mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 08:38:50 +00:00
change tests and nips to use the new api.
This commit is contained in:
8
nip18.ts
8
nip18.ts
@@ -1,4 +1,4 @@
|
||||
import { Event, finishEvent, verifySignature } from './event.ts'
|
||||
import { Event, finalizeEvent, verifyEvent } from './pure.ts'
|
||||
import { Repost } from './kinds.ts'
|
||||
import { EventPointer } from './nip19.ts'
|
||||
|
||||
@@ -23,9 +23,9 @@ export function finishRepostEvent(
|
||||
t: RepostEventTemplate,
|
||||
reposted: Event,
|
||||
relayUrl: string,
|
||||
privateKey: string,
|
||||
privateKey: Uint8Array,
|
||||
): Event {
|
||||
return finishEvent(
|
||||
return finalizeEvent(
|
||||
{
|
||||
kind: Repost,
|
||||
tags: [...(t.tags ?? []), ['e', reposted.id, relayUrl], ['p', reposted.pubkey]],
|
||||
@@ -89,7 +89,7 @@ export function getRepostedEvent(event: Event, { skipVerification }: GetReposted
|
||||
return undefined
|
||||
}
|
||||
|
||||
if (!skipVerification && !verifySignature(repostedEvent)) {
|
||||
if (!skipVerification && !verifyEvent(repostedEvent)) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user