Author

Topic: Best way to check the balance of an address without the private key (Read 9033 times)

newbie
Activity: 43
Merit: 0
I've made the coolest app at the moment to check your balances:

www.wonderwallets.com.ar


With only your public keys, of course.
hero member
Activity: 658
Merit: 500
Caveat Emptor
donator
Activity: 848
Merit: 1078
it spits out quite a bit of info that you probably don't need, but here's the URL:

Code:
http://blockchain.info/multiaddr?active=$address|$address (Multiple addresses divided by |)

( source: http://blockchain.info/api/blockchain_api )

That does spit out the info needed. However, there is a particular URL on Blockchain.info, which I forgot, that is much prettier and displays the current balances of all the wallet addresses. Basically, it lets you check a bunch of addresses via URL and sums them all, etc.

I have people I am introducing to Bitcoin and this would be a good way for them to be OCD about their balances without having to login all the time and thus increase their security if traveling and not using trusted computers.

https://blockchain.info/q

From the site:

addressbalance/Address - Get the balance of an address (in satoshi) Do not use to process payments without the confirmations parameter

I believe you should be able to divide multiple addresses by |

Give it a go and let me know
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
I wrote a small python script called coinwatch which checks each block as it happens against a database of addresses and updates account balances with any amount received. It allows you to set a confirmation count for low and high value payments.

But it uses blockchain.info block-height / getblockcount calls. I wanted it to be lightweight and not have to run bitcoind. The worst that happens if blockchain goes down is that receipts are delayed. It could be easily modified to use a backup like blockexplorer except I don't think blockexplorer has a block-height call.

Or I could look at modifying it to use an alternate block source. I did look at using bitcoind but it doesn't seem to offer a getblock api with json output. It will give a list of transaction ids but then you can't check those because it only seems to provide transaction details for it's own accounts.

Anyway, coinwatch is in my "misc" repo in my sig. It runs as a super lightweight daemon on a server. If anyone can suggest another source for new block data I'd be happy to update it so it doesn't depend only on blockchain.info.

The advantage to checking each block as it occurs is that you can have a huge number of addresses in the database, and the overhead doesn't change (much) as the number increases.
legendary
Activity: 1031
Merit: 1000
it spits out quite a bit of info that you probably don't need, but here's the URL:

Code:
http://blockchain.info/multiaddr?active=$address|$address (Multiple addresses divided by |)

( source: http://blockchain.info/api/blockchain_api )

That does spit out the info needed. However, there is a particular URL on Blockchain.info, which I forgot, that is much prettier and displays the current balances of all the wallet addresses. Basically, it lets you check a bunch of addresses via URL and sums them all, etc.

I have people I am introducing to Bitcoin and this would be a good way for them to be OCD about their balances without having to login all the time and thus increase their security if traveling and not using trusted computers.
hero member
Activity: 812
Merit: 1000
Since Blockchain.info does not have a sitemap; does anyone have the URL for where you can check multiple address balances?

it spits out quite a bit of info that you probably don't need, but here's the URL:

Code:
http://blockchain.info/multiaddr?active=$address|$address (Multiple addresses divided by |)

( source: http://blockchain.info/api/blockchain_api )
legendary
Activity: 1031
Merit: 1000
Since Blockchain.info does not have a sitemap; does anyone have the URL for where you can check multiple address balances?
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
I made Armory for doing exactly this.  Create the full wallet offline, create a watching-only copy to put online (main computer and/or webserver).  The watching-only wallet only has public keys.  And it can generate an infinite number of new public keys, for which the offline computer has the private keys.  And using the interface, you can manually execute transactions using a USB key to take a transaction to the offline computer for signing.  It takes about 60 seconds to move the coins.

There's more information about using Armory via python scripts in this thread.
And more information about offline wallets on the website.

There's lot of other great benefits, such as being able to print off a backup once that protects your wallets forever (no matter how many addresses you generate).  Please PM if you have questions.  This use-case was my inspiration for making Armory.
full member
Activity: 136
Merit: 100
scanbook app on iPhone (in AppStore)

Excellent app!

donator
Activity: 1464
Merit: 1047
I outlived my lifetime membership:)
i wrote an an iphone app to keep track of my offline addresses...see the link in my signature...
legendary
Activity: 1221
Merit: 1025
e-ducat.fr
scanbook app on iPhone (in AppStore)
legendary
Activity: 1764
Merit: 1002
donator
Activity: 1218
Merit: 1079
Gerald Davis
One option:

Use an offline computer.
Expand the keypool to a large enough number to ensure you won't need to make a new backup in the near future.
Make a copy of your wallet.dat.
On the COPY: change the encryption password to a 256 bit random number.  Don't record the password anywhere.

Put this copy with unknown passphrase on the server and you essentially have full bitcoind access except for functions which require the wallet to be unlocked.  Technically the private key is in the wallet but since it can't be unlocked that copy of the private key is lost forever.


full member
Activity: 198
Merit: 100
You can put the PUBLIC key in a wallet (at least on blockchain.info wallet) and it will show you the balance for that address.
full member
Activity: 219
Merit: 101
So I want to do bitcoin transactions on my server and I installed bitcoind on it only to discover that it requires the private key of an address to get the balance.  I need to get the balance for a bitcoin account but I'm not putting my private keys on my server for security reasons.

So what's the best way to get the balance of an address without the private key?  I want to avoid using external services like blockchain.info because they could go down or go out of business or even worse get compromised and then people could get everything on my site for free.

Should I run an electrum server?  What's my best option here?  Literally the only functionality I need is checking the balance of an account.  I'm generating the pub/priv keys offline en masse using vanitygen and then importing the public keys into the server database. 

Thanks everyone!
Jump to: