tendermint
A JS RPC client for Tendermint nodes.
usage
First, make sure you've set up a tendermint node and ABCI application
then:
npm install tendermint
let Tendermint = require('tendermint')
const NODE_URI = 'ws://localhost:46657'
let client = Tendermint(NODE_URI)
client.subscribe({ event: 'NewBlock' }, (err, event) => {
console.log(event)
})
the following methods are available on the client
object, each accepting a nodeback as the last argument:
- subscribe
- unsubscribe
- status
- netInfo
- dialSeeds
- blockchain
- genesis
- block
- validators
- dumpConsensusState
- broadcastTxCommit
- broadcastTxSync
- broadcastTxSync
- unconfirmedTxs
- numUnconfirmedTxs
- abciQuery
- abciInfo
- abciProof
- unsafeFlushMempool
- unsafeSetConfig
- unsafeStartCpuProfiler
- unsafeStopCpuProfiler
- unsafeWriteHeapProfile
more detailed docs about arguments to each method coming soon.