Skip to content

Instantly share code, notes, and snippets.

@olalonde
Last active January 24, 2020 00:54
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save olalonde/eddb9e955ca317cee9a611198a35fbf5 to your computer and use it in GitHub Desktop.
Save olalonde/eddb9e955ca317cee9a611198a35fbf5 to your computer and use it in GitHub Desktop.
// 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