Type Parameters

Hierarchy

  • AsyncQueryBusBase<TParams>
    • AsyncQueryBusClient

Constructors

Properties

_lastState?: LRUCache<Lowercase<string>, Lowercase<string>>
_queryCache?: LRUCache<Lowercase<string>, ModuleQueryResult | "pending">
_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 config(): TParams["config"]
  • Returns TParams["config"]

  • get lastState(): LRUCache<Lowercase<string>, Lowercase<string>>
  • Returns LRUCache<Lowercase<string>, Lowercase<string>>

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

  • get params(): TParams
  • Returns TParams

  • get pollFrequency(): number
  • Returns number

  • get queryCache(): LRUCache<Lowercase<string>, ModuleQueryResult | "pending">
  • Returns LRUCache<Lowercase<string>, ModuleQueryResult | "pending">

  • get queryCacheConfig(): Options<
        Lowercase<string>,
        ModuleQueryResult | "pending",
        unknown,
    >
  • Returns Options<Lowercase<string>, ModuleQueryResult | "pending", unknown>

  • get rootModule(): ModuleInstance<
        BaseParamsFields & {
            account?: AccountInstance
            | "random";
            additionalSigners?: AccountInstance[];
            addToResolvers?: boolean;
            allowNameResolution?: boolean;
            config: DeepRestrictToStringKeys<
                {
                    allowedQueries?: string[];
                    archiving?: { archivists?: string[]; queries?: string[] };
                    archivist?: string;
                    consoleLogger?: LogLevel;
                    labels?: { [x: string]: undefined | string };
                    name?: string;
                    paging?: { [x: string]: { size?: number } };
                    retry?: { backoff?: number; interval?: number; retries?: number };
                    schema: string;
                    security?: {
                        allowAnonymous?: boolean;
                        allowed?: { [x: string]: ((...) | (...))[] };
                        disallowed?: { [x: string]: Lowercase<(...)>[] };
                    };
                    sign?: boolean;
                    storeQueries?: boolean;
                    timestamp?: boolean;
                },
            >;
            ephemeralQueryAccountEnabled?: boolean;
            moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
        },
    >
  • Returns ModuleInstance<
        BaseParamsFields & {
            account?: AccountInstance
            | "random";
            additionalSigners?: AccountInstance[];
            addToResolvers?: boolean;
            allowNameResolution?: boolean;
            config: DeepRestrictToStringKeys<
                {
                    allowedQueries?: string[];
                    archiving?: { archivists?: string[]; queries?: string[] };
                    archivist?: string;
                    consoleLogger?: LogLevel;
                    labels?: { [x: string]: undefined | string };
                    name?: string;
                    paging?: { [x: string]: { size?: number } };
                    retry?: { backoff?: number; interval?: number; retries?: number };
                    schema: string;
                    security?: {
                        allowAnonymous?: boolean;
                        allowed?: { [x: string]: ((...) | (...))[] };
                        disallowed?: { [x: string]: Lowercase<(...)>[] };
                    };
                    sign?: boolean;
                    storeQueries?: boolean;
                    timestamp?: boolean;
                },
            >;
            ephemeralQueryAccountEnabled?: boolean;
            moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
        },
    >

  • get started(): boolean
  • Returns boolean

  • 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

  • Parameters

    • address: Lowercase<string>
    • nextState: Lowercase<string>

    Returns Promise<void>

  • Returns undefined | Generator<Lowercase<string>, void>

  • Returns Promise<
        | undefined
        | ArchivistInstance<
            BaseParamsFields & {
                account?: AccountInstance
                | "random";
                additionalSigners?: AccountInstance[];
                addToResolvers?: boolean;
                allowNameResolution?: boolean;
                config: DeepRestrictToStringKeys<
                    {
                        allowedQueries?: string[];
                        archiving?: { archivists?: (...)[]; queries?: (...)[] };
                        archivist?: string;
                        consoleLogger?: LogLevel;
                        labels?: { [x: string]: undefined | string };
                        name?: string;
                        paging?: { [x: string]: { size?: (...) | (...) } };
                        parents?: { commit?: (...)[]; read?: (...)[]; write?: (...)[] };
                        requireAllParents?: boolean;
                        retry?: { backoff?: number; interval?: number; retries?: number };
                        schema: string;
                        security?: {
                            allowAnonymous?: boolean;
                            allowed?: { [x: ...]: ... };
                            disallowed?: { [x: ...]: ... };
                        };
                        sign?: boolean;
                        storage?: { indexes?: (...)[] };
                        storeParentReads?: boolean;
                        storeQueries?: boolean;
                        timestamp?: boolean;
                    },
                >;
                ephemeralQueryAccountEnabled?: boolean;
                moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
            },
            DeepRestrictToStringKeys<{ schema: string }>,
        >,
    >

  • 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?: { [x: string]: undefined | string };
                        name?: string;
                        paging?: { [x: string]: { size?: number } };
                        retry?: { backoff?: number; interval?: number; retries?: number };
                        schema: string;
                        security?: {
                            allowAnonymous?: boolean;
                            allowed?: { [x: string]: (...)[] };
                            disallowed?: { [x: 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?: any;
                    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,
            DivinerModuleEventData<
                ModuleInstance<
                    BaseParamsFields & {
                        account?: AccountInstance
                        | "random";
                        additionalSigners?: AccountInstance[];
                        addToResolvers?: boolean;
                        allowNameResolution?: boolean;
                        config: DeepRestrictToStringKeys<
                            {
                                allowedQueries?: string[];
                                archiving?: { archivists?: (...)
                                | (...); queries?: (...) | (...) };
                                archivist?: string;
                                consoleLogger?: LogLevel;
                                labels?: { [x: string]: (...) | (...) };
                                name?: string;
                                paging?: { [x: string]: { size?: ... } };
                                retry?: {
                                    backoff?: (...) | (...);
                                    interval?: (...) | (...);
                                    retries?: (...) | (...);
                                };
                                schema: string;
                                security?: {
                                    allowAnonymous?: (...)
                                    | (...)
                                    | (...);
                                    allowed?: (...) | (...);
                                    disallowed?: (...) | (...);
                                };
                                sign?: boolean;
                                storeQueries?: boolean;
                                timestamp?: boolean;
                            },
                        >;
                        ephemeralQueryAccountEnabled?: boolean;
                        moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                    },
                >,
                DeepRestrictToStringKeys<{ schema: string }>,
                DeepRestrictToStringKeys<{ schema: string }>,
            >,
        >,
    >

  • Returns Promise<
        | undefined
        | ArchivistInstance<
            BaseParamsFields & {
                account?: AccountInstance
                | "random";
                additionalSigners?: AccountInstance[];
                addToResolvers?: boolean;
                allowNameResolution?: boolean;
                config: DeepRestrictToStringKeys<
                    {
                        allowedQueries?: string[];
                        archiving?: { archivists?: (...)[]; queries?: (...)[] };
                        archivist?: string;
                        consoleLogger?: LogLevel;
                        labels?: { [x: string]: undefined | string };
                        name?: string;
                        paging?: { [x: string]: { size?: (...) | (...) } };
                        parents?: { commit?: (...)[]; read?: (...)[]; write?: (...)[] };
                        requireAllParents?: boolean;
                        retry?: { backoff?: number; interval?: number; retries?: number };
                        schema: string;
                        security?: {
                            allowAnonymous?: boolean;
                            allowed?: { [x: ...]: ... };
                            disallowed?: { [x: ...]: ... };
                        };
                        sign?: boolean;
                        storage?: { indexes?: (...)[] };
                        storeParentReads?: boolean;
                        storeQueries?: boolean;
                        timestamp?: boolean;
                    },
                >;
                ephemeralQueryAccountEnabled?: boolean;
                moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
            },
            DeepRestrictToStringKeys<{ schema: string }>,
        >,
    >

  • 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?: { [x: string]: undefined | string };
                        name?: string;
                        paging?: { [x: string]: { size?: number } };
                        retry?: { backoff?: number; interval?: number; retries?: number };
                        schema: string;
                        security?: {
                            allowAnonymous?: boolean;
                            allowed?: { [x: string]: (...)[] };
                            disallowed?: { [x: 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?: any;
                    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,
            DivinerModuleEventData<
                ModuleInstance<
                    BaseParamsFields & {
                        account?: AccountInstance
                        | "random";
                        additionalSigners?: AccountInstance[];
                        addToResolvers?: boolean;
                        allowNameResolution?: boolean;
                        config: DeepRestrictToStringKeys<
                            {
                                allowedQueries?: string[];
                                archiving?: { archivists?: (...)
                                | (...); queries?: (...) | (...) };
                                archivist?: string;
                                consoleLogger?: LogLevel;
                                labels?: { [x: string]: (...) | (...) };
                                name?: string;
                                paging?: { [x: string]: { size?: ... } };
                                retry?: {
                                    backoff?: (...) | (...);
                                    interval?: (...) | (...);
                                    retries?: (...) | (...);
                                };
                                schema: string;
                                security?: {
                                    allowAnonymous?: (...)
                                    | (...)
                                    | (...);
                                    allowed?: (...) | (...);
                                    disallowed?: (...) | (...);
                                };
                                sign?: boolean;
                                storeQueries?: boolean;
                                timestamp?: boolean;
                            },
                        >;
                        ephemeralQueryAccountEnabled?: boolean;
                        moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                    },
                >,
                DeepRestrictToStringKeys<{ schema: string }>,
                DeepRestrictToStringKeys<{ schema: string }>,
            >,
        >,
    >

  • Parameters

    • address: Lowercase<string>

    Returns Promise<Lowercase<string>>

  • Parameters

    • Optionalforce: boolean

    Returns void

  • Parameters

    • className: string

    Returns void

  • Parameters

    • className: string

    Returns number

  • Returns Record<string, number>

  • Returns void

  • Returns void