EventFactorySigner: {
    getPublicKey: () => Promise<string> | string;
    nip04?: {
        decrypt: (
            pubkey: string,
            ciphertext: string,
        ) => Promise<string> | string;
        encrypt: (pubkey: string, plaintext: string) => Promise<string> | string;
    };
    nip44?: {
        decrypt: (
            pubkey: string,
            ciphertext: string,
        ) => Promise<string> | string;
        encrypt: (pubkey: string, plaintext: string) => Promise<string> | string;
    };
    signEvent: (template: EventTemplate) => Promise<NostrEvent> | NostrEvent;
}

Type declaration

  • getPublicKey: () => Promise<string> | string
  • Optionalnip04?: {
        decrypt: (
            pubkey: string,
            ciphertext: string,
        ) => Promise<string> | string;
        encrypt: (pubkey: string, plaintext: string) => Promise<string> | string;
    }
  • Optionalnip44?: {
        decrypt: (
            pubkey: string,
            ciphertext: string,
        ) => Promise<string> | string;
        encrypt: (pubkey: string, plaintext: string) => Promise<string> | string;
    }
  • signEvent: (template: EventTemplate) => Promise<NostrEvent> | NostrEvent