Type Parameters

Hierarchy

Constructors

  • Type Parameters

    • TParams extends BaseParamsFields & {
          account?: AccountInstance | "random";
          config: SchemaFields & object & Omit<{
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.witness.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          } & ArchivingModuleConfig & {
              schema: "network.xyo.witness.config";
          } & {
              address?: string;
          }, "schema"> & {
              schema: "network.xyo.erc1822.witness.config";
          };
          ephemeralQueryAccountEnabled?: boolean;
      } & {
          providers: (() => Promisable<Provider[]>);
      } = BaseParamsFields & {
          account?: AccountInstance | "random";
          config: SchemaFields & object & Omit<{
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.witness.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          } & ArchivingModuleConfig & {
              schema: "network.xyo.witness.config";
          } & {
              address?: string;
          }, "schema"> & {
              schema: "network.xyo.erc1822.witness.config";
          };
          ephemeralQueryAccountEnabled?: boolean;
      } & {
          providers: (() => Promisable<Provider[]>);
      }

    Parameters

    • privateConstructorKey: string
    • params: TParams
    • account: AccountInstance

    Returns Erc1822Witness<TParams>

Properties

_account: undefined | AccountInstance
_baseModuleQueryAccountPaths: Record<"network.xyo.query.module.discover" | "network.xyo.query.module.address" | "network.xyo.query.module.subscribe" | "network.xyo.query.module.describe" | "network.xyo.query.module.manifest", string>
_queryAccounts: Record<"network.xyo.query.module.discover" | "network.xyo.query.module.address" | "network.xyo.query.module.subscribe" | "network.xyo.query.module.describe" | "network.xyo.query.module.manifest", undefined | AccountInstance>
_startPromise: undefined | Promisable<boolean>
_started: undefined | Promisable<boolean>
downResolver: Omit<CompositeModuleResolver, "resolve">
eventData: WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
    address?: string;
    blockTag?: string | number;
    chainId?: number;
} & {
    schema: "network.xyo.evm.address";
}, SchemaFields & object & {
    address: string;
    block: number;
    chainId: number;
    implementation?: string;
    slots?: Erc1822DataSlots;
} & {
    schema: "network.xyo.erc1822.status";
}>, SchemaFields & object & {
    address?: string;
    blockTag?: string | number;
    chainId?: number;
} & {
    schema: "network.xyo.evm.address";
}, SchemaFields & object & {
    address: string;
    block: number;
    chainId: number;
    implementation?: string;
    slots?: Erc1822DataSlots;
} & {
    schema: "network.xyo.erc1822.status";
}>
moduleConfigQueryValidator: Queryable
params: TParams
supportedQueryValidator: Queryable
upResolver: Omit<CompositeModuleResolver, "resolve>">
allowRandomAccount: boolean
configSchemas: string[]
defaultLogger?: Logger
enableLazyLoad: boolean
privateConstructorKey: string

Accessors

  • get _queryAccountPaths(): Record<"network.xyo.query.witness.observe", string>
  • Returns Record<"network.xyo.query.witness.observe", string>

  • get account(): AccountInstance
  • Returns AccountInstance

  • get address(): string
  • Returns string

  • get allowAnonymous(): boolean
  • Returns boolean

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

  • get config(): TParams["config"]
  • Returns TParams["config"]

  • get ephemeralQueryAccountEnabled(): boolean
  • Returns boolean

  • get id(): string
  • Returns string

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

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

  • get queryAccountPaths(): Readonly<Record<string, undefined | string>>
  • Returns Readonly<Record<string, undefined | string>>

  • get queryAccounts(): Readonly<Record<string, undefined | AccountInstance>>
  • Returns Readonly<Record<string, undefined | AccountInstance>>

  • get timestamp(): boolean
  • Returns boolean

  • get configSchema(): string
  • Returns string

