node-dcrcoin
node-dcrcoin is a simple wrapper for the dcrd and dcrwallet client's JSON-RPC API.
Install
npm install node-dcr-rpc
Examples
Create DCRD client
var dcrd = host: '127.0.0.1' port: 19109 // testnet default port user: '' pass: '' ssl: true //,sslCa: fs.readFileSync('~/.dcrd/rpc.cert');
Get Info with Method
dcrd;
Get Info with Command
dcrd;
Create Wallet client
var dcrwallet = host: '127.0.0.1' port: 19110 // testnet walltet default port user: '' pass: '' ssl: true //,sslCa: fs.readFileSync('~/.dcrd/rpc.cert');
Generate New Account and Address
var accountName = "bk_dcr_wallet"dcrwallet;
List All Accounts
dcrwallet;
Using DCRD and DCRWALLET in same Client
var dcrdAndDcrWallet = host: '127.0.0.1' dcrdPort: 19109 // dcrd port dcrWalletPort: 19110 // dcrwallet port user: 'brunokenj' pass: 'J6BINJBX5pCnrr1P5RO87na3DNLPsvv/' ssl: true //,sslCa: fs.readFileSync('~/.dcrd/rpc.cert'); dcrdAndDcrWallet; dcrdAndDcrWalletwallet;
Forked
forked from brunokenj/node-ethcoin