import type { CreatableInstance, Hash, Logger, Promisable, SpanConfig } from '@ariestools/sdk'; import { AbstractCreatable, PromiseEx } from '@ariestools/sdk'; import type { AccountInstance, BoundWitness, ModuleError, ModuleManifestPayload, Payload, Query, QueryBoundWitness, Schema, WalletInstance, XyoAddress } from '@xyo-network/sdk-protocol'; import { Mutex } from 'async-mutex'; import { LRUCache } from 'lru-cache'; import type { ArchivistInstance } from '../archivist-model/index.js'; import type { AddressPayload, AddressPreviousHashPayload, ArchivingModuleConfig, AttachableModuleInstance, CreatableModule, CreatableModuleFactory, CreatableModuleInstance, Labels, ModuleConfig, ModuleDescriptionPayload, ModuleDetailsError, ModuleEventData, ModuleQueryHandlerResult, ModuleQueryResult, ModuleResolverInstance, QueryableModule, QueryableModuleParams } from '../module-model/index.js'; import type { Queryable } from './QueryValidator/index.js'; export declare const DefaultModuleQueries: (("network.xyo.query.module.manifest" & { readonly __schema: true; }) | ("network.xyo.query.module.address" & { readonly __schema: true; }) | ("network.xyo.query.module.state" & { readonly __schema: true; }) | ("network.xyo.query.module.subscribe" & { readonly __schema: true; }))[]; export declare abstract class AbstractModule extends AbstractCreatable implements QueryableModule { static readonly allowRandomAccount: boolean; static readonly configSchemas: Schema[]; static readonly defaultConfigSchema: Schema; static defaultLogger: Logger; static enableLazyLoad: boolean; static readonly labels: Labels; protected static privateConstructorKey: string; protected _account: AccountInstance | undefined; protected _cachedManifests: LRUCache; protected _globalReentrancyMutex: Mutex | undefined; protected _lastError?: ModuleDetailsError; protected _moduleConfigQueryValidator: Queryable | undefined; protected _supportedQueryValidator: Queryable | undefined; private _busyCount; private _logger; get account(): AccountInstance; get additionalSigners(): AccountInstance[]; get address(): (Lowercase & { readonly __hex: true; } & { readonly __address: true; }) | import("@xyo-network/sdk-protocol").XyoQuantAddress; get allowAnonymous(): boolean; get allowNameResolution(): boolean; get archiving(): ArchivingModuleConfig['archiving'] | undefined; get archivist(): import('../module-model/index.js').ModuleIdentifier | undefined; get config(): TParams['config'] & { schema: Schema; }; get dead(): boolean; get ephemeralQueryAccountEnabled(): boolean; get globalReentrancyMutex(): Mutex | undefined; get id(): string; get logger(): Logger | undefined; get modName(): string | undefined; get priority(): 2; get queries(): Schema[]; get reentrancy(): { action: "skip" | "wait"; scope: "global"; } | undefined; get statusReporter(): (import('../module-model/index.js').ModuleStatusReporter & import("@ariestools/sdk").CreatableStatusReporter) | undefined; get timestamp(): boolean; protected get moduleConfigQueryValidator(): Queryable; protected get supportedQueryValidator(): Queryable; abstract get downResolver(): ModuleResolverInstance; abstract get upResolver(): ModuleResolverInstance; static _getRootFunction(funcName: string): any; static _noOverride(functionName: string): void; static createHandler(inInstance: T): Promise>; static determineAccount(params: { account?: AccountInstance | 'random'; accountPath?: string; wallet?: WalletInstance; }): Promise; static factory(this: CreatableModule, params?: Partial): CreatableModuleFactory; static isAllowedSchema(schema: Schema): boolean; static paramsHandler>(inParams?: Partial): Promise; _getRootFunction(funcName: string): any; busy(closure: () => Promise): Promise; createHandler(): Promise; emit(eventName: TEventName, eventArgs: TEventArgs): Promise; isSupportedQuery(query: Schema, assert?: boolean | string): boolean; previousHash(): Promisable; query(query: T, payloads?: Payload[], queryConfig?: TConfig): Promise; queryable(query: T, payloads?: Payload[], queryConfig?: TConfig): Promise; /** * Executes a function within a telemetry root span. * @param name - The span name * @param fn - The function to execute within the span */ span(name: string, fn: () => T): T; /** * Executes an async function within a telemetry root span. * @param name - The span name * @param fn - The async function to execute within the span * @param config - Optional span configuration */ spanAsync(name: string, fn: () => Promise, config?: SpanConfig): Promise; protected _checkDead(): void; protected archivistInstance(): Promise; protected archivistInstance(required: true): Promise; protected bindHashes(hashes: Hash[], schema: Schema[], account?: AccountInstance): PromiseEx; protected bindHashesInternal(hashes: Hash[], schema: Schema[], account?: AccountInstance): Promise; protected bindQuery(query: T, payloads?: Payload[], account?: AccountInstance, additionalSigners?: AccountInstance[]): PromiseEx<[QueryBoundWitness, Payload[], Payload[]], AccountInstance>; protected bindQueryInternal(query: T, payloads?: Payload[], account?: AccountInstance, additionalSigners?: AccountInstance[]): Promise<[QueryBoundWitness, Payload[], Payload[]]>; protected bindQueryResult(query: T, payloads: Payload[], additionalWitnesses?: AccountInstance[], errors?: ModuleError[]): Promise; protected generateConfigAndAddress(_maxDepth?: number): Promisable; protected generateDescribe(): Promise; /** @deprecated use archivistInstance() instead */ protected getArchivist(): Promise; protected isAllowedArchivingQuery(schema: Schema): boolean; protected manifestHandler(_maxDepth?: number, _ignoreAddresses?: XyoAddress[]): Promisable; protected moduleAddressHandler(): Promisable<(AddressPreviousHashPayload | AddressPayload)[]>; protected queryHandler(query: T, payloads?: Payload[], queryConfig?: TConfig): Promise; protected startHandler(): Promise; protected stateHandler(): Promise; protected stopHandler(): Promise; protected subscribeHandler(): void; protected validateConfig(config?: unknown, parents?: string[]): boolean; protected abstract certifyParents(): Promise; protected abstract storeToArchivists(payloads: Payload[]): Promise; } //# sourceMappingURL=AbstractModule.d.ts.map