Open merland opened 5 years ago
Nobody has requested this yet, but I'll leave the issue open. The problem is when the last word of the preexisting seed is something other than the first - alphabetically - of the possible checksum words.
FWIW, here is how I solved this on my golang implementation. Not sure if this is best for you but wanted to mention the idea:
Same as seedpicker:
$ go run *.go -firstWords="zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo"
SECRET INFO:
Full mnemonic (with checksum word): zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo buddy
Full mnemonic length (# words): 24
--------------------------------------------------------------------------------
PUBLIC INFO:
SLIP132 Extended Pubkey: Zpub74sb5KB3Ak1RwabGr8SHQnMTkd2mC3boVDgPf1jBFNxcXh7Nx4KV3XakPDtWLN5RpszdM7qcBN4wm7xreh8Ys2xYUBqQ9GtkTN8h5kRVecc
Root Fingerprint: 669dce62
Network: mainnet
Derivation Path: m/48'/0'/0'/2'
Specter-Desktop Input Format:
[669dce62/48h/0h/0h/2h]Zpub74sb5KB3Ak1RwabGr8SHQnMTkd2mC3boVDgPf1jBFNxcXh7Nx4KV3XakPDtWLN5RpszdM7qcBN4wm7xreh8Ys2xYUBqQ9GtkTN8h5kRVecc
--------------------------------------------------------------------------------
nth word (0-indexed):
$ go run *.go -firstWords="zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo" -checksum=1
WARNING!
You have selected a checksum # greater than 0.
This should only be attempted by experts users.
If you do not know what you're doing, DO NOT CONTINUE.
--------------------------------------------------------------------------------
SECRET INFO:
Full mnemonic (with checksum word): zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo cash
Full mnemonic length (# words): 24
--------------------------------------------------------------------------------
PUBLIC INFO:
SLIP132 Extended Pubkey: Zpub74Xt8CDUiM6k8oB2F4oErRmucC56UqRYNgFN3o2HS6mWWmz1EuzToeyKgG58Xaqjn5xLzqWLHaZKaVC3Us2GpoyhMPCGuU2KD6oBgPBFPbv
Root Fingerprint: 58557178
Network: mainnet
Derivation Path: m/48'/0'/0'/2'
Specter-Desktop Input Format:
[58557178/48h/0h/0h/2h]Zpub74Xt8CDUiM6k8oB2F4oErRmucC56UqRYNgFN3o2HS6mWWmz1EuzToeyKgG58Xaqjn5xLzqWLHaZKaVC3Us2GpoyhMPCGuU2KD6oBgPBFPbv
--------------------------------------------------------------------------------
My UI obviously leaves a lot to be desired, and since it's CLI only I'm ok with expert flags. Full set of flags/options here:
-checksum int
Which checksum word to append, using a 0-index. EXPERTS ONLY.
-firstWords string
First words of mnemonic (23 words by default)
-testnet
Use testnet (default is mainnet)
-verbose
Verbose printout (default is quiet)
IN ORDER TO calculate the Extended Public Key(s) of an existing 24 word seed. AS A user who already has obtained a 24 word seed elsewhere and want to use it in an Electrum multisig scheme. I WANT to enter my 24 words into the field and be presented with the resulting Extend Public Keys