import { EventKind, type EventSigner, type FullRelaySettings, type NostrEvent, NostrLink, type NotSignedNostrEvent, type PowMiner, type RelaySettings, type SignerSupports, type TaggedNostrEvent, type ToNostrEventTag, type UserMetadata } from "."; import { EventBuilder } from "./event-builder"; type EventBuilderHook = (ev: EventBuilder) => EventBuilder; export declare class EventPublisher { #private; static isInstance(obj: unknown): obj is EventPublisher; constructor(signer: EventSigner, pubKey: string); get signer(): EventSigner; /** * Create a NIP-07 EventPublisher */ static nip7(): Promise; /** * Create an EventPublisher for a private key */ static privateKey(privateKey: string | Uint8Array): EventPublisher; supports(t: SignerSupports): boolean; get pubKey(): string; /** * Create a copy of this publisher with PoW */ pow(target: number, miner?: PowMiner): EventPublisher; nip4Encrypt(content: string, otherKey: string): Promise; nip4Decrypt(content: string, otherKey: string): Promise; nip42Auth(challenge: string, relay: string): Promise; /** * Build a mute list event using lists of pubkeys * @param pub Public mute list * @param priv Private mute list */ muted(pub: Array, priv: Array): Promise; /** * Build a pin list event using lists of event links */ pinned(notes: Array): Promise; /** * Build a categorized bookmarks event with a given label * @param notes List of bookmarked links */ bookmarks(notes: Array): Promise; metadata(obj: UserMetadata): Promise; /** * Create a basic text note */ note(msg: string, fnExtra?: EventBuilderHook): Promise; /** * Create a zap request event for a given target event/profile * @param amount Millisats amout! * @param author Author pubkey to tag in the zap * @param note Note Id to tag in the zap * @param msg Custom message to be included in the zap */ zap(amount: number, author: string, relays: Array, note?: NostrLink, msg?: string, fnExtra?: EventBuilderHook): Promise; /** * Reply to a note * * Replies to kind 1 notes are kind 1, otherwise kind 1111 */ reply(replyTo: TaggedNostrEvent, msg: string, fnExtra?: EventBuilderHook): Promise; react(evRef: NostrEvent, content?: string): Promise; relayList(relays: Array | Record): Promise; contactList(tags: Array<[string, string]>, relays?: Record): Promise; /** * Delete an event (NIP-09) */ delete(id: string): Promise; /** * Repost a note (NIP-18) */ repost(note: NostrEvent): Promise; decryptDm(note: NostrEvent): Promise; sendDm(content: string, to: string): Promise; generic(fnHook: EventBuilderHook): Promise; appData(data: object, id: string): Promise; /** * NIP-59 Gift Wrap event with ephemeral key */ giftWrap(inner: NostrEvent, explicitP?: string, powTarget?: number, powMiner?: PowMiner): Promise; unwrapGift(gift: NostrEvent): Promise; /** * Create an unsigned gossip message */ createUnsigned(kind: EventKind, content: string, fnHook: EventBuilderHook): NotSignedNostrEvent; /** * Create sealed rumor */ sealRumor(inner: NotSignedNostrEvent, toKey: string): Promise; /** * Unseal rumor */ unsealRumor(inner: NostrEvent): Promise; } export {}; //# sourceMappingURL=event-publisher.d.ts.map