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