import { InstructionSetOperationMapping, Operation } from '../../virtual-machine'; import { AuthenticationProgramStateError, AuthenticationProgramStateExecutionStack, AuthenticationProgramStateStack } from '../../vm-types'; import { AuthenticationErrorCommon } from './errors'; export declare const incrementOperationCount: (operation: Operation) => Operation; export declare const conditionallyEvaluate: (operation: Operation) => Operation; /** * Map a function over each operation in an `InstructionSet.operations` object, * assigning the result to the same `opcode` in the resulting object. * @param operations - an operations map from an `InstructionSet` * @param combinator - a function to apply to each operation */ export declare const mapOverOperations: (operations: InstructionSetOperationMapping, ...combinators: ((operation: Operation) => Operation)[]) => { [opcode: number]: Operation; }; /** * Pop one stack item off of `state.stack` and provide that item to `operation`. */ export declare const useOneStackItem: & AuthenticationProgramStateError, Errors>(state: State, operation: (nextState: State, [value]: [Uint8Array]) => State) => State; export declare const useTwoStackItems: & AuthenticationProgramStateError, Errors>(state: State, operation: (nextState: State, [valueTop, valueTwo]: [Uint8Array, Uint8Array]) => State) => State; export declare const useThreeStackItems: & AuthenticationProgramStateError, Errors>(state: State, operation: (nextState: State, [valueTop, valueTwo, valueThree]: [Uint8Array, Uint8Array, Uint8Array]) => State) => State; export declare const useFourStackItems: & AuthenticationProgramStateError, Errors>(state: State, operation: (nextState: State, [valueTop, valueTwo, valueThree, valueFour]: [Uint8Array, Uint8Array, Uint8Array, Uint8Array]) => State) => State; export declare const useSixStackItems: & AuthenticationProgramStateError, Errors>(state: State, operation: (nextState: State, [valueTop, valueTwo, valueThree, valueFour, valueFive, valueSix]: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array]) => State) => State; export declare const useOneScriptNumber: & AuthenticationProgramStateError, Errors>(state: State, operation: (nextState: State, [value]: [bigint]) => State, { requireMinimalEncoding, maximumScriptNumberByteLength, }: { requireMinimalEncoding: boolean; maximumScriptNumberByteLength?: number | undefined; }) => State; export declare const useTwoScriptNumbers: & AuthenticationProgramStateError, Errors>(state: State, operation: (nextState: State, [firstValue, secondValue]: [bigint, bigint]) => State, { requireMinimalEncoding, maximumScriptNumberByteLength, }: { requireMinimalEncoding: boolean; maximumScriptNumberByteLength?: number | undefined; }) => State; export declare const useThreeScriptNumbers: & AuthenticationProgramStateError, Errors>(state: State, operation: (nextState: State, [firstValue, secondValue, thirdValue]: [bigint, bigint, bigint]) => State, { requireMinimalEncoding, maximumScriptNumberByteLength, }: { requireMinimalEncoding: boolean; maximumScriptNumberByteLength?: number | undefined; }) => State; /** * Return the provided state with the provided value pushed to its stack. * @param state - the state to update and return * @param data - the value to push to the stack */ export declare const pushToStack: >(state: State, ...data: Uint8Array[]) => State; export declare const combineOperations: (firstOperation: Operation, secondOperation: Operation) => (state: State) => State; //# sourceMappingURL=combinators.d.ts.map