|
|
@ -40,7 +40,7 @@ var PrivateKey = function PrivateKey(data, network, compressed) { |
|
|
|
|
|
|
|
var info = { |
|
|
|
compressed: typeof(compressed) !== 'undefined' ? compressed : true, |
|
|
|
network: network || 'livenet' |
|
|
|
network: network || networks.defaultNetwork.name |
|
|
|
}; |
|
|
|
|
|
|
|
// detect type of data
|
|
|
@ -116,9 +116,9 @@ PrivateKey._transformBuffer = function(buf, network, compressed) { |
|
|
|
} |
|
|
|
|
|
|
|
if (buf[0] === networks.livenet.privatekey) { |
|
|
|
info.network = 'livenet'; |
|
|
|
info.network = networks.livenet.name; |
|
|
|
} else if (buf[0] === networks.testnet.privatekey) { |
|
|
|
info.network = 'testnet'; |
|
|
|
info.network = networks.testnet.name; |
|
|
|
} else { |
|
|
|
throw new Error('Invalid network'); |
|
|
|
} |
|
|
|