XYO Platform SDK - v3.10.6
    Preparing search index...

    Interface CustomSentinelModule<TParams, TEvents>

    interface CustomSentinelModule<
        TParams extends SentinelParams = SentinelParams,
        TEvents extends
            SentinelModuleEventData<SentinelModule<TParams>> = SentinelModuleEventData<
            SentinelModule<TParams>,
        >,
    > {
        address: Lowercase<string>;
        config: TParams["config"];
        eventData: TEvents;
        id: string;
        modName?: string;
        params: TParams;
        previousHash: () => Promisable<undefined | string>;
        queries: string[];
        query: <
            T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness,
            TConf extends ModuleConfig = ModuleConfig,
        >(
            query: T,
            payloads?: Payload[],
            queryConfig?: TConf,
        ) => Promisable<ModuleQueryResult>;
        queryable: <
            T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness,
            TConf extends ModuleConfig = ModuleConfig,
        >(
            query: T,
            payloads?: Payload[],
            queryConfig?: TConf,
        ) => Promisable<boolean>;
        start?: () => Promisable<boolean>;
        stop?: () => Promisable<boolean>;
        clearListeners(eventNames: keyof TEvents | (keyof TEvents)[]): void;
        emit<TEventName extends string | number | symbol>(
            eventName: TEventName,
            eventArgs: TEvents[TEventName],
        ): Promise<void>;
        emitSerial<TEventName extends string | number | symbol>(
            eventName: TEventName,
            eventArgs: TEvents[TEventName],
        ): Promise<void>;
        listenerCount(eventNames: keyof TEvents | (keyof TEvents)[]): number;
        off<TEventName extends string | number | symbol>(
            eventNames: TEventName | TEventName[],
            listener: EventListener<TEvents[TEventName]>,
        ): void;
        offAny(listener: Promise<void> | EventAnyListener<EventArgs>): void;
        on<TEventName extends string | number | symbol>(
            eventNames: TEventName | TEventName[],
            listener: EventListener<TEvents[TEventName]>,
        ): EventUnsubscribeFunction;
        onAny(listener: EventAnyListener): EventUnsubscribeFunction;
        once<TEventName extends string | number | symbol>(
            eventName: TEventName,
            listener: EventListener<TEvents[TEventName]>,
        ): EventUnsubscribeFunction;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    address: Lowercase<string>
    config: TParams["config"]
    eventData: TEvents
    id: string

    The name (if specified) or address of the module

    modName?: string
    params: TParams
    previousHash: () => Promisable<undefined | string>
    queries: string[]
    query: <
        T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness,
        TConf extends ModuleConfig = ModuleConfig,
    >(
        query: T,
        payloads?: Payload[],
        queryConfig?: TConf,
    ) => Promisable<ModuleQueryResult>
    queryable: <
        T extends UnsignedQueryBoundWitness = UnsignedQueryBoundWitness,
        TConf extends ModuleConfig = ModuleConfig,
    >(
        query: T,
        payloads?: Payload[],
        queryConfig?: TConf,
    ) => Promisable<boolean>
    start?: () => Promisable<boolean>
    stop?: () => Promisable<boolean>

    Methods

    • Parameters

      Returns void

    • Type Parameters

      • TEventName extends string | number | symbol

      Parameters

      Returns Promise<void>

    • Type Parameters

      • TEventName extends string | number | symbol

      Parameters

      Returns Promise<void>

    • Parameters

      Returns number