Type Parameters

Hierarchy (View Summary)

Implements

Constructors

Properties

cachedCalls: LRUCache<string, DeepRestrictToStringKeys<{ schema: string }>[]>
eventData: TModule["eventData"]
wrapperParams: BaseParamsFields & {
    account: AccountInstance;
    additionalSigners?: AccountInstance[];
    mod: TModule;
}
defaultLogger?: Logger
globalInstances: Record<string, WeakRef<Base<undefined | BaseParamsFields>>[]>
globalInstancesCountHistory: Record<string, number[]>
instanceIdentityCheck: TypeCheck<
    SentinelInstance<
        BaseParamsFields & {
            account?: AccountInstance
            | "random";
            additionalSigners?: AccountInstance[];
            addToResolvers?: boolean;
            allowNameResolution?: boolean;
            config: DeepRestrictToStringKeys<
                {
                    allowedQueries?: string[];
                    archiving?: { archivists?: string[]; queries?: string[] };
                    archivist?: string;
                    automations?: (
                        | {
                            end?: (...)
                            | (...);
                            frequency?: (...) | (...);
                            frequencyUnits?: (...) | (...) | (...) | (...) | (...);
                            remaining?: (...) | (...);
                            schema: "network.xyo.automation";
                            start: number;
                            type: "interval";
                        }
                        | {
                            end?: (...)
                            | (...);
                            frequency?: (...) | (...);
                            frequencyUnits?: (...) | (...) | (...) | (...) | (...);
                            remaining?: (...) | (...);
                            schema: "network.xyo.automation.interval";
                            start: number;
                            type: "interval";
                        }
                        | {
                            end?: (...)
                            | (...);
                            frequency?: (...) | (...);
                            frequencyUnits?: (...) | (...) | (...) | (...) | (...);
                            remaining?: (...) | (...);
                            schema: "network.xyo.automation.event";
                            start: number;
                            type: "interval";
                        }
                        | { schema: "network.xyo.automation"; type: "event" }
                        | { schema: "network.xyo.automation.interval"; type: "event" }
                        | { schema: "network.xyo.automation.event"; type: "event" }
                    )[];
                    consoleLogger?: any;
                    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;
                    synchronous?: boolean;
                    tasks: (
                        | {
                            endPoint?: | "all"
                            | "clear"
                            | "commit"
                            | "delete"
                            | "get"
                            | "insert";
                            input?: string
                            | boolean
                            | (...)[];
                            mod: string;
                            required?: boolean;
                        }
                        | {
                            endPoint?: "divine";
                            input?: string
                            | boolean
                            | (...)[];
                            mod: string;
                            required?: boolean;
                        }
                        | {
                            endPoint?: "observe";
                            input?: string
                            | boolean
                            | (...)[];
                            mod: string;
                            required?: boolean;
                        }
                        | {
                            endPoint?: string;
                            input?: string
                            | boolean
                            | (...)[];
                            mod: string;
                            required?: boolean;
                        }
                    )[];
                    throwErrors?: boolean;
                    timestamp?: boolean;
                },
            >;
            ephemeralQueryAccountEnabled?: boolean;
            moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
        },
        SentinelModuleEventData<
            Module<
                BaseParamsFields & {
                    account?: AccountInstance
                    | "random";
                    additionalSigners?: AccountInstance[];
                    addToResolvers?: boolean;
                    allowNameResolution?: boolean;
                    config: DeepRestrictToStringKeys<
                        {
                            allowedQueries?: string[];
                            archiving?: { archivists?: (...)
                            | (...); queries?: (...) | (...) };
                            archivist?: string;
                            consoleLogger?: any;
                            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[];
                },
            >,
        >,
    >,
> = isSentinelInstance
moduleIdentityCheck: ModuleTypeCheck<
    SentinelModule<
        BaseParamsFields & {
            account?: AccountInstance
            | "random";
            additionalSigners?: AccountInstance[];
            addToResolvers?: boolean;
            allowNameResolution?: boolean;
            config: DeepRestrictToStringKeys<
                {
                    allowedQueries?: string[];
                    archiving?: { archivists?: string[]; queries?: string[] };
                    archivist?: string;
                    automations?: (
                        | {
                            end?: (...)
                            | (...);
                            frequency?: (...) | (...);
                            frequencyUnits?: (...) | (...) | (...) | (...) | (...);
                            remaining?: (...) | (...);
                            schema: "network.xyo.automation";
                            start: number;
                            type: "interval";
                        }
                        | {
                            end?: (...)
                            | (...);
                            frequency?: (...) | (...);
                            frequencyUnits?: (...) | (...) | (...) | (...) | (...);
                            remaining?: (...) | (...);
                            schema: "network.xyo.automation.interval";
                            start: number;
                            type: "interval";
                        }
                        | {
                            end?: (...)
                            | (...);
                            frequency?: (...) | (...);
                            frequencyUnits?: (...) | (...) | (...) | (...) | (...);
                            remaining?: (...) | (...);
                            schema: "network.xyo.automation.event";
                            start: number;
                            type: "interval";
                        }
                        | { schema: "network.xyo.automation"; type: "event" }
                        | { schema: "network.xyo.automation.interval"; type: "event" }
                        | { schema: "network.xyo.automation.event"; type: "event" }
                    )[];
                    consoleLogger?: any;
                    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;
                    synchronous?: boolean;
                    tasks: (
                        | {
                            endPoint?: | "all"
                            | "clear"
                            | "commit"
                            | "delete"
                            | "get"
                            | "insert";
                            input?: string
                            | boolean
                            | (...)[];
                            mod: string;
                            required?: boolean;
                        }
                        | {
                            endPoint?: "divine";
                            input?: string
                            | boolean
                            | (...)[];
                            mod: string;
                            required?: boolean;
                        }
                        | {
                            endPoint?: "observe";
                            input?: string
                            | boolean
                            | (...)[];
                            mod: string;
                            required?: boolean;
                        }
                        | {
                            endPoint?: string;
                            input?: string
                            | boolean
                            | (...)[];
                            mod: string;
                            required?: boolean;
                        }
                    )[];
                    throwErrors?: boolean;
                    timestamp?: boolean;
                },
            >;
            ephemeralQueryAccountEnabled?: boolean;
            moduleIdentifierTransformers?: ModuleIdentifierTransformer[];
        },
        SentinelModuleEventData<
            Module<
                BaseParamsFields & {
                    account?: AccountInstance
                    | "random";
                    additionalSigners?: AccountInstance[];
                    addToResolvers?: boolean;
                    allowNameResolution?: boolean;
                    config: DeepRestrictToStringKeys<
                        {
                            allowedQueries?: string[];
                            archiving?: { archivists?: (...)
                            | (...); queries?: (...) | (...) };
                            archivist?: string;
                            consoleLogger?: any;
                            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[];
                },
            >,
        >,
    >,
> = isSentinelModule
requiredQueries: string[] = ...
uniqueName: string

Accessors

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

  • get address(): Lowercase<string>
  • Returns Lowercase<string>

  • get config(): Exclude<TWrappedModule["params"]["config"], undefined>
  • Returns Exclude<TWrappedModule["params"]["config"], undefined>

  • get id(): string
  • Returns string

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

  • get mod(): TWrappedModule
  • Returns TWrappedModule

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

  • get params(): TParams
  • Returns TParams

  • get priority(): 1
  • Returns 1

  • get queries(): string[]
  • Returns string[]

  • 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 Promise<
        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;
          },
      >

    Parameters

    Returns PromiseEx<
        [
            UnsignedQueryBoundWitness,
            DeepRestrictToStringKeys<{ schema: string }>[],
            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";
                },
            >[],
        ],
        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<
                {
                    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";
                },
            >[],
        ],
    >

  • Parameters

    • eventName: Parameters<TModule["emit"]>[0]
    • eventArgs: Parameters<TModule["emit"]>[1]

    Returns Promise<void>

  • Parameters

    • eventName: Parameters<TModule["emitSerial"]>[0]
    • eventArgs: Parameters<TModule["emitSerial"]>[1]

    Returns Promise<void>

  • 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";
            },
        >[],
    >

  • 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

    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 Promise<
        DeepRestrictToStringKeys<
            {
                address: Lowercase<string>;
                previousHash?: string;
                schema: "network.xyo.address.hash.previous";
            },
        >[],
    >

  • Parameters

    Returns Promise<
        ModuleQueryResult<
            DeepRestrictToStringKeys<
                {
                    address: Lowercase<string>;
                    previousHash?: string;
                    schema: "network.xyo.address.hash.previous";
                },
            >,
        >,
    >

  • Parameters

    • address: Lowercase<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;
          },
      >
    • P extends DeepRestrictToStringKeys<{ schema: string }> = DeepRestrictToStringKeys<{ schema: string }>
    • R extends DeepRestrictToStringKeys<{ schema: string }> = DeepRestrictToStringKeys<{ schema: string }>

    Parameters

    • queryPayload: T
    • Optionalpayloads: P[]

    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

    Returns mod is Module<
        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[];
        },
    >

  • Parameters

    • Optionalforce: boolean

    Returns void

  • Parameters

    • className: string

    Returns void

  • Parameters

    • className: string

    Returns number

  • Returns Record<string, number>

  • Returns void

  • Returns void