Bitcoin Forum
September 18, 2019, 09:12:34 PM *
News: If you like a topic and you see an orange "bump" link, click it. More info.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin core hd wallet from mnemonic  (Read 155 times)
tekbe
Jr. Member
*
Offline Offline

Activity: 35
Merit: 3


View Profile
May 05, 2019, 01:22:51 PM
Merited by ETFbitcoin (2), Husna QA (1)
 #1

To have a way of (re-)creating bitcoin core hd wallets out of a mnemonic I wrote a bash script.

https://github.com/tekbe/wallet-tools

It's using libbitcoin-explorer and requires latest bitcoin core v0.18.0.

Hope it's useful for somebody.
1568841154
Hero Member
*
Offline Offline

Posts: 1568841154

View Profile Personal Message (Offline)

Ignore
1568841154
Reply with quote  #2

1568841154
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1568841154
Hero Member
*
Offline Offline

Posts: 1568841154

View Profile Personal Message (Offline)

Ignore
1568841154
Reply with quote  #2

1568841154
Report to moderator
ETFbitcoin
Legendary
*
Offline Offline

Activity: 1764
Merit: 2028

Use SegWit and enjoy lower fees.


View Profile WWW
May 05, 2019, 03:43:45 PM
 #2

Interesting script, but i wonder why you use mnemonic seed with 18 words which isn't common?

tekbe
Jr. Member
*
Offline Offline

Activity: 35
Merit: 3


View Profile
May 06, 2019, 02:23:56 AM
 #3

i wonder why you use mnemonic seed with 18 words which isn't common?

The readme was misleading: 9, 12, 15, 18 or 21 words are fine (everything that "bx mnemonic-to-seed" accepts as input).
croxNN
Newbie
*
Offline Offline

Activity: 12
Merit: 3


View Profile
August 31, 2019, 08:45:37 AM
 #4

Hello all!

I'm trying understand HD wallets in bitcoin core implementation and got stuck. Here it is:

$ bx seed | bx mnemonic-new -l en
reward awake later spot grass list peanut clog hurry guess question father leg dress only reunion horn napkin

$ echo "reward awake later spot grass list peanut clog hurry guess question father leg dress only reunion horn napkin" | bx mnemonic-to-seed | bx hd-new | bx hd-to-ec | bx ec-to-wif
L1G3dzjDmkPNkrYLs2L9pTbF9BZ4XThqkXVtDxcrP887uPYRjriG

That WIF key L1G3dzjDmkPNkrYLs2L9pTbF9BZ4XThqkXVtDxcrP887uPYRjriG should be ok for sethdseed? Right?

So next:
$ bitcoin-cli createwallet test
{
  "name": "test",
  "warning": ""
}


$ bitcoin-cli -rpcwallet=test sethdseed true L1G3dzjDmkPNkrYLs2L9pTbF9BZ4XThqkXVtDxcrP887uPYRjriG
error code: -5
error message:
Invalid private key


What's wrong?

Thanks in advance.
croxNN
Newbie
*
Offline Offline

Activity: 12
Merit: 3


View Profile
August 31, 2019, 09:01:15 AM
 #5

UPD: Resolved. It needs to use  -v 239 for testnet in bx ec-to-wif command
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!