Skip to content

Commit

Permalink
feat: get raw public key method
Browse files Browse the repository at this point in the history
  • Loading branch information
emidev98 committed Sep 12, 2023
1 parent b060cce commit c6e3611
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/key/RawKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,10 @@ export class RawKey extends Key {
): boolean {
return secp256k1.ecdsaVerify(signature, message, publicKey);
}

public getRawPublicKey(): Buffer {
const pub = secp256k1.publicKeyCreate(this.privateKey);

return Buffer.from(pub);
}
}

0 comments on commit c6e3611

Please sign in to comment.