Type Parameters

Hierarchy

  • AsyncQueryBusBase<TParams>
    • AsyncQueryBusClient

Constructors

Properties

_lastState?: LRUCache<Lowercase<string>, Lowercase<string>>
_queryCache?: LRUCache<Lowercase<string>, "pending" | ModuleQueryResult>
_targetConfigs: Record<
    Lowercase<string>,
    DeepRestrictToStringKeys<
        {
            allowedQueries?: string[];
            archiving?: { archivists?: string[]; queries?: string[] };
            archivist?: string;
            consoleLogger?: LogLevel;
            labels?: { [key: string]: undefined | string };
            name?: string;
            paging?: { [key: string]: { size?: number } };
            retry?: { backoff?: number; interval?: number; retries?: number };
            schema: "network.xyo.module.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: { [key: string]: (Lowercase<string> | Lowercase<(...)>[])[] };
                disallowed?: { [key: string]: Lowercase<string>[] };
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        },
    >,
> = {}
_targetQueries: Record<Lowercase<string>, string[]> = {}
defaultLogger?: Logger
globalInstances: Record<string, WeakRef<Base<undefined | BaseParamsFields>>[]>
globalInstancesCountHistory: Record<string, number[]>
uniqueName: string

Accessors

  • get logger(): undefined | Logger
  • Returns undefined | Logger

  • get params(): TParams
  • Returns TParams

  • get historyInterval(): number
  • Returns number

  • set historyInterval(value: number): void
  • Parameters

    • value: number

    Returns void

  • get historyTime(): number
  • Returns number

  • set historyTime(value: number): void
  • Parameters

    • value: number

    Returns void

  • get maxGcFrequency(): number
  • Returns number

  • set maxGcFrequency(value: number): void
  • Parameters

    • value: number

    Returns void

  • get maxHistoryDepth(): number
  • Returns number

Methods

  • Commit the internal state of the process. This is similar to a transaction completion in a database and should only be called when results have been successfully persisted to the appropriate external stores.

    Parameters

    • address: Lowercase<string>

      The module address to commit the state for

    • nextState: Lowercase<string>

      The state to commit

    Returns Promise<void>

  • Returns Promise<
        DivinerInstance<
            BaseParamsFields & {
                account?: AccountInstance
                | "random";
                additionalSigners?: AccountInstance[];
                addToResolvers?: boolean;
                allowNameResolution?: boolean;
                config: DeepRestrictToStringKeys<
                    {
                        allowedQueries?: string[];
                        archiving?: { archivists?: string[]; queries?: string[] };
                        archivist?: string;
                        consoleLogger?: LogLevel;
                        labels?: { [key: string]: undefined | string };
                        name?: string;
                        paging?: { [key: string]: { size?: number } };
                        retry?: { backoff?: number; interval?: number; retries?: number };
                        schema: string;
                        security?: {
                            allowAnonymous?: boolean;
                            allowed?: { [key: string]: (...)[] };
                            disallowed?: { [key: string]: (...)[] };
                        };
                        sign?: boolean;
                        storeQueries?: boolean;
                        timestamp?: boolean;
                    },
                >;
                ephemeralQueryAccountEnabled?: boolean;
                moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
            },
            DeepRestrictToStringKeys<
                {
                    address?: Lowercase<string>
                    | Lowercase<string>[];
                    addresses?: Lowercase<string>[];
                    block?: Lowercase<string>;
                    budget?: number;
                    chain?: Lowercase<string>;
                    cursor?: Lowercase<string>;
                    destination?: string[];
                    limit?: number;
                    maxFrequency?:
                        | "once"
                        | "second"
                        | "minute"
                        | "hour"
                        | "day"
                        | "week"
                        | "month"
                        | "year";
                    minBid?: number;
                    order?: Order;
                    payload_hashes?: Lowercase<string>[];
                    payload_schemas?: string[];
                    previous_hashes?: DeepRestrictToStringKeys<null | Lowercase<string>>[];
                    root?: Lowercase<string>;
                    schema: "network.xyo.diviner.boundwitness.query";
                    sourceQuery?: string;
                },
            >,
            UnsignedQueryBoundWitness,
        >,
    >

  • Returns Promise<
        DivinerInstance<
            BaseParamsFields & {
                account?: AccountInstance
                | "random";
                additionalSigners?: AccountInstance[];
                addToResolvers?: boolean;
                allowNameResolution?: boolean;
                config: DeepRestrictToStringKeys<
                    {
                        allowedQueries?: string[];
                        archiving?: { archivists?: string[]; queries?: string[] };
                        archivist?: string;
                        consoleLogger?: LogLevel;
                        labels?: { [key: string]: undefined | string };
                        name?: string;
                        paging?: { [key: string]: { size?: number } };
                        retry?: { backoff?: number; interval?: number; retries?: number };
                        schema: string;
                        security?: {
                            allowAnonymous?: boolean;
                            allowed?: { [key: string]: (...)[] };
                            disallowed?: { [key: string]: (...)[] };
                        };
                        sign?: boolean;
                        storeQueries?: boolean;
                        timestamp?: boolean;
                    },
                >;
                ephemeralQueryAccountEnabled?: boolean;
                moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
            },
            DeepRestrictToStringKeys<
                {
                    address?: Lowercase<string>
                    | Lowercase<string>[];
                    addresses?: Lowercase<string>[];
                    block?: Lowercase<string>;
                    budget?: number;
                    chain?: Lowercase<string>;
                    cursor?: Lowercase<string>;
                    destination?: string[];
                    limit?: number;
                    maxFrequency?:
                        | "once"
                        | "second"
                        | "minute"
                        | "hour"
                        | "day"
                        | "week"
                        | "month"
                        | "year";
                    minBid?: number;
                    order?: Order;
                    payload_hashes?: Lowercase<string>[];
                    payload_schemas?: string[];
                    previous_hashes?: DeepRestrictToStringKeys<null | Lowercase<string>>[];
                    root?: Lowercase<string>;
                    schema: "network.xyo.diviner.boundwitness.query";
                    sourceQuery?: string;
                },
            >,
            BoundWitness,
        >,
    >

  • Parameters

    • Optionalforce: boolean

    Returns void

  • Parameters

    • className: string

    Returns void

  • Parameters

    • className: string

    Returns number

  • Returns Record<string, number>

  • Returns void

  • Returns void