import { ExecutionUnits } from '@cardano-ogmios/schema'; import { Address, ProtocolParameters, TxPlan, TxPlanArgs, TxPlanResult, UTxO } from "../types"; declare const TxRedeemers: readonly ["spend", "mint", "cert", "reward"]; type RedeemerPointer = { purpose: (typeof TxRedeemers)[number]; index: number; }; type EvaluationResult = { validator: RedeemerPointer; budget: ExecutionUnits; }; export type Evaluations = EvaluationResult[]; export type EvaluateTxBodyFn = (txBody: string) => Promise<{ success: true; evaluations: Evaluations; } | { success: false; cause?: 'Overspent budget' | 'Deserialization failure'; }>; export declare function assertEvaluations(data: unknown): asserts data is Evaluations; export declare function assertExUnitsNotExceeded(evaluations: Evaluations, { maxExecutionUnitsPerTransaction }: ProtocolParameters): void; export declare const evaluateTxBodyFactory: (apiServerUrl: string) => EvaluateTxBodyFn; export declare const getTotalExUnits: (txPlan: TxPlan) => ExecutionUnits; export declare const getTotalOgmiosExUnits: (evaluations: { budget: ExecutionUnits; }[]) => { memory: number; cpu: number; }; /** * Creates a transaction plan and evaluates the budget to be used. * * Assumes that any scripts have very pessimistic estimates for the budgets, * so there is always change ADA that can be returned to the user. */ export declare function getEvaluatedTxPlan({ txPlanArgs: origTxPlanArgs, utxos, changeAddress, evaluateTxBodyFn, validityIntervalStart, ttl, allowExceededExUnits, }: { txPlanArgs: TxPlanArgs; /** should be pubkey-only utxo list for now */ utxos: UTxO[]; changeAddress: Address; evaluateTxBodyFn: EvaluateTxBodyFn; validityIntervalStart?: number; ttl?: number; allowExceededExUnits?: boolean; }): Promise; export {}; //# sourceMappingURL=exUnits.d.ts.map