From b5dd11dc5c4bfcc2ecf3e6ac6ca734013d6c7a04 Mon Sep 17 00:00:00 2001 From: Shannon Appelcline Date: Wed, 2 Sep 2020 14:32:41 -1000 Subject: [PATCH] Create 17_3_walletinfo.js --- src/17_3_walletinfo.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/17_3_walletinfo.js diff --git a/src/17_3_walletinfo.js b/src/17_3_walletinfo.js new file mode 100644 index 0000000..bad5157 --- /dev/null +++ b/src/17_3_walletinfo.js @@ -0,0 +1,14 @@ +const RpcAgent = require('bcrpc'); +agent = new RpcAgent({port: 18332, user: 'StandUp', pass: '6305f1b2dbb3bc5a16cd0f4aac7e1eba'}); + +agent.getReceivedByAddress('tb1q04q2wzlhfqlrnz95ynfj7gp4t3yynrj0542smv', 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); +});