diff --git a/lib/hdkey.js b/lib/hdkey.js index 77e1a44..3c28932 100644 --- a/lib/hdkey.js +++ b/lib/hdkey.js @@ -152,6 +152,14 @@ HDKey.prototype.deriveChild = function (index) { return hd } +HDKey.prototype.sign = function (hash) { + return secp256k1.sign(hash, this.privateKey).signature +} + +HDKey.prototype.verify = function (hash, signature) { + return secp256k1.verify(hash, signature, this.publicKey) +} + HDKey.prototype.toJSON = function () { return { xpriv: this.privateExtendedKey,