25th word missing :-(

@wynn I’m sorry :confused:

Like @fabrice said, you can compute the 25th word if you know the first 24, but if the word you’re missing is one of the first 24, you may need to try all possible combinations…

A basic structure for your program in Python would look like this

# recover.py
# written by danger_dave

from algosdk import mnemonic
from algosdk import wordlist

# Write in Public Key here
address = ""

# 24 words go here (single space seperated)
confirmed = "yellow bird ... cat"

word_list = wordlist.word_list_raw().split("\n")
curr = 0
first_part = ""
second_part = confirmed
for location in range(25):
    if location != 0:
        curr = confirmed.index(" ", curr + 1)
        first_part = confirmed[:curr]
        second_part = confirmed[curr:]
    for word in word_list:
        test_phrase = first_part + " " + word + second_part
        try:
            test_address = mnemonic.to_public_key(test_phrase)
        except:
            continue
        if test_address == address:
            print(test_phrase)
            raise

I just tested it by deleting a random word. This should work.

1 Like