Author

Topic: How to find XPUB adress in wallet.dat file ? (Read 95 times)

legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
September 09, 2021, 08:21:48 AM
#4
Alright, just wanted to make sure that someone doesn't think 'okay, it spits out only xpriv, then let's try that instead' Wink

It should include the public key or addresses if you use the command dumpwallet

Here's the sample of dumpwallet testnet result
Quote
# Wallet dump created by Bitcoin v0.21.0   
# * Created on 2021-01-21T16:59:50Z   
# * Best block at time of backup was 1905234 (00000000e26170d0f846a334a1bfdfebe8da906c5),   
#   mined on 2021-01-21T17:05:05Z   

# extended private masterkey: tpR2efnJMh85ufpQcYSTwrrKrYJ   

cTdH4SbvTR 1970-01-01T00:00:01Z label= # addr=mnb8RSpTqvhLh8Q6,2MudYFE2awqc,tbvhpur8zf35ql3yx5h9nu   
cRaKzuR9MCVwAxVa3aAZrVh15YbV 2019-08-26T01:19:00Z reserve=1 # addr=tb1q3qc52q hdkeypath=m/0'/0'/222'   
cT2ozo5xcj6iCe4dTfywan3qJnib 2019-08-26T01:19:00Z hdseed=1 # addr=tb1qzqtu25qsue0a5pp3hg8lkftclf8ds   
cNb2K9tUhQaeXiVz2Jt2Wq9DMLdf 2019-08-26T01:19:00Z reserve=1 # addr=tb14d7lx hdkeypath=m/0'/0'/117'   

.....4040 lines   
# End of dump
Source: https://bitcoin.stackexchange.com/questions/101767/dumpwallet-output-documentation-explanation

under addr= should be the public key.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
September 09, 2021, 06:21:18 AM
#3
I often see OP dealing with private/public key, so i assume he already know how to handle xprv securely. If the want to create watch-only wallet, he could simply copy list of addresses generated by dumpwallet command.
Alright, just wanted to make sure that someone doesn't think 'okay, it spits out only xpriv, then let's try that instead' Wink
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
September 09, 2021, 06:05:26 AM
#2
See this stackexchange answer.

Bitcoin Core uses hardened derivation so there simply is no xpub to begin with, it isn't being hidden from you or obscured.

However, you could get xprv by using dumpwallet command.
The use case for this is however quite different Cheesy If OP e.g. wants to extract xpub to watch Core wallets on a mobile Bitcoin app, please don't try to now transfer xpriv to your phone or other insecure system in any way or form...
member
Activity: 873
Merit: 22
$$P2P BTC BRUTE.JOIN NOW ! https://uclck.me/SQPJk
September 08, 2021, 09:34:55 PM
#1
How to find XPUB adress in wallet.dat file ?


thx
Jump to: