cb-streams
stream-based interface to common-blockchain API
this module is used by Tradle
Usage
var through2 = var cbstreams = var Blockchain = var blockchain = 'testnet' // 1. Specify which blocks to read // block stream var blockstream = cbstreamsstream for var i = 0; i < 10; i++ blockstream // push block numbers into the stream // tx stream var txstream = cbstreamsstream for var i = 0; i < 10; i++ txstream // push block numbers into the stream // similarly you have:// // cbstreams.stream.dataTxs which will return only txs with OP_RETURN data// cbstreams.stream.data which will return wrapped OP_RETURN data: // {// data: data,// tx: tx,// height: height // block height// } // 2. Specify which "addresses" to watch var stream = cbstreamsstream