1
I have used bitcoin-core package in node js to get the information about the block detail using rpc command.
For example:
var Client = require('bitcoin-core');
const client = new Client({ headers:'false', host:'127.0.0.1', network:'testnet', password:'xxxx',port:'18332', ssl: {
enabled: false,
strict: false
}, timeout:'3000', username:'xxxx' });
client.getBlockchainInformation().then((help) => console.log(help));
It throws below mentioned error:
unhandled rejection rpcerror: not found
Any solution for this.
Thanks in advance.
That code is trying to connect to a bitcoin testnet node RPC running locally (
127.0.0.1port18332). Do you have one running locally? – JBaczuk – 2018-09-13T14:49:26.767Yes I have one running locally. – Sarath Kumar – 2018-09-14T02:27:34.190