import type { AnyCompilerConfiguration, CompilationContextBCH, CompilationData, CompilerConfiguration, CompilerOperation, CompilerOperationErrorFatal, CompilerOperationResult, WalletTemplateHdKey } from '../lib.js'; /** * Attempt a series of compiler operations, skipping to the next operation if * the current operation returns a {@link CompilerOperationSkip} (indicating it * failed and can be skipped). The `finalOperation` may not be skipped, and must * either return {@link CompilerOperationSuccess} or * {@link CompilerOperationError}. * * @param operations - an array of skippable operations to try * @param finalOperation - a final, un-skippable operation */ export declare const attemptCompilerOperations: (operations: CompilerOperation[], finalOperation: CompilerOperation) => CompilerOperation; /** * Modify a compiler operation to verify that certain properties exist in the * {@link CompilationData} and {@link CompilerConfiguration} before executing * the provided operation. If the properties don't exist, an error message * is returned. * * This is useful for eliminating repetitive existence checks. */ export declare const compilerOperationRequires: , RequiredConfigurationProperties extends keyof CompilerConfiguration, CompilationContext = CompilationContextBCH>({ canBeSkipped, dataProperties, configurationProperties, operation, }: { canBeSkipped: CanBeSkipped; dataProperties: RequiredDataProperties[]; configurationProperties: RequiredConfigurationProperties[]; operation: (identifier: string, data: CompilationData & Required, RequiredDataProperties>>, configuration: CompilerConfiguration & Required, RequiredConfigurationProperties>>) => CompilerOperationResult; }) => CompilerOperation; export declare const compilerOperationAttemptBytecodeResolution: CompilerOperation; export declare const compilerOperationHelperDeriveHdPrivateNode: ({ addressIndex, entityId, entityHdPrivateKey, configuration, hdKey, identifier, }: { addressIndex: number; entityId: string; entityHdPrivateKey: string; configuration: { ripemd160: NonNullable; secp256k1: NonNullable; sha256: NonNullable; sha512: NonNullable; }; hdKey: WalletTemplateHdKey; identifier: string; }) => CompilerOperationResult; export declare const compilerOperationHelperUnknownEntity: (identifier: string, variableId: string) => { error: string; status: "error"; }; export declare const compilerOperationHelperAddressIndex: (identifier: string) => { error: string; status: "error"; }; export declare const compilerOperationHelperDeriveHdKeyPrivate: ({ configuration, hdKeys, identifier, }: { configuration: { entityOwnership: NonNullable; ripemd160: NonNullable; secp256k1: NonNullable; sha256: NonNullable; sha512: NonNullable; variables: NonNullable; }; hdKeys: NonNullable; identifier: string; }) => CompilerOperationResult; /** * Returns `false` if the target script ID doesn't exist in the compiler * configuration (allows for the caller to generate the error message). * * If the compilation produced errors, returns a * {@link CompilerOperationErrorFatal}. * * If the compilation was successful, returns the compiled bytecode as a * `Uint8Array`. */ export declare const compilerOperationHelperCompileScript: ({ targetScriptId, data, configuration, }: { targetScriptId: string; data: CompilationData; configuration: AnyCompilerConfiguration; }) => false | Uint8Array | CompilerOperationErrorFatal; /** * Returns either the properly generated `coveredBytecode` or a * {@link CompilerOperationErrorFatal}. */ export declare const compilerOperationHelperGenerateCoveredBytecode: ({ data, configuration, identifier, sourceScriptIds, unlockingScripts, }: { data: CompilationData; configuration: AnyCompilerConfiguration; identifier: string; sourceScriptIds: string[]; unlockingScripts: { [unlockingScriptId: string]: string; }; }) => CompilerOperationErrorFatal | Uint8Array; //# sourceMappingURL=compiler-operation-helpers.d.ts.map