Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from algosdk import mnemonic
- # actual key is just to check that it's right not used and can be ignored
- actual_key = "require pizza romance quality asthma turtle tent obey address bless include scan table scrub rude fit shoe such trophy wheat ridge squirrel lab able festival"
- # Replace with 24 word mnemonic (only works if its the last word that is missing)
- truncated_key = "require pizza romance quality asthma turtle tent obey address bless include scan table scrub rude fit shoe such trophy wheat ridge squirrel lab able"
- mm = truncated_key.split(' ')
- words = mnemonic._from_words(mm)
- bits = bytearray(mnemonic._to_bytes(words)[:32])
- full = mnemonic._from_key(bits)
- last = full.split(' ')[-1]
- print(f'Full mnemonic: {full}')
- print(f'Checksum word: {last}')
Advertisement