Last active
August 29, 2015 14:04
-
-
Save lsparrish/7554865d901ef0df0a93 to your computer and use it in GitHub Desktop.
Emoticoin converter
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
// simple tool for converting addresses to the new form | |
// also shows the BTC form of the address, which is default for some blockchain tools like Abe. | |
// depends on coinstring, from cryptocoinjs | |
// npm install coinstring | |
var cs = require('coinstring') | |
var res = cs.decode('6F2bAPuyG1qESEQPdiF3SBWcvQv53KzthQ', 13) | |
console.log(res.toString('hex')) | |
// 06f32bd4f30ad3ea6c080060095b1401d1bd2699 | |
var addr = cs.encode(res, 13); | |
console.log("EMO form (old): ",addr); | |
// EMO form: 6F2bAPuyG1qESEQPdiF3SBWcvQv53KzthQ | |
var addr = cs.encode(res, 33); | |
console.log("EMO form (new): ",addr); | |
// EMO form 2: EHnerZsjTd6knuC886uR8gxMWW4wByQYpB | |
var addr = cs.encode(res, 00); | |
console.log("BTC form: ",addr); | |
// BTC form: 1dkMz3E2foqobbGKFuu8YyPjrZojkYhM3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment