Last active
January 24, 2020 00:54
-
-
Save olalonde/eddb9e955ca317cee9a611198a35fbf5 to your computer and use it in GitHub Desktop.
UPDATE: latest attempt here: https://github.com/olalonde/phemex-puzzle/blob/master/notebooks/solution.ipynb
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
// First 21-digit prime number found in consecutive digits of e | |
// answer: | |
// 957496696762772407663 | |
// | |
// in hexadecimal: | |
// 33E7EF9CABBAF6C56F | |
const bitcore = require("bitcore-lib"); | |
const { PrivateKey, HDPrivateKey } = bitcore; | |
// console.log(new PrivateKey("deadbeef")); | |
const privKey = new PrivateKey("33E7EF9CABBAF6C56F"); | |
console.log(privKey.toWIF()); | |
console.log(new PrivateKey("33E7EF9CABBAF6C56F00000000000000").toWIF()); | |
const hdPrivKey = HDPrivateKey.fromSeed( | |
Buffer.from("33E7EF9CABBAF6C56F00000000000000", "hex") | |
); | |
console.log(hdPrivKey.privateKey.toWIF()); | |
for (let i = 0; i < 30; i++) { | |
for (let j = 0; j < 2; j++) { | |
for (let k = 0; k < 50; k++) { | |
// const child = hdPrivKey.deriveChild(`m/44'/0'/${i}'/${j}/${k}`); | |
const child = hdPrivKey.deriveChild(`m/0/${i}/${k}`); | |
console.log(child.privateKey.toWIF()); | |
} | |
} | |
} | |
// node phemex-puzzle.js | pbcopy | |
// paste private keys in Electrum > Wallet > Private Keys > Import |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment