import { AnyCompilationEnvironment, CompilationData, CompilationEnvironment, CompilerOperationResult } from '../compiler-types'; import { BtlScriptSegment, CompilationResultSuccess, IdentifierResolutionFunction, ResolvedScript } from './language-types'; export declare const resolveScriptSegment: (segment: BtlScriptSegment, resolveIdentifiers: IdentifierResolutionFunction) => ResolvedScript; export declare enum BuiltInVariables { currentBlockTime = "current_block_time", currentBlockHeight = "current_block_height", signingSerialization = "signing_serialization" } /** * If the identifer can be successfully resolved as a variable, the result is * returned as a Uint8Array. If the identifier references a known variable, but * an error occurs in resolving it, the error is returned as a string. * Otherwise, the identifier is not recognized as a variable, and this method * simply returns `false`. * * @param identifier - The full identifier used to describe this operation, e.g. * `owner.signature.all_outputs`. * @param data - The `CompilationData` provided to the compiler * @param environment - The `CompilationEnvironment` provided to the compiler */ export declare const resolveVariableIdentifier: >({ data, environment, identifier, }: { data: CompilationData; environment: Environment; identifier: string; }) => CompilerOperationResult; /** * Compile an internal script identifier. * * @remarks * If the identifer can be successfully resolved as a script, the script is * compiled and returned as a CompilationResultSuccess. If an error occurs in * compiling it, the error is returned as a string. * * Otherwise, the identifier is not recognized as a script, and this method * simply returns `false`. * * @param identifier - the identifier of the script to be resolved * @param data - the provided CompilationData * @param environment - the provided CompilationEnvironment * @param parentIdentifier - the identifier of the script which references the * script being resolved (for detecting circular dependencies) */ export declare const resolveScriptIdentifier: ({ data, environment, identifier, }: { identifier: string; data: CompilationData; environment: CompilationEnvironment; }) => string | false | CompilationResultSuccess; /** * Return an `IdentifierResolutionFunction` for use in `resolveScriptSegment`. * * @param scriptId - the `id` of the script for which the resulting * `IdentifierResolutionFunction` will be used. * @param environment - a snapshot of the context around `scriptId`. See * `CompilationEnvironment` for details. * @param data - the actual variable values (private keys, shared wallet data, * shared address data, etc.) to use in resolving variables. */ export declare const createIdentifierResolver: ({ data, environment, }: { data: CompilationData; environment: CompilationEnvironment; }) => IdentifierResolutionFunction; //# sourceMappingURL=resolve.d.ts.map