Merge pull request #278 from ryanxcharles/feature/default-bip32-livenet
default BIP32 to livenet
This commit is contained in:
commit
46fe8ea800
|
@ -11,12 +11,14 @@ var secp256k1_n = new bignum("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBF
|
||||||
var secp256k1_Gx = new bignum("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", 16);
|
var secp256k1_Gx = new bignum("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", 16);
|
||||||
|
|
||||||
var BIP32 = function(bytes) {
|
var BIP32 = function(bytes) {
|
||||||
if (bytes == 'mainnet' || bytes == 'livenet')
|
if (typeof bytes == 'undefined' || bytes == 'mainnet' || bytes == 'livenet') {
|
||||||
|
bytes = 'livenet';
|
||||||
this.version = networks['livenet'].bip32privateVersion;
|
this.version = networks['livenet'].bip32privateVersion;
|
||||||
|
}
|
||||||
else if (bytes == 'testnet')
|
else if (bytes == 'testnet')
|
||||||
this.version = networks['testnet'].bip32privateVersion;
|
this.version = networks['testnet'].bip32privateVersion;
|
||||||
|
|
||||||
if (bytes == 'mainnet' || bytes == 'livenet' || bytes == 'testnet') {
|
if (bytes == 'livenet' || bytes == 'testnet') {
|
||||||
this.depth = 0x00;
|
this.depth = 0x00;
|
||||||
this.parentFingerprint = new Buffer([0, 0, 0, 0]);
|
this.parentFingerprint = new Buffer([0, 0, 0, 0]);
|
||||||
this.childIndex = new Buffer([0, 0, 0, 0]);
|
this.childIndex = new Buffer([0, 0, 0, 0]);
|
||||||
|
|
Loading…
Reference in New Issue