Private key from myalgo wallet

Hello. This is a script with which you can get a private key. This private key can be imported, for example, into a trust wallet. I checked - the wallet address is the same. The author of the script is Don Mega from the Algorand group, all thanks go to him.

import algosdk
import base64

mnemonic = “Your 25 words separated by spaces without commas”
pk = algosdk.mnemonic.to_master_derivation_key(mnemonic)
print("base 64 encoded: ",pk)
pk_bytes = base64.b64decode(pk)
pk_hex = pk_bytes.hex()
print("hex: ",pk_hex)

hex is what do you need. I imported it into the Trust wallet and it works. But there is a problem - trust wallet supports only ALGO token for now. So, if you have any other tokens in algo wallet, you won’t see them in trust.wallet. Only algo token. I don’t know abourt others wallet apps, will try.=)