Methods

  • Parameters

    • funcName: string

    Returns any

  • Parameters

    • functionName: string

    Returns void

  • Parameters

    • hashes: string[]
    • schema: string[]
    • Optional account: AccountInstance

    Returns PromiseEx<unknown, AccountInstance>

  • Parameters

    • hashes: string[]
    • schema: string[]
    • Optional account: AccountInstance

    Returns Promise<SchemaFields & object & BoundWitnessFields & {
        schema: "network.xyo.boundwitness";
    }>

  • Type Parameters

    • T extends SchemaFields & object & QueryFields & {
          schema: string;
      }

    Parameters

    • query: T
    • Optional payloads: ({
          schema: string;
      } & object)[]
    • Optional account: AccountInstance

    Returns PromiseEx<[SchemaFields & object & Omit<BoundWitnessFields & {
        query: string;
        resultSet?: string;
        schema: "network.xyo.boundwitness";
    }, "schema"> & {
        schema: "network.xyo.boundwitness";
    }, ({
        schema: string;
    } & object)[], ({
        schema: string;
    } & object)[]], AccountInstance>

  • Type Parameters

    • T extends SchemaFields & object & QueryFields & {
          schema: string;
      }

    Parameters

    • query: T
    • Optional payloads: ({
          schema: string;
      } & object)[]
    • Optional account: AccountInstance

    Returns Promise<[SchemaFields & object & Omit<BoundWitnessFields & {
        query: string;
        resultSet?: string;
        schema: "network.xyo.boundwitness";
    }, "schema"> & {
        schema: "network.xyo.boundwitness";
    }, ({
        schema: string;
    } & object)[], ({
        schema: string;
    } & object)[]]>

  • Type Parameters

    • T extends SchemaFields & object & QueryFields & {
          schema: string;
      }

    Parameters

    • query: WithMeta<T>
    • payloads: ({
          schema: string;
      } & object)[]
    • Optional additionalWitnesses: AccountInstance[]
    • Optional errors: (SchemaFields & object & {
          message?: string;
          name?: string;
          query?: string;
          schema: "network.xyo.error.module";
          sources?: string[];
      })[]

    Returns Promise<ModuleQueryResult>

  • Type Parameters

    • R

    Parameters

    • closure: (() => Promise<R>)
        • (): Promise<R>
        • Returns Promise<R>

    Returns Promise<R>

  • Parameters

    • eventNames: (keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & { address?: string | undefined; blockTag?: string | number | undefined; chainId?: number | undefined; } & { schema: "network.xyo.evm.address"; }, SchemaFields & ... 2 more ... & { ...; }>, SchemaFields & ... 2 more ... & { ...; }, SchemaFi...) | (keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & { address?: string | undefined; blockTag?: string | number | undefined; chainId?: number | undefined; } & { schema: "network.xyo.evm.address"; }, SchemaFields & ... 2 more ... & { ...; }>, SchemaFields & ... 2 more ... & { ...; }, SchemaFi...)[]

    Returns void

  • Returns Promise<SchemaFields & object & ModuleDescription & {
        schema: "network.xyo.module.description";
    }>

  • Returns Promise<SchemaFields & object & ModuleDescription & {
        schema: "network.xyo.module.description";
    }>

  • Returns Promise<({
        schema: string;
    } & object)[]>

  • Parameters

    • Optional _maxDepth: number

    Returns Promise<({
        schema: string;
    } & object)[]>

  • Type Parameters

    • TEventName extends keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }> = keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>

    • TEventArgs extends EventArgs = WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>[TEventName]

    Parameters

    Returns Promise<void>

  • Type Parameters

    • TEventName extends keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }> = keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>

    • TEventArgs extends EventArgs = WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>[TEventName]

    Parameters

    Returns Promise<void>

  • Returns Promise<undefined | ArchivistInstance<BaseParamsFields & {
        account?: AccountInstance | "random";
        config: SchemaFields & object & Omit<{
            archivist?: string;
            labels?: Labels;
            name?: string;
            paging?: Record<string, {
                size?: number;
            }>;
            retry?: RetryConfig;
            schema: "network.xyo.archivist.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: Record<string, (string | CosigningAddressSet)[]>;
                disallowed?: Record<string, string[]>;
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        } & ArchivingModuleConfig & SchemaFields & object & {
            archivist?: string;
            labels?: Labels;
            name?: string;
            paging?: Record<string, {
                size?: number;
            }>;
            retry?: RetryConfig;
            schema: "network.xyo.archivist.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: Record<string, (string | CosigningAddressSet)[]>;
                disallowed?: Record<string, string[]>;
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        } & {
            parents?: ArchivistParents;
            requireAllParents?: boolean;
            schema: "network.xyo.archivist.config";
            storeParentReads?: boolean;
        }, "schema"> & {
            schema: string;
        };
        ephemeralQueryAccountEnabled?: boolean;
    }, ArchivistModuleEventData>>

  • Returns Promise<undefined | ArchivistInstance<BaseParamsFields & {
        account?: AccountInstance | "random";
        config: SchemaFields & object & Omit<{
            archivist?: string;
            labels?: Labels;
            name?: string;
            paging?: Record<string, {
                size?: number;
            }>;
            retry?: RetryConfig;
            schema: "network.xyo.archivist.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: Record<string, (string | CosigningAddressSet)[]>;
                disallowed?: Record<string, string[]>;
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        } & ArchivingModuleConfig & SchemaFields & object & {
            archivist?: string;
            labels?: Labels;
            name?: string;
            paging?: Record<string, {
                size?: number;
            }>;
            retry?: RetryConfig;
            schema: "network.xyo.archivist.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: Record<string, (string | CosigningAddressSet)[]>;
                disallowed?: Record<string, string[]>;
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        } & {
            parents?: ArchivistParents;
            requireAllParents?: boolean;
            schema: "network.xyo.archivist.config";
            storeParentReads?: boolean;
        }, "schema"> & {
            schema: string;
        };
        ephemeralQueryAccountEnabled?: boolean;
    }, ArchivistModuleEventData>>

  • Parameters

    • Optional cache: boolean

    Returns Promise<undefined | Provider>

  • Parameters

    • cache: boolean
    • error: string | true

    Returns Promise<Provider>

  • Parameters

    • Optional cache: boolean

    Returns Promise<Provider[]>

  • Returns Promise<void>

  • Parameters

    • eventNames: (keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & { address?: string | undefined; blockTag?: string | number | undefined; chainId?: number | undefined; } & { schema: "network.xyo.evm.address"; }, SchemaFields & ... 2 more ... & { ...; }>, SchemaFields & ... 2 more ... & { ...; }, SchemaFi...) | (keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & { address?: string | undefined; blockTag?: string | number | undefined; chainId?: number | undefined; } & { schema: "network.xyo.evm.address"; }, SchemaFields & ... 2 more ... & { ...; }>, SchemaFields & ... 2 more ... & { ...; }, SchemaFi...)[]

    Returns number

  • Parameters

    • Optional maxDepth: number
    • Optional ignoreAddresses: string[]

    Returns Promise<SchemaFields & object & ModuleManifest & {
        schema: "network.xyo.module.manifest";
    } | SchemaFields & object & ModuleManifest & {
        schema: "network.xyo.node.manifest";
    }>

  • Parameters

    • Optional _depth: number
    • Optional _ignoreAddresses: string[]

    Returns Promisable<SchemaFields & object & ModuleManifest & {
        schema: "network.xyo.module.manifest";
    } | SchemaFields & object & ModuleManifest & {
        schema: "network.xyo.node.manifest";
    }>

  • Returns Promise<(SchemaFields & object & {
        address: string;
        previousHash?: string;
        schema: string;
    })[]>

  • Returns Promisable<(SchemaFields & object & {
        address: string;
        previousHash?: string;
        schema: string;
    })[]>

  • Parameters

    • Optional inPayloads: (SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      })[]

    Returns Promise<(SchemaFields & object & {
        address: string;
        block: number;
        chainId: number;
        implementation?: string;
        slots?: Erc1822DataSlots;
    } & {
        schema: "network.xyo.erc1822.status";
    })[]>

    Function

    observe The main entry point for a witness. Do not override this function. Implement/override observeHandler for custom functionality

  • Parameters

    • Optional inPayloads: (SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      })[]

    Returns Promise<(SchemaFields & object & {
        address: string;
        block: number;
        chainId: number;
        implementation?: string;
        slots?: Erc1822DataSlots;
    } & {
        schema: "network.xyo.erc1822.status";
    })[]>

  • Type Parameters

    • TEventName extends keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>

    Parameters

    • eventNames: TEventName | TEventName[]
    • listener: EventListener<WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>[TEventName]>

    Returns void

  • Parameters

    • listener: EventAnyListener

    Returns void

  • Type Parameters

    • TEventName extends keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>

    Parameters

    • eventNames: TEventName | TEventName[]
    • listener: EventListener<WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>[TEventName]>

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • listener: EventAnyListener

    Returns (() => void)

      • (): void
      • Returns void

  • Type Parameters

    • TEventName extends keyof WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>

    Parameters

    • eventName: TEventName
    • listener: EventListener<WitnessModuleEventData<WitnessInstance<TParams, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>, SchemaFields & object & {
          address?: string;
          blockTag?: string | number;
          chainId?: number;
      } & {
          schema: "network.xyo.evm.address";
      }, SchemaFields & object & {
          address: string;
          block: number;
          chainId: number;
          implementation?: string;
          slots?: Erc1822DataSlots;
      } & {
          schema: "network.xyo.erc1822.status";
      }>[TEventName]>

    Returns (() => void)

      • (): void
      • Returns void

  • Returns Promisable<undefined | string>

  • Type Parameters

    • T extends SchemaFields & object & Omit<BoundWitnessFields & {
          query: string;
          resultSet?: string;
          schema: "network.xyo.boundwitness";
      }, "schema"> & {
          schema: "network.xyo.boundwitness";
      } = SchemaFields & object & Omit<BoundWitnessFields & {
          query: string;
          resultSet?: string;
          schema: "network.xyo.boundwitness";
      }, "schema"> & {
          schema: "network.xyo.boundwitness";
      }

    • TConfig extends SchemaFields & object & {
          archivist?: string;
          labels?: Labels;
          name?: string;
          paging?: Record<string, {
              size?: number;
          }>;
          retry?: RetryConfig;
          schema: "network.xyo.module.config";
          security?: {
              allowAnonymous?: boolean;
              allowed?: Record<string, (string | CosigningAddressSet)[]>;
              disallowed?: Record<string, string[]>;
          };
          sign?: boolean;
          storeQueries?: boolean;
          timestamp?: boolean;
      } & ArchivingModuleConfig = SchemaFields & object & {
          archivist?: string;
          labels?: Labels;
          name?: string;
          paging?: Record<string, {
              size?: number;
          }>;
          retry?: RetryConfig;
          schema: "network.xyo.module.config";
          security?: {
              allowAnonymous?: boolean;
              allowed?: Record<string, (string | CosigningAddressSet)[]>;
              disallowed?: Record<string, string[]>;
          };
          sign?: boolean;
          storeQueries?: boolean;
          timestamp?: boolean;
      } & ArchivingModuleConfig

    Parameters

    • query: T
    • Optional payloads: ({
          schema: string;
      } & object)[]
    • Optional queryConfig: TConfig

    Returns Promise<ModuleQueryResult>

  • Type Parameters

    • T extends SchemaFields & object & Omit<BoundWitnessFields & {
          query: string;
          resultSet?: string;
          schema: "network.xyo.boundwitness";
      }, "schema"> & {
          schema: "network.xyo.boundwitness";
      } = SchemaFields & object & Omit<BoundWitnessFields & {
          query: string;
          resultSet?: string;
          schema: "network.xyo.boundwitness";
      }, "schema"> & {
          schema: "network.xyo.boundwitness";
      }

    • TConfig extends SchemaFields & object & {
          archivist?: string;
          labels?: Labels;
          name?: string;
          paging?: Record<string, {
              size?: number;
          }>;
          retry?: RetryConfig;
          schema: "network.xyo.module.config";
          security?: {
              allowAnonymous?: boolean;
              allowed?: Record<string, (string | CosigningAddressSet)[]>;
              disallowed?: Record<string, string[]>;
          };
          sign?: boolean;
          storeQueries?: boolean;
          timestamp?: boolean;
      } & ArchivingModuleConfig = SchemaFields & object & {
          archivist?: string;
          labels?: Labels;
          name?: string;
          paging?: Record<string, {
              size?: number;
          }>;
          retry?: RetryConfig;
          schema: "network.xyo.module.config";
          security?: {
              allowAnonymous?: boolean;
              allowed?: Record<string, (string | CosigningAddressSet)[]>;
              disallowed?: Record<string, string[]>;
          };
          sign?: boolean;
          storeQueries?: boolean;
          timestamp?: boolean;
      } & ArchivingModuleConfig

    Parameters

    • query: T
    • Optional payloads: ({
          schema: string;
      } & object)[]
    • Optional queryConfig: TConfig

    Returns Promise<ModuleQueryHandlerResult>

    Function

    queryHandler Calls observe for an observe query. Override to support additional queries.

  • Type Parameters

    • T extends SchemaFields & object & Omit<BoundWitnessFields & {
          query: string;
          resultSet?: string;
          schema: "network.xyo.boundwitness";
      }, "schema"> & {
          schema: "network.xyo.boundwitness";
      } = SchemaFields & object & Omit<BoundWitnessFields & {
          query: string;
          resultSet?: string;
          schema: "network.xyo.boundwitness";
      }, "schema"> & {
          schema: "network.xyo.boundwitness";
      }

    • TConfig extends SchemaFields & object & {
          archivist?: string;
          labels?: Labels;
          name?: string;
          paging?: Record<string, {
              size?: number;
          }>;
          retry?: RetryConfig;
          schema: "network.xyo.module.config";
          security?: {
              allowAnonymous?: boolean;
              allowed?: Record<string, (string | CosigningAddressSet)[]>;
              disallowed?: Record<string, string[]>;
          };
          sign?: boolean;
          storeQueries?: boolean;
          timestamp?: boolean;
      } & ArchivingModuleConfig = SchemaFields & object & {
          archivist?: string;
          labels?: Labels;
          name?: string;
          paging?: Record<string, {
              size?: number;
          }>;
          retry?: RetryConfig;
          schema: "network.xyo.module.config";
          security?: {
              allowAnonymous?: boolean;
              allowed?: Record<string, (string | CosigningAddressSet)[]>;
              disallowed?: Record<string, string[]>;
          };
          sign?: boolean;
          storeQueries?: boolean;
          timestamp?: boolean;
      } & ArchivingModuleConfig

    Parameters

    • query: T
    • Optional payloads: ({
          schema: string;
      } & object)[]
    • Optional queryConfig: TConfig

    Returns Promise<boolean>

  • Type Parameters

    • T extends ModuleInstance<BaseParamsFields & {
          account?: AccountInstance | "random";
          config: SchemaFields & object & Omit<{
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          } & ArchivingModuleConfig & SchemaFields & object & {
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          }, "schema"> & {
              schema: string;
          };
          ephemeralQueryAccountEnabled?: boolean;
      }, ModuleEventData<object>> = ModuleInstance<BaseParamsFields & {
          account?: AccountInstance | "random";
          config: SchemaFields & object & Omit<{
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          } & ArchivingModuleConfig & SchemaFields & object & {
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          }, "schema"> & {
              schema: string;
          };
          ephemeralQueryAccountEnabled?: boolean;
      }, ModuleEventData<object>>

    Parameters

    • Optional filter: ModuleFilter
    • Optional options: ModuleFilterOptions<T>

    Returns Promise<T[]>

  • Type Parameters

    • T extends ModuleInstance<BaseParamsFields & {
          account?: AccountInstance | "random";
          config: SchemaFields & object & Omit<{
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          } & ArchivingModuleConfig & SchemaFields & object & {
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          }, "schema"> & {
              schema: string;
          };
          ephemeralQueryAccountEnabled?: boolean;
      }, ModuleEventData<object>> = ModuleInstance<BaseParamsFields & {
          account?: AccountInstance | "random";
          config: SchemaFields & object & Omit<{
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          } & ArchivingModuleConfig & SchemaFields & object & {
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          }, "schema"> & {
              schema: string;
          };
          ephemeralQueryAccountEnabled?: boolean;
      }, ModuleEventData<object>>

    Parameters

    • nameOrAddress: string
    • Optional options: ModuleFilterOptions<T>

    Returns Promise<undefined | T>

  • Returns Promise<ArchivistInstance<BaseParamsFields & {
        account?: AccountInstance | "random";
        config: SchemaFields & object & Omit<{
            archivist?: string;
            labels?: Labels;
            name?: string;
            paging?: Record<string, {
                size?: number;
            }>;
            retry?: RetryConfig;
            schema: "network.xyo.archivist.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: Record<string, (string | CosigningAddressSet)[]>;
                disallowed?: Record<string, string[]>;
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        } & ArchivingModuleConfig & SchemaFields & object & {
            archivist?: string;
            labels?: Labels;
            name?: string;
            paging?: Record<string, {
                size?: number;
            }>;
            retry?: RetryConfig;
            schema: "network.xyo.archivist.config";
            security?: {
                allowAnonymous?: boolean;
                allowed?: Record<string, (string | CosigningAddressSet)[]>;
                disallowed?: Record<string, string[]>;
            };
            sign?: boolean;
            storeQueries?: boolean;
            timestamp?: boolean;
        } & {
            parents?: ArchivistParents;
            requireAllParents?: boolean;
            schema: "network.xyo.archivist.config";
            storeParentReads?: boolean;
        }, "schema"> & {
            schema: string;
        };
        ephemeralQueryAccountEnabled?: boolean;
    }, ArchivistModuleEventData>[]>

  • Parameters

    • Optional _timeout: number

    Returns Promisable<boolean>

  • Returns Promise<boolean>

  • Parameters

    • Optional notStartedAction: "error" | "throw" | "warn" | "log" | "none"
    • Optional tryStart: boolean

    Returns Promise<boolean>

  • Parameters

    • Optional _timeout: number

    Returns Promise<boolean>

  • Parameters

    • Optional _timeout: number

    Returns Promisable<boolean>

  • Parameters

    • payloads: ({
          schema: string;
      } & object)[]

    Returns Promise<({
        schema: string;
    } & object)[]>

  • Parameters

    • Optional _queryAccount: AccountInstance

    Returns void

  • Returns void

  • Parameters

    • Optional config: unknown
    • Optional parents: string[]

    Returns boolean

  • Parameters

    • funcName: string

    Returns any

  • Parameters

    • functionName: string

    Returns void

  • Type Parameters

    • TModule extends ModuleInstance<BaseParamsFields & {
          account?: AccountInstance | "random";
          config: SchemaFields & object & Omit<{
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          } & ArchivingModuleConfig & SchemaFields & object & {
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          }, "schema"> & {
              schema: string;
          };
          ephemeralQueryAccountEnabled?: boolean;
      }, ModuleEventData<object>>

    Parameters

    • this: CreatableModule<TModule>
    • Optional params: Omit<TModule["params"], "config"> & {
          config?: TModule["params"]["config"];
      }

    Returns Promise<TModule>

  • Parameters

    • params: {
          account?: AccountInstance | "random";
          accountPath?: string;
          wallet?: WalletInstance;
      }
      • Optional account?: AccountInstance | "random"
      • Optional accountPath?: string
      • Optional wallet?: WalletInstance

    Returns Promise<AccountInstance>

  • Type Parameters

    • TModule extends ModuleInstance<BaseParamsFields & {
          account?: AccountInstance | "random";
          config: SchemaFields & object & Omit<{
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          } & ArchivingModuleConfig & SchemaFields & object & {
              archivist?: string;
              labels?: Labels;
              name?: string;
              paging?: Record<string, {
                  size?: number;
              }>;
              retry?: RetryConfig;
              schema: "network.xyo.module.config";
              security?: {
                  allowAnonymous?: boolean;
                  allowed?: Record<string, (string | CosigningAddressSet)[]>;
                  disallowed?: Record<string, string[]>;
              };
              sign?: boolean;
              storeQueries?: boolean;
              timestamp?: boolean;
          }, "schema"> & {
              schema: string;
          };
          ephemeralQueryAccountEnabled?: boolean;
      }, ModuleEventData<object>>

    Parameters

    • this: CreatableModule<TModule>
    • Optional params: Omit<TModule["params"], "config"> & {
          config?: TModule["params"]["config"];
      }

    Returns CreatableModuleFactory<TModule>

Generated using TypeDoc