mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
always recompute the hash when signing.
fixes https://github.com/fiatjaf/nostr-tools/issues/59
This commit is contained in:
2
event.ts
2
event.ts
@@ -64,6 +64,6 @@ export function verifySignature(
|
||||
|
||||
export async function signEvent(event: Event, key: string): Promise<string> {
|
||||
return secp256k1.utils.bytesToHex(
|
||||
await secp256k1.schnorr.sign(event.id || getEventHash(event), key)
|
||||
await secp256k1.schnorr.sign(getEventHash(event), key)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user