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

    Interface Module<TParams, TEventData>

    interface Module<
        TParams extends ModuleParams = ModuleParams,
        TEventData extends ModuleEventData<object> = ModuleEventData<object>,
    > {
        address: Lowercase<string>;
        config: TParams["config"];
        eventData: TEventData;
        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 TEventData | (keyof TEventData)[]): void;
        emit<TEventName extends string | number | symbol>(
            eventName: TEventName,
            eventArgs: TEventData[TEventName],
        ): Promise<void>;
        emitSerial<TEventName extends string | number | symbol>(
            eventName: TEventName,
            eventArgs: TEventData[TEventName],
        ): Promise<void>;
        listenerCount(eventNames: keyof TEventData | (keyof TEventData)[]): number;
        off<TEventName extends string | number | symbol>(
            eventNames: TEventName | TEventName[],
            listener: EventListener<TEventData[TEventName]>,
        ): void;
        offAny(listener: Promise<void> | EventAnyListener<EventArgs>): void;
        on<TEventName extends string | number | symbol>(
            eventNames: TEventName | TEventName[],
            listener: EventListener<TEventData[TEventName]>,
        ): EventUnsubscribeFunction;
        onAny(listener: EventAnyListener): EventUnsubscribeFunction;
        once<TEventName extends string | number | symbol>(
            eventName: TEventName,
            listener: EventListener<TEventData[TEventName]>,
        ): EventUnsubscribeFunction;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    address: Lowercase<string>
    config: TParams["config"]
    eventData: TEventData
    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