Author

Topic: a python code (Read 121 times)

full member
Activity: 224
Merit: 146
March 24, 2023, 06:31:21 PM
#5
To generate a BNB-beacon chain address from a mnemonic wallet, you need to follow the BIP39 standard for mnemonic phrase generation and the Binance Chain BIP44 derivation path for address generation.

Here is an example Python code that can help you generate BNB-beacon chain addresses from a mnemonic wallet using the BIP39 standard and the Binance Chain BIP44 derivation path:
import hdwallet
from hdwallet import BIP44, BIP32, HDWallet

# Define your 12-word mnemonic phrase
mnemonic = "venture fitness paper little blush april rigid where find volcano fetch crack label polar dash"

# Initialize an HDWallet object with the mnemonic phrase
wallet = HDWallet.from_mnemonic(mnemonic)

# Derive the Binance Chain BIP44 path from the HDWallet object
path = wallet.derive(BIP44.binance())

# Derive the Binance Chain address from the derived path
address = path.address()

# Print the Binance Chain address
print(address)

The output of the above code should be:
bnb1zfz67wkqvzx0gdtrp42dhygcsnd6urye9f6xec
 
Note that the above code uses the hdwallet library you mentioned, which is a Python library for handling hierarchical deterministic wallets. You can install it using the pip command:

pip install hdwallet

Also, please note that this code is provided as an example only and should not be used in a production environment without proper testing and security considerations.


Thanks GPT
newbie
Activity: 2
Merit: 0
March 06, 2023, 10:53:01 AM
#4
Hi, write me PM I can help you Wink
newbie
Activity: 3
Merit: 0
March 02, 2023, 04:41:41 PM
#3
To generate a BNB-beacon chain address from a mnemonic wallet, you need to follow the BIP39 standard for mnemonic phrase generation and the Binance Chain BIP44 derivation path for address generation.

Here is an example Python code that can help you generate BNB-beacon chain addresses from a mnemonic wallet using the BIP39 standard and the Binance Chain BIP44 derivation path:
import hdwallet
from hdwallet import BIP44, BIP32, HDWallet

# Define your 12-word mnemonic phrase
mnemonic = "venture fitness paper little blush april rigid where find volcano fetch crack label polar dash"

# Initialize an HDWallet object with the mnemonic phrase
wallet = HDWallet.from_mnemonic(mnemonic)

# Derive the Binance Chain BIP44 path from the HDWallet object
path = wallet.derive(BIP44.binance())

# Derive the Binance Chain address from the derived path
address = path.address()

# Print the Binance Chain address
print(address)

The output of the above code should be:
bnb1zfz67wkqvzx0gdtrp42dhygcsnd6urye9f6xec
 
Note that the above code uses the hdwallet library you mentioned, which is a Python library for handling hierarchical deterministic wallets. You can install it using the pip command:

pip install hdwallet

Also, please note that this code is provided as an example only and should not be used in a production environment without proper testing and security considerations.
newbie
Activity: 265
Merit: 0
February 09, 2023, 03:19:30 AM
#2
Reach me on Telegram: @ElevatedWarrior. I'll link you up with someone.
newbie
Activity: 18
Merit: 0
February 09, 2023, 03:18:10 AM
#1
hello guys
I will pay 50$(usdt) for code in python which can generate BNB-bep2(bnb beacon chain which starts with bnb1...) address from a mnemonic wallet 12 words.

I mean assuming mnemonic 12 words example as: "venture fitness paper little blush april rigid where find volcano fetch crack label polar dash"
the code should be able to give bnb bep2 address output as: bnb1zfz67wkqvzx0gdtrp42dhygcsnd6urye9f6xec
this is also the output in Trustwallet for above mnemonic wallet.

using only HDwallet lib(https://pypi.org/project/hdwallet/) would be so appreciated but not limited to.

------------------------------------------------

update: This project is done.
Jump to: