Marmot-TS
    Preparing search index...

    Type Alias GroupsManagerEvents<THistory, TMedia>

    Events emitted by GroupsManager

    type GroupsManagerEvents<
        THistory extends BaseGroupHistory
        | undefined = any,
        TMedia extends BaseGroupMedia | undefined = any,
    > = {
        created: (group: MarmotGroup<THistory, TMedia>) => void;
        destroyed: (groupId: Uint8Array) => void;
        imported: (group: MarmotGroup<THistory, TMedia>) => void;
        joined: (group: MarmotGroup<THistory, TMedia>) => void;
        left: (groupId: Uint8Array) => void;
        loaded: (group: MarmotGroup<THistory, TMedia>) => void;
        removed: (groupId: Uint8Array) => void;
        unloaded: (groupId: Uint8Array) => void;
        unreadable: (groupId: Uint8Array, event: NostrEvent) => void;
        updated: (groups: MarmotGroup<THistory, TMedia>[]) => void;
    }

    Type Parameters

    Index

    Client - Group Manager

    created: (group: MarmotGroup<THistory, TMedia>) => void

    Emitted when a new group is created

    destroyed: (groupId: Uint8Array) => void

    Emitted when a group is destroyed

    imported: (group: MarmotGroup<THistory, TMedia>) => void

    Emitted when a group is imported from a ClientState object

    joined: (group: MarmotGroup<THistory, TMedia>) => void

    Emitted when a group is joined

    left: (groupId: Uint8Array) => void

    Emitted when the client leaves a group via self-remove proposal events

    loaded: (group: MarmotGroup<THistory, TMedia>) => void

    Emitted when a group is loaded from the store

    removed: (groupId: Uint8Array) => void

    Emitted when an inbound commit removed the client from a group — an admin's involuntary Remove, or a peer committing the client's own self_remove. The group's local state is kept as a removedFromGroup tombstone; the app may call GroupsManager.destroy to purge it.

    unloaded: (groupId: Uint8Array) => void

    Emitted when a group is unloaded

    unreadable: (groupId: Uint8Array, event: NostrEvent) => void

    Emitted by a GroupsManager.connect subscription when a received transport event could not be read (e.g. an epoch beyond the retained rewind horizon). Lets the app surface dropped events instead of the connection loop logging them.

    updated: (groups: MarmotGroup<THistory, TMedia>[]) => void

    Emitted when the set of loaded groups changes