Marmot-TS
    Preparing search index...

    Type Alias MarmotClientOptions<THistory, TMedia>

    MarmotClientOptions: {
        accountProofSigner?: AccountIdentityProofSigner;
        audit?: AuditSink;
        auditContext?: AuditContextOptions;
        capabilities?: Capabilities;
        clientId?: string;
        convergencePolicy?: ConvergencePolicy;
        cryptoProvider?: CryptoProvider;
        groupStateStore: GenericKeyValueStore<SerializedClientState>;
        ingestionPool?: IngestionPoolOptions;
        inviteStore?: GenericKeyValueStore<StoredInviteEntry>;
        keyPackageStore: GenericKeyValueStore<StoredKeyPackage>;
        network: NostrNetworkInterface;
        rewindStore?: GenericKeyValueStore<Uint8Array>;
        signer: EventSigner;
    } & (
        THistory extends undefined
            ? {}
            : { historyFactory: GroupHistoryFactory<THistory> }
    ) & (
        TMedia extends undefined
            ? {}
            : { mediaFactory: GroupMediaFactory<TMedia> }
    )

    Type Parameters

    Type Declaration

    • OptionalaccountProofSigner?: AccountIdentityProofSigner

      Optional Nostr-account proof signer. When provided, key packages this client publishes carry a marmot.account-identity-proof.v1 LeafNode extension required for darkmatter wire interop. Supply from a signer with raw BIP-340 access (the applesauce EventSigner cannot sign the digest).

    • Optionalaudit?: AuditSink

      Optional forensic audit sink inherited by groups. Omitted by default.

    • OptionalauditContext?: AuditContextOptions

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

    • Optionalcapabilities?: Capabilities

      The capabilities to use for the client

    • OptionalclientId?: string

      Default d tag value (slot identifier) for key package events. Used by KeyPackageManager.create when no explicit d is passed. Set this to a stable per-device string (e.g. "my-app-desktop") so all key packages from this client share a single addressable slot on relays.

    • OptionalconvergencePolicy?: ConvergencePolicy

      Convergence policy applied to every group: branch selection and the maxRewindCommits rollback horizon. Set maxRewindCommits: Infinity to preserve the whole MLS history and keep forks of any age eligible for re-convergence. Defaults to the profile-1 policy (DEFAULT_CONVERGENCE_POLICY).

    • OptionalcryptoProvider?: CryptoProvider

      The crypto provider to use for cryptographic operations

    • groupStateStore: GenericKeyValueStore<SerializedClientState>

      The backend to store and load the groups from

    • OptionalingestionPool?: IngestionPoolOptions

      Ingestion-pool tuning applied to every group: max entries and max epoch-age for undecryptable events held and retried as history grows. Defaults bound it; a debugging tool that retains and processes everything can raise both (e.g. a large maxSize and a very large maxEpochAge).

    • OptionalinviteStore?: GenericKeyValueStore<StoredInviteEntry>

      Key value store for the InviteManager class, if non is provided an InMemoryKeyValueStore is used

    • keyPackageStore: GenericKeyValueStore<StoredKeyPackage>

      The backend for key package private material and publish tracking

    • network: NostrNetworkInterface

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

    • OptionalrewindStore?: GenericKeyValueStore<Uint8Array>

      Dedicated backend for the per-group full-fork history tree (the single persisted source for fork recovery and the MarmotGroup.forkTree API). When provided, the tree is persisted so fork recovery survives a restart; back it with the same durable (ideally encrypted) backend as groupStateStore. Optional — when omitted, history is in-memory only and is rebuilt from the current tip after each restart.

    • signer: EventSigner

      The signer used for the clients identity