import { Address } from "../../types/base"; import { TxInput } from "../../types/transaction"; import { TxPlan, TxPlanDraft, TxPlanResult } from "../../types/txPlan"; type ComputeTxPlanParams = TxPlanDraft & { availableCollateralInputs: TxInput[]; changeAddress: Address; }; type ComputeStrictTxPlanParams = TxPlanDraft & { changeAddress: Address; }; /** * The current plan can already contain some collaterals which this function leaves in place, * These might've come from the user or previous calculation. The caller should reset the collaterals * if doesn't want to reuse previously calculated collaterals. * We might need to add additional collaterals or if the user haven't defined * any collaterals, we add some extra. * @param txPlan the current plan that potentially contains some collaterals * @param availableCollateralInputs all collaterals that are in the account * @returns */ export declare function addCollateralsIfNeeded(txPlan: TxPlan, availableCollateralInputs: TxInput[]): { error: string | null; txPlan: TxPlan; }; export declare function computeTxPlan({ inputs, referenceInputs, collateralInputs, availableCollateralInputs, outputs, changeAddress, certificates, withdrawals, datums, scripts, redeemers, mint, planId, requiredSigners, protocolParameters, metadata, }: ComputeTxPlanParams): TxPlanResult; /** * Compute strict transaction plan takes a transaction draft with a possible * change output and creates a plan that doesn't add any more inputs or * collateral inputs to the transaction, and in case it needs to create * a change output, it creates a change output with both the remaining * Lovelace change and remaining token bundles in it. */ export declare function computeStrictTxPlan({ inputs, referenceInputs, collateralInputs, outputs, changeAddress, certificates, withdrawals, datums, scripts, redeemers, mint, planId, requiredSigners, protocolParameters, metadata, }: ComputeStrictTxPlanParams): TxPlanResult; export declare const validateTxPlan: (txPlanResult: TxPlanResult) => TxPlanResult; export {}; //# sourceMappingURL=computeTxPlan.d.ts.map