@tradle/cb-blockr
common-blockchain-blockr
Last updated 3 years ago by tenaciousmv .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @tradle/cb-blockr 
SYNC missed versions from official npm registry.

cb-blockr

Build Status Version

Usage

var Blockchain = require('cb-blockr')
var blockchain = new Blockchain('testnet')

// helper function
function printTxInfo(err, transactions) {
  if(err) return console.error(err.stack)
  console.log(transactions)
}

// get transactions of an address
blockchain.addresses.transactions('mijTkG8nYpN57CZNPqmGUZamqyspoxtxd4', 0, printTxInfo)

// get transactions of multiple addresses
blockchain.addresses.transactions(['mijTkG8nYpN57CZNPqmGUZamqyspoxtxd4', 'mxzhFsPcF8ujAJ7CxLtvxLLoZqJtkGD5e4'], 0, printTxInfo)

// get transactions
blockchain.transactions.get([
  'd37d8d34bb0a5e309fc365da1d860d2fc13131f3d8955dcaec89bf502e58f23b',
  '43de8af6b31f996df522fc3489c4474fb918135a15ff4dbc04f551b4e79e2683'
], printTxInfo)

// get unspents
blockchain.addresses.unspents('mijTkG8nYpN57CZNPqmGUZamqyspoxtxd4', function(err, unspents) {
  console.log(unspents)
})

See also

Current Tags

  • 3.2.1                                ...           latest (3 years ago)

6 Versions

  • 3.2.1                                ...           3 years ago
  • 3.2.0                                ...           3 years ago
  • 3.1.4                                ...           4 years ago
  • 3.1.3                                ...           4 years ago
  • 3.1.2                                ...           4 years ago
  • 3.1.1                                ...           5 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (4)
Dev Dependencies (5)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |