Initial code for getbalance rpc call