Expose private key in a signing key.
This commit is contained in:
parent
2605e7de40
commit
66a5b0ecdc
@ -105,6 +105,7 @@ function SigningKey(privateKey) {
|
||||
} else if (!Buffer.isBuffer(privateKey) || privateKey.length !== 32) {
|
||||
throw new Error('invalid private key');
|
||||
}
|
||||
utils.defineProperty(this, 'privateKey', '0x' + privateKey.toString('hex'))
|
||||
|
||||
var keyPair = secp256k1.keyFromPrivate(privateKey);
|
||||
var publicKey = (new Buffer(keyPair.getPublic(false, 'hex'), 'hex')).slice(1);
|
||||
|
Loading…
Reference in New Issue
Block a user