<reponame>manyunya/Learning-Bitcoin-from-the-Command-Line-Google-Colab<filename>src/18_3_walletinfo.js<gh_stars>0const RpcAgent = require('bcrpc');
agent = new RpcAgent({port: 18332, user: 'StandUp', pass: '74t3tndxag9o7h0890bnpfzh4olk2h9x'});

agent.getReceivedByAddress('949d1u22cbffbrarjh182eig55721odj', function (err, addressInfo) {
  if (err)
    throw Error(JSON.stringify(err));
  console.log(addressInfo.result);
});

agent.getWalletInfo(function (err, walletInfo) {
  if (err)
    throw Error(JSON.stringify(err));
  console.log(walletInfo.result);
});
