Marmot-TS
    Preparing search index...

    Type Alias GroupSessionOptions<THistory>

    type GroupSessionOptions<
        THistory extends GroupSessionHistory
        | undefined = undefined,
    > = {
        audit?: AuditSink;
        auditContext?: AuditContextOptions;
        ciphersuite: CiphersuiteImpl;
        convergencePolicy?: ConvergencePolicy;
        history?: THistory;
        historyTree?: GroupHistoryTree;
        ingestionPool?: IngestionPoolOptions;
        now?: () => number;
        onApplicationMessage?: (message: Uint8Array) => void;
        onHistoryError?: (error: Error) => void;
        onSettleCheck?: () => void | Promise<void>;
        onStateChanged?: (state: ClientState) => void;
        onStateSaved?: () => void;
        retained?: RetainedHistoryStore;
        rewindStore?: GenericKeyValueStore<Uint8Array>;
        scheduler?: ConvergenceScheduler;
        settlementQuiescenceMs?: number;
        state: ClientState;
        store: GenericKeyValueStore<SerializedClientState>;
    }

    Type Parameters

    Index

    Client - Session

    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
    convergencePolicy?: ConvergencePolicy

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

    history?: THistory
    historyTree?: GroupHistoryTree

    A full-fork history tree rehydrated from rewindStore on load. When omitted and a rewindStore is set, a fresh tree is bound to that store and flushed on GroupSession.save.

    ingestionPool?: IngestionPoolOptions

    Tuning for the persistent ingestion pool (undecryptable events held and retried as the history tree grows): max entries and max epoch-age before an unresolved entry is given up. Defaults bound it; a debugging tool that wants to retain everything can raise both.

    now?: () => number

    Injectable wall-clock for the convergence quiescence window (B5; tests).

    onApplicationMessage?: (message: Uint8Array) => void
    onHistoryError?: (error: Error) => void
    onSettleCheck?: () => void | Promise<void>

    Fired when the quiescence window elapses, so the owner can drain queued outbound (B5).

    onStateChanged?: (state: ClientState) => void
    onStateSaved?: () => void
    retained?: RetainedHistoryStore

    The bounded convergence window, derived from the history tree on load (never persisted separately). Set by the loader (GroupRegistry); fresh groups seed it from the current tip.

    rewindStore?: GenericKeyValueStore<Uint8Array>

    Dedicated store for the full-fork history tree (per-node keys under a hex group-id prefix). When set, the tree is flushed on GroupSession.save and survives a restart. Optional — when omitted, history is in-memory only and rebuilt from the current tip after each restart.

    scheduler?: ConvergenceScheduler

    Injectable settle-check timer (B5); defaults to setTimeout.

    settlementQuiescenceMs?: number

    Quiescence window (ms) before convergence may be treated as settled.