mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
change tests and nips to use the new api.
This commit is contained in:
6
nip25.ts
6
nip25.ts
@@ -1,4 +1,4 @@
|
||||
import { Event, finishEvent } from './event.ts'
|
||||
import { Event, finalizeEvent } from './pure.ts'
|
||||
import { Reaction } from './kinds.ts'
|
||||
|
||||
import type { EventPointer } from './nip19.ts'
|
||||
@@ -17,10 +17,10 @@ export type ReactionEventTemplate = {
|
||||
created_at: number
|
||||
}
|
||||
|
||||
export function finishReactionEvent(t: ReactionEventTemplate, reacted: Event, privateKey: string): Event {
|
||||
export function finishReactionEvent(t: ReactionEventTemplate, reacted: Event, privateKey: Uint8Array): Event {
|
||||
const inheritedTags = reacted.tags.filter(tag => tag.length >= 2 && (tag[0] === 'e' || tag[0] === 'p'))
|
||||
|
||||
return finishEvent(
|
||||
return finalizeEvent(
|
||||
{
|
||||
...t,
|
||||
kind: Reaction,
|
||||
|
||||
Reference in New Issue
Block a user