Bitcoin Forum
May 20, 2024, 10:31:45 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Best way to check the balance of an address without the private key  (Read 9010 times)
glitch003 (OP)
Full Member
***
Offline Offline

Activity: 219
Merit: 101


View Profile
September 06, 2012, 09:39:37 PM
 #1

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!
ChipGeek
Full Member
***
Offline Offline

Activity: 198
Merit: 100


View Profile
September 06, 2012, 09:43:26 PM
 #2

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.

Tip jar: 1ChipGeeK7PDxaAWG4VgsTi31SfJ6peKHw
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
September 06, 2012, 09:49:00 PM
 #3

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.


cypherdoc
Legendary
*
Offline Offline

Activity: 1764
Merit: 1002



View Profile
September 06, 2012, 09:57:55 PM
 #4

Armory
Boussac
Legendary
*
Offline Offline

Activity: 1220
Merit: 1015


e-ducat.fr


View Profile WWW
September 06, 2012, 10:03:05 PM
 #5

scanbook app on iPhone (in AppStore)

bg002h
Donator
Legendary
*
Offline Offline

Activity: 1463
Merit: 1047


I outlived my lifetime membership:)


View Profile WWW
September 07, 2012, 02:22:19 PM
 #6

i wrote an an iphone app to keep track of my offline addresses...see the link in my signature...

Hardforks aren't that hard. It’s getting others to use them that's hard.
1GCDzqmX2Cf513E8NeThNHxiYEivU1Chhe
fivemileshigh
Full Member
***
Offline Offline

Activity: 136
Merit: 100


View Profile
September 07, 2012, 05:45:53 PM
 #7

scanbook app on iPhone (in AppStore)

Excellent app!

etotheipi
Legendary
*
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
September 07, 2012, 06:47:55 PM
Last edit: September 07, 2012, 07:02:14 PM by etotheipi
 #8

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.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
sunnankar
Legendary
*
Offline Offline

Activity: 1031
Merit: 1000



View Profile WWW
January 02, 2013, 02:37:35 AM
 #9

Since Blockchain.info does not have a sitemap; does anyone have the URL for where you can check multiple address balances?

payb.tc
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1000



View Profile
January 02, 2013, 02:57:03 AM
 #10

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 )
sunnankar
Legendary
*
Offline Offline

Activity: 1031
Merit: 1000



View Profile WWW
January 02, 2013, 03:37:28 AM
 #11

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.

BkkCoins
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1009


firstbits:1MinerQ


View Profile WWW
January 03, 2013, 10:31:23 AM
Last edit: January 03, 2013, 10:52:18 AM by BkkCoins
 #12

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.

TheButterZone
Legendary
*
Offline Offline

Activity: 3052
Merit: 1031


RIP Mommy


View Profile WWW
January 03, 2013, 07:59:14 PM
 #13

Put http://bitcoinbox.ru/display/graph.php?btcaddress=1TBZYXjrGjXCEN1SprpF66Jzy5uN3GiLS&type=balance in an image tag.

Saying that you don't trust someone because of their behavior is completely valid.
Seal
Donator
Hero Member
*
Offline Offline

Activity: 848
Merit: 1078


View Profile WWW
February 20, 2013, 08:00:59 PM
 #14

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

DefiDive - Filter the noise
A clean crypto asset management terminal
bowen151
Hero Member
*****
Offline Offline

Activity: 658
Merit: 500


Caveat Emptor


View Profile
February 20, 2013, 08:59:40 PM
 #15

Armory


-Buying/Selling graphics cards every month
--Buying BTC every month £/$/€200+ wanted
---UK based re-seller of physical bitcoins  Click here to buy
juancho
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile WWW
December 23, 2013, 03:28:53 PM
 #16

I've made the coolest app at the moment to check your balances:

www.wonderwallets.com.ar


With only your public keys, of course.
BookLover
Hero Member
*****
Offline Offline

Activity: 533
Merit: 500


^Bitcoin Library of Congress.


View Profile
December 23, 2013, 04:26:42 PM
 #17

Cool

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!