Last active
May 23, 2021 05:03
-
-
Save earthchie/36061fc9994b536309c98735b07d825e to your computer and use it in GitHub Desktop.
ตามหา private key และ path ของกระเป๋าที่สูญหาย จาก mnemonic keys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ethers = require('ethers'); | |
const mnemonic = `critic seek crop move student season draw fiscal put prevent message cereal` | |
const target = `0xB1aB1cdC94e4edC8a7cc3187D5CCE0169de7505c`; | |
let i = -1; | |
let wallet; | |
console.log('searching...') | |
do { | |
i++; | |
wallet = ethers.Wallet.fromMnemonic(mnemonic, `m/44'/60'/0'/0/${i}`); | |
} while (wallet.address != target); | |
console.log(`FOUND! at m/44'/60'/0'/0/${i}\nprivate key:`, wallet._signingKey().privateKey); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
วิธีใช้