import type { AlgobRuntimeEnv, EnvironmentExtender, Network, ResolvedAlgobConfig, RunTaskFunction, RuntimeArgs, TasksMap } from "../../types"; export declare class Environment implements AlgobRuntimeEnv { readonly config: ResolvedAlgobConfig; readonly runtimeArgs: RuntimeArgs; readonly tasks: TasksMap; private static readonly _BLACKLISTED_PROPERTIES; network: Network; private readonly _extenders; /** * Initializes the Algob Runtime Environment and the given * extender functions. * * @remarks The extenders' execution order is given by the order * of the requires in the algob's config file and its plugins. * * @param config The algob's config object. * @param runtimeArgs The parsed algob's arguments. * @param tasks A map of tasks. * @param extenders A list of extenders. * @param networkRequired if true it will assert that a requested network is defined. */ constructor(config: ResolvedAlgobConfig, runtimeArgs: RuntimeArgs, tasks: TasksMap, extenders?: EnvironmentExtender[], networkRequired?: boolean); /** * Executes the task with the given name. * * @param name The task's name. * @param taskArguments A map of task's arguments. * * @throws a ALGORAND_BUILDER303 if there aren't any defined tasks with the given name. * @returns a promise with the task's execution result. */ readonly run: RunTaskFunction; /** * Injects the properties of `this` (the Algob Runtime Environment) into the global scope. * * @param blacklist a list of property names that won't be injected. * * @returns a function that restores the previous environment. */ injectToGlobal(blacklist?: string[]): () => void; private _runTaskDefinition; /** * Check that task arguments are within TaskDefinition defined params constraints. * Also, populate missing, non-mandatory arguments with default param values (if any). * * @private * @throws BuilderError if any of the following are true: * > a required argument is missing * > an argument's value's type doesn't match the defined param type * * @param taskDefinition * @param taskArguments * @returns resolvedTaskArguments */ private _resolveValidTaskArguments; /** * Resolves an argument according to a ParamDefinition rules. * * @param paramDefinition * @param argumentValue * @private */ private _resolveArgument; /** * Checks if value is valid for the specified param definition. * * @param paramDefinition {ParamDefinition} - the param definition for validation * @param argumentValue - the value to be validated * @private * @throws ALGORAND_BUILDER301 if value is not valid for the param type */ private _checkTypeValidation; }