Bitcoin Forum
May 24, 2024, 12:29:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: check balance of address without trusting block explorer  (Read 998 times)
jabetizo (OP)
Full Member
***
Offline Offline

Activity: 125
Merit: 101


View Profile WWW
December 26, 2012, 06:03:06 PM
 #1

How can one check the "balance" of an address without using a block explorer site - for example to verify if a paper wallet was funded successfully?

Stephen Gornick
Legendary
*
Offline Offline

Activity: 2506
Merit: 1010


View Profile
December 26, 2012, 07:34:31 PM
Last edit: December 26, 2012, 09:32:08 PM by Stephen Gornick
 #2

How can one check the "balance" of an address without using a block explorer site - for example to verify if a paper wallet was funded successfully?

If the address (and private key) are in the wallet, there are RPC calls to provide this info.  For a paper wallet, you wouldn't have the address (and private key) in your wallet, so those calls won't help you in that instance.

The Bitcoin-Qt client (v0.7 and above) provides Raw Transactions (getrawtransaction, decoderawtransaction) that will give you this information but you need to know the transaction hash.
 - http://en.bitcoin.it/wiki/Raw_Transactions

You can build a database with all the transactions by processing the transactions from the blocks of the longest chain  (getblockhash and getblock) plus the valid but unconfirmed transactions in the memory pool (listsinceblock), but that is not a trivial task. [Edit: There is also the monitortx patch that will help with this.]

There are other tools that can help as well.  Armory provides easy access to blockchain data, see the "Extras" folder.   Also libBitcoin might provide this to you as might ABE blockchain explorer source.    Or now there is libccoin even that might be useful:
 - http://bitcointalk.org/index.php?topic=128055.0

If you are willing to use the Block Explorer to obtain the transaction hashes but then use your local bitcoind to obtain the amounts that might be a hybrid solution that works for you -- depending on the reasons you didn't want to use a hosted blockchain service.

There are other services providing this information as well:
 - http://btcbalance.net
 - http://bitcoinmonitor.net
 - http://blockchain.info/address-balance-sheet

Unichange.me

            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █
            █


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!