add a bunch of tests.

This commit is contained in:
fiatjaf
2022-12-19 19:51:55 -03:00
parent a49d971f6a
commit 1162935f58
7 changed files with 138 additions and 4 deletions

View File

@@ -64,6 +64,6 @@ export function verifySignature(
export async function signEvent(event: Event, key: string): Promise<string> {
return Buffer.from(
await secp256k1.schnorr.sign(getEventHash(event), key)
await secp256k1.schnorr.sign(event.id || getEventHash(event), key)
).toString('hex')
}