Class AbstractModuleProxy<TWrappedModule, TParams>Abstract

Type Parameters

Hierarchy (View Summary)

Implements

Constructors

Properties

Accessors

Methods

Constructors

  • Type Parameters

    • TWrappedModule extends ModuleInstance = ModuleInstance
    • TParams extends Omit<
          BaseParamsFields & {
              account?: AccountInstance
              | "random";
              additionalSigners?: AccountInstance[];
              addToResolvers?: boolean;
              allowNameResolution?: boolean;
              config: { schema: "network.xyo.module.config" };
              ephemeralQueryAccountEnabled?: boolean;
              moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
          } & {
              account: AccountInstance;
              archiving?: { archivists?: string[]; queries?: string[] } & {
                  resolveArchivists: () => Promise<ArchivistInstance[]>;
              };
              host: ModuleResolver;
              manifest?: | DeepRestrictToStringKeys<
                  {
                      config: {
                          accountPath?: string;
                          features?: string[];
                          labels?: { [key: string]: (...)
                          | (...) };
                          language?: string;
                          name: string;
                          os?: string;
                          schema: string;
                      };
                      description?: string;
                      lazyStart?: boolean;
                      schema: "network.xyo.module.manifest";
                      status?: { address: Lowercase<string>; children?: { [key: ...]: ... } };
                  },
              >
              | DeepRestrictToStringKeys<
                  {
                      config: {
                          accountPath?: string;
                          features?: string[];
                          labels?: { [key: string]: (...)
                          | (...) };
                          language?: string;
                          name: string;
                          os?: string;
                          schema: string;
                      };
                      description?: string;
                      lazyStart?: boolean;
                      schema: "network.xyo.node.manifest";
                      status?: { address: Lowercase<string>; children?: { [key: ...]: ... } };
                  },
              >;
              moduleAddress: Lowercase<string>;
              onQuerySendFinished?: (
                  args: Omit<QuerySendFinishedEventArgs, "mod">,
              ) => void;
              onQuerySendStarted?: (
                  args: Omit<QuerySendStartedEventArgs, "mod">,
              ) => void;
              state?: DeepRestrictToStringKeys<{ schema: string }>[];
          },
          "config",
      > & { config: TWrappedModule["config"] } = Omit<
          BaseParamsFields & {
              account?: AccountInstance
              | "random";
              additionalSigners?: AccountInstance[];
              addToResolvers?: boolean;
              allowNameResolution?: boolean;
              config: { schema: "network.xyo.module.config" };
              ephemeralQueryAccountEnabled?: boolean;
              moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
          } & {
              account: AccountInstance;
              archiving?: { archivists?: string[]; queries?: string[] } & {
                  resolveArchivists: () => Promise<ArchivistInstance[]>;
              };
              host: ModuleResolver;
              manifest?: | DeepRestrictToStringKeys<
                  {
                      config: {
                          accountPath?: string;
                          features?: string[];
                          labels?: { [key: string]: (...)
                          | (...) };
                          language?: string;
                          name: string;
                          os?: string;
                          schema: string;
                      };
                      description?: string;
                      lazyStart?: boolean;
                      schema: "network.xyo.module.manifest";
                      status?: { address: Lowercase<string>; children?: { [key: ...]: ... } };
                  },
              >
              | DeepRestrictToStringKeys<
                  {
                      config: {
                          accountPath?: string;
                          features?: string[];
                          labels?: { [key: string]: (...)
                          | (...) };
                          language?: string;
                          name: string;
                          os?: string;
                          schema: string;
                      };
                      description?: string;
                      lazyStart?: boolean;
                      schema: "network.xyo.node.manifest";
                      status?: { address: Lowercase<string>; children?: { [key: ...]: ... } };
                  },
              >;
              moduleAddress: Lowercase<string>;
              onQuerySendFinished?: (
                  args: Omit<QuerySendFinishedEventArgs, "mod">,
              ) => void;
              onQuerySendStarted?: (
                  args: Omit<QuerySendStartedEventArgs, "mod">,
              ) => void;
              state?: DeepRestrictToStringKeys<{ schema: string }>[];
          },
          "config",
      > & { config: TWrappedModule["config"] }

    Parameters

    Returns AbstractModuleProxy<TWrappedModule, TParams>

Properties

