change tests and nips to use the new api.

This commit is contained in:
fiatjaf
2023-12-19 13:49:03 -03:00
parent 1908e1ee0d
commit fe87529646
32 changed files with 151 additions and 163 deletions

View File

@@ -14,7 +14,7 @@ class JS implements Nostr {
}
finalizeEvent(t: EventTemplate, secretKey: Uint8Array): VerifiedEvent {
const event = t as VerifiedEvent
event.pubkey = this.getPublicKey(secretKey)
event.pubkey = bytesToHex(schnorr.getPublicKey(secretKey))
event.id = getEventHash(event)
event.sig = bytesToHex(schnorr.sign(getEventHash(event), secretKey))
event[verifiedSymbol] = true