export interface OnrampOptions { /** Asset to buy. Default 'USDC'. */ asset?: 'SOL' | 'USDC'; /** * @deprecated Ignored. Onramp always funds the signed-in user's own embedded * wallet; a caller-supplied destination is dropped server-side (DS2-0076). */ address?: string; /** Exact fiat amount in USD ($2-$25,000). Mutually exclusive with minAmountOut. */ amountUsd?: number; /** Floor on crypto received (see module docs). Mutually exclusive with amountUsd. */ minAmountOut?: number; /** Upward fiat padding for minAmountOut, 0-0.1. Default 0.01 (1%). */ slippagePad?: number; /** Open in a new tab instead of a popup window. */ newTab?: boolean; width?: number; height?: number; /** How long to keep verifying completion after the window closes (ms, default 24000). */ completionTimeoutMs?: number; } export interface OnrampQuoteInfo { quoteId: string; /** Fiat the user pays (fees included) under the quoted payment method. */ amountUsd: number; /** Crypto the pinned quote delivers. */ quotedOut: number; coinbaseFee: number; networkFee: number; /** The payment method the quote assumed (the worst-fee tier, e.g. CARD). */ paymentMethod: string; } export interface OnrampResult { /** * 'completed' - Coinbase reported a successful purchase (actualOut/txHash set). * 'closed' - the window closed and no completed purchase was observed * within the verification window (abandoned, or still settling - * call onrampStatus() later to re-check). * 'opened' - a new TAB was opened (tab close is not observable; verify * later via onrampStatus()). */ status: 'completed' | 'closed' | 'opened'; /** The destination wallet the session was minted for. */ address: string; asset: 'SOL' | 'USDC'; /** The pinned quote, when one was requested (amountUsd or minAmountOut). */ quote?: OnrampQuoteInfo; /** Actual crypto received, when status is 'completed'. */ actualOut?: number; txHash?: string; } export interface OnrampTransaction { status: string; createdAt: string; asset: string | null; amountOut: number | null; txHash: string | null; } /** * Preview a quote (fees + exact/floor output) WITHOUT opening any window or * consuming a session. Show this to the user, then call onramp() to check out. */ export declare function onrampQuote(options?: OnrampOptions): Promise<{ quote: OnrampQuoteInfo; address: string; asset: 'SOL' | 'USDC'; }>; /** The signed-in user's recent onramp transactions (newest first). */ export declare function onrampStatus(sinceMs?: number): Promise; /** * Open Coinbase Onramp for the signed-in user. Resolves after the window * closes, with completion VERIFIED against Coinbase when possible. * Call from a click handler - popup blockers require user activation. */ export declare function onramp(options?: OnrampOptions): Promise;