_account: AccountInstance
_cachedManifests: LRUCache<
    number,
    | DeepRestrictToStringKeys<
        {
            config: {
                accountPath?: string;
                features?: string[];
                labels?: { [x: string]: undefined
                | string };
                language?: string;
                name: string;
                os?: string;
                schema: string;
            };
            description?: string;
            lazyStart?: boolean;
            schema: "network.xyo.module.manifest";
            status?: {
                address: Lowercase<string>;
                children?: { [x: Lowercase<string>]: null | string };
            };
        },
    >
    | DeepRestrictToStringKeys<
        {
            config: {
                accountPath?: string;
                features?: string[];
                labels?: { [x: string]: undefined
                | string };
                language?: string;
                name: string;
                os?: string;
                schema: string;
            };
            description?: string;
            lazyStart?: boolean;
            schema: "network.xyo.node.manifest";
            status?: {
                address: Lowercase<string>;
                children?: { [x: Lowercase<string>]: null | string };
            };
        },
    >,
>
_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]: (Lowercase<string> | Lowercase<(...)>[])[] };
            disallowed?: { [key: string]: Lowercase<string>[] };
        };
        sign?: boolean;
        storeQueries?: boolean;
        timestamp?: boolean;
    },
>
_lastError?: ModuleDetailsError
_publicChildren?: ModuleInstance[]
_started: undefined | Promisable<boolean>
_startPromise: undefined | Promisable<boolean>
_state: undefined | DeepRestrictToStringKeys<{ schema: string }>[] = undefined
_stateInProcess: boolean = false
eventData: TWrappedModule["eventData"]
moduleConfigQueryValidator: Queryable<UnsignedQueryBoundWitness>
supportedQueryValidator: Queryable<UnsignedQueryBoundWitness>
allowRandomAccount: boolean
configSchemas: string[]
defaultConfigSchema: string
defaultLogger: Logger
enableLazyLoad: boolean
globalInstances: Record<string, WeakRef<Base<undefined | BaseParamsFields>>[]>
globalInstancesCountHistory: Record<string, number[]>
labels: Labels
privateConstructorKey: string
requiredQueries: string[] = ...
uniqueName: string
useNewResolver: false

Accessors

  • get additionalSigners(): AccountInstance[]
  • Returns AccountInstance[]

  • get allowAnonymous(): boolean
  • Returns boolean

  • get allowNameResolution(): boolean
  • Returns boolean

  • get archivist(): undefined | string
  • Returns undefined | string

  • get 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]: (Lowercase<string> | Lowercase<string>[])[] };
                disallowed?: { [key: string]: Lowercase<string>[] };
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        },
    >
  • Returns 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]: (Lowercase<string> | Lowercase<string>[])[] };
                disallowed?: { [key: string]: Lowercase<string>[] };
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        },
    >

  • get dead(): boolean
  • Returns boolean

  • get ephemeralQueryAccountEnabled(): boolean
  • Returns boolean

  • get id(): string
  • Returns string

  • get logger(): Logger
  • Returns Logger

  • get modName(): undefined | string
  • Returns undefined | string

  • get params(): TParams
  • Returns TParams

  • get priority(): 2
  • Returns 2

  • get root(): this
  • Returns this

  • get status(): ModuleStatus
  • Returns ModuleStatus

  • set status(value: ModuleStatus): void
  • Parameters

    Returns void

  • get timestamp(): 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

  • Returns void

  • Parameters

    • funcName: string

    Returns any

  • Parameters

    • functionName: string

    Returns void

  • Type Parameters

    • T extends DeepRestrictToStringKeys<
          {
              address?: Lowercase<string>
              | Lowercase<string>[];
              budget?: number;
              maxFrequency?:
                  | "once"
                  | "second"
                  | "minute"
                  | "hour"
                  | "day"
                  | "week"
                  | "month"
                  | "year";
              minBid?: number;
              schema: string;
          },
      >

    Parameters

    Returns PromiseEx<
        [
            UnsignedQueryBoundWitness,
            DeepRestrictToStringKeys<{ schema: string }>[],
            DeepRestrictToStringKeys<{ schema: string }>[],
        ],
        AccountInstance,
    >

  • Type Parameters

    • T extends DeepRestrictToStringKeys<
          {
              address?: Lowercase<string>
              | Lowercase<string>[];
              budget?: number;
              maxFrequency?:
                  | "once"
                  | "second"
                  | "minute"
                  | "hour"
                  | "day"
                  | "week"
                  | "month"
                  | "year";
              minBid?: number;
              schema: string;
          },
      >

    Parameters

    Returns Promise<
        [
            UnsignedQueryBoundWitness,
            DeepRestrictToStringKeys<{ schema: string }>[],
            DeepRestrictToStringKeys<{ schema: string }>[],
        ],
    >

  • Type Parameters

    • T extends DeepRestrictToStringKeys<
          {
              address?: Lowercase<string>
              | Lowercase<string>[];
              budget?: number;
              maxFrequency?:
                  | "once"
                  | "second"
                  | "minute"
                  | "hour"
                  | "day"
                  | "week"
                  | "month"
                  | "year";
              minBid?: number;
              schema: string;
          },
      >

    Parameters

    • query: T
    • payloads: DeepRestrictToStringKeys<{ schema: string }>[]
    • OptionaladditionalWitnesses: AccountInstance[]
    • Optionalerrors: DeepRestrictToStringKeys<
          {
              details?: | null
              | string
              | number
              | boolean
              | {
                  [key: string]: | null
                  | string
                  | number
                  | boolean
                  | (
                      { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                  )
                  | (
                      string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                  )[];
              }
              | (
                  | null
                  | string
                  | number
                  | boolean
                  | {
                      [key: string]: string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null;
                  }
                  | (
                      (string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null)[]
                  )
              )[];
              message?: string;
              name?: string;
              query?: Lowercase<string>;
              schema: "network.xyo.error.module";
          },
      >[]

    Returns Promise<ModuleQueryResult>

  • Type Parameters

    • R

    Parameters

    • closure: () => Promise<R>

    Returns Promise<R>

  • Parameters

    Returns Promise<
        DeepRestrictToStringKeys<
            {
                details?: | null
                | string
                | number
                | boolean
                | {
                    [key: string]: | null
                    | string
                    | number
                    | boolean
                    | (
                        { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null)[] | null; }
                    )
                    | (
                        string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null
                    )[];
                }
                | (
                    | null
                    | string
                    | number
                    | boolean
                    | {
                        [key: string]: string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null;
                    }
                    | (
                        (string | number | boolean | { [x: string]: string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | number | boolean | ... | (string | ... 4 more ... | null)[] | null)[] | null)[] | null)[] | null; } | (string | ... 4 more ... | null)[] | null)[]
                    )
                )[];
                message?: string;
                name?: string;
                query?: Lowercase<string>;
                schema: "network.xyo.error.module";
            },
        >[],
    >

  • Returns Promise<
        DeepRestrictToStringKeys<
            {
                address: Lowercase<string>;
                children?: string[];
                name?: string;
                queries: string[];
                schema: "network.xyo.module.description";
            },
        >,
    >

  • Parameters

    • schema: string

    Returns boolean

  • Parameters

    • OptionalmaxDepth: number

    Returns Promise<
        | DeepRestrictToStringKeys<
            {
                config: {
                    accountPath?: string;
                    features?: string[];
                    labels?: { [key: string]: undefined
                    | string };
                    language?: string;
                    name: string;
                    os?: string;
                    schema: string;
                };
                description?: string;
                lazyStart?: boolean;
                schema: "network.xyo.module.manifest";
                status?: {
                    address: Lowercase<string>;
                    children?: { [key: Lowercase<string>]: null | string };
                };
            },
        >
        | DeepRestrictToStringKeys<
            {
                config: {
                    accountPath?: string;
                    features?: string[];
                    labels?: { [key: string]: undefined
                    | string };
                    language?: string;
                    name: string;
                    os?: string;
                    schema: string;
                };
                description?: string;
                lazyStart?: boolean;
                schema: "network.xyo.node.manifest";
                status?: {
                    address: Lowercase<string>;
                    children?: { [key: Lowercase<string>]: null | string };
                };
            },
        >,
    >

  • Parameters

    • OptionalmaxDepth: number
    • Optional_ignoreAddresses: Lowercase<string>[]

    Returns Promise<
        | DeepRestrictToStringKeys<
            {
                config: {
                    accountPath?: string;
                    features?: string[];
                    labels?: { [key: string]: undefined
                    | string };
                    language?: string;
                    name: string;
                    os?: string;
                    schema: string;
                };
                description?: string;
                lazyStart?: boolean;
                schema: "network.xyo.module.manifest";
                status?: {
                    address: Lowercase<string>;
                    children?: { [key: Lowercase<string>]: null | string };
                };
            },
        >
        | DeepRestrictToStringKeys<
            {
                config: {
                    accountPath?: string;
                    features?: string[];
                    labels?: { [key: string]: undefined
                    | string };
                    language?: string;
                    name: string;
                    os?: string;
                    schema: string;
                };
                description?: string;
                lazyStart?: boolean;
                schema: "network.xyo.node.manifest";
                status?: {
                    address: Lowercase<string>;
                    children?: { [key: Lowercase<string>]: null | string };
                };
            },
        >,
    >

  • Parameters

    Returns Promise<
        ModuleQueryResult<
            | DeepRestrictToStringKeys<
                {
                    config: {
                        accountPath?: string;
                        features?: string[];
                        labels?: { [key: string]: undefined
                        | string };
                        language?: string;
                        name: string;
                        os?: string;
                        schema: string;
                    };
                    description?: string;
                    lazyStart?: boolean;
                    schema: "network.xyo.module.manifest";
                    status?: {
                        address: Lowercase<string>;
                        children?: { [key: Lowercase<string>]: null | string };
                    };
                },
            >
            | DeepRestrictToStringKeys<
                {
                    config: {
                        accountPath?: string;
                        features?: string[];
                        labels?: { [key: string]: undefined
                        | string };
                        language?: string;
                        name: string;
                        os?: string;
                        schema: string;
                    };
                    description?: string;
                    lazyStart?: boolean;
                    schema: "network.xyo.node.manifest";
                    status?: {
                        address: Lowercase<string>;
                        children?: { [key: Lowercase<string>]: null | string };
                    };
                },
            >,
        >,
    >

  • Returns Promisable<
        (
            | DeepRestrictToStringKeys<
                { address: Lowercase<string>; schema: "network.xyo.address" },
            >
            | DeepRestrictToStringKeys<
                {
                    address: Lowercase<string>;
                    previousHash?: string;
                    schema: "network.xyo.address.hash.previous";
                },
            >
        )[],
    >

  • Type Parameters

    • T extends DeepRestrictToStringKeys<
          {
              address?: Lowercase<string>
              | Lowercase<string>[];
              budget?: number;
              maxFrequency?:
                  | "once"
                  | "second"
                  | "minute"
                  | "hour"
                  | "day"
                  | "week"
                  | "month"
                  | "year";
              minBid?: number;
              schema: string;
          },
      >
    • P extends DeepRestrictToStringKeys<{ schema: string }> = DeepRestrictToStringKeys<{ schema: string }>
    • R extends DeepRestrictToStringKeys<{ schema: string }> = DeepRestrictToStringKeys<{ schema: string }>

    Parameters

    Returns Promise<R[]>

  • Type Parameters

    • T extends DeepRestrictToStringKeys<
          {
              address?: Lowercase<string>
              | Lowercase<string>[];
              budget?: number;
              maxFrequency?:
                  | "once"
                  | "second"
                  | "minute"
                  | "hour"
                  | "day"
                  | "week"
                  | "month"
                  | "year";
              minBid?: number;
              schema: string;
          },
      >
    • P extends DeepRestrictToStringKeys<{ schema: string }> = DeepRestrictToStringKeys<{ schema: string }>
    • R extends DeepRestrictToStringKeys<{ schema: string }> = DeepRestrictToStringKeys<{ schema: string }>

    Parameters

    Returns Promise<ModuleQueryResult<R>>

  • Parameters

    • Optional_timeout: number

    Returns Promisable<boolean>

  • Parameters

    • OptionalnotStartedAction: "error" | "warn" | "log" | "throw" | "none"
    • OptionaltryStart: boolean

    Returns Promise<boolean>

  • Parameters

    • Optional_timeout: number

    Returns Promise<boolean>

  • Parameters

    • Optional_timeout: number

    Returns Promisable<boolean>

  • Parameters

    • Optionalconfig: unknown
    • Optionalparents: string[]

    Returns boolean

  • Parameters

    • funcName: string

    Returns any

  • Parameters

    • functionName: string

    Returns void

  • Parameters

    • Optionalforce: boolean

    Returns void

  • Parameters

    • className: string

    Returns void

  • Parameters

    • className: string

    Returns number

  • Returns Record<string, number>

  • Returns void

  • Returns void