Get Seed from wallet on regtest mode

1

I am doing some tests for an application that signs Bitcoin transactions. I already downloaded the binary files bitcoin-cli,bitcoind and bitcoin-wallet from bitcoin.org. I need to know that the seed of the wallet created by regtest. It is available when the bitcoin-wallet -regtest info command returns:

Wallet info                                                                             │
===========                                                                             │
Encrypted: no                                                                           │
HD (hd seed available): yes                                                             │
Keypool Size: 1999                                                                      │
Transactions: 103                                                                       │
Address Book: 2

I need that seed for run recovery on my app and check if it sign correctly a Bitcoin transaction.

Thanks in advance

wic

Posted 2019-11-08T22:18:28.743

Reputation: 13

Answers

0

You are looking for the dumpwallet command.

While in regtest open the console a/k/a debug window, and type:
dumpwallet "C:\myfolder\dump.txt"

This will create a text file with all your keys. At the top you will see your extended master private key. And if you are looking for your HD seed, do a control+f for hdseed, you should find a key with the label hdseed=1.

https://bitcoincore.org/en/doc/0.18.0/rpc/wallet/sethdseed/

m1xolyd1an

Posted 2019-11-08T22:18:28.743

Reputation: 3 356