Commit b55b0581 authored by Zhenzhen Zhan's avatar Zhenzhen Zhan
Browse files

Address conversion

parent 36871c86
......@@ -33,8 +33,10 @@ var livenet = new Network();
_.extend(livenet, {
name: 'livenet',
alias: 'mainnet',
pubkeyAddressPrefix: Buffer.from([0x00]),
pubkeyhash: 0x00,
privatekey: 0x80,
scriptAddressPrefix: Buffer.from([0x05]),
scripthash: 0x05,
xpubkey: 0x0488b21e,
xprivkey: 0x0488ade4,
......@@ -45,8 +47,10 @@ var testnet = new Network();
_.extend(testnet, {
name: 'testnet',
alias: 'testnet',
pubkeyAddressPrefix: Buffer.from([0x6f]),
pubkeyhash: 0x6f,
privatekey: 0xef,
scriptAddressPrefix: Buffer.from([0xc4]),
scripthash: 0xc4,
xpubkey: 0x043587cf,
xprivkey: 0x04358394,
......
......@@ -40,8 +40,10 @@ describe('Networks', function() {
var custom = {
name: 'customnet',
alias: 'mynet',
pubkeyAddressPrefix: Buffer.from([0x10]),
pubkeyhash: 0x10,
privatekey: 0x90,
scriptAddressPrefix: Buffer.from([0x08]),
scripthash: 0x08,
xpubkey: 0x0278b20e,
xprivkey: 0x0278ade4,
......@@ -73,8 +75,10 @@ describe('Networks', function() {
it('should not set a network map for an undefined value', function() {
var custom = {
name: 'somenet',
pubkeyAddressPrefix: Buffer.from([0x13]),
pubkeyhash: 0x13,
privatekey: 0x93,
scriptAddressPrefix: Buffer.from([0x11]),
scripthash: 0x11,
xpubkey: 0x0278b20f,
xprivkey: 0x0278ade5,
......
......@@ -49,9 +49,11 @@ describe('PrivateKey', function() {
var nmc = {
name: 'namecoin',
alias: 'namecoin',
pubkeyAddressPrefix: Buffer.from([0x34]),
pubkeyhash: 0x34,
privatekey: 0xB4,
// these below aren't the real NMC version numbers
scriptAddressPrefix: Buffer.from([0x08]),
scripthash: 0x08,
xpubkey: 0x0278b20e,
xprivkey: 0x0278ade4,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment