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

    Class AsyncQueryBusClient<TParams>

    Type Parameters

    Hierarchy

    • AsyncQueryBusBase<TParams>
      • AsyncQueryBusClient
    Index

    Constructors

    Properties

    _lastState?: LRUCache<Lowercase<string>, Lowercase<string>, unknown>
    _queryCache?: LRUCache<
        Lowercase<string>,
        ModuleQueryResult | "pending",
        unknown,
    >
    _targetConfigs: Record<Lowercase<string>, ModuleConfig>
    _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>>

      A cache of the last offset of the Diviner process per address

      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">

      A cache of queries that have been issued

      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?: any;
              additionalSigners?: any[];
              addToResolvers?: boolean;
              allowNameResolution?: boolean;
              config: AnyConfigSchema<ModuleConfig>;
              ephemeralQueryAccountEnabled?: boolean;
              moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
              privateChildren?: ModuleInstance<
                  BaseParamsFields & {
                      account?: AccountInstance
                      | "random";
                      additionalSigners?: AccountInstance[];
                      addToResolvers?: boolean;
                      allowNameResolution?: boolean;
                      config: AnyConfigSchema<ModuleConfig>;
                      ephemeralQueryAccountEnabled?: boolean;
                      moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                      privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                  },
                  ModuleEventData<object>,
              >[];
              publicChildren?: ModuleInstance<
                  BaseParamsFields & {
                      account?: AccountInstance
                      | "random";
                      additionalSigners?: AccountInstance[];
                      addToResolvers?: boolean;
                      allowNameResolution?: boolean;
                      config: AnyConfigSchema<ModuleConfig>;
                      ephemeralQueryAccountEnabled?: boolean;
                      moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                      privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                  },
                  ModuleEventData<object>,
              >[];
          },
          ModuleEventData<object>,
      >

      Returns ModuleInstance<
          BaseParamsFields & {
              account?: any;
              additionalSigners?: any[];
              addToResolvers?: boolean;
              allowNameResolution?: boolean;
              config: AnyConfigSchema<ModuleConfig>;
              ephemeralQueryAccountEnabled?: boolean;
              moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
              privateChildren?: ModuleInstance<
                  BaseParamsFields & {
                      account?: AccountInstance
                      | "random";
                      additionalSigners?: AccountInstance[];
                      addToResolvers?: boolean;
                      allowNameResolution?: boolean;
                      config: AnyConfigSchema<ModuleConfig>;
                      ephemeralQueryAccountEnabled?: boolean;
                      moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                      privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                  },
                  ModuleEventData<object>,
              >[];
              publicChildren?: ModuleInstance<
                  BaseParamsFields & {
                      account?: AccountInstance
                      | "random";
                      additionalSigners?: AccountInstance[];
                      addToResolvers?: boolean;
                      allowNameResolution?: boolean;
                      config: AnyConfigSchema<ModuleConfig>;
                      ephemeralQueryAccountEnabled?: boolean;
                      moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                      privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                  },
                  ModuleEventData<object>,
              >[];
          },
          ModuleEventData<object>,
      >

    • 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

    • 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 undefined | Generator<Lowercase<string>, void, unknown>

    • Returns Promise<
          | undefined
          | ArchivistInstance<
              BaseParamsFields & {
                  account?: any;
                  additionalSigners?: any[];
                  addToResolvers?: boolean;
                  allowNameResolution?: boolean;
                  config: AnyConfigSchema<ArchivistConfig<void, void>>;
                  ephemeralQueryAccountEnabled?: boolean;
                  moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                  privateChildren?: ModuleInstance<
                      BaseParamsFields & {
                          account?: (...)
                          | (...)
                          | (...);
                          additionalSigners?: (...) | (...);
                          addToResolvers?: (...) | (...) | (...);
                          allowNameResolution?: (...) | (...) | (...);
                          config: AnyConfigSchema<(...)>;
                          ephemeralQueryAccountEnabled?: (...) | (...) | (...);
                          moduleIdentifierTransformers?: (...) | (...);
                          privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                          publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      },
                      ModuleEventData<object>,
                  >[];
                  publicChildren?: ModuleInstance<
                      BaseParamsFields & {
                          account?: (...)
                          | (...)
                          | (...);
                          additionalSigners?: (...) | (...);
                          addToResolvers?: (...) | (...) | (...);
                          allowNameResolution?: (...) | (...) | (...);
                          config: AnyConfigSchema<(...)>;
                          ephemeralQueryAccountEnabled?: (...) | (...) | (...);
                          moduleIdentifierTransformers?: (...) | (...);
                          privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                          publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      },
                      ModuleEventData<object>,
                  >[];
              } & ArchivistParamFields & object,
              ArchivistModuleEventData,
              Payload<void, void>,
          >,
      >

    • Returns Promise<
          DivinerInstance<
              BaseParamsFields & {
                  account?: any;
                  additionalSigners?: any[];
                  addToResolvers?: boolean;
                  allowNameResolution?: boolean;
                  config: AnyConfigSchema<BoundWitnessDivinerConfig<Payload>>;
                  ephemeralQueryAccountEnabled?: boolean;
                  moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                  privateChildren?: ModuleInstance<
                      BaseParamsFields & {
                          account?: AccountInstance
                          | "random";
                          additionalSigners?: (...)[];
                          addToResolvers?: boolean;
                          allowNameResolution?: boolean;
                          config: AnyConfigSchema<ModuleConfig>;
                          ephemeralQueryAccountEnabled?: boolean;
                          moduleIdentifierTransformers?: (...)[];
                          privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                          publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      },
                      ModuleEventData<object>,
                  >[];
                  publicChildren?: ModuleInstance<
                      BaseParamsFields & {
                          account?: AccountInstance
                          | "random";
                          additionalSigners?: (...)[];
                          addToResolvers?: boolean;
                          allowNameResolution?: boolean;
                          config: AnyConfigSchema<ModuleConfig>;
                          ephemeralQueryAccountEnabled?: boolean;
                          moduleIdentifierTransformers?: (...)[];
                          privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                          publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      },
                      ModuleEventData<object>,
                  >[];
              },
              BoundWitnessDivinerQueryPayload,
              UnsignedQueryBoundWitness,
              DivinerModuleEventData<
                  ModuleInstance<
                      BaseParamsFields & {
                          account?: AccountInstance
                          | "random";
                          additionalSigners?: AccountInstance[];
                          addToResolvers?: boolean;
                          allowNameResolution?: boolean;
                          config: AnyConfigSchema<ModuleConfig>;
                          ephemeralQueryAccountEnabled?: boolean;
                          moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                          privateChildren?: (
                              ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>
                          )[];
                          publicChildren?: (
                              ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>
                          )[];
                      },
                      ModuleEventData<object>,
                  >,
                  Payload,
                  Payload,
              >,
          >,
      >

    • Returns Promise<
          | undefined
          | ArchivistInstance<
              BaseParamsFields & {
                  account?: any;
                  additionalSigners?: any[];
                  addToResolvers?: boolean;
                  allowNameResolution?: boolean;
                  config: AnyConfigSchema<ArchivistConfig<void, void>>;
                  ephemeralQueryAccountEnabled?: boolean;
                  moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                  privateChildren?: ModuleInstance<
                      BaseParamsFields & {
                          account?: (...)
                          | (...)
                          | (...);
                          additionalSigners?: (...) | (...);
                          addToResolvers?: (...) | (...) | (...);
                          allowNameResolution?: (...) | (...) | (...);
                          config: AnyConfigSchema<(...)>;
                          ephemeralQueryAccountEnabled?: (...) | (...) | (...);
                          moduleIdentifierTransformers?: (...) | (...);
                          privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                          publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      },
                      ModuleEventData<object>,
                  >[];
                  publicChildren?: ModuleInstance<
                      BaseParamsFields & {
                          account?: (...)
                          | (...)
                          | (...);
                          additionalSigners?: (...) | (...);
                          addToResolvers?: (...) | (...) | (...);
                          allowNameResolution?: (...) | (...) | (...);
                          config: AnyConfigSchema<(...)>;
                          ephemeralQueryAccountEnabled?: (...) | (...) | (...);
                          moduleIdentifierTransformers?: (...) | (...);
                          privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                          publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      },
                      ModuleEventData<object>,
                  >[];
              } & ArchivistParamFields & object,
              ArchivistModuleEventData,
              Payload<void, void>,
          >,
      >

    • Returns Promise<
          DivinerInstance<
              BaseParamsFields & {
                  account?: any;
                  additionalSigners?: any[];
                  addToResolvers?: boolean;
                  allowNameResolution?: boolean;
                  config: AnyConfigSchema<BoundWitnessDivinerConfig<Payload>>;
                  ephemeralQueryAccountEnabled?: boolean;
                  moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                  privateChildren?: ModuleInstance<
                      BaseParamsFields & {
                          account?: AccountInstance
                          | "random";
                          additionalSigners?: (...)[];
                          addToResolvers?: boolean;
                          allowNameResolution?: boolean;
                          config: AnyConfigSchema<ModuleConfig>;
                          ephemeralQueryAccountEnabled?: boolean;
                          moduleIdentifierTransformers?: (...)[];
                          privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                          publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      },
                      ModuleEventData<object>,
                  >[];
                  publicChildren?: ModuleInstance<
                      BaseParamsFields & {
                          account?: AccountInstance
                          | "random";
                          additionalSigners?: (...)[];
                          addToResolvers?: boolean;
                          allowNameResolution?: boolean;
                          config: AnyConfigSchema<ModuleConfig>;
                          ephemeralQueryAccountEnabled?: boolean;
                          moduleIdentifierTransformers?: (...)[];
                          privateChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                          publicChildren?: ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>[] | undefined;
                      },
                      ModuleEventData<object>,
                  >[];
              },
              BoundWitnessDivinerQueryPayload,
              BoundWitness,
              DivinerModuleEventData<
                  ModuleInstance<
                      BaseParamsFields & {
                          account?: AccountInstance
                          | "random";
                          additionalSigners?: AccountInstance[];
                          addToResolvers?: boolean;
                          allowNameResolution?: boolean;
                          config: AnyConfigSchema<ModuleConfig>;
                          ephemeralQueryAccountEnabled?: boolean;
                          moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
                          privateChildren?: (
                              ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>
                          )[];
                          publicChildren?: (
                              ModuleInstance<BaseParamsFields & { account?: AccountInstance | "random" | undefined; addToResolvers?: boolean | undefined; additionalSigners?: AccountInstance[] | undefined; ... 5 more ...; publicChildren?: ModuleInstance<...>[] | undefined; }, ModuleEventData<...>>
                          )[];
                      },
                      ModuleEventData<object>,
                  >,
                  Payload,
                  Payload,
              >,
          >,
      >

    • Retrieves the last state of the process. Used to recover state after preemptions, reboots, etc.

      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