Marmot-TS
    Preparing search index...

    Type Alias MarmotGroupOptions<THistory, TMedia>

    type MarmotGroupOptions<
        THistory extends BaseGroupHistory
        | undefined = undefined,
        TMedia extends BaseGroupMedia | undefined = undefined,
    > = {
        audit?: AuditSink;
        auditContext?: AuditContextOptions;
        ciphersuite: CiphersuiteImpl;
        convergencePolicy?: ConvergencePolicy;
        history?: THistory | GroupHistoryFactory<THistory>;
        historyTree?: GroupHistoryTree;
        ingestionPool?: IngestionPoolOptions;
        media?: TMedia | GroupMediaFactory<TMedia>;
        network: NostrNetworkInterface;
        now?: () => number;
        retained?: RetainedHistoryStore;
        rewindStore?: GenericKeyValueStore<Uint8Array>;
        scheduler?: ConvergenceScheduler;
        settlementQuiescenceMs?: number;
        signer: EventSigner;
        store: GenericKeyValueStore<SerializedClientState>;
    }

    Type Parameters

    Index

    Client - Group

    audit?: AuditSink

    Optional forensic audit sink. Omitted by default; audit logging is app opt-in.

    auditContext?: AuditContextOptions

    Required when audit is set; contains stable engine/account/session metadata.

    ciphersuite: CiphersuiteImpl

    The ciphersuite implementation to use for the group

    convergencePolicy?: ConvergencePolicy

    Convergence policy (branch selection + maxRewindCommits rollback horizon). Set maxRewindCommits: Infinity to keep forks of any age eligible for re-convergence. Defaults to the profile-1 policy.

    The storage interface for the groups application message history (optional)

    historyTree?: GroupHistoryTree

    A full-fork history tree rehydrated from rewindStore on load. Set by the loader (GroupRegistry); not part of the public construction API.

    ingestionPool?: IngestionPoolOptions

    Tuning for the persistent ingestion pool (size + epoch-age bounds on undecryptable events held for retry). Defaults bound it.

    Backend (or pre-wrapped store) for the plaintext blob cache used by MarmotGroup.decryptMedia. Defaults to an in-memory cache when not provided.

    The nostr relay pool to use for the group. Should implement GroupNostrInterface for group operations.

    now?: () => number

    Injectable wall-clock (ms) for the convergence quiescence window (B5). Defaults to Date.now; tests inject a fake clock for determinism.

    retained?: RetainedHistoryStore

    The bounded convergence window, derived from the history tree on load. Set by the loader (GroupRegistry); not part of the public construction API.

    rewindStore?: GenericKeyValueStore<Uint8Array>

    Dedicated backend for the rewind-history blob (one entry per group). When provided, the convergence rewind window survives a restart. Optional — omitted means rewind history is in-memory only (legacy behavior).

    scheduler?: ConvergenceScheduler

    Injectable settle-check timer for releasing queued outbound work (B5). Defaults to setTimeout; tests pass a controllable fake.

    settlementQuiescenceMs?: number

    Quiescence window (ms) before convergence may be treated as settled (convergence.md settlementQuiescenceMs). Defaults to the profile-1 value.

    signer: EventSigner

    The signer used for the clients identity

    The key-value backend where serialized group state bytes are persisted