Created
January 26, 2018 03:12
-
-
Save pyramation/7f1855580e717157f3f77509e07435c1 to your computer and use it in GitHub Desktop.
This file contains 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 bitcoin = require('bitcoinjs-lib'); | |
var privatekey = process.argv[2] | |
// NOTE: only wif and pubKeyHash are correct, they were all that is needed for this function to work | |
const pair = bitcoin.ECPair.fromWIF(privatekey, { | |
messagePrefix: '\x19Denarius Signed Message:\n', | |
bip32: { | |
public: 0x019da462, // TODO DONT USE | |
private: 0x019d9cfe // TODO DONT USE | |
}, | |
pubKeyHash: 0x1e, | |
scriptHash: 0x32, // TODO DONT USE | |
wif: 0x9e | |
}) | |
console.log(pair.getAddress()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment