blockchainjs
A pure JavaScript library for node.js and browsers for easy data exchange between wallets and bitcoin network.
What is include blockchainjs?
blockchainjs have two abstraction level: Connector and Blockchain
Connector implements a common interface for remote service. For now available only one provider: chromanode.
Blockchain implements a common interface between connector and your wallet. You can use Naive (trust all data from remove service) or Verified (SPV implementation).
In addition to Verified blockchainjs has Storage interface for store headers. Memory and LocalStorage available for now.
API
Examples
Show UTXO on address touched
var blockchainjs = var connector = networkName: 'testnet'var address = 'mp8XoMWnJzQwovninMdChQutPuhyHokJNc' { connector } connectorconnectorconnector
Show last header upon completion of sync process
var blockchainjs = var connector = networkName: 'testnet'connector var storage = networkName: 'testnet' compactMode: true var blockchain = connector storage: storage networkName: 'testnet' testnet: true compactMode: true chunkHashes: blockchainjschunkHashestestnet blockchain
License
Code released under the MIT license.
Copyright 2015 Chromaway AB
Todo
- migrate to bitcore (in tests)
- add karma
- add https://github.com/visionmedia/debug