constants: zero key.
This commit is contained in:
parent
bb0149e603
commit
8bcfeca44e
@ -94,11 +94,7 @@ var unorm;
|
||||
* Constants
|
||||
*/
|
||||
|
||||
var PUBLIC_KEY = new Buffer(33);
|
||||
PUBLIC_KEY.fill(0);
|
||||
|
||||
var FINGER_PRINT = new Buffer(4);
|
||||
FINGER_PRINT.fill(0);
|
||||
var FINGER_PRINT = new Buffer('00000000', 'hex');
|
||||
|
||||
/**
|
||||
* HD Mnemonic
|
||||
@ -845,7 +841,7 @@ function HDPrivateKey(options) {
|
||||
this.chainCode = constants.ZERO_HASH;
|
||||
this.privateKey = constants.ZERO_HASH;
|
||||
|
||||
this.publicKey = PUBLIC_KEY;
|
||||
this.publicKey = constants.ZERO_KEY;
|
||||
this.fingerPrint = null;
|
||||
|
||||
this.mnemonic = null;
|
||||
@ -1521,7 +1517,7 @@ function HDPublicKey(options) {
|
||||
this.parentFingerPrint = FINGER_PRINT;
|
||||
this.childIndex = 0;
|
||||
this.chainCode = constants.ZERO_HASH;
|
||||
this.publicKey = PUBLIC_KEY;
|
||||
this.publicKey = constants.ZERO_KEY;
|
||||
|
||||
this.fingerPrint = null;
|
||||
|
||||
|
||||
@ -630,6 +630,17 @@ exports.ZERO_HASH160 = new Buffer(
|
||||
|
||||
exports.NULL_HASH160 = '0000000000000000000000000000000000000000';
|
||||
|
||||
/**
|
||||
* A compressed pubkey of all zeroes.
|
||||
* @const {Buffer}
|
||||
* @default
|
||||
*/
|
||||
|
||||
exports.ZERO_KEY = new Buffer(
|
||||
'000000000000000000000000000000000000000000000000000000000000000000',
|
||||
'hex'
|
||||
);
|
||||
|
||||
/**
|
||||
* BCoin version.
|
||||
* @const {String}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user