import { Address, Hex } from 'viem'; import { ExecutionDataV7 } from '../blockchain'; import type { Gondi } from '../gondi'; import { CreditPurchaseQuote } from '../utils/creditPurchase'; type Context = Pick; type PurchaseInput = Parameters[0]; /** Selected buyer financing; quote preparation never requests a wallet signature. */ export type BuyWithLoanInput = Pick & { orderId: number; minimumInitialPayment?: bigint; sellAndRepaySwapData?: PurchaseInput['sellAndRepaySwapData']; slippageBps?: bigint; }; type QuoteBase = { orderId: number; price: bigint; totalPrice: bigint; buyer: Address; buyerBundler: Address; buyerLoanContract: Address; loanCurrency: Address; purchaseCurrency: Address; netPrincipal: bigint; initialPayment: bigint; inputAmount: bigint; deadline: bigint; module: Address; execution: ExecutionDataV7; approvalCaps: readonly { currency: Address; amount: bigint; }[]; extraSeaportData?: Hex; loanSwapData: Hex; repaymentSwapData: Hex; }; type SellerQuote = { sellerContract: Address; loanId: bigint; loanHash: Hex; repaymentCalldata: Hex; }; /** A short-lived, token-bounded authorization for one exact listing and buyer execution. */ export type BuyWithLoanQuote = Readonly; /** Caps every collection from the buyer, including zeroing unquoted flash fallback allowances. */ export declare const buyWithLoanApprovals: (quote: BuyWithLoanQuote) => { currency: Address; amount: bigint; }[]; /** Resolves the canonical listing and prepares a bounded unsigned execution before confirmation. */ export declare const quoteBuyWithLoan: (context: Context, input: BuyWithLoanInput) => Promise; /** Checks activation, currency permissions, seller state and the live flash premium again. */ export declare const assertBuyWithLoanRoute: (context: Context, quote: BuyWithLoanQuote) => Promise; /** Publishes only the confirmed authorization and broadcasts through the existing simulated route. */ export declare const buyWithLoan: (context: Context, input: PurchaseInput & { buyWithLoanQuote: BuyWithLoanQuote; }) => Promise<{ txHash: `0x${string}`; waitTxInBlock: () => Promise; }>; export {};