/** * Records a perps ⇄ predictions transfer as a tracking-only direct execution, so * transfer volume outlives the Datadog logs it currently lives in (ENG-4867). * * `EXTERNALLY_FULFILLED` because Fun only initiates the move and Polymarket's own * contracts settle it — the same shape Lighter's fills use, which the backend * closes out as a terminal SUCCESS without polling for settlement. */ import type { Address } from 'viem'; import type { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext'; import type { PerpsTransferDirection } from './PolymarketPerpsTransferScreen'; /** * `sourceOfFund` is a persisted, GSI-indexed column, making this prefix the * stable key transfer volume is reported on — do not reformat it. */ export declare const PERPS_TRANSFER_SOURCE_OF_FUND_PREFIX = "polymarket_perps_transfer"; export declare function buildPerpsTransferSourceOfFund(direction: PerpsTransferDirection, sourceAddress: Address): string; export interface RecordPerpsTransferParams { direction: PerpsTransferDirection; sourceAddress: Address; /** Becomes the row's `recipientAddr`. */ destinationAddress: Address; /** Exact string the user entered (validated numeric, ≤6 decimals). */ amountUsd: string; /** * The rail's own id, when the integrator returns one. Absent for integrators * still on the void-returning `transfer()`, which falls back to a local uuid * and leaves the record with no join key to the venue's side. */ railId?: string; userId: string | undefined; apiKey: string; checkoutItem: FunkitActiveCheckoutItem; } /** * Best-effort by design: the transfer already succeeded when this runs, so a * bookkeeping failure must never surface to the user or be retried. Callers do * not need to catch — every failure path is swallowed at WARN here. */ export declare function recordPerpsTransfer({ direction, sourceAddress, destinationAddress, amountUsd, railId, userId, apiKey, checkoutItem, }: RecordPerpsTransferParams): Promise;