Interface IAccount<Signer, SignerData, Metadata>

interface IAccount<Signer, SignerData, Metadata> {
    disableQueue?: boolean;
    getPublicKey: (() => string | Promise<string>);
    getRelays?: (() => Record<string, {
        read: boolean;
        write: boolean;
    }> | Promise<Record<string, {
        read: boolean;
        write: boolean;
    }>>);
    id: string;
    metadata?: Metadata;
    name?: string;
    nip04?: {
        decrypt: ((pubkey: string, ciphertext: string) => string | Promise<string>);
        encrypt: ((pubkey: string, plaintext: string) => string | Promise<string>);
    };
    nip44?: {
        decrypt: ((pubkey: string, ciphertext: string) => string | Promise<string>);
        encrypt: ((pubkey: string, plaintext: string) => string | Promise<string>);
    };
    pubkey: string;
    signer: Signer;
    signEvent: ((template: EventTemplate) => Event | Promise<Event>);
    type: string;
    toJSON(): SerializedAccount<SignerData, Metadata>;
}

Type Parameters

Hierarchy (view full)

Implemented by

Properties

disableQueue?: boolean
getPublicKey: (() => string | Promise<string>)
getRelays?: (() => Record<string, {
    read: boolean;
    write: boolean;
}> | Promise<Record<string, {
    read: boolean;
    write: boolean;
}>>)
id: string
metadata?: Metadata
name?: string
nip04?: {
    decrypt: ((pubkey: string, ciphertext: string) => string | Promise<string>);
    encrypt: ((pubkey: string, plaintext: string) => string | Promise<string>);
}
nip44?: {
    decrypt: ((pubkey: string, ciphertext: string) => string | Promise<string>);
    encrypt: ((pubkey: string, plaintext: string) => string | Promise<string>);
}
pubkey: string
signer: Signer
signEvent: ((template: EventTemplate) => Event | Promise<Event>)
type: string

Methods