import { Wallet, type JsonRpcProvider } from 'ethers'; import { type CommonBundleConfig } from '../../utils/bundle-helpers.js'; import type { FourSwapSignConfig, SellerNoncePlan, UserType } from './types/index.js'; export type { SellerNoncePlan } from './types/index.js'; export declare function getFourSwapProfitRateBps(_userType?: UserType): number; export declare function needsTmTokenApproval(currentAllowance: bigint, decimals: number): boolean; export declare function countSellerNonceSlots(needBribeTx: boolean, needApproval: boolean, includeProfit: boolean): number; export declare function planSellerNonces(sellerNonces: number[], needBribeTx: boolean, needApproval: boolean, extractProfit: boolean): SellerNoncePlan; export declare function signTmMaxApprovalTx(seller: Wallet, tokenAddress: string, approvalNonce: number, gasPrice: bigint, chainIdNum: number, txType: 0 | 2): Promise; export declare function quoteFourSwapSellFunds(provider: JsonRpcProvider, tokenAddress: string, sellAmountWei: bigint): Promise; /** 换手按卖出所得收万六会像万五点多:用所得能买回的数量把计价额抬到买侧。 */ export declare function grossUpFourSellProceedsToBuySide(provider: JsonRpcProvider, tokenAddress: string, sellAmountWei: bigint, sellProceedsWei: bigint): Promise; export declare function fetchFourSwapSellQuoteAndAllowance(provider: JsonRpcProvider, tokenAddress: string, sellerAddress: string, sellAmountWei: bigint): Promise<{ sellFunds: bigint; allowance: bigint; }>; export declare function fetchFourSwapSellQuoteAllowanceAndBalances(provider: JsonRpcProvider, tokenAddress: string, sellerAddress: string, sellAmountWei: bigint, buyerAddresses: string[]): Promise<{ sellFunds: bigint; allowance: bigint; buyerBalances: bigint[]; }>; export declare function toCommonBundleConfig(config: FourSwapSignConfig): CommonBundleConfig; export type FourSwapGasContext = { chainIdNum: number; provider: JsonRpcProvider; bundleConfig: CommonBundleConfig; finalGasLimit: bigint; txType: 0 | 2; }; export declare function createFourSwapGasContext(config: FourSwapSignConfig): FourSwapGasContext;