talonlab / python-hdwallet

Python-based library for the implementation of a Hierarchical Deterministic (HD) Wallet generator supporting more than 200 cryptocurrencies.
https://hdwallet.readthedocs.io
MIT License
461 stars 151 forks source link

Generate New Wallet #65

Closed budx1 closed 2 years ago

budx1 commented 2 years ago

Hey, this code creates a new wallet or just generate a random mnemonic?

MNEMONIC= generate_mnemonic(language="english", strength=128) PASSPHRASE: Optional[str] = None # "meherett" bip44_hdwallet: BIP44HDWallet = BIP44HDWallet(cryptocurrency=EthereumMainnet) bip44_hdwallet.from_mnemonic( mnemonic=MNEMONIC, language="english", passphrase=PASSPHRASE

How can i initialize a wallet with my mnemonic words?

Thanks!

meherett commented 2 years ago

Hi @victorpoffo,

# To initialize your wallet, use this
MNEMONIC: str = "..."
# instead of generating new mnemonic words
MNEMONIC: str = generate_mnemonic(language="english", strength=128)