import { TransactionContextCommon } from '../transaction/transaction-types'; import { AuthenticationErrorCommon, OpcodesCommon } from '../vm/instruction-sets/instruction-sets'; import { AuthenticationProgramCommon, AuthenticationProgramStateCommon, AuthenticationProgramStateExecutionStack, AuthenticationProgramStateMinimum, AuthenticationProgramStateStack } from '../vm/vm-types'; import { AnyCompilationEnvironment, CompilationEnvironment, Compiler } from './compiler-types'; import { AuthenticationTemplate } from './template-types'; /** * Create a `Compiler` from the provided compilation environment. This method * requires a full `CompilationEnvironment` and does not instantiate any new * crypto or VM implementations. * * @param compilationEnvironment - the environment from which to create the * compiler */ export declare const createCompiler: , Opcodes extends number = number, ProgramState extends AuthenticationProgramStateStack & AuthenticationProgramStateExecutionStack & AuthenticationProgramStateMinimum = AuthenticationProgramStateStack & AuthenticationProgramStateExecutionStack & AuthenticationProgramStateMinimum>(compilationEnvironment: Environment) => Compiler; /** * A common `createAuthenticationProgram` implementation for most compilers. * * Accepts the compiled contents of an evaluation and produces a * `AuthenticationProgramCommon` which can be evaluated to produce the resulting * program state. * * The precise shape of the authentication program produced by this method is * critical to the determinism of BTL evaluations for the compiler in which it * is used, it therefore must be standardized between compiler implementations. * * @param evaluationBytecode - the compiled bytecode to incorporate in the * created authentication program */ export declare const createAuthenticationProgramEvaluationCommon: (evaluationBytecode: Uint8Array) => AuthenticationProgramCommon; /** * Synchronously create a compiler using the default common environment. Because * this compiler has no access to Secp256k1, Sha256, or a VM, it cannot compile * evaluations or operations which require key derivation or hashing. * * @param scriptsAndOverrides - a compilation environment from which properties * will be used to override properties of the default common compilation * environment – must include the `scripts` property */ export declare const createCompilerCommonSynchronous: , ProgramState extends AuthenticationProgramStateCommon, Opcodes extends number = OpcodesCommon, Errors = AuthenticationErrorCommon>(scriptsAndOverrides: Environment) => Compiler; /** * Create a partial `CompilationEnvironment` from an `AuthenticationTemplate` by * extracting and formatting the `scripts` and `variables` properties. * * Note, if this `AuthenticationTemplate` might be malformed, first validate it * with `validateAuthenticationTemplate`. * * @param template - the `AuthenticationTemplate` from which to extract the * compilation environment */ export declare const authenticationTemplateToCompilationEnvironment: (template: AuthenticationTemplate) => Pick; /** * Create a partial `CompilationEnvironment` from an `AuthenticationTemplate`, * virtualizing all script tests as unlocking and locking script pairs. * * @param template - the authentication template from which to extract the * compilation environment */ export declare const authenticationTemplateToCompilationEnvironmentVirtualizedTests: (template: AuthenticationTemplate) => ReturnType; //# sourceMappingURL=compiler.d.ts.map