great:)
can i some how check the balance of the Public or Private Keys through RPC or CLI cos I did?
the method "listunspent" returns an array of unspent outputs, for each output the txid, vout,
address,..,
amount,... will be returned. It's up to you to create a sum of all amounts for each address. You'll need the txid and vout in order to create a raw transaction btw...
There's also the method "getreceivedbyaddress"
The big difference between the two is that the first method (using listunspent) will return a lot of information you'll need when creating a new transaction (tx, vout, number of unspent outputs) but you'll have to calculate the sum yourself (but, in all fairness, if you don't know how to do this, you shouldn't be working on a project to begin with
), while on the other hand getreceivedbyaddress will give you a "simple" result... Just a value indicating the total amount in btc that was received by the address you queryd