From 321d2ff0ab9d704edd504cad6e1ba57b620718fa Mon Sep 17 00:00:00 2001 From: Shannon Appelcline Date: Thu, 15 Jun 2017 11:51:41 -0700 Subject: [PATCH] Create 12_3_Accessing_Bitcoind_with_Node.md --- 12_3_Accessing_Bitcoind_with_Node.md | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/12_3_Accessing_Bitcoind_with_Node.md b/12_3_Accessing_Bitcoind_with_Node.md index c815173..8ec961e 100644 --- a/12_3_Accessing_Bitcoind_with_Node.md +++ b/12_3_Accessing_Bitcoind_with_Node.md @@ -27,3 +27,38 @@ $ npm install ### Testing BCRPC +To test the BCRPC package, you must first set environmental variables for your rpcuser and rpcpassword. As noted in [§12.1: Accessing Bitcoind with Curl](12_1_Accessing_Bitcoind_with_Curl.md), these come from `~/.bitcoin/bitcoin.conf`. +``` +$ export BITCOIND_USER=bitcoinrpc +$ export BITCOIND_PASS=d8340efbcd34e312044c8431c59c792c +``` +> **WARNING:** Obviously, you'd never put set your password in an environmental variable in a production environment. + +You can now verify everything is working correctly: +``` +$ npm test + +> bcrpc@0.0.5 test /home/user1/bcrpc-master +> mocha tests.js + + BitcoinD + ✓ is running + + bcrpc + ✓ can get info + + 2 passing (36ms) +``` +Congratulations, you now have a Bitcoin-ready RPC wrapper for node.js. + +## Manipulate Your Wallet + +### Look Up Addresses + +### Look Up Funds + +### Create an Address + +## Create a Transaction + +## Summary: Accessing Bitcoind with Node