default BIP32 to livenet

This commit is contained in:
Ryan X. Charles 2014-04-22 12:25:05 -03:00
parent 7f7d076c7f
commit d54fa570a2
1 changed files with 4 additions and 2 deletions

View File

@ -11,12 +11,14 @@ var secp256k1_n = new bignum("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBF
var secp256k1_Gx = new bignum("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", 16);
var BIP32 = function(bytes) {
if (bytes == 'mainnet' || bytes == 'livenet')
if (typeof bytes == 'undefined' || bytes == 'mainnet' || bytes == 'livenet') {
bytes = 'livenet';
this.version = networks['livenet'].bip32privateVersion;
}
else if (bytes == 'testnet')
this.version = networks['testnet'].bip32privateVersion;
if (bytes == 'mainnet' || bytes == 'livenet' || bytes == 'testnet') {
if (bytes == 'livenet' || bytes == 'testnet') {
this.depth = 0x00;
this.parentFingerprint = new Buffer([0, 0, 0, 0]);
this.childIndex = new Buffer([0, 0, 0, 0]);