3

I've read that addresses alone are a "confusing" way to think about "where" bitcoins "are". Nonetheless I was formerly (2018) able to correlate what I got from bitcoin-cli commands with what I saw on blockchain explorers like https://www.blockchain.com/btc/address/

e.g. back in 2018 getaccountaddress would list 1 address, getaddressesbyaccount would list that plus a 2nd address, getaddressesbylabel would list those same two addresses, getwalletinfo would show a 0.0003 balance, and listaddressgroupings would also show that balance.

Now in 2020, that online explorer still shows that 0.0003 BTC balance, as it did in 2018, but due to deprecated cli commands, how can I confirm that with bitcoin-cli?

Background... I have been running a full bitcoin node on Ubuntu 16.04, kept updated, so currently Satoshi:0.18.0, and just to experiment and educate myself, I played around in 2018 with a bitcoin faucet until I managed to get 0.0003 BTC. Then I had the faucet site transfer it to one of the addresses in my bitcoin node's wallet.

For non-deprecated commands I've also found bitcoin-cli scantxoutset "start" "[\"addr()\"]" from this question https://bitcoin.stackexchange.com/questions/92342/how-to-quickly-get-the-balance-of-any-bitcoin-address-with-no-third-party-api however that too shows a zero balance for the two addresses that I can list from getaddressesbylabel.

2 Answers 2

3

I've read that addresses alone are a "confusing" way to think about "where" bitcoins "are".

Yep, addresses are only an encoded description of how the coins are locked, not when(*) they are.

e.g. back in 2018 getaccountaddress would list 1 address, getaddressesbyaccount would list that plus a 2nd address, getaddressesbylabel would list those same two addresses, getwalletinfo would show a 0.0003 balance, and listaddressgroupings would also show that balance.

The listreceivedbyaddress command is probably the most similar one : it lists coins locked to each address, if an address has been reused then you'll see multiple txids. The balance will be updated accordingly.
Given your first sentence, you might be interested in checking listunspent which will give you a less abstract representations of the coins you received.

Now in 2020, that online explorer still shows that 0.0003 BTC balance, as it did in 2018, but due to deprecated cli commands, how can I confirm that with bitcoin-cli?

So, you can use :

  • getbalance for your total balance
  • listreceivedbyaddress for the representation by address
  • listunspent for the representation by unspent transaction

Finally, check the Wallet section of bitcoin-cli help for more commands. For more details about a command, use bitcoin-cli help <command>.

(*) You used "where" in your question, but I think since we are talking about blocks, it makes more sense to reason chronologically.

1

You can use getReceivedByAddress

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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