I have this lib setup and imported to my project. but don't know how to call and give seed as input and get public key of my desired coin as my desired derivation path.
Could you be more specific? The documentation of library you mentioned give several code examples.
# Source: https://hdwallet.readthedocs.io/en/v2.1.1/hdwallet.html#hdwallet.hdwallet.HDWallet.p2wpkh_address
>>> from hdwallet import HDWallet
>>> from hdwallet.symbols import BTC
>>> hdwallet = HDWallet(symbol=BTC)
>>> hdwallet.from_mnemonic(mnemonic="venture fitness paper little blush april rigid where find volcano fetch crack label polar dash", passphrase="meherett")
>>> hdwallet.from_path(path="m/44'/0'/0'/0/0")
>>> hdwallet.p2wpkh_address()
"bc1qfky82ek5pr07t65qjretw9hevw2j8j5fdrn5hc"
If you need to get public key, just use
hdwallet.public_key() after specify correct derivation path.
>>> hdwallet.from_path(path="m/44'/0'/0'/0/1")
>>> hdwallet.p2wpkh_address()
'bc1qllytr4ftxqgpg2he8uafcgcj9gzxcv7xmuyjw6'
>>> hdwallet.public_key()
'02fed55ac2909f56c9a2f933113893fdc18a24b7a12c9530c771e47e991da0401b'
I would like some examples if possible please.
1- how do I use this lib to create bulk random seeds in a for loop. print each mnemonic.
2- how do I use this lib in a for loop so it generate keys of default derivation path for a list of coins for a given mnemonic seed phrase.
for example I give the input as:
[carpet, stove, mind, material, icon, tree, jungle, beyond, anchor, hover, robust, else](seed phrase as a list type)
and
[btc legacy, btc segwit, eth, doge](desired coins)
and get the output:[btc legacy: blah blah blah..., btc segwit: blah blah blah..., eth: blah blah blah..., doge: blah blah blah...]
I think I'm just not familiar with the way of using libs.
3- another example is what is the code if I want to check my seed phrase to see if it is valid(checksum) or not
because I want to use these in bulk a shorter, more efficient and human readable code is much more appreciated.