I want to generate a independent Mnemonic Phrase, but with the code generate the same Mnemonic Phrase:

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)
mnemonic=MNEMONIC, language="english", passphrase=PASSPHRASE

for address_index in range(5): # Amount of Mnemonic Phrase to Generate
    bip44_derivation: BIP44Derivation = BIP44Derivation(
        cryptocurrency=EthereumMainnet, account=0, change=False, address=address_index

    os.system(f'echo {bip44_hdwallet.mnemonic()} >> /home/mnemonic.txt')


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.