0

I’m currently having a hard time figuring how to get to check users wallet addresses and get the balances ie if a user wants to send out 3btc and they have like 10 addresses with different amounts inside them, how do I subtract the amount from each address to get the 3btc the user wants to send out?

0

You have to scan all blockchain (or utxo set) and summarize all unspent outputs for each address.

0

Go to the RPC and do 'listunspent', it will show you all amounts in a core wallet that are available to spend.

If you for example labelled an address, you can also use 'listaccounts' to see what is available in each one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.