import { ZkProgram } from "o1js"; import { DependencyContainer } from "tsyringe"; import { StringKeyOf, ModuleContainer, ModulesRecord, TypedClass, ZkProgrammable, PlainZkProgram, AreProofsEnabled, ChildContainerProvider, CompilableModule, CompileRegistry } from "@proto-kit/common"; import { MethodPublicOutput, StateServiceProvider, SimpleAsyncStateService } from "@proto-kit/protocol"; import { RuntimeModule } from "./RuntimeModule"; import { MethodIdResolver } from "./MethodIdResolver"; import { RuntimeEnvironment } from "./RuntimeEnvironment"; export declare function getAllPropertyNames(obj: any): (string | symbol)[]; /** * Record of modules accepted by the Runtime module container. * * We have to use TypedClass since RuntimeModule * is an abstract class */ export type RuntimeModulesRecord = ModulesRecord>>; export declare class RuntimeZkProgrammable extends ZkProgrammable { runtime: Runtime; constructor(runtime: Runtime); get areProofsEnabled(): AreProofsEnabled | undefined; private extractRuntimeMethods; zkProgramFactory(): Promise[]>; } /** * Wrapper for an application specific runtime, which helps orchestrate * runtime modules into an interoperable runtime. */ export declare class Runtime extends ModuleContainer implements RuntimeEnvironment, CompilableModule { static from(definition: Modules): TypedClass>; program?: ReturnType; definition: Modules; zkProgrammable: ZkProgrammable; /** * Creates a new Runtime from the provided config * * @param modules - Configuration object for the constructed Runtime */ constructor(definition: Modules); create(childContainerProvider: ChildContainerProvider): void; get areProofsEnabled(): AreProofsEnabled | undefined; get stateServiceProvider(): StateServiceProvider; get stateService(): SimpleAsyncStateService; get methodIdResolver(): MethodIdResolver; /** * @returns The dependency injection container of this runtime */ get dependencyContainer(): DependencyContainer; /** * @param methodId The encoded name of the method to call. * Encoding: "stringToField(module.name) << 128 + stringToField(method-name)" */ getMethodById(methodId: bigint): ((...args: unknown[]) => Promise) | undefined; bucketRuntimeMethods(methods: string[]): string[][]; /** * Add a name and other respective properties required by RuntimeModules, * that come from the current Runtime * * @param moduleName - Name of the runtime module to decorate * @param containedModule */ decorateModule(moduleName: StringKeyOf, containedModule: InstanceType]>): void; /** * @returns A list of names of all the registered module names */ get runtimeModuleNames(): string[]; compile(registry: CompileRegistry): Promise>; } //# sourceMappingURL=Runtime.d.ts.map