-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
I want to generate a independent Mnemonic Phrase, but with the code generate the same Mnemonic Phrase:
import mnemonic
import threading
from hdwallet import BIP44HDWallet
from hdwallet.cryptocurrencies import EthereumMainnet
from hdwallet.derivations import BIP44Derivation
from hdwallet.utils import generate_mnemonic
from typing import Optional
from etherscan import Etherscan
from requests import get
from matplotlib import pyplot as plt
from datetime import datetime
import time
import os
import sys
MNEMONIC: str = 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
)
bip44_hdwallet.clean_derivation()
for address_index in range(2): # Mnemonic Quantity to generate
bip44_derivation: BIP44Derivation = BIP44Derivation(
cryptocurrency=EthereumMainnet, account=0, change=False, address=address_index
)
bip44_hdwallet.from_path(path=bip44_derivation)
bip44_hdwallet.clean_derivation()
print(f"{bip44_hdwallet.mnemonic()}")
os.system(f'echo {bip44_hdwallet.mnemonic()} >> /home/mnemonic.txt')
Metadata
Metadata
Assignees
Labels
No labels