nostr.ts (644B)
1 import type { Pool, Repository, Tracker } from "@welshman/net"; 2 import type { ISigner } from "@welshman/signer"; 3 import type { SignedEvent, TrustedEvent } from "@welshman/util"; 4 import type { NostrEventTagClient } from "./lib.js"; 5 6 export type NostrEvent = TrustedEvent; 7 export type NostrSignedEvent = SignedEvent; 8 export type NostrSigner = ISigner; 9 10 export type NostrContext = { 11 pool: Pool; 12 repository: Repository; 13 tracker: Tracker; 14 }; 15 16 export type NostrEventFigure<T extends object> = { 17 signer: NostrSigner; 18 date_published?: Date; 19 client?: NostrEventTagClient; 20 } & T; 21 22 export type NostrUser = { 23 pubkey: string; 24 };