Update documentation for lib/daemon
This commit is contained in:
parent
412078e1a0
commit
1f42d24e42
13
README.md
13
README.md
@ -362,10 +362,15 @@ Note that if you already have a bitcore-node database, and you want to query dat
|
||||
|
||||
- `daemon.start([options], [callback])` - Start the JavaScript Bitcoin node.
|
||||
- `daemon.getBlock(blockHash|blockHeight, callback)` - Get any block asynchronously by block hash or height as a node buffer.
|
||||
- `daemon.getTransaction(txid, blockhash, callback)` - Get any tx asynchronously by reading it from disk.
|
||||
- `daemon.log(message), daemon.info(message)` - Log to standard output.
|
||||
- `daemon.error(message)` - Log to stderr.
|
||||
- `daemon.close([callback])` - Stop the JavaScript bitcoin node safely, the callback will be called when bitcoind is closed. This will also be done automatically on `process.exit`. It also takes the bitcoind node off the libuv event loop. If the daemon object is the only thing on the event loop. Node will simply close.
|
||||
- `daemon.isSpent(txid, outputIndex)` - Returns a boolean if a txid and outputIndex is already spent.
|
||||
- `daemon.getBlockIndex(blockHash)` - Will return the block chain work and previous hash.
|
||||
- `daemon.estimateFee(blocks)` - Estimates the fees required to have a transaction included in the number of blocks specified as the first argument.
|
||||
- `daemon.sendTransaction(transaction, allowAbsurdFees)` - Will attempt to add a transaction to the mempool and broadcast to peers.
|
||||
- `daemon.getTransaction(txid, queryMempool, callback)` - Get any tx asynchronously by reading it from disk, with an argument to optionally not include the mempool.
|
||||
- `daemon.getTransactionWithBlockInfo(txid, queryMempool, callback)` - Similar to getTransaction but will also include the block timestamp and height.
|
||||
- `daemon.getMempoolOutputs(address)` - Will return an array of outputs that match an address from the mempool.
|
||||
- `daemon.getInfo()` - Basic information about the chain including total number of blocks.
|
||||
- `daemon.stop([callback])` - Stop the JavaScript bitcoin node safely, the callback will be called when bitcoind is closed. This will also be done automatically on `process.exit`. It also takes the bitcoind node off the libuv event loop. If the daemon object is the only thing on the event loop. Node will simply close.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user