import { POLYMARKET_PERPS_ROUTING_ID, POLYMARKET_PREDICTIONS_ROUTING_ID } from '../../consts/polymarket'; import type { DepositAccess, FunkitCheckoutActionParams, FunkitCheckoutConfig, PerpsTransferDirection, PolymarketPerpsTransferPending, PolymarketTransferAccount } from '../../providers/FunkitCheckoutContext/types'; import { type PolymarketPerpsDepositConfig } from './polymarket'; export { POLYMARKET_PERPS_ROUTING_ID, POLYMARKET_PREDICTIONS_ROUTING_ID }; /** * Builds the `generateActionsParams` for a Polymarket *Predictions* deposit: * wrap USDC.e → pUSD into the predictions proxy via the CollateralOnramp, * mediated by the VaultDepositor so it composes with EXACT_INPUT quoting (the * VaultDepositor pulls msg.sender's full balance and substitutes * AMOUNT_PLACEHOLDER at exec time). */ export declare function createPredictionsGenerateActionParams(config: PolymarketPerpsDepositConfig): () => Promise; /** * A Polymarket account in the deposit picker / transfer step — the same * integrator-owned shape the transfer step consumes (address, min-topup, * transfer, live balance getter; see {@link PolymarketTransferAccount}). * Both accounts share it, so each transfer direction is symmetrical. */ export type PolymarketAccount = PolymarketTransferAccount; /** * Re-exported so an integrator can type a `transfer` implementation without * reaching outside this entry point — returning the rail's id is what lets a * transfer record be joined to Polymarket's side of the same transfer. */ export type { PolymarketPerpsTransferPending, DepositAccess, PerpsTransferDirection, PolymarketTransferResult, } from '../../providers/FunkitCheckoutContext/types'; /** What the transfer step opens with. Both fields are optional. */ export interface PolymarketTransferDefaults { /** * Direction on open. Defaults to Predictions → Perps. Ignored when `access` * leaves only one product fundable — that product is the destination. */ direction?: PerpsTransferDirection; /** * Amount the field opens with, as a plain USD string with up to 2 decimals * and no commas/separators. Examples of acceptable values: `'12.50'`, * `'25'`, `'1000.00'`. Anything else is ignored. */ amountUsd?: string; } export interface CreatePolymarketDepositConfigParams { /** Predictions account (the user's predictions proxy). */ predictions: PolymarketAccount; /** Perps account. */ perps: PolymarketAccount; /** Optional subtitle under the modal title, e.g. a balance line. */ modalTitleMeta?: string; /** * Optional per-destination modal title overrides. When omitted, both * destinations title the modal "Deposit" — the header tabs already name the * selected account. */ modalTitles?: { predictions?: string; perps?: string; }; /** * Account selected when the modal opens. Falls back to the accessible account * when the requested default is unavailable. Defaults to `'predictions'`. */ defaultAccount?: 'predictions' | 'perps'; /** * In-flight perps transfers at the time the modal opens. While a deposit or * withdrawal is pending the transfer step disables Transfer and shows a * pending state. Keep it current after opening with * `useUpdateActiveFunkitCheckout().updatePolymarketPerpsTransferPending`. */ pendingTransfers?: PolymarketPerpsTransferPending; /** * Geo eligibility per product; omit to preserve access to both. Reflects * location restrictions only — a false flag surfaces as "Unavailable in your * location". */ access?: DepositAccess; /** Direction and amount the Transfer tab opens with. */ transferDefaults?: PolymarketTransferDefaults; } /** * Builds the entire Polymarket deposit checkout config from the two accounts. * Its `headerTabs` show Predictions | Perps | Transfer on the deposit and * transfer screens while `polymarketPerpsTransfer` is set — the tabs switch * `dynamicRoutingId` or open the transfer step; modal title, min deposit, * recipient and on-chain deposit actions are derived per account. Supersedes * the "Deposit to" dropdown. */ export declare function createPolymarketDepositConfig({ predictions, perps, modalTitleMeta, modalTitles, defaultAccount, pendingTransfers, access, transferDefaults, }: CreatePolymarketDepositConfigParams): FunkitCheckoutConfig;