Author

Topic: Get balance from XPUB (Read 2712 times)

full member
Activity: 217
Merit: 259
October 26, 2015, 03:56:02 PM
#8
You shouldn't post your xpub in a public forum...
Why not?
If that is your xpub it now means that you just gave away any privacy you had as anybody can now monitor and see every single address and or transaction that ever goes into and out of that wallet.

Yes, privacy is the main concern.  It is also that if one of the keys was broken because of bad signatures with weak r values or because you simply leaked the private key, then the xpub can be used to derive all other private keys in the wallet.  On the theoretical side it also makes you vulnerable to quantum computers (similar as reusing addresses does).  And someone may send you 0.0009 BTC just to annoy you Smiley   (They were sent today).

You'll have to plug it into whatever wallet software you were using to receive funds.  That software should be able to retrieve the balance for you.

Aside from that, there's no way to tell what exact key index structure was used to generate the child keys.  If they went with what's recommended (m / is_change / n) then a generic solution might work, but wouldn't rely on accuracy.  Is that the key index used?  Are they hardened child keys, or no?  etc...

Yes this could be an issue.  Mycelium and myTrezor lite assume standard structure m/is_change/n, which seems to be the case here (at least I can see a lot of transactions).  Note that hardened child keys do not work with xpubs (this is the reason why one uses hardening in the first place).  So you can at least exclude that.

You can also use bip32.org to generate the addresses.  Then you can choose the path by hand.  E.g., "Custom" and m/0/0 gives you the first used address.  It is not really practical, though. You need to generate the addresses one by one and then use a block explorer to check the balance.

EDIT: electrum also works: "Recover wallet or import key" (under File->New/Recover)  and then enter the xpub in the seed field..
sr. member
Activity: 318
Merit: 251
October 26, 2015, 02:16:58 PM
#7

You'll have to plug it into whatever wallet software you were using to receive funds.  That software should be able to retrieve the balance for you.

Aside from that, there's no way to tell what exact key index structure was used to generate the child keys.  If they went with what's recommended (m / is_change / n) then a generic solution might work, but wouldn't rely on accuracy.  Is that the key index used?  Are they hardened child keys, or no?  etc...

sr. member
Activity: 336
Merit: 251
October 26, 2015, 12:15:11 PM
#6
You shouldn't post your xpub in a public forum...
- snip -

Why not?

If that is your xpub it now means that you just gave away any privacy you had as anybody can now monitor and see every single address and or transaction that ever goes into and out of that wallet.
legendary
Activity: 3472
Merit: 4801
October 26, 2015, 11:50:43 AM
#5
You shouldn't post your xpub in a public forum...
- snip -

Why not?
full member
Activity: 217
Merit: 259
October 26, 2015, 11:22:34 AM
#4
You shouldn't post your xpub in a public forum...  unless you use it only for testing.

There is myTrezor lite android app that reads an xpub (from a qrcode) and shows the balance.  It cannot spend from it but it is useful for watching.

Mycelium can also import xpub addresses.

Your balance is 0.0009 BTC (according to Mycelium).
newbie
Activity: 56
Merit: 0
October 26, 2015, 10:18:03 AM
#3
Here is xpub I have: I only need to know final balance and not history.

xpub6Bx6daFD2499gwjkoac1DrfMDZd6TEhx5frZ6mNoHTkAvL8QckN7uqCMr81Jn2tk1nYvUPL2TFR sD4X3KdzpKac19WTQ3DdgZjQRSjS9iU5

I was not able to find any service.
staff
Activity: 3458
Merit: 6793
Just writing some code
October 26, 2015, 09:18:22 AM
#2
You should be able to look up the xpub key on any block explorer
newbie
Activity: 56
Merit: 0
October 26, 2015, 09:05:13 AM
#1
Hi I need to get final balance from Account public keys (XPUBK). Is there any API or ready made code that can be used to check the balance of particular xpub?
Thank you.
Jump to: