Generate private key from seed phrase python
I basically followed the instructions here How to generate mycelium addresses from the 12 words in python So my code is similar:
And I verified it using https://iancoleman.io/bip39/#english that the generated address is indeed the first address that this webpage generated as well. However, I also want to get the public and private key pairs using this same library. I originally tried:
However, the output of these two calls are not the same as the ones provided by the website above for the same address. So my question is: what's the proper way for me to generate the public and private key pairs? Edit: To clarify, for the exact mnemonic and passphrase above, the website I'm using for reference tells me the first address and keypair should be: While the output of the above python code is:
So the address matches, but not the keypair.
Can you get private key from seed phrase?The seed phrase enables a wallet to derive your private key. A private key to a cryptocurrency wallet is the equivalent of an ATM PIN to a bank account. Bank accounts have a unique PIN, which proves to the ATM that a user owns the account. Using the PIN, anyone can spend funds from the account.
Is private key the same as seed?Private key is usually an access key to just one address (account), while seed phrase is an access key to the whole wallet, which can hold multiple addresses.
What is BIP39 seed?BIP39 is a design implementation that lays out how cryptocurrency wallets create the set of words (or "mnemonic codes") that make up a mnemonic sentence, and how the wallet turns them into a binary "seed" that is used to create encryption keys, which are then are used to execute cryptocurrency transactions.
|