2014-12-07 00:21:24 -08:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
/**
|
|
|
|
* bitcoind.js example
|
|
|
|
*/
|
|
|
|
|
|
|
|
process.title = 'bitcoind.js';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* bitcoind
|
|
|
|
*/
|
2015-07-08 11:24:26 -07:00
|
|
|
var bitcoindjsConf = process.env('BITCOINDJS_DIR');
|
2014-12-07 00:21:24 -08:00
|
|
|
|
|
|
|
var bitcoind = require('../')({
|
|
|
|
directory: '~/.libbitcoind-example'
|
|
|
|
});
|
|
|
|
|
|
|
|
bitcoind.on('error', function(err) {
|
|
|
|
bitcoind.log('error="%s"', err.message);
|
|
|
|
});
|
|
|
|
|
|
|
|
bitcoind.on('open', function(status) {
|
|
|
|
bitcoind.log('status="%s"', status);
|
|
|
|
});
|