import { ethers } from 'ethers'; import { type BalanceValidationParams, type BuildSwapParams, type BuyerBudget, type BuyerBudgetParams, type NoncePlan, type PancakeContext, type PancakeSwapConfig, type PancakeSwapSignConfig, type PlanNonceParams, type SwapUnsignedResult } from './bundle-swap-types.js'; export declare function createPancakeContext(config: PancakeSwapSignConfig): PancakeContext; export declare function getGasPrice(provider: ethers.JsonRpcProvider, config: PancakeSwapSignConfig | PancakeSwapConfig): Promise; export declare function buildSwapTransactions({ routeParams, sellAmountWei, buyAmountBNB, buyer, seller, tokenAddress, useNativeToken, v2RouterAddress, sellAmountOutMin, buyAmountOutMin, }: BuildSwapParams): Promise; export declare function calculateBuyerBudget({ buyer, quotedBNBOut, reserveGasBNB, useNativeToken, quoteToken, quoteTokenDecimals, provider, }: BuyerBudgetParams): Promise; /** * ✅ 从前端传入的 startNonces 构建 NoncePlan(用于性能优化) * 顺序:[sellerBaseNonce, buyerNonce] */ export declare function buildNoncePlanFromNonces(startNonces: number[], sameAddress: boolean, approvalExists: boolean, profitNeeded: boolean, needBribeTx: boolean): NoncePlan; /** * ✅ 规划 nonce * 交易顺序:贿赂 → 授权 → 卖出 → 买入 → 利润 * 贿赂和利润由卖方发送 */ export declare function planNonces({ seller, buyer, sameAddress, approvalExists, profitNeeded, needBribeTx, nonceManager, }: PlanNonceParams): Promise; export declare function validateFinalBalances({ sameAddress, buyerBalance, buyAmountBNB, reserveGas, gasLimit, gasPrice, useNativeToken, quoteTokenDecimals, provider, buyerAddress, }: BalanceValidationParams): Promise; export declare function countTruthy(values: Array): number;