Skip to content

Commit

Permalink
feat: verify ecdsa signature
Browse files Browse the repository at this point in the history
  • Loading branch information
emidev98 committed Sep 12, 2023
1 parent 17c9847 commit b060cce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/key/RawKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,12 @@ export class RawKey extends Key {
: this.ecdsaSign(payload);
return Buffer.from(signature);
}

public ecdsaVerify(
signature: Buffer,
message: Buffer,
publicKey: Buffer
): boolean {
return secp256k1.ecdsaVerify(signature, message, publicKey);
}
}

0 comments on commit b060cce

Please sign in to comment.