New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

basecoin

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basecoin - npm Package Compare versions

Comparing version 2.0.4 to 2.1.0

2

package.json
{
"name": "basecoin",
"version": "2.0.4",
"version": "2.1.0",
"description": "Client for Tendermint's basecoin cryptocurrency",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -47,3 +47,8 @@ 'use strict'

if (err) return this.emit('error', err)
this.emit('block', event[1].data[1].block)
let { block } = event[1].data[1]
block.data.txs = block.data.txs.map((txHex) => {
let txBytes = Buffer.from(txHex, 'hex')
return Tx.decode(txBytes)
})
this.emit('block', block)
})

@@ -50,0 +55,0 @@ }

@@ -94,2 +94,6 @@ 'use strict'

* _initialSync (next) {
this.onceReady(() => {
this.basecoin.on('block', this._processBlock.bind(this))
})
let txs = yield this.basecoin.fetchTxs(this.addresses, this.state.syncHeight, next)

@@ -139,2 +143,14 @@ this.state.syncHeight = txs.height

* _processBlock (block) {
let { header, data } = block
let time = new Date(header.time).getTime()
this.state.syncHeight = header.height
for (let tx of data.txs) {
yield this._processTx(tx, time)
}
yield this.save()
}
* _processTx (tx, time) {

@@ -141,0 +157,0 @@ let myInputs = tx.inputs.filter((input) =>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc