Close Menu
  • Home
  • Bitcoin
    • Bitcoin Atm Machines
    • Bitcoin Books
      • Bitcoin Jobs
        • Bitcoin Price Prediction
        • Bitcoin Coin
  • Bitcoin Farm
  • Bitcoin Gifts
    • Bitcoin Gift Card
    • Bitcoin Mining
    • Bitcoin Wallets
  • Technology
  • Shop
    • Bitcoin Atm Machine
    • Bitcoin Coins
    • Bitcoin Coins, Wallets,Shirts,Books,Gifts
    • Bitcoin Mining Machine
    • Bitcoin Mining Machine Full Set Up
    • Computers and Accessories
    • USB Flash Drives
    • Mini Bitcoin Mining Machine
What's Hot

Adam Again Invests SEK 21 Million To H100 Group Bitcoin Treasury Technique

June 4, 2025

World Liberty Monetary airdrops $47 USD1 stablecoin in symbolic ‘stimulus’ nod to Donald Trump

June 4, 2025

Allow This Hidden iPhone Characteristic. Your Eyes Will Thank You

June 3, 2025
Facebook X (Twitter) Instagram
  • Bitcoin
  • Bitcoin Books
  • Bitcoin Coin
  • Bitcoin Farm
  • Bitcoin Gift Card
Facebook X (Twitter) Instagram
farm-bitcoin.com
  • Home
  • Bitcoin
    • Bitcoin Atm Machines
    • Bitcoin Books
      • Bitcoin Jobs
        • Bitcoin Price Prediction
        • Bitcoin Coin
  • Bitcoin Farm
  • Bitcoin Gifts
    • Bitcoin Gift Card
    • Bitcoin Mining
    • Bitcoin Wallets
  • Technology
  • Shop
    • Bitcoin Atm Machine
    • Bitcoin Coins
    • Bitcoin Coins, Wallets,Shirts,Books,Gifts
    • Bitcoin Mining Machine
    • Bitcoin Mining Machine Full Set Up
    • Computers and Accessories
    • USB Flash Drives
    • Mini Bitcoin Mining Machine
farm-bitcoin.com
Home » How to get correct address from BTC mnemonic phrase in Python
How to get correct address from BTC mnemonic phrase in Python
Bitcoin

How to get correct address from BTC mnemonic phrase in Python

adminBy adminMarch 18, 2025No Comments1 Min Read
Share
Facebook Twitter LinkedIn Pinterest Email


Thank you.
I independently found libraries that generate the same address as Trust Wallet, as well as Cryptoneed (Mobile Apps).
Who needs my code, copy and customize for yourself:

from hdwallet import BIP44HDWallet
from hdwallet.utils import generate_mnemonic
from hdwallet.derivations import BIP44Derivation
from hdwallet.cryptocurrencies import BitcoinMainnet, EthereumMainnet
from bip_utils import Bip84, Bip84Coins, Bip44Changes, Bip39SeedGenerator


LanguageInMnemonic = "english"

Mnemonic = generate_mnemonic(language = LanguageInMnemonic, strength = 128)
    Seed = Bip39SeedGenerator(Mnemonic).Generate()

    print(Mnemonic)

    if IsCheckBTC == "+":
        if IsCheckBTCBip44 == "+":
            CheckedWalletBTCBip44 = BIP44HDWallet(cryptocurrency=BitcoinMainnet)
            CheckedWalletBTCBip44.from_mnemonic(mnemonic = Mnemonic, language = LanguageInMnemonic, passphrase = None)
            CheckedWalletBTCBip44.clean_derivation()
            CheckedWalletBTCBip44Derivation = BIP44Derivation(cryptocurrency = BitcoinMainnet, account = 0, change = False, address = 0)
            CheckedWalletBTCBip44.from_path(path = CheckedWalletBTCBip44Derivation)

            CheckedAddressBTCBip44 = CheckedWalletBTCBip44.address()
            print(CheckedAddressBTCBip44)

        if IsCheckBTCBip84 == "+":
            CheckedWalletBTCBip84 = Bip84.FromSeed(Seed, Bip84Coins.BITCOIN)
            CheckedWalletBTCBip84Step1 = (CheckedWalletBTCBip84.Purpose().Coin().Account(0)).Change(Bip44Changes.CHAIN_EXT)
            CheckedWalletBTCBip84Step2 = CheckedWalletBTCBip84Step1.AddressIndex(0)

            CheckedAddressBTCBip84 = CheckedWalletBTCBip84Step2.PublicKey().ToAddress()
            print(CheckedAddressBTCBip84)

    if IsCheckETH == "+":
        CheckedWalletETH = BIP44HDWallet(cryptocurrency = EthereumMainnet)
        CheckedWalletETH.from_mnemonic(mnemonic = Mnemonic, language = LanguageInMnemonic, passphrase = None)
        CheckedWalletETH.clean_derivation()
        CheckedWalletETHDerivation: BIP44Derivation = BIP44Derivation(cryptocurrency = EthereumMainnet, account = 0, change = False, address = 0)
        CheckedWalletETH.from_path(path=CheckedWalletETHDerivation)

        CheckedAddressETH = CheckedWalletETH.address()
        print(CheckedAddressETH)

(P. S. I used google translate)



Source link

Post Views: 52
Address btc correct mnemonic phrase python
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
admin
  • Website

Related Posts

Adam Again Invests SEK 21 Million To H100 Group Bitcoin Treasury Technique

June 4, 2025

World Liberty Monetary airdrops $47 USD1 stablecoin in symbolic ‘stimulus’ nod to Donald Trump

June 4, 2025

ETH Stays Robust at $2,600 After $321M Spot ETF Surge

June 3, 2025

How To Purchase Bitcoin From Malta? – The World Of Cryptocurrency

June 3, 2025
Add A Comment
Leave A Reply Cancel Reply

Subscribe to Updates

Get the latest creative news from farm-bitcoin about crypto, bitcoin, business and technology.

Please enable JavaScript in your browser to complete this form.
Loading
About

At Farm Bitcoin, we are passionate about unlocking the potential of cryptocurrency and blockchain technology. Our mission is to make the world of digital currencies accessible and understandable for everyone, from beginners to seasoned investors. We believe that cryptocurrency represents the future of finance, and we are here to guide you through this exciting landscape.

Get Informed

Subscribe to Updates

Get the latest creative news from farm-bitcoin about crypto, bitcoin, business and technology.

Please enable JavaScript in your browser to complete this form.
Loading
Top Insights

Adam Again Invests SEK 21 Million To H100 Group Bitcoin Treasury Technique

June 4, 2025

World Liberty Monetary airdrops $47 USD1 stablecoin in symbolic ‘stimulus’ nod to Donald Trump

June 4, 2025
Facebook X (Twitter) Instagram Pinterest
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms and Conditions
Copyright 2024 Farm Bitcoin Design By Prince Ayaan.

Type above and press Enter to search. Press Esc to cancel.

Go to mobile version