You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
551 B
23 lines
551 B
|
|
var util = require('util');
|
|
|
|
// Replace path '..' to 'bitcore' if you are using this example
|
|
// in a different project
|
|
var RpcClient = require('../RpcClient').class();
|
|
var hash = process.argv[2]
|
|
|| '0000000000b6288775bbd326bedf324ca8717a15191da58391535408205aada4';
|
|
|
|
var config = {
|
|
protocol: 'http',
|
|
user: 'user',
|
|
pass: 'pass',
|
|
host: '127.0.0.1',
|
|
port: '18332',
|
|
};
|
|
|
|
|
|
var rpc = new RpcClient(config);
|
|
rpc.getBlock( hash, function(err, ret) {
|
|
console.log(err);
|
|
console.log(util.inspect(ret, { depth: 10} ));
|
|
});
|
|
|