From 1f42d24e4215ab2917114ef4110b5a2bf2c0a955 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Tue, 4 Aug 2015 14:06:13 -0400 Subject: [PATCH] Update documentation for lib/daemon --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bbb0a1ed..454d646d 100644 --- a/README.md +++ b/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