I wrote down a mnemonic seed that is missing one word, the position of which is unknown. I was able to locate this recovery tool which is very helpful. However it assumes a 13 word mnemonic seed formatted for mymonero instead of 25 word monero-wallet-cli seeds.

  • How can I adapt this tool for a 25 word seed?
  • In addition to the partial mnemonic seed I also wrote down the complete view key and address. Therefore, I have no need to scan the entire blockchain in order to know if the recovered mnemonic is accurate or not. How can I codify the automatic comparison of my address and/or view key to those generated from a recovered mnemonic to verify the match?
up vote 5 down vote accepted

I made one very simple recovery tool a while ago, by modifying Luigi's tools: https://github.com/JollyMort/xmr.llcoins.net/blob/master/README.md

This one can recover any 2 missing words, provided that you know the address and the checksum word is known.

It will not matter if it is 13 or 25 words seed since the script will just need to add another word in the first, last or in between your seed and create the wallet. Your problem is implementing it for the real monero-wallet-cli/monero wallet since it will take longer to scan compared to mymonero. In mymonero a single query would return that the wallet is new or old but in real monero wallet you need to scan the whole blockchain to find if there was a transaction.

This is not impossible to implement but you need to create a script on top of monero-wallet-cli and be able to automate the creation of wallet using the --restore-deterministic-wallet command or just create a new program based on monero-wallet-cli which automates the wallet creation and scanning of the blockchain.

Lastly, you can't trivially find the transaction hash knowing only the monero address and view key. You have to scan each transaction in the blockchain.

Edit: In the case that you have the view key you don't need to scan the blockchain you just need to compare it with the view key of your new created wallet.

Edit 2: Actually the address is enough and there are three ways you can implement this.

  1. Use the javascript code found in mymonero.com. The same source can be found here and the specific file
  2. Modify the cli wallet which is in github to just create wallet address base on given seed and looping to all possible combination.

  3. Use your favorite scripting language and automate the monero-wallet-cli --restore-deterministic-wallet. It will return the address.

Edit 3: I implemented it in javascript. The seed is missing the word older in the end. http://jsfiddle.net/gundamlancer/9jvdkrat/1/

  • If you have the view key you don't need to check any transaction just compare it with the view key of the created wallet. – Gundamlancer Mar 29 '17 at 7:59
  • I know I don't need to verify the transaction. My original wording was intended to solicit an answer (in code) that can restrict the automated blockchain scan to a specific block height range. Those in a similar situation (but lacking the addresss and view key data that I have) could save time by doing this. Because of the confusion I edited my answer for clarity. – user1414 Mar 29 '17 at 8:51
  • I added a third edit on how you can implement this when you have the address. – Gundamlancer Mar 29 '17 at 9:31
  • 1
    Does this tool require an internet connection? I tried to run it offline but was unsuccessful – user1414 Sep 9 '17 at 21:20

The last word is a checksum for the first 24 words.

  • if you miss the last word, you can easily find it deterministically and there's only one solution
  • if you miss another word, you can brute force all the possibilities that are valid based on the last word. You then need to test these possibilities against a wallet to see if transactions are found. That step takes time but hopefully you will only have a handful of valid combinations at that point.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.