Post
Topic
Board Development & Technical Discussion
Merits 1 from 1 user
Re: Decipher xprv or seed from keystore when I know the password
by
ETFbitcoin
on 15/03/2023, 12:31:04 UTC
⭐ Merited by pbies (1)
--snip--
Both xprv and seed are in hex. I've already told you.
I need xprv and seed to be converted to xprv in base58 format, seed to words.
--snip--

At least from seed (in hex format) to words it should be straightforward. An example,

Code:
>>> from mnemonic import Mnemonic
>>> mnemo = Mnemonic("english")
>>> xprv = '419ff3b824753f296223325a300a694a9641135558eedda79d9cb74f046e1457'
>>> len(xprv)
64
>>> xprv_bytes = bytes.fromhex(xprv)
>>> len(xprv_bytes)
32
>>> mnemo.to_mnemonic(xprv_bytes)
'dose zebra unlock employ fault net mass green focus leopard olympic news goat meadow fever build tank diagram grunt hub utility damage eyebrow view'

Take note it require library from https://github.com/trezor/python-mnemonic. And in case i also misunderstood what you want to achieve, i would suggest you to add expected input/output with some examples.