Skip to content

an easier way to consume bitcoin blocks and transactions

License

Notifications You must be signed in to change notification settings

tradle/tx-walker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Usage

var Walker = require('tx-walker')
var walker = new Walker({
  networkName: 'bitcoin',   // optional, defaults to 'bitcoin'
  batchSize: 20,            // optional, defaults to 20
  throttle: 2000            // optional, defaults to 2000
})

var numBlocks = 0
walker.start(100000) // block height
walker.on('block', function(block) {
  // i want to do bad things to block
});

walker.on('tx', function(tx) {
  // i want to do bad things to tx
});

// emitted after the last 'tx' event of a block, unless the walker is stopped in the middle of the block
walker.on('blockend', function() {
  if (++numBlocks === 10) walker.stop()
})

About

an easier way to consume bitcoin blocks and transactions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published