Marmot-TS
    Preparing search index...

    Class GroupSession<THistory>

    Type Parameters

    Index
    ciphersuite: CiphersuiteImpl
    history: THistory
    ingestStateStore?: GenericKeyValueStore<Uint8Array<ArrayBufferLike>>
    lifecycleStore?: GenericKeyValueStore<Uint8Array<ArrayBufferLike>>
    rewindStore?: GenericKeyValueStore<Uint8Array<ArrayBufferLike>>
    • Builds the self-remove proposal effects for leaving the group.

      Per RFC 9420 §12.4 a member cannot commit a Remove targeting their own leaf, so this emits self-remove proposal(s) for the next committer (e.g. an admin) to apply. Modelled as a send-intent — the darkmatter engine exposes the same operation as do_send_leave rather than letting callers hand-build the proposals.

      Parameters

      • ownPubkey: string

        The leaving member's Nostr public key (hex string).

      Returns Promise<GroupEffects>

      Publishable proposal effects (one per owned leaf node).

    • Commits selected terminal evidence before repeatable cleanup. The first durable write is authoritative even if any later store operation fails.

      Parameters

      • evidence: DisbandCandidateEvidence

      Returns Promise<DisbandTombstone>

    • Re-scores the persisted fork history against the current tip and switches to the canonical branch if a competing fork now wins (convergence.md), then persists a resulting switch. Sources candidates from the history tree, so a client that diverged onto a losing fork converges from disk without waiting for the network to re-deliver the winning branch. Called on load.

      Returns the pass's results in the same shape ingest yields, so the caller can route them through the identical handler — in particular the stateInvalidated withdrawal that clears the removed-inactive marker (CONV-03, D-12). This layer used to swallow them (CR-06).

      Returns Promise<DispositionedIngestResult[]>