Documentation
    Preparing search index...

    Interface MockNostrStore

    In-memory event store shared by the social mocks.

    const store = createMockNostrStore();
    const note = store.publish({ kind: 1, content: 'hi', tags: [] }, MOCK_ACCOUNTS[0].pubkey);
    store.get(note.id) === note;
    interface MockNostrStore {
        add(event: NostrEvent): boolean;
        events(): readonly NostrEvent[];
        get(id: string): NostrEvent | undefined;
        hintsFor(event: NostrEvent): string[];
        latest(
            kind: number,
            pubkey: string,
            identifier?: string,
        ): NostrEvent | undefined;
        onEvent(listener: (event: NostrEvent) => void): () => void;
        publish(template: MockEventTemplate, pubkey: string): NostrEvent;
        query(filters: readonly NostrFilter[]): NostrEvent[];
        relayList(pubkey: string): MockRelayEntry[] | undefined;
        reset(): void;
        sign(template: MockEventTemplate, pubkey: string): NostrEvent;
        toResult(event: NostrEvent): RelayEventResult;
    }
    Index

    Methods