Created
December 20, 2018 13:47
-
-
Save you21979/0aa9acf1b6d8eb78642ecded4867dea7 to your computer and use it in GitHub Desktop.
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
"use strict"; | |
const oldmnemonic = require("electrum-oldmnemonic"); | |
const bitcoin = require("bitcoinjs-lib") | |
const words = "" | |
const oldseedhex = oldmnemonic.mn_decode(words.split(' ')); | |
console.log(oldseedhex) | |
const monacoin = { | |
messagePrefix: '\x18Monacoin Signed Message:\n', | |
bip32: { | |
public: 0x0488b21e, | |
private: 0x0488ade4 | |
}, | |
pubKeyHash: 0x32, | |
scriptHash: 0x37, | |
wif: 0xB2 | |
}; | |
const m = bitcoin.HDNode.fromSeedBuffer(Buffer.from(oldseedhex, 'hex'), monacoin) | |
console.log(m.derivePath("m/0'/0/0").getAddress()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment