import { z } from 'zod'; import { AccessComputationResult, AccessRecorderEngine } from './access-recorder'; import { ChainBuilderRuntime } from './runtime'; import { chainDefinitionSchema } from './schemas'; import { ChainArtifacts, ChainBuilderContext, PackageState } from './types'; export interface RawConfig { description?: string; depends?: string[]; } export interface CannonAction { label: string; configInject: (ctx: ChainBuilderContext, config: Config, packageState: PackageState) => Config; getState: (runtime: ChainBuilderRuntime, ctx: ChainBuilderContext, config: Config, packageState: PackageState) => Promise; /** * Returns a list of state keys that this operation consumes (used for dependency inference) */ getInputs?: (config: Config, engine: AccessRecorderEngine, packageState: PackageState) => AccessComputationResult; /** * Returns a list of state keys this operation produces (used for dependency inference) */ getOutputs?: (config: Config, packageState: PackageState) => string[]; exec: (runtime: ChainBuilderRuntime, ctx: ChainBuilderContext, config: Config, packageState: PackageState) => Promise; importExisting?: (runtime: ChainBuilderRuntime, ctx: ChainBuilderContext, config: Config, packageState: PackageState, existingKeys: string[]) => Promise; validate: z.ZodSchema; timeout?: number; } /** * @internal * All the different types (and their implementations) */ export declare const ActionKinds: { [label: string]: CannonAction; }; /** * Available properties for top level config * @public * @group Base Cannonfile Config */ export type RawChainDefinition = z.infer; /** * @internal * parses the schema and performs zod validations safely with a custom error handler */ export declare function validateConfig(schema: z.ZodSchema, config: any): z.SafeParseReturnType; export declare function checkConfig(schema: z.ZodSchema, config: any): z.ZodIssue[] | null; export declare function registerAction(action: CannonAction): void; //# sourceMappingURL=actions.d.ts.map