import type { AnyCompilerConfiguration, AuthenticationProgramStateControlStack, AuthenticationProgramStateMinimum, AuthenticationProgramStateStack, CashAssemblyScriptSegment, CompilationData, CompilationResultSuccess, CompilerOperationResult, IdentifierResolutionFunction, ResolvedScript } from '../lib.js'; import type { CompilationError, CompilationResult } from './language-types.js'; export declare const resolveScriptSegment: (segment: CashAssemblyScriptSegment, resolveIdentifiers: IdentifierResolutionFunction) => ResolvedScript; export declare enum BuiltInVariables { currentBlockTime = "current_block_time", currentBlockHeight = "current_block_height", signingSerialization = "signing_serialization" } /** * If the identifier 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.schnorr_signature.all_outputs`. * @param data - The {@link CompilationData} provided to the compiler * @param configuration - The {@link CompilerConfiguration} provided to * the compiler */ export declare const resolveVariableIdentifier: >({ data, configuration, identifier, }: { data: CompilationData; configuration: Configuration; identifier: string; }) => CompilerOperationResult; /** * A text-formatting method to pretty-print the list of expected inputs * (`Encountered unexpected input while parsing script. Expected ...`). If * present, the `EOF` expectation is always moved to the end of the list. * @param expectedArray - the alphabetized list of expected inputs produced by * `parseScript` */ export declare const describeExpectedInput: (expectedArray: string[]) => string; export declare const createEmptyRange: () => { endColumn: number; endLineNumber: number; startColumn: number; startLineNumber: number; }; /** * Validate all compilation data (i.e. validate all public and private keys), * returning an array of validation errors. If no validity issues are detected, * an empty array is returned. * * The function ensures that compilation fails whenever invalid compilation data * is provided, regardless of whether or not the offending public or private key * material is used. This is intended to surface software defects (particularly * in the software used by counterparties) as early as possible. */ export declare const validateCompilationData: ({ configuration, data, }: { configuration: AnyCompilerConfiguration; data: CompilationData; }) => CompilationError[]; /** * This method is generally for internal use. The {@link compileScript} method * is the recommended API for direct compilation. */ export declare const compileScriptRaw: ({ data, configuration, scriptId, }: { data: CompilationData; configuration: AnyCompilerConfiguration; scriptId: string; }) => CompilationResult; /** * Compile an internal script identifier. * * @remarks * If the identifier can be successfully resolved as a script, the script is * compiled and returned as a {@link 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`. */ export declare const resolveScriptIdentifier: ({ data, configuration, identifier, }: { /** * The identifier of the script to be resolved */ identifier: string; /** * The provided {@link CompilationData} */ data: CompilationData; /** * the provided {@link CompilerConfiguration} */ configuration: AnyCompilerConfiguration; }) => string | false | CompilationResultSuccess; /** * Return an {@link IdentifierResolutionFunction} for use in * {@link resolveScriptSegment}. * * @param scriptId - the `id` of the script for which the resulting * `IdentifierResolutionFunction` will be used. */ export declare const createIdentifierResolver: ({ data, configuration, }: { /** * The actual variable values (private keys, shared wallet data, shared * address data, etc.) to use in resolving variables. */ data: CompilationData; /** * A snapshot of the configuration around `scriptId`, see * {@link CompilerConfiguration} for details */ configuration: AnyCompilerConfiguration; }) => IdentifierResolutionFunction; /** * This method is generally for internal use. The {@link compileScript} method * is the recommended API for direct compilation. */ export declare const compileScriptContents: ({ data, configuration, script, }: { script: string; data: CompilationData; configuration: AnyCompilerConfiguration; }) => CompilationResult; //# sourceMappingURL=resolve.d.ts.map