{"_id":"bitcoind.js","_rev":"27-68950393fd3a498916152785d947b968","name":"bitcoind.js","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.0":{"name":"bitcoind.js","version":"0.0.0","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.0","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"03a3d0e180bbdecb962c9c675f4e6b316d4ebb21","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.0.tgz","integrity":"sha512-uJNR7v0ptFDgJ0K1XaX0p51/GzTj5S9sxBlvYohsm63D7Wn0rMFJHt9dxAYkcEyX3nCBGLWFIih4JLDM450C7w==","signatures":[{"sig":"MEYCIQDwH6oV6qMmJduywT2triMw7g9Je70THBB2CpKoxGJr6QIhANU4zeywiLBuqMCO61RIb+/LRNF/c4HdlJRzuonHABJY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"03a3d0e180bbdecb962c9c675f4e6b316d4ebb21","gitHead":"f05bd154d6b06a9bd4c3621f5d0ea3eb49d3ac1d","gypfile":true,"scripts":{"test":"NODE_ENV=test mocha -R spec","install":"node-gyp rebuild"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.4","description":"Node binding for bitcoind","_nodeVersion":"0.10.32","dependencies":{"nan":"1.3.0","bn.js":"^0.10.0"},"devDependencies":{"mocha":"~1.16.2","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.1":{"name":"bitcoind.js","version":"0.0.1","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.1","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"c7c78116ab4aa2b56f2938ed05c0d2cba382d9cc","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.1.tgz","integrity":"sha512-1L3nkWD73rBHt29SRRvcOQD6++/cNVfuUdzlV3AWbvhP+u4/oorx6S/QuMjXJhOBUjR/iV/GLwGt501CNx92Hg==","signatures":[{"sig":"MEYCIQCXB4jhKYRqC+71f5lT63LvJuWpo01Mkl//2KGwUFkJZAIhAKejzYIaY/IJnzGB2M/OyJV0Jk6XhKVTLigoikivlIro","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"c7c78116ab4aa2b56f2938ed05c0d2cba382d9cc","gitHead":"f561332bb52081e8d611996bc9c51f9ad3ad9c77","scripts":{"start":"node example","install":"./build-libbitcoind.sh remote"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.11","description":"Node binding for bitcoind","_nodeVersion":"0.10.33","dependencies":{"nan":"1.3.0","tiny":"0.0.10","mkdirp":"0.5.0"},"devDependencies":{"mocha":"~1.16.2","rimraf":"2.2.8","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"bitcoind.js","version":"0.0.2","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.2","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"4e1e02d41e43269731dff0c0c6c2eca7e0543136","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.2.tgz","integrity":"sha512-R7FDYj3mInhLLgD0q99N/A8C7HBMQ/haTWU6vSayWkIfSubDOoUUe02LVK4g0L8tP3866bzk7MgIJeSET3Vzdg==","signatures":[{"sig":"MEUCIQCVeQSw/oUj5FDVGeaOBQHGLLQrsfDaCJVWUcTwRTIG1gIgHnCA+cotadl66kLUr4emXd7DAfhEsze7H4+eBKeyLvY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"4e1e02d41e43269731dff0c0c6c2eca7e0543136","gitHead":"4ff5f8fd6a34ea692f7b193129884ca28affa7ae","scripts":{"start":"node example","preinstall":"./build-libbitcoind.sh remote"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.11","description":"Node binding for bitcoind","_nodeVersion":"0.10.33","dependencies":{"nan":"1.3.0","tiny":"0.0.10","mkdirp":"0.5.0"},"devDependencies":{"mocha":"~1.16.2","rimraf":"2.2.8","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.3":{"name":"bitcoind.js","version":"0.0.3","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.3","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"34da2162fb8469e7b5e4db465eda4da26ad29120","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.3.tgz","integrity":"sha512-4aZklbZ67IviQaVs93OiysJCcR+3OMuTCJHKiFsB6nTrMV9OTUdvxCXZ7sKCrCVmFZJw5kkSEhXRgPxH8aFHjg==","signatures":[{"sig":"MEYCIQDlz7mXejyKDZ7JAyNBbfgP15zMETj8Qu4UjmqFYOmEVAIhAKQNlaJ9+svEnVM7PjpdPYUiIvfKvpOItIDQs76T0DQS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"34da2162fb8469e7b5e4db465eda4da26ad29120","gitHead":"fe1739c809120f20b7b81c65bff0b2e976a4bdfa","scripts":{"start":"node example","preinstall":"./build-libbitcoind.sh remote"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.11","description":"Node binding for bitcoind","_nodeVersion":"0.10.33","dependencies":{"nan":"1.3.0","tiny":"0.0.10","mkdirp":"0.5.0"},"devDependencies":{"mocha":"~1.16.2","rimraf":"2.2.8","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.4":{"name":"bitcoind.js","version":"0.0.4","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.4","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"acfcaa0fcec739c096fd60630266f3d692226fd2","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.4.tgz","integrity":"sha512-o4TX/dt53qR/00lhPYbVt3ub3KQVWbLGx89kAJ5bFUhbottlt7zlcurmQWi2QvEHCnuTnYwLiiiy+yM4+spEsw==","signatures":[{"sig":"MEUCIDTeecZVyoRQx0Zc6FgNV68c/NZRXUngRyFi+ZRA0lOLAiEA0+/svqAIxjUhDGDK0Fq2rrF1uAss/BGHR+g9g69JuBo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"acfcaa0fcec739c096fd60630266f3d692226fd2","gitHead":"49b41f81fd6e273c25e90c0e9dd20bcce933b276","scripts":{"start":"node example","preinstall":"./build-libbitcoind.sh remote"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.11","description":"Node binding for bitcoind","_nodeVersion":"0.10.33","dependencies":{"nan":"1.3.0","tiny":"0.0.10","mkdirp":"0.5.0"},"devDependencies":{"mocha":"~1.16.2","rimraf":"2.2.8","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.5":{"name":"bitcoind.js","version":"0.0.5","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.5","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"94949a482075a8c911445e6ed4d2c444b936ba0f","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.5.tgz","integrity":"sha512-fWixRy7+wJUIkKvaS8R5/uVR7A1sEa1TBnh3MSYANBggGodDyLN8RHhAEuyDGijvYEKvXPf+obV9mAw12k9UCw==","signatures":[{"sig":"MEQCIHLvphcp2nRHHpx5fWvJWUFnRr5YUiZrWNtQ6t1tojwhAiB1TXEtVhop6up5y+3WyXhdprM6mGuQxSX9okvYb5fhGw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"94949a482075a8c911445e6ed4d2c444b936ba0f","gitHead":"b740185c69488306c1b7a74dfb6c1274824db706","scripts":{"start":"node example","preinstall":"./build-libbitcoind.sh remote"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.11","description":"Node binding for bitcoind","_nodeVersion":"0.10.33","dependencies":{"nan":"1.3.0","tiny":"0.0.10","mkdirp":"0.5.0"},"devDependencies":{"mocha":"~1.16.2","rimraf":"2.2.8","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.6":{"name":"bitcoind.js","version":"0.0.6","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.6","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"be065acf38236eaa9d9fc5f252de46964477747d","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.6.tgz","integrity":"sha512-bn2P+UbxRuIl1+it+lHFXsN+kVHdO0HHxC/00HBZnRR5PseiO5gfKkyWN4Vhh9n4UMRxhkv9LLye+NpC4qx/+A==","signatures":[{"sig":"MEUCIGjN91d+FMrXia9mcHKT6TQ5HZUnVti6Jrzj58H81CRLAiEAnSwf54z5VkYRVLoFoNKyNSZUU8+4vaaOJHoiDLuRwdg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"be065acf38236eaa9d9fc5f252de46964477747d","gitHead":"c430c2cecea2f9f0b907b9857d8ae9c93076b1a0","scripts":{"start":"node example","preinstall":"./bin/build-libbitcoind remote"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.12","description":"Node binding for bitcoind","_nodeVersion":"0.10.33","dependencies":{"nan":"1.3.0","tiny":"0.0.10","mkdirp":"0.5.0"},"devDependencies":{"mocha":"~1.16.2","rimraf":"2.2.8","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.7":{"name":"bitcoind.js","version":"0.0.7","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.7","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"0d18f2159616ece0f501969cd5d96a0b70369449","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.7.tgz","integrity":"sha512-/JnHj92rod14JAZCpcmYyQ+fdfyv/b1Cvd3YJVxVUgWl3ZXbLILIcEtA/Ed5vEyoUvMELP1qn8oSFGnuHr/Lkg==","signatures":[{"sig":"MEUCIGyiIaiyiNCelxdVSLdnj7oRlrFfY+HbhZYYGh/hCXAWAiEAtbsRUIazAiiBoEo2U3+SDlpae6gYgRmscH2aFjsK9KA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"0d18f2159616ece0f501969cd5d96a0b70369449","gitHead":"b8ab3463493603002e58129af1730d1e988a67de","scripts":{"start":"node example","preinstall":"./bin/build-libbitcoind remote"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.12","description":"Node binding for bitcoind","_nodeVersion":"0.10.33","dependencies":{"nan":"1.3.0","tiny":"0.0.10","mkdirp":"0.5.0"},"devDependencies":{"mocha":"~1.16.2","rimraf":"2.2.8","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.8":{"name":"bitcoind.js","version":"0.0.8","author":{"name":"Christopher Jeffrey"},"_id":"bitcoind.js@0.0.8","maintainers":[{"name":"chjj","email":"chjjeffrey@gmail.com"}],"homepage":"https://github.com/chjj/bitcoind.js","bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"dist":{"shasum":"e898cfd0f169f46fbde6991cde59477d29ba4956","tarball":"https://registry.npmjs.org/bitcoind.js/-/bitcoind.js-0.0.8.tgz","integrity":"sha512-2pymg/LMCOeD0w4ro5iPYlnkFAvKejVJUtBIexDXX0v/huOtDD2ZaQAK3BcreqH/ydVMHr/VtkPU0VaRdzTDfw==","signatures":[{"sig":"MEUCIFWQOg7M7AamipFwOOjlVDtpimu1OMREYVGbTWTbyvWcAiEA9uWZBKq16C3H3jDOhK8cyzPuyO9B3dj5B0r2f8M8gY8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./index.js","tags":["bitcoin","bitcoind"],"_from":".","_shasum":"e898cfd0f169f46fbde6991cde59477d29ba4956","gitHead":"84a20b44183b27e57030efbe77b4b46fc17c36bc","scripts":{"start":"node example","preinstall":"./bin/build-libbitcoind remote"},"_npmUser":{"name":"chjj","email":"chjjeffrey@gmail.com"},"repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"_npmVersion":"2.1.12","description":"Node binding for bitcoind","_nodeVersion":"0.10.33","dependencies":{"nan":"1.3.0","tiny":"0.0.10","mkdirp":"0.5.0"},"devDependencies":{"mocha":"~1.16.2","rimraf":"2.2.8","optimist":"0.6.0"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2014-10-13T23:42:47.963Z","modified":"2025-06-10T03:58:48.982Z","0.0.0":"2014-10-13T23:42:47.963Z","0.0.1":"2014-12-07T09:47:09.944Z","0.0.2":"2014-12-07T09:49:18.806Z","0.0.3":"2014-12-07T10:05:17.572Z","0.0.4":"2014-12-07T10:08:53.840Z","0.0.5":"2014-12-07T10:10:34.093Z","0.0.6":"2014-12-09T21:34:56.812Z","0.0.7":"2014-12-09T23:08:46.789Z","0.0.8":"2014-12-09T23:17:56.225Z"},"bugs":{"url":"https://github.com/chjj/bitcoind.js/issues"},"author":{"name":"Christopher Jeffrey"},"homepage":"https://github.com/chjj/bitcoind.js","repository":{"url":"git://github.com/chjj/bitcoind.js.git","type":"git"},"description":"Node binding for bitcoind","maintainers":[{"name":"braydonf","email":"braydon@bitpay.com"},{"name":"chjj","email":"chjjeffrey@gmail.com"},{"name":"kleetus","email":"laconia@gmail.com"}],"readme":"# bitcoind.js\n\n__bitcoind.js__ as a node.js module which dynamically loads a node.js C++\nmodules which links to libbitcoind.so (bitcoind compiled as a shared library),\nmaking all useful bitcoind functions asynchronous.\n\n## Building\n\n### libbitcoind.so\n\n#### Compiling bitcoind as a library\n\n##### Dependencies\n\n- Boost\n  - Bost Header Files (`/usr/include/boost`)\n  - NOTE: These are now included in the repo if they're not present.\n\n- Berkeley DB\n\n- LevelDB Header Files (included in bitcoin source repo, leveldb itself\n  unnecessary, libbitcoind.so is already linked to them)\n  - NOTE: These also are now included in the repo if they're not present.\n\n- Protobuf\n\n- secp256k1\n\n##### Building\n\n``` bash\n$ cd ~/node_modules/bitcoind.js\n$ ./bin/build-libbitcoind remote\n```\n\nNOTE: This script will run automatically on an `npm install`, along with the\ncompilation below.\n\n`remote` will clone the latest bitcoin upstream, apply a patch to it, compile\nlibbitcoind.so, and place it in the appropriate directory. The first argument\ncan also be a bitcoin repo directory you already have on your disk, otherwise\nit will check for ~/bitcoin by default.\n\nNOTE: libbitcoind.so is currently unsupported on OSX due to OSX's mess of\nheader files and libraries. Special magic is required to make this work that\nhas not been implemented yet. This will only compile on a real unix (linux is\nrecommended).\n\n###### In the build-libbitcoind.sh script:\n\n`--enable-daemonlib` will compile all object files with `-fPIC` (Position\nIndependent Code - needed to create a shared object).\n\n`make` will then compile `./src/libbitcoind.so` (with `-shared -fPIC`), linking\nto all the freshly compiled PIC object files. This will completely ignore\ncompiling tests and the QT object files.\n\nWithout `--enable-daemonlib`, the Makefile with compile bitcoind with -fPIE\n(Position Independent for Executable), this allows compiling of bitcoind.\n\n### bitcoind.js\n\n``` bash\n$ cd ~/node_modules/bitcoind.js\n$ BITCOIN_DIR=~/libbitcoind BOOST_INCLUDE=/usr/include/boost PYTHON=/usr/bin/python2.7 make\n```\n\n#### Running bitcoind.js\n\nYou can run bitcoind.js to start downloading the blockchain by doing:\n\n``` bash\n$ node example --on-block &\nbitcoind: status=\"start_node(): bitcoind opened.\"\n...\n[should see full javascript blocks here]\n```\n\nYou can also look at the blocks come in through the bitcoind log file:\n\n``` bash\n$ tail -f ~/.libbitcoind-example/debug.log\n```\n\n^C (SIGINT) will call `StartShutdown()` in bitcoind on the node thread pool.\n\n##### Example Usage\n\nbitcoind.js has direct access to the global wallet:\n\n``` js\nvar bitcoind = require('bitcoind.js')({\n  directory: '~/.libbitcoind-example',\n  testnet: false,\n  rpc: false\n});\n\nbitcoind.on('block', function(block) {\n  console.log('Found Block:');\n  console.log(block);\n});\n\nbitcoind.on('addr', function(addr) {\n  console.log('Found more peers to connect to:');\n  console.log(addr);\n});\n\nbitcoind.on('open', function() {\n  console.log('Your Wallet:');\n  console.log(bitcoind.wallet.getAccounts());\n});\n\nbitcoind.start();\n```\n\n``` bash\n$ node ./my-example.js\nbitcoind.js: status=\"start_node(): bitcoind opened.\"\nYour Wallet:\n{ '':\n   { balance: 0,\n     addresses:\n      [ { address: '16PvEk4NggaCyfR2keZaP9nPufJvDb2ATZ',\n          privkeycompressed: true,\n          privkey: 'L47MC7gtB5UdWYsmxT6czzGophFm6Zj99PYVQWDNkJG6Mf12GGyi',\n          pubkeycompressed: true,\n          pubkey: '02bf636e7a3ad48ea2cf0c8dbdf992792e617a4f92f2e161f20f3c038883647f0d' } ] } }\n^C\nbitcoind.js: stop_node(): bitcoind shutdown.\nbitcoind.js: shutting down...\nbitcoind.js: shut down.\n```\n\n\n## Documentation\n\n**bitcoind.js** is a node.js module which links to libbitcoind.so (bitcoind\ncomplied as a shared library).\n\n### Javascript API\n\n#### Bitcoin Object/Class\n\nBitcoind in javascript. Right now, only one object can be instantiated.\n\n##### `Bitcoin::start([options], [callback])`\n\nStart the javascript bitcoin node.\n\n##### `Bitcoin::getBlock(blockHash, callback)`\n\nGet any block asynchronously by reading it from disk.\n\n##### `Bitcoin::getTransaction(txid, blockhash, callback)`\n\nGet any tx asynchronously by reading it from disk.\n\n##### `Bitcoin::log(), Bitcoin::info()`\n\nLog to standard output.\n\n##### `Bitcoin::error()`\n\nLog to stderr.\n\n##### `Bitcoin::stop, Bitcoin::close(callback)`\n\nStop the javascript bitcoin node safely. This will be done automatically on\n`process.exit` also. It also takes the bitcoin node off the libuv event loop.\nIf the bitcoin object is the only thing on the event loop. Node will simply\nclose.\n\n\n##### Bitcoin Object Events\n\nNote: Any event that requires polling will only start the polling once the\nevent is bound.\n\n###### `open(bitcoind)`\n\nbitcoind has opened and loaded the blockchain.\n\n###### `close(bitcoind)`\n\nbitcoind has shutdown.\n\n###### `block(block)`\n\nA block has been received an accepted by bitcoind.\n\n###### `tx(tx)`\n\nA confirmed or unconfirmed transaction has been received by bitcoind.\n\n###### `mptx(tx)`\n\nA tx from the mempool has been addded. Most likely not included in a block yet.\n\n\n#### Block Object\n\nA block (CBlock) represented in javascript. It is a full block containing all\ntransactions in `block.tx`.\n\n##### `Block::_blockFlag`\n\nInternal non-enumerable property to check whether the object is a block.\n\n##### `Block.isBlock(block)`\n\nStatic method to check whether object is a block.\n\n##### `Block.fromHex(hex)`\n\nCreate a js block from a hex string.\n\n##### `Block::getHash(enc)`\n\nGet the block's hash. Return the correct encoding. `hex` is most likely what\nyou want. If no encoding is provided, a buffer will be returned.\n\n##### `Block::verify()`\n\nVerify whether the block is valid.\n\n##### `Block::toHex()`\n\nConvert the block to a hex string.\n\n##### `Block.toHex(block)`\n\nStatic method to convert any block-like object to a hex string.\n\n##### `Block::toBinary()`\n\nConvert the block to a binary buffer.\n\n##### `Block.toBinary(block)`\n\nStatic method to convert a block-like object to a hex string.\n\n\n#### Transaction Object/Class\n\n##### `Transaction::_txFlag`\n\nInternal non-enumerable property to check whether the object is a transaction.\n\n##### `Transaction.isTransaction(tx), Transaction.isTx(tx)`\n\nStatic method to check whether object is a transaction.\n\n##### `Transaction.fromHex(hex)`\n\nCreate a js transaction from a hex string.\n\n##### `Transaction::verify()`\n\nVerify whether the transaction is valid.\n\n##### `Transaction::sign(), Transaction::fill(options)`\n\nFill the raw transaction with available unspent outputs and sign them.\n\n##### `Transaction.sign(tx, options), Transaction.fill(tx, options)`\n\nStatic method to fill a tx-like object.\n\n##### `Transaction::getHash(enc)`\n\nGet the hash of a Transaction object. Encoding is usually `hex`. If no encoding\nis provided, a Buffer will be returned.\n\n##### `Transaction::isCoinbase()`\n\nCheck whether the Transaction is a coinbase tx.\n\n##### `Transaction::toHex()`\n\nConvert the transaction to a hex string.\n\n##### `Transaction.toHex(tx)`\n\nStatic method to convert a transaction-like object to a hex string.\n\n##### `Transaction::toBinary()`\n\nConvert the transaction to a binary buffer.\n\n##### `Transaction.toBinary(tx)`\n\nStatic method to convert a transaction-like object to a binary buffer.\n\n##### `Transaction::broadcast(options, callback)`\n\nBroadcast a raw transaction that has not been included in a block yet. This can\nbe your own transaction or a transaction relayed to you.\n\n##### `Transaction.broadcast(tx, options, callback)`\n\nStatic method to broadcast a transaction.\n\n\n#### Wallet Object/Class (Singleton)\n\n##### `Wallet::createAddress(options)`\n\nCreate a new address for the global wallet.\n\n##### `Wallet::getAccountAddress(options)`\n\nGet the main address associated with the provided account.\n\n##### `Wallet::setAccount(options)`\n\nAssociate account name with address.\n\n##### `Wallet::getAccount(options)`\n\nGet account name by address.\n\n##### `Wallet::sendTo(options)`\n\nAutomatically create a transaction and fill/sign it with any available unspent\noutputs/inputs and broadcast it.\n\n##### `Wallet::signMessage(options)`\n\nSign any piece of text using the private key associated with the provided\naddress.\n\n##### `Wallet::verifyMessage(options)`\n\nVerify any signed piece of text using the public key associated with signing\nprivate key.\n\n##### `Wallet::createMultiSigAddress(options)`\n\nCreate a multi-signature for the global wallet.\n\n##### `Wallet::getBalance(options)`\n\nGet the total balance of the global wallet in satoshis.\n\n##### `Wallet::getUnconfirmedBalance(options)`\n\nGet the total unconfirmed balance of the global wallet in satoshis\n\n##### `Wallet::sendFrom(options)`\n\nAutomatically create a transaction and fill/sign it with any available unspent\noutputs/inputs and broadcast it. This method will also select unspent outputs\nfrom the provided account name to fill the transaction.\n\n##### `Wallet::listTransactions(options)`\n\nList transactions associated with the global wallet - NOT YET IMPLEMENTED.\n\n##### `Wallet::listAccounts(options)`\n\nReturn a javascript object containing account names, addresses, public keys,\nprivate keys, balances, and whether the keys are in compressed format.\n\n##### `Wallet::getTransaction(options)`\n\nReturn any transaction associated with the global wallet - NOT YET IMPLEMENTED.\n\n##### `Wallet::backup(options)`\n\nBackup wallet.dat to provided path.\n\n##### `Wallet::decrypt(options), Wallet::passphrase(options)`\n\nTemporarily decrypt the wallet using the provided passphrase.\n\n##### `Wallet::passphraseChange(options)`\n\nChange passphrase for the global encrypted wallet.\n\n##### `Wallet::forgetPassphrase(options), Wallet::lock(options)`\n\nForget the current passphrase so the wallet is once again encrypted and\nunusuable for any meaningful purpose.\n\n##### `Wallet::encrypt(options)`\n\nEncrypt the global wallet with the provided passphrase.\n\n##### `Wallet::setTxFee(options)`\n\nThe the default transaction fee for the global wallet in satoshis.\n\n##### `Wallet::importKey(options)`\n\nImport a private key to global wallet in the standard bitcoind compressed\nformat.\n\n\n#### Utils Object (Singleton)\n\n##### `utils.forEach(obj, iter, done)`\n\nAsynchronous parallel forEach function.\n\n##### `utils.NOOP()`\n\nA simple NOP function.\n\n\n#### Exposed Objects\n\nNOTE: All exposed objects will also be exposed on any instantiated `Bitcoin` object.\n\n##### `bitcoin.Bitcoin, bitcoin.bitcoin, bitcoin.bitcoind`\n\nThe bitcoin object.\n\n##### `bitcoin.native, bitcoin.bitcoindjs`\n\nThe native C++ bitcoindjs object.\n\n##### `bitcoin.Block, bitcoin.block`\n\nThe bitcoind.js Block object.\n\n##### `bitcoin.Transaction, bitcoin.transaction, bitcoin.tx`\n\nThe bitcoind.js Transaction object.\n\n##### `bitcoin.Wallet, bitcoin.wallet`\n\nThe bitcoind.js Wallet singleton.\n\n##### `bitcoin.utils`\n\nThe bitcoind.js utils object.\n\n\n## Contribution and License Agreement\n\nIf you contribute code to this project, you are implicitly allowing your code\nto be distributed under the MIT license. You are also implicitly verifying that\nall code is your original work. `</legalese>`\n\n\n## License\n\n- bitcoind.js: Copyright (c) 2014, BitPay (MIT License).\n- bitcoin: Copyright (c) 2009-2013 Bitcoin Core Developers (MIT License)\n- bcoin (some code borrowed temporarily): Copyright Fedor Indutny, 2014.\n","readmeFilename":"README.md","users":{"hengkiardo":true}}