@metamask-previews/ramps-controller 17.0.0-preview-b8d04f274 → 17.0.0-preview-1ccf11bcb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+
12
+ - Add the pure `getHeadlessProviderAllowlist(remoteFeatureFlagState, surface?)` helper plus the `HEADLESS_ALLOWLIST_SURFACES` constant and `HeadlessAllowlistSurface` type, resolving the provider-id allowlist carried by the `moneyHeadlessAllProviders` flag's object payload (`surfaces[surface]` overrides the top-level `providerIds`; absent, empty, or malformed levels fall through to no restriction) ([#9524](https://github.com/MetaMask/core/pull/9524))
13
+ - Add an optional `surface` option to `RampsController.getQuotes` (canonical values `money` | `perps` | `predictions`) selecting the per-surface allowlist from the flag payload on the widened all-providers path; it does not affect fetching or caching ([#9524](https://github.com/MetaMask/core/pull/9524))
14
+
15
+ ### Changed
16
+
17
+ - Widen the `moneyHeadlessAllProviders` flag value contract to accept an object payload `{ enabled: true, providerIds?: string[], surfaces?: Record<string, string[]> }` alongside the boolean form ([#9524](https://github.com/MetaMask/core/pull/9524))
18
+ - `isHeadlessAllProvidersEnabled` now returns `true` for an object payload whose `enabled` is the literal `true`; every other previously-false value (strings, numbers, arrays, disabled or malformed payloads) still resolves to `false`, and the boolean forms behave exactly as before, so boolean-only configurations see no behavior change
19
+ - When the payload lists provider ids, the widened quote pick drops candidates whose provider is not listed (ids match in prefixed `/providers/x` or bare form, case-insensitively); if nothing survives, `getQuotes` returns an empty `success[]` with `sorted` / `error` / `customActions` preserved
20
+ - Clients on earlier versions coerce the object payload to `false` (native-only), so serving it cannot enable widening for a client that cannot parse it
21
+
10
22
  ## [17.0.0]
11
23
 
12
24
  ### Added
@@ -1 +1 @@
1
- {"version":3,"file":"RampsController-method-action-types.cjs","sourceRoot":"","sources":["../src/RampsController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { RampsController } from './RampsController';\n\n/**\n * Executes a request with caching, deduplication, and at most one in-flight\n * request per resource type.\n *\n * 1. **Same cache key in flight** – If a request with this cache key is\n * already pending, returns that promise (deduplication; no second request).\n *\n * 2. **Cache hit** – If valid, non-expired data exists in state.requests for\n * this key and forceRefresh is not set, returns that data without fetching.\n *\n * 3. **New request** – Creates an AbortController and fires the fetcher.\n * If options.resourceType is set, tags the pending request with that\n * resource type (so #abortDependentRequests can cancel it on region\n * change or cleanup) and ref-counts resource-level loading state.\n * On success or error, updates request state and resource error;\n * in finally, clears resource loading only if this request was not\n * aborted.\n *\n * @param cacheKey - Unique identifier for this request (e.g. from createCacheKey).\n * @param fetcher - Async function that performs the fetch. Receives an AbortSignal\n * that is aborted when this request is superseded by another for the same resource.\n * @param options - Optional forceRefresh, ttl, and resourceType for loading/error state.\n * @returns The result of the request (from cache, joined promise, or fetcher).\n */\nexport type RampsControllerExecuteRequestAction = {\n type: `RampsController:executeRequest`;\n handler: RampsController['executeRequest'];\n};\n\n/**\n * Aborts a pending request if one exists.\n *\n * @param cacheKey - The cache key of the request to abort.\n * @returns True if a request was aborted.\n */\nexport type RampsControllerAbortRequestAction = {\n type: `RampsController:abortRequest`;\n handler: RampsController['abortRequest'];\n};\n\n/**\n * Gets the state of a specific cached request.\n *\n * @param cacheKey - The cache key to look up.\n * @returns The request state, or undefined if not cached.\n */\nexport type RampsControllerGetRequestStateAction = {\n type: `RampsController:getRequestState`;\n handler: RampsController['getRequestState'];\n};\n\n/**\n * Sets the user's region manually (without fetching geolocation).\n * This allows users to override the detected region.\n *\n * @param region - The region code to set (e.g., \"US-CA\").\n * @param options - Options for cache behavior.\n * @returns The user region object.\n */\nexport type RampsControllerSetUserRegionAction = {\n type: `RampsController:setUserRegion`;\n handler: RampsController['setUserRegion'];\n};\n\n/**\n * Sets the user's selected provider.\n *\n * Accepts either a Provider object (stored directly) or a provider ID\n * string (looked up from state). The object form is preferred when the\n * caller already has the full data (e.g. from React Query cache).\n *\n * @param providerOrId - A Provider object, a provider ID string (e.g., \"/providers/moonpay\"), or null to clear.\n * @param options - Optional settings for the selection.\n * @param options.autoSelected - When true, marks the provider as system-guessed\n * (soft selection). The UI will silently auto-switch on token conflict instead\n * of showing the \"Token Not Available\" modal. Defaults to false.\n */\nexport type RampsControllerSetSelectedProviderAction = {\n type: `RampsController:setSelectedProvider`;\n handler: RampsController['setSelectedProvider'];\n};\n\n/**\n * Initializes the controller by fetching the user's region from geolocation.\n * This should be called once at app startup to set up the initial region.\n *\n * Idempotent: subsequent calls return the same promise unless forceRefresh is set.\n * Force-refetches the countries catalog on startup (bypassing the in-session\n * request cache) so region preset amounts stay current. The catalog is not\n * persisted, so a cold start always re-fetches it regardless. Skips\n * geolocation when userRegion already exists.\n *\n * @param options - Options for cache behavior. forceRefresh bypasses idempotency and re-runs the full flow.\n * @returns Promise that resolves when initialization is complete.\n */\nexport type RampsControllerInitAction = {\n type: `RampsController:init`;\n handler: RampsController['init'];\n};\n\n/**\n * Fetches the list of supported countries.\n * The API returns countries with support information for both buy and sell actions.\n * The countries are saved in the controller state once fetched.\n *\n * @param options - Options for cache behavior.\n * @returns An array of countries.\n */\nexport type RampsControllerGetCountriesAction = {\n type: `RampsController:getCountries`;\n handler: RampsController['getCountries'];\n};\n\n/**\n * Fetches the list of available tokens for a given region and action.\n * The tokens are saved in the controller state once fetched.\n *\n * @param region - The region code (e.g., \"us\", \"fr\", \"us-ny\"). If not provided, uses the user's region from controller state.\n * @param action - The ramp action type ('buy' or 'sell').\n * @param options - Options for cache behavior and query filters.\n * @param options.provider - Provider ID(s) to filter by.\n * @returns The tokens response containing topTokens and allTokens.\n */\nexport type RampsControllerGetTokensAction = {\n type: `RampsController:getTokens`;\n handler: RampsController['getTokens'];\n};\n\n/**\n * Sets the user's selected token by asset ID.\n * Looks up the token from the current tokens in state and automatically\n * fetches payment methods for that token.\n *\n * @param assetId - The asset identifier in CAIP-19 format (e.g., \"eip155:1/erc20:0x...\"), or undefined to clear.\n * @throws If region is not set, tokens are not loaded, or token is not found.\n */\nexport type RampsControllerSetSelectedTokenAction = {\n type: `RampsController:setSelectedToken`;\n handler: RampsController['setSelectedToken'];\n};\n\n/**\n * Fetches the list of providers for a given region.\n * The providers are saved in the controller state once fetched.\n *\n * @param region - The region code (e.g., \"us\", \"fr\", \"us-ny\"). If not provided, uses the user's region from controller state.\n * @param options - Options for cache behavior and query filters.\n * @param options.provider - Provider ID(s) to filter by.\n * @param options.crypto - Crypto currency ID(s) to filter by.\n * @param options.payments - Payment method ID(s) to filter by.\n * @returns The providers response containing providers array.\n */\nexport type RampsControllerGetProvidersAction = {\n type: `RampsController:getProviders`;\n handler: RampsController['getProviders'];\n};\n\n/**\n * Fetches the list of payment methods for a given context.\n * The payment methods are saved in the controller state once fetched.\n *\n * @param region - User's region code (e.g. \"fr\", \"us-ny\").\n * @param options - Query parameters for filtering payment methods.\n * @param options.assetId - CAIP-19 cryptocurrency identifier.\n * @param options.provider - Provider ID path.\n * @returns The payment methods response containing payments array.\n */\nexport type RampsControllerGetPaymentMethodsAction = {\n type: `RampsController:getPaymentMethods`;\n handler: RampsController['getPaymentMethods'];\n};\n\n/**\n * Sets the user's selected payment method.\n *\n * Accepts either a payment method ID (looked up from state) or a full\n * PaymentMethod object (stored directly). The object form is preferred\n * when the caller already has the full data (e.g. from React Query cache),\n * as it avoids depending on controller state being populated.\n *\n * @param paymentMethodOrId - A PaymentMethod object, a payment method ID string, or undefined/null to clear.\n */\nexport type RampsControllerSetSelectedPaymentMethodAction = {\n type: `RampsController:setSelectedPaymentMethod`;\n handler: RampsController['setSelectedPaymentMethod'];\n};\n\n/**\n * Fetches quotes from all providers for a given set of parameters.\n * Uses the controller's request cache; callers manage the response in local state.\n *\n * @param options - The parameters for fetching quotes.\n * @param options.region - User's region code. If not provided, uses userRegion from state.\n * @param options.fiat - Fiat currency code. If not provided, uses userRegion currency.\n * @param options.assetId - CAIP-19 cryptocurrency identifier.\n * @param options.amount - The amount (in fiat for buy, crypto for sell).\n * @param options.walletAddress - The destination wallet address.\n * @param options.paymentMethods - Array of payment method IDs. If not provided, uses paymentMethods from state.\n * @param options.providers - Optional provider IDs to filter quotes.\n * @param options.autoSelectProvider - When true and `providers` is omitted,\n * resolves a provider that supports `assetId` for this request only (no\n * state mutation). Ignored when `providers` is passed.\n * @param options.preferredProviderIds - Optional provider IDs to prefer\n * during auto-selection, in priority order (e.g. derived by the caller\n * from completed-order history). Only used when `autoSelectProvider` is\n * true and `providers` is omitted.\n * @param options.restrictToKnownOrNativeProviders - Headless-buy v0 gating. When\n * true, auto-selection resolves only a native provider, and an explicitly\n * passed `providers` list is filtered to those supporting the region and\n * asset. If nothing qualifies, `getQuotes` returns an empty response\n * instead of quoting other providers.\n * @param options.redirectUrl - Optional redirect URL after order completion.\n * @param options.action - The ramp action type. Defaults to 'buy'.\n * @param options.forceRefresh - Whether to bypass cache.\n * @param options.ttl - Custom TTL for this request.\n * @returns The quotes response containing success, sorted, error, and customActions.\n */\nexport type RampsControllerGetQuotesAction = {\n type: `RampsController:getQuotes`;\n handler: RampsController['getQuotes'];\n};\n\n/**\n * Adds or updates a V2 order in controller state.\n * If an order with the same internal order code already exists, the incoming\n * fields are merged on top of the existing order so that fields not present\n * in the update (e.g. paymentDetails from the Transak API) are preserved.\n *\n * @param order - The RampsOrder to add or update.\n */\nexport type RampsControllerAddOrderAction = {\n type: `RampsController:addOrder`;\n handler: RampsController['addOrder'];\n};\n\n/**\n * Removes a V2 order from controller state by providerOrderId.\n *\n * @param providerOrderId - The provider order ID to remove.\n */\nexport type RampsControllerRemoveOrderAction = {\n type: `RampsController:removeOrder`;\n handler: RampsController['removeOrder'];\n};\n\n/**\n * Starts polling all pending V2 orders at a fixed interval.\n * Each poll cycle iterates orders with non-terminal statuses,\n * respects pollingSecondsMinimum and backoff from error count.\n */\nexport type RampsControllerStartOrderPollingAction = {\n type: `RampsController:startOrderPolling`;\n handler: RampsController['startOrderPolling'];\n};\n\n/**\n * Stops order polling and clears the interval.\n */\nexport type RampsControllerStopOrderPollingAction = {\n type: `RampsController:stopOrderPolling`;\n handler: RampsController['stopOrderPolling'];\n};\n\n/**\n * Fetches the widget data from a quote for redirect providers.\n * Makes a request to the buyURL endpoint via the RampsService to get the\n * actual provider widget URL and optional order ID for polling.\n *\n * @param quote - The quote to fetch the widget URL from.\n * @returns Promise resolving to the full BuyWidget (url, browser, orderId), or null if not available (missing buyURL or empty url in response).\n * @throws Rethrows errors from the RampsService (e.g. HttpError, network failures) so clients can react to fetch failures.\n */\nexport type RampsControllerGetBuyWidgetDataAction = {\n type: `RampsController:getBuyWidgetData`;\n handler: RampsController['getBuyWidgetData'];\n};\n\n/**\n * Registers an order ID for polling until the order is created or resolved.\n * Adds a minimal stub order to controller state; the existing order polling\n * will fetch the full order when the provider has created it.\n *\n * @param params - Object containing order identifiers and wallet info.\n * @param params.orderId - Full order ID (e.g. \"/providers/paypal/orders/abc123\") or order code.\n * @param params.providerCode - Canonical provider code (e.g. \"paypal\", \"transak\").\n * @param params.walletAddress - Wallet address for the order.\n * @param params.chainId - Optional chain ID for the order.\n */\nexport type RampsControllerAddPrecreatedOrderAction = {\n type: `RampsController:addPrecreatedOrder`;\n handler: RampsController['addPrecreatedOrder'];\n};\n\n/**\n * Fetches an order from the unified V2 API endpoint.\n * Returns a normalized RampsOrder for all provider types (aggregator and native).\n *\n * @param providerCode - The provider code (e.g., \"transak\", \"transak-native\", \"moonpay\").\n * @param orderCode - The order identifier.\n * @param wallet - The wallet address associated with the order.\n * @returns The unified order data.\n */\nexport type RampsControllerGetOrderAction = {\n type: `RampsController:getOrder`;\n handler: RampsController['getOrder'];\n};\n\n/**\n * Extracts an order from a provider callback URL.\n * Sends the callback URL to the V2 backend for provider-specific parsing,\n * then fetches the full order. This is the V2 equivalent of the aggregator\n * SDK's `getOrderFromCallback`.\n *\n * @param providerCode - The provider code (e.g., \"transak\", \"moonpay\").\n * @param callbackUrl - The full callback URL the provider redirected to.\n * @param wallet - The wallet address associated with the order.\n * @returns The unified order data.\n */\nexport type RampsControllerGetOrderFromCallbackAction = {\n type: `RampsController:getOrderFromCallback`;\n handler: RampsController['getOrderFromCallback'];\n};\n\n/**\n * Sets the Transak API key used for all Transak API requests.\n *\n * @param apiKey - The Transak API key.\n */\nexport type RampsControllerTransakSetApiKeyAction = {\n type: `RampsController:transakSetApiKey`;\n handler: RampsController['transakSetApiKey'];\n};\n\n/**\n * Sets the Transak access token and marks the user as authenticated.\n *\n * @param token - The access token received from Transak auth.\n */\nexport type RampsControllerTransakSetAccessTokenAction = {\n type: `RampsController:transakSetAccessToken`;\n handler: RampsController['transakSetAccessToken'];\n};\n\n/**\n * Clears the Transak access token and marks the user as unauthenticated.\n */\nexport type RampsControllerTransakClearAccessTokenAction = {\n type: `RampsController:transakClearAccessToken`;\n handler: RampsController['transakClearAccessToken'];\n};\n\n/**\n * Updates the Transak authentication flag in controller state.\n *\n * @param isAuthenticated - Whether the user is authenticated with Transak.\n */\nexport type RampsControllerTransakSetAuthenticatedAction = {\n type: `RampsController:transakSetAuthenticated`;\n handler: RampsController['transakSetAuthenticated'];\n};\n\n/**\n * Resets all Transak state back to defaults (unauthenticated, no data).\n */\nexport type RampsControllerTransakResetStateAction = {\n type: `RampsController:transakResetState`;\n handler: RampsController['transakResetState'];\n};\n\n/**\n * Sends a one-time password to the user's email for Transak authentication.\n *\n * @param email - The user's email address.\n * @returns The OTP response containing a state token for verification.\n */\nexport type RampsControllerTransakSendUserOtpAction = {\n type: `RampsController:transakSendUserOtp`;\n handler: RampsController['transakSendUserOtp'];\n};\n\n/**\n * Verifies a one-time password and authenticates the user with Transak.\n * Updates the controller's authentication state on success.\n *\n * @param email - The user's email address.\n * @param verificationCode - The OTP code entered by the user.\n * @param stateToken - The state token from the sendUserOtp response.\n * @returns The access token for subsequent authenticated requests.\n */\nexport type RampsControllerTransakVerifyUserOtpAction = {\n type: `RampsController:transakVerifyUserOtp`;\n handler: RampsController['transakVerifyUserOtp'];\n};\n\n/**\n * Logs the user out of Transak. Clears authentication state and user details\n * regardless of whether the API call succeeds or fails.\n *\n * @returns A message indicating the logout result.\n */\nexport type RampsControllerTransakLogoutAction = {\n type: `RampsController:transakLogout`;\n handler: RampsController['transakLogout'];\n};\n\n/**\n * Fetches the authenticated user's details from Transak.\n * Updates the userDetails resource state with loading/success/error states.\n *\n * @returns The user's profile and KYC details.\n */\nexport type RampsControllerTransakGetUserDetailsAction = {\n type: `RampsController:transakGetUserDetails`;\n handler: RampsController['transakGetUserDetails'];\n};\n\n/**\n * Fetches a buy quote from Transak for the given parameters.\n * Updates the buyQuote resource state with loading/success/error states.\n *\n * @param fiatCurrency - The fiat currency code (e.g., \"USD\").\n * @param cryptoCurrency - The cryptocurrency identifier.\n * @param network - The blockchain network identifier.\n * @param paymentMethod - The payment method identifier.\n * @param fiatAmount - The fiat amount as a string.\n * @returns The buy quote with pricing and fee details.\n */\nexport type RampsControllerTransakGetBuyQuoteAction = {\n type: `RampsController:transakGetBuyQuote`;\n handler: RampsController['transakGetBuyQuote'];\n};\n\n/**\n * Fetches the KYC requirement for a given quote.\n * Updates the kycRequirement resource state with loading/success/error states.\n *\n * @param quoteId - The quote ID to check KYC requirements for.\n * @returns The KYC requirement status and whether the user can place an order.\n */\nexport type RampsControllerTransakGetKycRequirementAction = {\n type: `RampsController:transakGetKycRequirement`;\n handler: RampsController['transakGetKycRequirement'];\n};\n\n/**\n * Fetches additional KYC requirements (e.g., ID proof, address proof) for a quote.\n *\n * @param quoteId - The quote ID to check additional requirements for.\n * @returns The list of additional forms required.\n */\nexport type RampsControllerTransakGetAdditionalRequirementsAction = {\n type: `RampsController:transakGetAdditionalRequirements`;\n handler: RampsController['transakGetAdditionalRequirements'];\n};\n\n/**\n * Creates a new order on Transak. If an existing order conflicts (HTTP 409),\n * active orders are cancelled and the creation is retried.\n *\n * @param quoteId - The quote ID to create an order from.\n * @param walletAddress - The destination wallet address.\n * @param paymentMethodId - The payment method to use.\n * @returns The created deposit order.\n */\nexport type RampsControllerTransakCreateOrderAction = {\n type: `RampsController:transakCreateOrder`;\n handler: RampsController['transakCreateOrder'];\n};\n\n/**\n * Fetches an existing order from Transak by order ID.\n *\n * @param orderId - The order ID (deposit format or raw Transak format).\n * @param wallet - The wallet address associated with the order.\n * @param paymentDetails - Optional payment details to attach to the order.\n * @returns The deposit order details.\n */\nexport type RampsControllerTransakGetOrderAction = {\n type: `RampsController:transakGetOrder`;\n handler: RampsController['transakGetOrder'];\n};\n\n/**\n * Fetches the user's spending limits for a given currency and payment method.\n *\n * @param fiatCurrency - The fiat currency code.\n * @param paymentMethod - The payment method identifier.\n * @param kycType - The KYC level type.\n * @returns The user's limits, spending, and remaining amounts.\n */\nexport type RampsControllerTransakGetUserLimitsAction = {\n type: `RampsController:transakGetUserLimits`;\n handler: RampsController['transakGetUserLimits'];\n};\n\n/**\n * Requests a one-time token (OTT) for the Transak payment widget.\n *\n * @returns The OTT response containing the token.\n */\nexport type RampsControllerTransakRequestOttAction = {\n type: `RampsController:transakRequestOtt`;\n handler: RampsController['transakRequestOtt'];\n};\n\n/**\n * Generates a URL for the Transak payment widget with pre-filled parameters.\n *\n * @param ottToken - The one-time token for widget authentication.\n * @param quote - The buy quote to pre-fill in the widget.\n * @param walletAddress - The destination wallet address.\n * @param extraParams - Optional additional URL parameters.\n * @returns The fully constructed widget URL string.\n */\nexport type RampsControllerTransakGeneratePaymentWidgetUrlAction = {\n type: `RampsController:transakGeneratePaymentWidgetUrl`;\n handler: RampsController['transakGeneratePaymentWidgetUrl'];\n};\n\n/**\n * Submits the user's purpose of usage form for KYC compliance.\n *\n * @param purpose - Array of purpose strings selected by the user.\n * @returns A promise that resolves when the form is submitted.\n */\nexport type RampsControllerTransakSubmitPurposeOfUsageFormAction = {\n type: `RampsController:transakSubmitPurposeOfUsageForm`;\n handler: RampsController['transakSubmitPurposeOfUsageForm'];\n};\n\n/**\n * Updates the user's personal or address details on Transak.\n *\n * @param data - The user data fields to update.\n * @returns The API response data.\n */\nexport type RampsControllerTransakPatchUserAction = {\n type: `RampsController:transakPatchUser`;\n handler: RampsController['transakPatchUser'];\n};\n\n/**\n * Submits the user's SSN for identity verification.\n *\n * @param ssn - The Social Security Number.\n * @param quoteId - The quote ID associated with the order requiring SSN.\n * @returns The API response data.\n */\nexport type RampsControllerTransakSubmitSsnDetailsAction = {\n type: `RampsController:transakSubmitSsnDetails`;\n handler: RampsController['transakSubmitSsnDetails'];\n};\n\n/**\n * Confirms payment for an order after the user has completed payment.\n *\n * @param orderId - The order ID to confirm payment for.\n * @param paymentMethodId - The payment method used.\n * @returns Whether the payment confirmation was successful.\n */\nexport type RampsControllerTransakConfirmPaymentAction = {\n type: `RampsController:transakConfirmPayment`;\n handler: RampsController['transakConfirmPayment'];\n};\n\n/**\n * Translates generic ramps identifiers to Transak-specific identifiers.\n *\n * @param request - The translation request with optional identifiers to translate.\n * @returns The translated Transak-specific identifiers.\n */\nexport type RampsControllerTransakGetTranslationAction = {\n type: `RampsController:transakGetTranslation`;\n handler: RampsController['transakGetTranslation'];\n};\n\n/**\n * Checks the status of an ID proof submission for KYC.\n *\n * @param workFlowRunId - The workflow run ID to check status for.\n * @returns The current ID proof status.\n */\nexport type RampsControllerTransakGetIdProofStatusAction = {\n type: `RampsController:transakGetIdProofStatus`;\n handler: RampsController['transakGetIdProofStatus'];\n};\n\n/**\n * Cancels a specific Transak order.\n *\n * @param depositOrderId - The deposit order ID to cancel.\n * @returns A promise that resolves when the order is cancelled.\n */\nexport type RampsControllerTransakCancelOrderAction = {\n type: `RampsController:transakCancelOrder`;\n handler: RampsController['transakCancelOrder'];\n};\n\n/**\n * Cancels all active Transak orders. Individual cancellation failures\n * are collected and returned rather than thrown.\n *\n * @returns An array of errors from any failed cancellations (empty if all succeeded).\n */\nexport type RampsControllerTransakCancelAllActiveOrdersAction = {\n type: `RampsController:transakCancelAllActiveOrders`;\n handler: RampsController['transakCancelAllActiveOrders'];\n};\n\n/**\n * Fetches all active Transak orders for the authenticated user.\n *\n * @returns The list of active orders.\n */\nexport type RampsControllerTransakGetActiveOrdersAction = {\n type: `RampsController:transakGetActiveOrders`;\n handler: RampsController['transakGetActiveOrders'];\n};\n\n/**\n * Union of all RampsController action types.\n */\nexport type RampsControllerMethodActions =\n | RampsControllerExecuteRequestAction\n | RampsControllerAbortRequestAction\n | RampsControllerGetRequestStateAction\n | RampsControllerSetUserRegionAction\n | RampsControllerSetSelectedProviderAction\n | RampsControllerInitAction\n | RampsControllerGetCountriesAction\n | RampsControllerGetTokensAction\n | RampsControllerSetSelectedTokenAction\n | RampsControllerGetProvidersAction\n | RampsControllerGetPaymentMethodsAction\n | RampsControllerSetSelectedPaymentMethodAction\n | RampsControllerGetQuotesAction\n | RampsControllerAddOrderAction\n | RampsControllerRemoveOrderAction\n | RampsControllerStartOrderPollingAction\n | RampsControllerStopOrderPollingAction\n | RampsControllerGetBuyWidgetDataAction\n | RampsControllerAddPrecreatedOrderAction\n | RampsControllerGetOrderAction\n | RampsControllerGetOrderFromCallbackAction\n | RampsControllerTransakSetApiKeyAction\n | RampsControllerTransakSetAccessTokenAction\n | RampsControllerTransakClearAccessTokenAction\n | RampsControllerTransakSetAuthenticatedAction\n | RampsControllerTransakResetStateAction\n | RampsControllerTransakSendUserOtpAction\n | RampsControllerTransakVerifyUserOtpAction\n | RampsControllerTransakLogoutAction\n | RampsControllerTransakGetUserDetailsAction\n | RampsControllerTransakGetBuyQuoteAction\n | RampsControllerTransakGetKycRequirementAction\n | RampsControllerTransakGetAdditionalRequirementsAction\n | RampsControllerTransakCreateOrderAction\n | RampsControllerTransakGetOrderAction\n | RampsControllerTransakGetUserLimitsAction\n | RampsControllerTransakRequestOttAction\n | RampsControllerTransakGeneratePaymentWidgetUrlAction\n | RampsControllerTransakSubmitPurposeOfUsageFormAction\n | RampsControllerTransakPatchUserAction\n | RampsControllerTransakSubmitSsnDetailsAction\n | RampsControllerTransakConfirmPaymentAction\n | RampsControllerTransakGetTranslationAction\n | RampsControllerTransakGetIdProofStatusAction\n | RampsControllerTransakCancelOrderAction\n | RampsControllerTransakCancelAllActiveOrdersAction\n | RampsControllerTransakGetActiveOrdersAction;\n"]}
1
+ {"version":3,"file":"RampsController-method-action-types.cjs","sourceRoot":"","sources":["../src/RampsController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { RampsController } from './RampsController';\n\n/**\n * Executes a request with caching, deduplication, and at most one in-flight\n * request per resource type.\n *\n * 1. **Same cache key in flight** – If a request with this cache key is\n * already pending, returns that promise (deduplication; no second request).\n *\n * 2. **Cache hit** – If valid, non-expired data exists in state.requests for\n * this key and forceRefresh is not set, returns that data without fetching.\n *\n * 3. **New request** – Creates an AbortController and fires the fetcher.\n * If options.resourceType is set, tags the pending request with that\n * resource type (so #abortDependentRequests can cancel it on region\n * change or cleanup) and ref-counts resource-level loading state.\n * On success or error, updates request state and resource error;\n * in finally, clears resource loading only if this request was not\n * aborted.\n *\n * @param cacheKey - Unique identifier for this request (e.g. from createCacheKey).\n * @param fetcher - Async function that performs the fetch. Receives an AbortSignal\n * that is aborted when this request is superseded by another for the same resource.\n * @param options - Optional forceRefresh, ttl, and resourceType for loading/error state.\n * @returns The result of the request (from cache, joined promise, or fetcher).\n */\nexport type RampsControllerExecuteRequestAction = {\n type: `RampsController:executeRequest`;\n handler: RampsController['executeRequest'];\n};\n\n/**\n * Aborts a pending request if one exists.\n *\n * @param cacheKey - The cache key of the request to abort.\n * @returns True if a request was aborted.\n */\nexport type RampsControllerAbortRequestAction = {\n type: `RampsController:abortRequest`;\n handler: RampsController['abortRequest'];\n};\n\n/**\n * Gets the state of a specific cached request.\n *\n * @param cacheKey - The cache key to look up.\n * @returns The request state, or undefined if not cached.\n */\nexport type RampsControllerGetRequestStateAction = {\n type: `RampsController:getRequestState`;\n handler: RampsController['getRequestState'];\n};\n\n/**\n * Sets the user's region manually (without fetching geolocation).\n * This allows users to override the detected region.\n *\n * @param region - The region code to set (e.g., \"US-CA\").\n * @param options - Options for cache behavior.\n * @returns The user region object.\n */\nexport type RampsControllerSetUserRegionAction = {\n type: `RampsController:setUserRegion`;\n handler: RampsController['setUserRegion'];\n};\n\n/**\n * Sets the user's selected provider.\n *\n * Accepts either a Provider object (stored directly) or a provider ID\n * string (looked up from state). The object form is preferred when the\n * caller already has the full data (e.g. from React Query cache).\n *\n * @param providerOrId - A Provider object, a provider ID string (e.g., \"/providers/moonpay\"), or null to clear.\n * @param options - Optional settings for the selection.\n * @param options.autoSelected - When true, marks the provider as system-guessed\n * (soft selection). The UI will silently auto-switch on token conflict instead\n * of showing the \"Token Not Available\" modal. Defaults to false.\n */\nexport type RampsControllerSetSelectedProviderAction = {\n type: `RampsController:setSelectedProvider`;\n handler: RampsController['setSelectedProvider'];\n};\n\n/**\n * Initializes the controller by fetching the user's region from geolocation.\n * This should be called once at app startup to set up the initial region.\n *\n * Idempotent: subsequent calls return the same promise unless forceRefresh is set.\n * Force-refetches the countries catalog on startup (bypassing the in-session\n * request cache) so region preset amounts stay current. The catalog is not\n * persisted, so a cold start always re-fetches it regardless. Skips\n * geolocation when userRegion already exists.\n *\n * @param options - Options for cache behavior. forceRefresh bypasses idempotency and re-runs the full flow.\n * @returns Promise that resolves when initialization is complete.\n */\nexport type RampsControllerInitAction = {\n type: `RampsController:init`;\n handler: RampsController['init'];\n};\n\n/**\n * Fetches the list of supported countries.\n * The API returns countries with support information for both buy and sell actions.\n * The countries are saved in the controller state once fetched.\n *\n * @param options - Options for cache behavior.\n * @returns An array of countries.\n */\nexport type RampsControllerGetCountriesAction = {\n type: `RampsController:getCountries`;\n handler: RampsController['getCountries'];\n};\n\n/**\n * Fetches the list of available tokens for a given region and action.\n * The tokens are saved in the controller state once fetched.\n *\n * @param region - The region code (e.g., \"us\", \"fr\", \"us-ny\"). If not provided, uses the user's region from controller state.\n * @param action - The ramp action type ('buy' or 'sell').\n * @param options - Options for cache behavior and query filters.\n * @param options.provider - Provider ID(s) to filter by.\n * @returns The tokens response containing topTokens and allTokens.\n */\nexport type RampsControllerGetTokensAction = {\n type: `RampsController:getTokens`;\n handler: RampsController['getTokens'];\n};\n\n/**\n * Sets the user's selected token by asset ID.\n * Looks up the token from the current tokens in state and automatically\n * fetches payment methods for that token.\n *\n * @param assetId - The asset identifier in CAIP-19 format (e.g., \"eip155:1/erc20:0x...\"), or undefined to clear.\n * @throws If region is not set, tokens are not loaded, or token is not found.\n */\nexport type RampsControllerSetSelectedTokenAction = {\n type: `RampsController:setSelectedToken`;\n handler: RampsController['setSelectedToken'];\n};\n\n/**\n * Fetches the list of providers for a given region.\n * The providers are saved in the controller state once fetched.\n *\n * @param region - The region code (e.g., \"us\", \"fr\", \"us-ny\"). If not provided, uses the user's region from controller state.\n * @param options - Options for cache behavior and query filters.\n * @param options.provider - Provider ID(s) to filter by.\n * @param options.crypto - Crypto currency ID(s) to filter by.\n * @param options.payments - Payment method ID(s) to filter by.\n * @returns The providers response containing providers array.\n */\nexport type RampsControllerGetProvidersAction = {\n type: `RampsController:getProviders`;\n handler: RampsController['getProviders'];\n};\n\n/**\n * Fetches the list of payment methods for a given context.\n * The payment methods are saved in the controller state once fetched.\n *\n * @param region - User's region code (e.g. \"fr\", \"us-ny\").\n * @param options - Query parameters for filtering payment methods.\n * @param options.assetId - CAIP-19 cryptocurrency identifier.\n * @param options.provider - Provider ID path.\n * @returns The payment methods response containing payments array.\n */\nexport type RampsControllerGetPaymentMethodsAction = {\n type: `RampsController:getPaymentMethods`;\n handler: RampsController['getPaymentMethods'];\n};\n\n/**\n * Sets the user's selected payment method.\n *\n * Accepts either a payment method ID (looked up from state) or a full\n * PaymentMethod object (stored directly). The object form is preferred\n * when the caller already has the full data (e.g. from React Query cache),\n * as it avoids depending on controller state being populated.\n *\n * @param paymentMethodOrId - A PaymentMethod object, a payment method ID string, or undefined/null to clear.\n */\nexport type RampsControllerSetSelectedPaymentMethodAction = {\n type: `RampsController:setSelectedPaymentMethod`;\n handler: RampsController['setSelectedPaymentMethod'];\n};\n\n/**\n * Fetches quotes from all providers for a given set of parameters.\n * Uses the controller's request cache; callers manage the response in local state.\n *\n * @param options - The parameters for fetching quotes.\n * @param options.region - User's region code. If not provided, uses userRegion from state.\n * @param options.fiat - Fiat currency code. If not provided, uses userRegion currency.\n * @param options.assetId - CAIP-19 cryptocurrency identifier.\n * @param options.amount - The amount (in fiat for buy, crypto for sell).\n * @param options.walletAddress - The destination wallet address.\n * @param options.paymentMethods - Array of payment method IDs. If not provided, uses paymentMethods from state.\n * @param options.providers - Optional provider IDs to filter quotes.\n * @param options.autoSelectProvider - When true and `providers` is omitted,\n * resolves a provider that supports `assetId` for this request only (no\n * state mutation). Ignored when `providers` is passed.\n * @param options.preferredProviderIds - Optional provider IDs to prefer\n * during auto-selection, in priority order (e.g. derived by the caller\n * from completed-order history). Only used when `autoSelectProvider` is\n * true and `providers` is omitted.\n * @param options.restrictToKnownOrNativeProviders - Headless-buy v0 gating. When\n * true, auto-selection resolves only a native provider, and an explicitly\n * passed `providers` list is filtered to those supporting the region and\n * asset. If nothing qualifies, `getQuotes` returns an empty response\n * instead of quoting other providers.\n * @param options.surface - Optional consumer surface key for the\n * `moneyHeadlessAllProviders` flag payload's `surfaces` map (canonical\n * values: `money` | `perps` | `predictions`). Selects that surface's\n * provider allowlist over the payload's top-level `providerIds`. Only\n * consulted on the widened all-providers path; has no effect on fetching\n * or caching, and a surface absent from the payload falls back to the\n * top-level list.\n * @param options.redirectUrl - Optional redirect URL after order completion.\n * @param options.action - The ramp action type. Defaults to 'buy'.\n * @param options.forceRefresh - Whether to bypass cache.\n * @param options.ttl - Custom TTL for this request.\n * @returns The quotes response containing success, sorted, error, and customActions.\n */\nexport type RampsControllerGetQuotesAction = {\n type: `RampsController:getQuotes`;\n handler: RampsController['getQuotes'];\n};\n\n/**\n * Adds or updates a V2 order in controller state.\n * If an order with the same internal order code already exists, the incoming\n * fields are merged on top of the existing order so that fields not present\n * in the update (e.g. paymentDetails from the Transak API) are preserved.\n *\n * @param order - The RampsOrder to add or update.\n */\nexport type RampsControllerAddOrderAction = {\n type: `RampsController:addOrder`;\n handler: RampsController['addOrder'];\n};\n\n/**\n * Removes a V2 order from controller state by providerOrderId.\n *\n * @param providerOrderId - The provider order ID to remove.\n */\nexport type RampsControllerRemoveOrderAction = {\n type: `RampsController:removeOrder`;\n handler: RampsController['removeOrder'];\n};\n\n/**\n * Starts polling all pending V2 orders at a fixed interval.\n * Each poll cycle iterates orders with non-terminal statuses,\n * respects pollingSecondsMinimum and backoff from error count.\n */\nexport type RampsControllerStartOrderPollingAction = {\n type: `RampsController:startOrderPolling`;\n handler: RampsController['startOrderPolling'];\n};\n\n/**\n * Stops order polling and clears the interval.\n */\nexport type RampsControllerStopOrderPollingAction = {\n type: `RampsController:stopOrderPolling`;\n handler: RampsController['stopOrderPolling'];\n};\n\n/**\n * Fetches the widget data from a quote for redirect providers.\n * Makes a request to the buyURL endpoint via the RampsService to get the\n * actual provider widget URL and optional order ID for polling.\n *\n * @param quote - The quote to fetch the widget URL from.\n * @returns Promise resolving to the full BuyWidget (url, browser, orderId), or null if not available (missing buyURL or empty url in response).\n * @throws Rethrows errors from the RampsService (e.g. HttpError, network failures) so clients can react to fetch failures.\n */\nexport type RampsControllerGetBuyWidgetDataAction = {\n type: `RampsController:getBuyWidgetData`;\n handler: RampsController['getBuyWidgetData'];\n};\n\n/**\n * Registers an order ID for polling until the order is created or resolved.\n * Adds a minimal stub order to controller state; the existing order polling\n * will fetch the full order when the provider has created it.\n *\n * @param params - Object containing order identifiers and wallet info.\n * @param params.orderId - Full order ID (e.g. \"/providers/paypal/orders/abc123\") or order code.\n * @param params.providerCode - Canonical provider code (e.g. \"paypal\", \"transak\").\n * @param params.walletAddress - Wallet address for the order.\n * @param params.chainId - Optional chain ID for the order.\n */\nexport type RampsControllerAddPrecreatedOrderAction = {\n type: `RampsController:addPrecreatedOrder`;\n handler: RampsController['addPrecreatedOrder'];\n};\n\n/**\n * Fetches an order from the unified V2 API endpoint.\n * Returns a normalized RampsOrder for all provider types (aggregator and native).\n *\n * @param providerCode - The provider code (e.g., \"transak\", \"transak-native\", \"moonpay\").\n * @param orderCode - The order identifier.\n * @param wallet - The wallet address associated with the order.\n * @returns The unified order data.\n */\nexport type RampsControllerGetOrderAction = {\n type: `RampsController:getOrder`;\n handler: RampsController['getOrder'];\n};\n\n/**\n * Extracts an order from a provider callback URL.\n * Sends the callback URL to the V2 backend for provider-specific parsing,\n * then fetches the full order. This is the V2 equivalent of the aggregator\n * SDK's `getOrderFromCallback`.\n *\n * @param providerCode - The provider code (e.g., \"transak\", \"moonpay\").\n * @param callbackUrl - The full callback URL the provider redirected to.\n * @param wallet - The wallet address associated with the order.\n * @returns The unified order data.\n */\nexport type RampsControllerGetOrderFromCallbackAction = {\n type: `RampsController:getOrderFromCallback`;\n handler: RampsController['getOrderFromCallback'];\n};\n\n/**\n * Sets the Transak API key used for all Transak API requests.\n *\n * @param apiKey - The Transak API key.\n */\nexport type RampsControllerTransakSetApiKeyAction = {\n type: `RampsController:transakSetApiKey`;\n handler: RampsController['transakSetApiKey'];\n};\n\n/**\n * Sets the Transak access token and marks the user as authenticated.\n *\n * @param token - The access token received from Transak auth.\n */\nexport type RampsControllerTransakSetAccessTokenAction = {\n type: `RampsController:transakSetAccessToken`;\n handler: RampsController['transakSetAccessToken'];\n};\n\n/**\n * Clears the Transak access token and marks the user as unauthenticated.\n */\nexport type RampsControllerTransakClearAccessTokenAction = {\n type: `RampsController:transakClearAccessToken`;\n handler: RampsController['transakClearAccessToken'];\n};\n\n/**\n * Updates the Transak authentication flag in controller state.\n *\n * @param isAuthenticated - Whether the user is authenticated with Transak.\n */\nexport type RampsControllerTransakSetAuthenticatedAction = {\n type: `RampsController:transakSetAuthenticated`;\n handler: RampsController['transakSetAuthenticated'];\n};\n\n/**\n * Resets all Transak state back to defaults (unauthenticated, no data).\n */\nexport type RampsControllerTransakResetStateAction = {\n type: `RampsController:transakResetState`;\n handler: RampsController['transakResetState'];\n};\n\n/**\n * Sends a one-time password to the user's email for Transak authentication.\n *\n * @param email - The user's email address.\n * @returns The OTP response containing a state token for verification.\n */\nexport type RampsControllerTransakSendUserOtpAction = {\n type: `RampsController:transakSendUserOtp`;\n handler: RampsController['transakSendUserOtp'];\n};\n\n/**\n * Verifies a one-time password and authenticates the user with Transak.\n * Updates the controller's authentication state on success.\n *\n * @param email - The user's email address.\n * @param verificationCode - The OTP code entered by the user.\n * @param stateToken - The state token from the sendUserOtp response.\n * @returns The access token for subsequent authenticated requests.\n */\nexport type RampsControllerTransakVerifyUserOtpAction = {\n type: `RampsController:transakVerifyUserOtp`;\n handler: RampsController['transakVerifyUserOtp'];\n};\n\n/**\n * Logs the user out of Transak. Clears authentication state and user details\n * regardless of whether the API call succeeds or fails.\n *\n * @returns A message indicating the logout result.\n */\nexport type RampsControllerTransakLogoutAction = {\n type: `RampsController:transakLogout`;\n handler: RampsController['transakLogout'];\n};\n\n/**\n * Fetches the authenticated user's details from Transak.\n * Updates the userDetails resource state with loading/success/error states.\n *\n * @returns The user's profile and KYC details.\n */\nexport type RampsControllerTransakGetUserDetailsAction = {\n type: `RampsController:transakGetUserDetails`;\n handler: RampsController['transakGetUserDetails'];\n};\n\n/**\n * Fetches a buy quote from Transak for the given parameters.\n * Updates the buyQuote resource state with loading/success/error states.\n *\n * @param fiatCurrency - The fiat currency code (e.g., \"USD\").\n * @param cryptoCurrency - The cryptocurrency identifier.\n * @param network - The blockchain network identifier.\n * @param paymentMethod - The payment method identifier.\n * @param fiatAmount - The fiat amount as a string.\n * @returns The buy quote with pricing and fee details.\n */\nexport type RampsControllerTransakGetBuyQuoteAction = {\n type: `RampsController:transakGetBuyQuote`;\n handler: RampsController['transakGetBuyQuote'];\n};\n\n/**\n * Fetches the KYC requirement for a given quote.\n * Updates the kycRequirement resource state with loading/success/error states.\n *\n * @param quoteId - The quote ID to check KYC requirements for.\n * @returns The KYC requirement status and whether the user can place an order.\n */\nexport type RampsControllerTransakGetKycRequirementAction = {\n type: `RampsController:transakGetKycRequirement`;\n handler: RampsController['transakGetKycRequirement'];\n};\n\n/**\n * Fetches additional KYC requirements (e.g., ID proof, address proof) for a quote.\n *\n * @param quoteId - The quote ID to check additional requirements for.\n * @returns The list of additional forms required.\n */\nexport type RampsControllerTransakGetAdditionalRequirementsAction = {\n type: `RampsController:transakGetAdditionalRequirements`;\n handler: RampsController['transakGetAdditionalRequirements'];\n};\n\n/**\n * Creates a new order on Transak. If an existing order conflicts (HTTP 409),\n * active orders are cancelled and the creation is retried.\n *\n * @param quoteId - The quote ID to create an order from.\n * @param walletAddress - The destination wallet address.\n * @param paymentMethodId - The payment method to use.\n * @returns The created deposit order.\n */\nexport type RampsControllerTransakCreateOrderAction = {\n type: `RampsController:transakCreateOrder`;\n handler: RampsController['transakCreateOrder'];\n};\n\n/**\n * Fetches an existing order from Transak by order ID.\n *\n * @param orderId - The order ID (deposit format or raw Transak format).\n * @param wallet - The wallet address associated with the order.\n * @param paymentDetails - Optional payment details to attach to the order.\n * @returns The deposit order details.\n */\nexport type RampsControllerTransakGetOrderAction = {\n type: `RampsController:transakGetOrder`;\n handler: RampsController['transakGetOrder'];\n};\n\n/**\n * Fetches the user's spending limits for a given currency and payment method.\n *\n * @param fiatCurrency - The fiat currency code.\n * @param paymentMethod - The payment method identifier.\n * @param kycType - The KYC level type.\n * @returns The user's limits, spending, and remaining amounts.\n */\nexport type RampsControllerTransakGetUserLimitsAction = {\n type: `RampsController:transakGetUserLimits`;\n handler: RampsController['transakGetUserLimits'];\n};\n\n/**\n * Requests a one-time token (OTT) for the Transak payment widget.\n *\n * @returns The OTT response containing the token.\n */\nexport type RampsControllerTransakRequestOttAction = {\n type: `RampsController:transakRequestOtt`;\n handler: RampsController['transakRequestOtt'];\n};\n\n/**\n * Generates a URL for the Transak payment widget with pre-filled parameters.\n *\n * @param ottToken - The one-time token for widget authentication.\n * @param quote - The buy quote to pre-fill in the widget.\n * @param walletAddress - The destination wallet address.\n * @param extraParams - Optional additional URL parameters.\n * @returns The fully constructed widget URL string.\n */\nexport type RampsControllerTransakGeneratePaymentWidgetUrlAction = {\n type: `RampsController:transakGeneratePaymentWidgetUrl`;\n handler: RampsController['transakGeneratePaymentWidgetUrl'];\n};\n\n/**\n * Submits the user's purpose of usage form for KYC compliance.\n *\n * @param purpose - Array of purpose strings selected by the user.\n * @returns A promise that resolves when the form is submitted.\n */\nexport type RampsControllerTransakSubmitPurposeOfUsageFormAction = {\n type: `RampsController:transakSubmitPurposeOfUsageForm`;\n handler: RampsController['transakSubmitPurposeOfUsageForm'];\n};\n\n/**\n * Updates the user's personal or address details on Transak.\n *\n * @param data - The user data fields to update.\n * @returns The API response data.\n */\nexport type RampsControllerTransakPatchUserAction = {\n type: `RampsController:transakPatchUser`;\n handler: RampsController['transakPatchUser'];\n};\n\n/**\n * Submits the user's SSN for identity verification.\n *\n * @param ssn - The Social Security Number.\n * @param quoteId - The quote ID associated with the order requiring SSN.\n * @returns The API response data.\n */\nexport type RampsControllerTransakSubmitSsnDetailsAction = {\n type: `RampsController:transakSubmitSsnDetails`;\n handler: RampsController['transakSubmitSsnDetails'];\n};\n\n/**\n * Confirms payment for an order after the user has completed payment.\n *\n * @param orderId - The order ID to confirm payment for.\n * @param paymentMethodId - The payment method used.\n * @returns Whether the payment confirmation was successful.\n */\nexport type RampsControllerTransakConfirmPaymentAction = {\n type: `RampsController:transakConfirmPayment`;\n handler: RampsController['transakConfirmPayment'];\n};\n\n/**\n * Translates generic ramps identifiers to Transak-specific identifiers.\n *\n * @param request - The translation request with optional identifiers to translate.\n * @returns The translated Transak-specific identifiers.\n */\nexport type RampsControllerTransakGetTranslationAction = {\n type: `RampsController:transakGetTranslation`;\n handler: RampsController['transakGetTranslation'];\n};\n\n/**\n * Checks the status of an ID proof submission for KYC.\n *\n * @param workFlowRunId - The workflow run ID to check status for.\n * @returns The current ID proof status.\n */\nexport type RampsControllerTransakGetIdProofStatusAction = {\n type: `RampsController:transakGetIdProofStatus`;\n handler: RampsController['transakGetIdProofStatus'];\n};\n\n/**\n * Cancels a specific Transak order.\n *\n * @param depositOrderId - The deposit order ID to cancel.\n * @returns A promise that resolves when the order is cancelled.\n */\nexport type RampsControllerTransakCancelOrderAction = {\n type: `RampsController:transakCancelOrder`;\n handler: RampsController['transakCancelOrder'];\n};\n\n/**\n * Cancels all active Transak orders. Individual cancellation failures\n * are collected and returned rather than thrown.\n *\n * @returns An array of errors from any failed cancellations (empty if all succeeded).\n */\nexport type RampsControllerTransakCancelAllActiveOrdersAction = {\n type: `RampsController:transakCancelAllActiveOrders`;\n handler: RampsController['transakCancelAllActiveOrders'];\n};\n\n/**\n * Fetches all active Transak orders for the authenticated user.\n *\n * @returns The list of active orders.\n */\nexport type RampsControllerTransakGetActiveOrdersAction = {\n type: `RampsController:transakGetActiveOrders`;\n handler: RampsController['transakGetActiveOrders'];\n};\n\n/**\n * Union of all RampsController action types.\n */\nexport type RampsControllerMethodActions =\n | RampsControllerExecuteRequestAction\n | RampsControllerAbortRequestAction\n | RampsControllerGetRequestStateAction\n | RampsControllerSetUserRegionAction\n | RampsControllerSetSelectedProviderAction\n | RampsControllerInitAction\n | RampsControllerGetCountriesAction\n | RampsControllerGetTokensAction\n | RampsControllerSetSelectedTokenAction\n | RampsControllerGetProvidersAction\n | RampsControllerGetPaymentMethodsAction\n | RampsControllerSetSelectedPaymentMethodAction\n | RampsControllerGetQuotesAction\n | RampsControllerAddOrderAction\n | RampsControllerRemoveOrderAction\n | RampsControllerStartOrderPollingAction\n | RampsControllerStopOrderPollingAction\n | RampsControllerGetBuyWidgetDataAction\n | RampsControllerAddPrecreatedOrderAction\n | RampsControllerGetOrderAction\n | RampsControllerGetOrderFromCallbackAction\n | RampsControllerTransakSetApiKeyAction\n | RampsControllerTransakSetAccessTokenAction\n | RampsControllerTransakClearAccessTokenAction\n | RampsControllerTransakSetAuthenticatedAction\n | RampsControllerTransakResetStateAction\n | RampsControllerTransakSendUserOtpAction\n | RampsControllerTransakVerifyUserOtpAction\n | RampsControllerTransakLogoutAction\n | RampsControllerTransakGetUserDetailsAction\n | RampsControllerTransakGetBuyQuoteAction\n | RampsControllerTransakGetKycRequirementAction\n | RampsControllerTransakGetAdditionalRequirementsAction\n | RampsControllerTransakCreateOrderAction\n | RampsControllerTransakGetOrderAction\n | RampsControllerTransakGetUserLimitsAction\n | RampsControllerTransakRequestOttAction\n | RampsControllerTransakGeneratePaymentWidgetUrlAction\n | RampsControllerTransakSubmitPurposeOfUsageFormAction\n | RampsControllerTransakPatchUserAction\n | RampsControllerTransakSubmitSsnDetailsAction\n | RampsControllerTransakConfirmPaymentAction\n | RampsControllerTransakGetTranslationAction\n | RampsControllerTransakGetIdProofStatusAction\n | RampsControllerTransakCancelOrderAction\n | RampsControllerTransakCancelAllActiveOrdersAction\n | RampsControllerTransakGetActiveOrdersAction;\n"]}
@@ -202,6 +202,13 @@ export type RampsControllerSetSelectedPaymentMethodAction = {
202
202
  * passed `providers` list is filtered to those supporting the region and
203
203
  * asset. If nothing qualifies, `getQuotes` returns an empty response
204
204
  * instead of quoting other providers.
205
+ * @param options.surface - Optional consumer surface key for the
206
+ * `moneyHeadlessAllProviders` flag payload's `surfaces` map (canonical
207
+ * values: `money` | `perps` | `predictions`). Selects that surface's
208
+ * provider allowlist over the payload's top-level `providerIds`. Only
209
+ * consulted on the widened all-providers path; has no effect on fetching
210
+ * or caching, and a surface absent from the payload falls back to the
211
+ * top-level list.
205
212
  * @param options.redirectUrl - Optional redirect URL after order completion.
206
213
  * @param options.action - The ramp action type. Defaults to 'buy'.
207
214
  * @param options.forceRefresh - Whether to bypass cache.
@@ -1 +1 @@
1
- {"version":3,"file":"RampsController-method-action-types.d.cts","sourceRoot":"","sources":["../src/RampsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,8BAA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vC,6CAA6C,GAC7C,qDAAqD,GACrD,uCAAuC,GACvC,oCAAoC,GACpC,yCAAyC,GACzC,sCAAsC,GACtC,oDAAoD,GACpD,oDAAoD,GACpD,qCAAqC,GACrC,4CAA4C,GAC5C,0CAA0C,GAC1C,0CAA0C,GAC1C,4CAA4C,GAC5C,uCAAuC,GACvC,iDAAiD,GACjD,2CAA2C,CAAC"}
1
+ {"version":3,"file":"RampsController-method-action-types.d.cts","sourceRoot":"","sources":["../src/RampsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,8BAA0B;AAEzD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,sBAAsB,CAAC;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AwC,GACxC,yBAAyB,GACzB,iCAAiC,GACjC,8BAA8B,GAC9B,qCAAqC,GACrC,iCAAiC,GACjC,sCAAsC,GACtC,6CAA6C,GAC7C,8BAA8B,GAC9B,6BAA6B,GAC7B,gCAAgC,GAChC,sCAAsC,GACtC,qCAAqC,GACrC,qCAAqC,GACrC,uCAAuC,GACvC,6BAA6B,GAC7B,yCAAyC,GACzC,qCAAqC,GACrC,0CAA0C,GAC1C,4CAA4C,GAC5C,4CAA4C,GAC5C,sCAAsC,GACtC,uCAAuC,GACvC,yCAAyC,GACzC,kCAAkC,GAClC,0CAA0C,GAC1C,uCAAuC,GACvC,6CAA6C,GAC7C,qDAAqD,GACrD,uCAAuC,GACvC,oCAAoC,GACpC,yCAAyC,GACzC,sCAAsC,GACtC,oDAAoD,GACpD,oDAAoD,GACpD,qCAAqC,GACrC,4CAA4C,GAC5C,0CAA0C,GAC1C,0CAA0C,GAC1C,4CAA4C,GAC5C,uCAAuC,GACvC,iDAAiD,GACjD,2CAA2C,CAAC"}
@@ -202,6 +202,13 @@ export type RampsControllerSetSelectedPaymentMethodAction = {
202
202
  * passed `providers` list is filtered to those supporting the region and
203
203
  * asset. If nothing qualifies, `getQuotes` returns an empty response
204
204
  * instead of quoting other providers.
205
+ * @param options.surface - Optional consumer surface key for the
206
+ * `moneyHeadlessAllProviders` flag payload's `surfaces` map (canonical
207
+ * values: `money` | `perps` | `predictions`). Selects that surface's
208
+ * provider allowlist over the payload's top-level `providerIds`. Only
209
+ * consulted on the widened all-providers path; has no effect on fetching
210
+ * or caching, and a surface absent from the payload falls back to the
211
+ * top-level list.
205
212
  * @param options.redirectUrl - Optional redirect URL after order completion.
206
213
  * @param options.action - The ramp action type. Defaults to 'buy'.
207
214
  * @param options.forceRefresh - Whether to bypass cache.
@@ -1 +1 @@
1
- {"version":3,"file":"RampsController-method-action-types.d.mts","sourceRoot":"","sources":["../src/RampsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,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C,0CAA0C,GAC1C,uCAAuC,GACvC,6CAA6C,GAC7C,qDAAqD,GACrD,uCAAuC,GACvC,oCAAoC,GACpC,yCAAyC,GACzC,sCAAsC,GACtC,oDAAoD,GACpD,oDAAoD,GACpD,qCAAqC,GACrC,4CAA4C,GAC5C,0CAA0C,GAC1C,0CAA0C,GAC1C,4CAA4C,GAC5C,uCAAuC,GACvC,iDAAiD,GACjD,2CAA2C,CAAC"}
1
+ {"version":3,"file":"RampsController-method-action-types.d.mts","sourceRoot":"","sources":["../src/RampsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,8BAA0B;AAEzD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG;IAC9C,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,eAAe,CAAC,cAAc,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,eAAe,CAAC,iBAAiB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,eAAe,CAAC,qBAAqB,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACt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AoC,GACpC,kCAAkC,GAClC,wCAAwC,GACxC,yBAAyB,GACzB,iCAAiC,GACjC,8BAA8B,GAC9B,qCAAqC,GACrC,iCAAiC,GACjC,sCAAsC,GACtC,6CAA6C,GAC7C,8BAA8B,GAC9B,6BAA6B,GAC7B,gCAAgC,GAChC,sCAAsC,GACtC,qCAAqC,GACrC,qCAAqC,GACrC,uCAAuC,GACvC,6BAA6B,GAC7B,yCAAyC,GACzC,qCAAqC,GACrC,0CAA0C,GAC1C,4CAA4C,GAC5C,4CAA4C,GAC5C,sCAAsC,GACtC,uCAAuC,GACvC,yCAAyC,GACzC,kCAAkC,GAClC,0CAA0C,GAC1C,uCAAuC,GACvC,6CAA6C,GAC7C,qDAAqD,GACrD,uCAAuC,GACvC,oCAAoC,GACpC,yCAAyC,GACzC,sCAAsC,GACtC,oDAAoD,GACpD,oDAAoD,GACpD,qCAAqC,GACrC,4CAA4C,GAC5C,0CAA0C,GAC1C,0CAA0C,GAC1C,4CAA4C,GAC5C,uCAAuC,GACvC,iDAAiD,GACjD,2CAA2C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RampsController-method-action-types.mjs","sourceRoot":"","sources":["../src/RampsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { RampsController } from './RampsController';\n\n/**\n * Executes a request with caching, deduplication, and at most one in-flight\n * request per resource type.\n *\n * 1. **Same cache key in flight** – If a request with this cache key is\n * already pending, returns that promise (deduplication; no second request).\n *\n * 2. **Cache hit** – If valid, non-expired data exists in state.requests for\n * this key and forceRefresh is not set, returns that data without fetching.\n *\n * 3. **New request** – Creates an AbortController and fires the fetcher.\n * If options.resourceType is set, tags the pending request with that\n * resource type (so #abortDependentRequests can cancel it on region\n * change or cleanup) and ref-counts resource-level loading state.\n * On success or error, updates request state and resource error;\n * in finally, clears resource loading only if this request was not\n * aborted.\n *\n * @param cacheKey - Unique identifier for this request (e.g. from createCacheKey).\n * @param fetcher - Async function that performs the fetch. Receives an AbortSignal\n * that is aborted when this request is superseded by another for the same resource.\n * @param options - Optional forceRefresh, ttl, and resourceType for loading/error state.\n * @returns The result of the request (from cache, joined promise, or fetcher).\n */\nexport type RampsControllerExecuteRequestAction = {\n type: `RampsController:executeRequest`;\n handler: RampsController['executeRequest'];\n};\n\n/**\n * Aborts a pending request if one exists.\n *\n * @param cacheKey - The cache key of the request to abort.\n * @returns True if a request was aborted.\n */\nexport type RampsControllerAbortRequestAction = {\n type: `RampsController:abortRequest`;\n handler: RampsController['abortRequest'];\n};\n\n/**\n * Gets the state of a specific cached request.\n *\n * @param cacheKey - The cache key to look up.\n * @returns The request state, or undefined if not cached.\n */\nexport type RampsControllerGetRequestStateAction = {\n type: `RampsController:getRequestState`;\n handler: RampsController['getRequestState'];\n};\n\n/**\n * Sets the user's region manually (without fetching geolocation).\n * This allows users to override the detected region.\n *\n * @param region - The region code to set (e.g., \"US-CA\").\n * @param options - Options for cache behavior.\n * @returns The user region object.\n */\nexport type RampsControllerSetUserRegionAction = {\n type: `RampsController:setUserRegion`;\n handler: RampsController['setUserRegion'];\n};\n\n/**\n * Sets the user's selected provider.\n *\n * Accepts either a Provider object (stored directly) or a provider ID\n * string (looked up from state). The object form is preferred when the\n * caller already has the full data (e.g. from React Query cache).\n *\n * @param providerOrId - A Provider object, a provider ID string (e.g., \"/providers/moonpay\"), or null to clear.\n * @param options - Optional settings for the selection.\n * @param options.autoSelected - When true, marks the provider as system-guessed\n * (soft selection). The UI will silently auto-switch on token conflict instead\n * of showing the \"Token Not Available\" modal. Defaults to false.\n */\nexport type RampsControllerSetSelectedProviderAction = {\n type: `RampsController:setSelectedProvider`;\n handler: RampsController['setSelectedProvider'];\n};\n\n/**\n * Initializes the controller by fetching the user's region from geolocation.\n * This should be called once at app startup to set up the initial region.\n *\n * Idempotent: subsequent calls return the same promise unless forceRefresh is set.\n * Force-refetches the countries catalog on startup (bypassing the in-session\n * request cache) so region preset amounts stay current. The catalog is not\n * persisted, so a cold start always re-fetches it regardless. Skips\n * geolocation when userRegion already exists.\n *\n * @param options - Options for cache behavior. forceRefresh bypasses idempotency and re-runs the full flow.\n * @returns Promise that resolves when initialization is complete.\n */\nexport type RampsControllerInitAction = {\n type: `RampsController:init`;\n handler: RampsController['init'];\n};\n\n/**\n * Fetches the list of supported countries.\n * The API returns countries with support information for both buy and sell actions.\n * The countries are saved in the controller state once fetched.\n *\n * @param options - Options for cache behavior.\n * @returns An array of countries.\n */\nexport type RampsControllerGetCountriesAction = {\n type: `RampsController:getCountries`;\n handler: RampsController['getCountries'];\n};\n\n/**\n * Fetches the list of available tokens for a given region and action.\n * The tokens are saved in the controller state once fetched.\n *\n * @param region - The region code (e.g., \"us\", \"fr\", \"us-ny\"). If not provided, uses the user's region from controller state.\n * @param action - The ramp action type ('buy' or 'sell').\n * @param options - Options for cache behavior and query filters.\n * @param options.provider - Provider ID(s) to filter by.\n * @returns The tokens response containing topTokens and allTokens.\n */\nexport type RampsControllerGetTokensAction = {\n type: `RampsController:getTokens`;\n handler: RampsController['getTokens'];\n};\n\n/**\n * Sets the user's selected token by asset ID.\n * Looks up the token from the current tokens in state and automatically\n * fetches payment methods for that token.\n *\n * @param assetId - The asset identifier in CAIP-19 format (e.g., \"eip155:1/erc20:0x...\"), or undefined to clear.\n * @throws If region is not set, tokens are not loaded, or token is not found.\n */\nexport type RampsControllerSetSelectedTokenAction = {\n type: `RampsController:setSelectedToken`;\n handler: RampsController['setSelectedToken'];\n};\n\n/**\n * Fetches the list of providers for a given region.\n * The providers are saved in the controller state once fetched.\n *\n * @param region - The region code (e.g., \"us\", \"fr\", \"us-ny\"). If not provided, uses the user's region from controller state.\n * @param options - Options for cache behavior and query filters.\n * @param options.provider - Provider ID(s) to filter by.\n * @param options.crypto - Crypto currency ID(s) to filter by.\n * @param options.payments - Payment method ID(s) to filter by.\n * @returns The providers response containing providers array.\n */\nexport type RampsControllerGetProvidersAction = {\n type: `RampsController:getProviders`;\n handler: RampsController['getProviders'];\n};\n\n/**\n * Fetches the list of payment methods for a given context.\n * The payment methods are saved in the controller state once fetched.\n *\n * @param region - User's region code (e.g. \"fr\", \"us-ny\").\n * @param options - Query parameters for filtering payment methods.\n * @param options.assetId - CAIP-19 cryptocurrency identifier.\n * @param options.provider - Provider ID path.\n * @returns The payment methods response containing payments array.\n */\nexport type RampsControllerGetPaymentMethodsAction = {\n type: `RampsController:getPaymentMethods`;\n handler: RampsController['getPaymentMethods'];\n};\n\n/**\n * Sets the user's selected payment method.\n *\n * Accepts either a payment method ID (looked up from state) or a full\n * PaymentMethod object (stored directly). The object form is preferred\n * when the caller already has the full data (e.g. from React Query cache),\n * as it avoids depending on controller state being populated.\n *\n * @param paymentMethodOrId - A PaymentMethod object, a payment method ID string, or undefined/null to clear.\n */\nexport type RampsControllerSetSelectedPaymentMethodAction = {\n type: `RampsController:setSelectedPaymentMethod`;\n handler: RampsController['setSelectedPaymentMethod'];\n};\n\n/**\n * Fetches quotes from all providers for a given set of parameters.\n * Uses the controller's request cache; callers manage the response in local state.\n *\n * @param options - The parameters for fetching quotes.\n * @param options.region - User's region code. If not provided, uses userRegion from state.\n * @param options.fiat - Fiat currency code. If not provided, uses userRegion currency.\n * @param options.assetId - CAIP-19 cryptocurrency identifier.\n * @param options.amount - The amount (in fiat for buy, crypto for sell).\n * @param options.walletAddress - The destination wallet address.\n * @param options.paymentMethods - Array of payment method IDs. If not provided, uses paymentMethods from state.\n * @param options.providers - Optional provider IDs to filter quotes.\n * @param options.autoSelectProvider - When true and `providers` is omitted,\n * resolves a provider that supports `assetId` for this request only (no\n * state mutation). Ignored when `providers` is passed.\n * @param options.preferredProviderIds - Optional provider IDs to prefer\n * during auto-selection, in priority order (e.g. derived by the caller\n * from completed-order history). Only used when `autoSelectProvider` is\n * true and `providers` is omitted.\n * @param options.restrictToKnownOrNativeProviders - Headless-buy v0 gating. When\n * true, auto-selection resolves only a native provider, and an explicitly\n * passed `providers` list is filtered to those supporting the region and\n * asset. If nothing qualifies, `getQuotes` returns an empty response\n * instead of quoting other providers.\n * @param options.redirectUrl - Optional redirect URL after order completion.\n * @param options.action - The ramp action type. Defaults to 'buy'.\n * @param options.forceRefresh - Whether to bypass cache.\n * @param options.ttl - Custom TTL for this request.\n * @returns The quotes response containing success, sorted, error, and customActions.\n */\nexport type RampsControllerGetQuotesAction = {\n type: `RampsController:getQuotes`;\n handler: RampsController['getQuotes'];\n};\n\n/**\n * Adds or updates a V2 order in controller state.\n * If an order with the same internal order code already exists, the incoming\n * fields are merged on top of the existing order so that fields not present\n * in the update (e.g. paymentDetails from the Transak API) are preserved.\n *\n * @param order - The RampsOrder to add or update.\n */\nexport type RampsControllerAddOrderAction = {\n type: `RampsController:addOrder`;\n handler: RampsController['addOrder'];\n};\n\n/**\n * Removes a V2 order from controller state by providerOrderId.\n *\n * @param providerOrderId - The provider order ID to remove.\n */\nexport type RampsControllerRemoveOrderAction = {\n type: `RampsController:removeOrder`;\n handler: RampsController['removeOrder'];\n};\n\n/**\n * Starts polling all pending V2 orders at a fixed interval.\n * Each poll cycle iterates orders with non-terminal statuses,\n * respects pollingSecondsMinimum and backoff from error count.\n */\nexport type RampsControllerStartOrderPollingAction = {\n type: `RampsController:startOrderPolling`;\n handler: RampsController['startOrderPolling'];\n};\n\n/**\n * Stops order polling and clears the interval.\n */\nexport type RampsControllerStopOrderPollingAction = {\n type: `RampsController:stopOrderPolling`;\n handler: RampsController['stopOrderPolling'];\n};\n\n/**\n * Fetches the widget data from a quote for redirect providers.\n * Makes a request to the buyURL endpoint via the RampsService to get the\n * actual provider widget URL and optional order ID for polling.\n *\n * @param quote - The quote to fetch the widget URL from.\n * @returns Promise resolving to the full BuyWidget (url, browser, orderId), or null if not available (missing buyURL or empty url in response).\n * @throws Rethrows errors from the RampsService (e.g. HttpError, network failures) so clients can react to fetch failures.\n */\nexport type RampsControllerGetBuyWidgetDataAction = {\n type: `RampsController:getBuyWidgetData`;\n handler: RampsController['getBuyWidgetData'];\n};\n\n/**\n * Registers an order ID for polling until the order is created or resolved.\n * Adds a minimal stub order to controller state; the existing order polling\n * will fetch the full order when the provider has created it.\n *\n * @param params - Object containing order identifiers and wallet info.\n * @param params.orderId - Full order ID (e.g. \"/providers/paypal/orders/abc123\") or order code.\n * @param params.providerCode - Canonical provider code (e.g. \"paypal\", \"transak\").\n * @param params.walletAddress - Wallet address for the order.\n * @param params.chainId - Optional chain ID for the order.\n */\nexport type RampsControllerAddPrecreatedOrderAction = {\n type: `RampsController:addPrecreatedOrder`;\n handler: RampsController['addPrecreatedOrder'];\n};\n\n/**\n * Fetches an order from the unified V2 API endpoint.\n * Returns a normalized RampsOrder for all provider types (aggregator and native).\n *\n * @param providerCode - The provider code (e.g., \"transak\", \"transak-native\", \"moonpay\").\n * @param orderCode - The order identifier.\n * @param wallet - The wallet address associated with the order.\n * @returns The unified order data.\n */\nexport type RampsControllerGetOrderAction = {\n type: `RampsController:getOrder`;\n handler: RampsController['getOrder'];\n};\n\n/**\n * Extracts an order from a provider callback URL.\n * Sends the callback URL to the V2 backend for provider-specific parsing,\n * then fetches the full order. This is the V2 equivalent of the aggregator\n * SDK's `getOrderFromCallback`.\n *\n * @param providerCode - The provider code (e.g., \"transak\", \"moonpay\").\n * @param callbackUrl - The full callback URL the provider redirected to.\n * @param wallet - The wallet address associated with the order.\n * @returns The unified order data.\n */\nexport type RampsControllerGetOrderFromCallbackAction = {\n type: `RampsController:getOrderFromCallback`;\n handler: RampsController['getOrderFromCallback'];\n};\n\n/**\n * Sets the Transak API key used for all Transak API requests.\n *\n * @param apiKey - The Transak API key.\n */\nexport type RampsControllerTransakSetApiKeyAction = {\n type: `RampsController:transakSetApiKey`;\n handler: RampsController['transakSetApiKey'];\n};\n\n/**\n * Sets the Transak access token and marks the user as authenticated.\n *\n * @param token - The access token received from Transak auth.\n */\nexport type RampsControllerTransakSetAccessTokenAction = {\n type: `RampsController:transakSetAccessToken`;\n handler: RampsController['transakSetAccessToken'];\n};\n\n/**\n * Clears the Transak access token and marks the user as unauthenticated.\n */\nexport type RampsControllerTransakClearAccessTokenAction = {\n type: `RampsController:transakClearAccessToken`;\n handler: RampsController['transakClearAccessToken'];\n};\n\n/**\n * Updates the Transak authentication flag in controller state.\n *\n * @param isAuthenticated - Whether the user is authenticated with Transak.\n */\nexport type RampsControllerTransakSetAuthenticatedAction = {\n type: `RampsController:transakSetAuthenticated`;\n handler: RampsController['transakSetAuthenticated'];\n};\n\n/**\n * Resets all Transak state back to defaults (unauthenticated, no data).\n */\nexport type RampsControllerTransakResetStateAction = {\n type: `RampsController:transakResetState`;\n handler: RampsController['transakResetState'];\n};\n\n/**\n * Sends a one-time password to the user's email for Transak authentication.\n *\n * @param email - The user's email address.\n * @returns The OTP response containing a state token for verification.\n */\nexport type RampsControllerTransakSendUserOtpAction = {\n type: `RampsController:transakSendUserOtp`;\n handler: RampsController['transakSendUserOtp'];\n};\n\n/**\n * Verifies a one-time password and authenticates the user with Transak.\n * Updates the controller's authentication state on success.\n *\n * @param email - The user's email address.\n * @param verificationCode - The OTP code entered by the user.\n * @param stateToken - The state token from the sendUserOtp response.\n * @returns The access token for subsequent authenticated requests.\n */\nexport type RampsControllerTransakVerifyUserOtpAction = {\n type: `RampsController:transakVerifyUserOtp`;\n handler: RampsController['transakVerifyUserOtp'];\n};\n\n/**\n * Logs the user out of Transak. Clears authentication state and user details\n * regardless of whether the API call succeeds or fails.\n *\n * @returns A message indicating the logout result.\n */\nexport type RampsControllerTransakLogoutAction = {\n type: `RampsController:transakLogout`;\n handler: RampsController['transakLogout'];\n};\n\n/**\n * Fetches the authenticated user's details from Transak.\n * Updates the userDetails resource state with loading/success/error states.\n *\n * @returns The user's profile and KYC details.\n */\nexport type RampsControllerTransakGetUserDetailsAction = {\n type: `RampsController:transakGetUserDetails`;\n handler: RampsController['transakGetUserDetails'];\n};\n\n/**\n * Fetches a buy quote from Transak for the given parameters.\n * Updates the buyQuote resource state with loading/success/error states.\n *\n * @param fiatCurrency - The fiat currency code (e.g., \"USD\").\n * @param cryptoCurrency - The cryptocurrency identifier.\n * @param network - The blockchain network identifier.\n * @param paymentMethod - The payment method identifier.\n * @param fiatAmount - The fiat amount as a string.\n * @returns The buy quote with pricing and fee details.\n */\nexport type RampsControllerTransakGetBuyQuoteAction = {\n type: `RampsController:transakGetBuyQuote`;\n handler: RampsController['transakGetBuyQuote'];\n};\n\n/**\n * Fetches the KYC requirement for a given quote.\n * Updates the kycRequirement resource state with loading/success/error states.\n *\n * @param quoteId - The quote ID to check KYC requirements for.\n * @returns The KYC requirement status and whether the user can place an order.\n */\nexport type RampsControllerTransakGetKycRequirementAction = {\n type: `RampsController:transakGetKycRequirement`;\n handler: RampsController['transakGetKycRequirement'];\n};\n\n/**\n * Fetches additional KYC requirements (e.g., ID proof, address proof) for a quote.\n *\n * @param quoteId - The quote ID to check additional requirements for.\n * @returns The list of additional forms required.\n */\nexport type RampsControllerTransakGetAdditionalRequirementsAction = {\n type: `RampsController:transakGetAdditionalRequirements`;\n handler: RampsController['transakGetAdditionalRequirements'];\n};\n\n/**\n * Creates a new order on Transak. If an existing order conflicts (HTTP 409),\n * active orders are cancelled and the creation is retried.\n *\n * @param quoteId - The quote ID to create an order from.\n * @param walletAddress - The destination wallet address.\n * @param paymentMethodId - The payment method to use.\n * @returns The created deposit order.\n */\nexport type RampsControllerTransakCreateOrderAction = {\n type: `RampsController:transakCreateOrder`;\n handler: RampsController['transakCreateOrder'];\n};\n\n/**\n * Fetches an existing order from Transak by order ID.\n *\n * @param orderId - The order ID (deposit format or raw Transak format).\n * @param wallet - The wallet address associated with the order.\n * @param paymentDetails - Optional payment details to attach to the order.\n * @returns The deposit order details.\n */\nexport type RampsControllerTransakGetOrderAction = {\n type: `RampsController:transakGetOrder`;\n handler: RampsController['transakGetOrder'];\n};\n\n/**\n * Fetches the user's spending limits for a given currency and payment method.\n *\n * @param fiatCurrency - The fiat currency code.\n * @param paymentMethod - The payment method identifier.\n * @param kycType - The KYC level type.\n * @returns The user's limits, spending, and remaining amounts.\n */\nexport type RampsControllerTransakGetUserLimitsAction = {\n type: `RampsController:transakGetUserLimits`;\n handler: RampsController['transakGetUserLimits'];\n};\n\n/**\n * Requests a one-time token (OTT) for the Transak payment widget.\n *\n * @returns The OTT response containing the token.\n */\nexport type RampsControllerTransakRequestOttAction = {\n type: `RampsController:transakRequestOtt`;\n handler: RampsController['transakRequestOtt'];\n};\n\n/**\n * Generates a URL for the Transak payment widget with pre-filled parameters.\n *\n * @param ottToken - The one-time token for widget authentication.\n * @param quote - The buy quote to pre-fill in the widget.\n * @param walletAddress - The destination wallet address.\n * @param extraParams - Optional additional URL parameters.\n * @returns The fully constructed widget URL string.\n */\nexport type RampsControllerTransakGeneratePaymentWidgetUrlAction = {\n type: `RampsController:transakGeneratePaymentWidgetUrl`;\n handler: RampsController['transakGeneratePaymentWidgetUrl'];\n};\n\n/**\n * Submits the user's purpose of usage form for KYC compliance.\n *\n * @param purpose - Array of purpose strings selected by the user.\n * @returns A promise that resolves when the form is submitted.\n */\nexport type RampsControllerTransakSubmitPurposeOfUsageFormAction = {\n type: `RampsController:transakSubmitPurposeOfUsageForm`;\n handler: RampsController['transakSubmitPurposeOfUsageForm'];\n};\n\n/**\n * Updates the user's personal or address details on Transak.\n *\n * @param data - The user data fields to update.\n * @returns The API response data.\n */\nexport type RampsControllerTransakPatchUserAction = {\n type: `RampsController:transakPatchUser`;\n handler: RampsController['transakPatchUser'];\n};\n\n/**\n * Submits the user's SSN for identity verification.\n *\n * @param ssn - The Social Security Number.\n * @param quoteId - The quote ID associated with the order requiring SSN.\n * @returns The API response data.\n */\nexport type RampsControllerTransakSubmitSsnDetailsAction = {\n type: `RampsController:transakSubmitSsnDetails`;\n handler: RampsController['transakSubmitSsnDetails'];\n};\n\n/**\n * Confirms payment for an order after the user has completed payment.\n *\n * @param orderId - The order ID to confirm payment for.\n * @param paymentMethodId - The payment method used.\n * @returns Whether the payment confirmation was successful.\n */\nexport type RampsControllerTransakConfirmPaymentAction = {\n type: `RampsController:transakConfirmPayment`;\n handler: RampsController['transakConfirmPayment'];\n};\n\n/**\n * Translates generic ramps identifiers to Transak-specific identifiers.\n *\n * @param request - The translation request with optional identifiers to translate.\n * @returns The translated Transak-specific identifiers.\n */\nexport type RampsControllerTransakGetTranslationAction = {\n type: `RampsController:transakGetTranslation`;\n handler: RampsController['transakGetTranslation'];\n};\n\n/**\n * Checks the status of an ID proof submission for KYC.\n *\n * @param workFlowRunId - The workflow run ID to check status for.\n * @returns The current ID proof status.\n */\nexport type RampsControllerTransakGetIdProofStatusAction = {\n type: `RampsController:transakGetIdProofStatus`;\n handler: RampsController['transakGetIdProofStatus'];\n};\n\n/**\n * Cancels a specific Transak order.\n *\n * @param depositOrderId - The deposit order ID to cancel.\n * @returns A promise that resolves when the order is cancelled.\n */\nexport type RampsControllerTransakCancelOrderAction = {\n type: `RampsController:transakCancelOrder`;\n handler: RampsController['transakCancelOrder'];\n};\n\n/**\n * Cancels all active Transak orders. Individual cancellation failures\n * are collected and returned rather than thrown.\n *\n * @returns An array of errors from any failed cancellations (empty if all succeeded).\n */\nexport type RampsControllerTransakCancelAllActiveOrdersAction = {\n type: `RampsController:transakCancelAllActiveOrders`;\n handler: RampsController['transakCancelAllActiveOrders'];\n};\n\n/**\n * Fetches all active Transak orders for the authenticated user.\n *\n * @returns The list of active orders.\n */\nexport type RampsControllerTransakGetActiveOrdersAction = {\n type: `RampsController:transakGetActiveOrders`;\n handler: RampsController['transakGetActiveOrders'];\n};\n\n/**\n * Union of all RampsController action types.\n */\nexport type RampsControllerMethodActions =\n | RampsControllerExecuteRequestAction\n | RampsControllerAbortRequestAction\n | RampsControllerGetRequestStateAction\n | RampsControllerSetUserRegionAction\n | RampsControllerSetSelectedProviderAction\n | RampsControllerInitAction\n | RampsControllerGetCountriesAction\n | RampsControllerGetTokensAction\n | RampsControllerSetSelectedTokenAction\n | RampsControllerGetProvidersAction\n | RampsControllerGetPaymentMethodsAction\n | RampsControllerSetSelectedPaymentMethodAction\n | RampsControllerGetQuotesAction\n | RampsControllerAddOrderAction\n | RampsControllerRemoveOrderAction\n | RampsControllerStartOrderPollingAction\n | RampsControllerStopOrderPollingAction\n | RampsControllerGetBuyWidgetDataAction\n | RampsControllerAddPrecreatedOrderAction\n | RampsControllerGetOrderAction\n | RampsControllerGetOrderFromCallbackAction\n | RampsControllerTransakSetApiKeyAction\n | RampsControllerTransakSetAccessTokenAction\n | RampsControllerTransakClearAccessTokenAction\n | RampsControllerTransakSetAuthenticatedAction\n | RampsControllerTransakResetStateAction\n | RampsControllerTransakSendUserOtpAction\n | RampsControllerTransakVerifyUserOtpAction\n | RampsControllerTransakLogoutAction\n | RampsControllerTransakGetUserDetailsAction\n | RampsControllerTransakGetBuyQuoteAction\n | RampsControllerTransakGetKycRequirementAction\n | RampsControllerTransakGetAdditionalRequirementsAction\n | RampsControllerTransakCreateOrderAction\n | RampsControllerTransakGetOrderAction\n | RampsControllerTransakGetUserLimitsAction\n | RampsControllerTransakRequestOttAction\n | RampsControllerTransakGeneratePaymentWidgetUrlAction\n | RampsControllerTransakSubmitPurposeOfUsageFormAction\n | RampsControllerTransakPatchUserAction\n | RampsControllerTransakSubmitSsnDetailsAction\n | RampsControllerTransakConfirmPaymentAction\n | RampsControllerTransakGetTranslationAction\n | RampsControllerTransakGetIdProofStatusAction\n | RampsControllerTransakCancelOrderAction\n | RampsControllerTransakCancelAllActiveOrdersAction\n | RampsControllerTransakGetActiveOrdersAction;\n"]}
1
+ {"version":3,"file":"RampsController-method-action-types.mjs","sourceRoot":"","sources":["../src/RampsController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { RampsController } from './RampsController';\n\n/**\n * Executes a request with caching, deduplication, and at most one in-flight\n * request per resource type.\n *\n * 1. **Same cache key in flight** – If a request with this cache key is\n * already pending, returns that promise (deduplication; no second request).\n *\n * 2. **Cache hit** – If valid, non-expired data exists in state.requests for\n * this key and forceRefresh is not set, returns that data without fetching.\n *\n * 3. **New request** – Creates an AbortController and fires the fetcher.\n * If options.resourceType is set, tags the pending request with that\n * resource type (so #abortDependentRequests can cancel it on region\n * change or cleanup) and ref-counts resource-level loading state.\n * On success or error, updates request state and resource error;\n * in finally, clears resource loading only if this request was not\n * aborted.\n *\n * @param cacheKey - Unique identifier for this request (e.g. from createCacheKey).\n * @param fetcher - Async function that performs the fetch. Receives an AbortSignal\n * that is aborted when this request is superseded by another for the same resource.\n * @param options - Optional forceRefresh, ttl, and resourceType for loading/error state.\n * @returns The result of the request (from cache, joined promise, or fetcher).\n */\nexport type RampsControllerExecuteRequestAction = {\n type: `RampsController:executeRequest`;\n handler: RampsController['executeRequest'];\n};\n\n/**\n * Aborts a pending request if one exists.\n *\n * @param cacheKey - The cache key of the request to abort.\n * @returns True if a request was aborted.\n */\nexport type RampsControllerAbortRequestAction = {\n type: `RampsController:abortRequest`;\n handler: RampsController['abortRequest'];\n};\n\n/**\n * Gets the state of a specific cached request.\n *\n * @param cacheKey - The cache key to look up.\n * @returns The request state, or undefined if not cached.\n */\nexport type RampsControllerGetRequestStateAction = {\n type: `RampsController:getRequestState`;\n handler: RampsController['getRequestState'];\n};\n\n/**\n * Sets the user's region manually (without fetching geolocation).\n * This allows users to override the detected region.\n *\n * @param region - The region code to set (e.g., \"US-CA\").\n * @param options - Options for cache behavior.\n * @returns The user region object.\n */\nexport type RampsControllerSetUserRegionAction = {\n type: `RampsController:setUserRegion`;\n handler: RampsController['setUserRegion'];\n};\n\n/**\n * Sets the user's selected provider.\n *\n * Accepts either a Provider object (stored directly) or a provider ID\n * string (looked up from state). The object form is preferred when the\n * caller already has the full data (e.g. from React Query cache).\n *\n * @param providerOrId - A Provider object, a provider ID string (e.g., \"/providers/moonpay\"), or null to clear.\n * @param options - Optional settings for the selection.\n * @param options.autoSelected - When true, marks the provider as system-guessed\n * (soft selection). The UI will silently auto-switch on token conflict instead\n * of showing the \"Token Not Available\" modal. Defaults to false.\n */\nexport type RampsControllerSetSelectedProviderAction = {\n type: `RampsController:setSelectedProvider`;\n handler: RampsController['setSelectedProvider'];\n};\n\n/**\n * Initializes the controller by fetching the user's region from geolocation.\n * This should be called once at app startup to set up the initial region.\n *\n * Idempotent: subsequent calls return the same promise unless forceRefresh is set.\n * Force-refetches the countries catalog on startup (bypassing the in-session\n * request cache) so region preset amounts stay current. The catalog is not\n * persisted, so a cold start always re-fetches it regardless. Skips\n * geolocation when userRegion already exists.\n *\n * @param options - Options for cache behavior. forceRefresh bypasses idempotency and re-runs the full flow.\n * @returns Promise that resolves when initialization is complete.\n */\nexport type RampsControllerInitAction = {\n type: `RampsController:init`;\n handler: RampsController['init'];\n};\n\n/**\n * Fetches the list of supported countries.\n * The API returns countries with support information for both buy and sell actions.\n * The countries are saved in the controller state once fetched.\n *\n * @param options - Options for cache behavior.\n * @returns An array of countries.\n */\nexport type RampsControllerGetCountriesAction = {\n type: `RampsController:getCountries`;\n handler: RampsController['getCountries'];\n};\n\n/**\n * Fetches the list of available tokens for a given region and action.\n * The tokens are saved in the controller state once fetched.\n *\n * @param region - The region code (e.g., \"us\", \"fr\", \"us-ny\"). If not provided, uses the user's region from controller state.\n * @param action - The ramp action type ('buy' or 'sell').\n * @param options - Options for cache behavior and query filters.\n * @param options.provider - Provider ID(s) to filter by.\n * @returns The tokens response containing topTokens and allTokens.\n */\nexport type RampsControllerGetTokensAction = {\n type: `RampsController:getTokens`;\n handler: RampsController['getTokens'];\n};\n\n/**\n * Sets the user's selected token by asset ID.\n * Looks up the token from the current tokens in state and automatically\n * fetches payment methods for that token.\n *\n * @param assetId - The asset identifier in CAIP-19 format (e.g., \"eip155:1/erc20:0x...\"), or undefined to clear.\n * @throws If region is not set, tokens are not loaded, or token is not found.\n */\nexport type RampsControllerSetSelectedTokenAction = {\n type: `RampsController:setSelectedToken`;\n handler: RampsController['setSelectedToken'];\n};\n\n/**\n * Fetches the list of providers for a given region.\n * The providers are saved in the controller state once fetched.\n *\n * @param region - The region code (e.g., \"us\", \"fr\", \"us-ny\"). If not provided, uses the user's region from controller state.\n * @param options - Options for cache behavior and query filters.\n * @param options.provider - Provider ID(s) to filter by.\n * @param options.crypto - Crypto currency ID(s) to filter by.\n * @param options.payments - Payment method ID(s) to filter by.\n * @returns The providers response containing providers array.\n */\nexport type RampsControllerGetProvidersAction = {\n type: `RampsController:getProviders`;\n handler: RampsController['getProviders'];\n};\n\n/**\n * Fetches the list of payment methods for a given context.\n * The payment methods are saved in the controller state once fetched.\n *\n * @param region - User's region code (e.g. \"fr\", \"us-ny\").\n * @param options - Query parameters for filtering payment methods.\n * @param options.assetId - CAIP-19 cryptocurrency identifier.\n * @param options.provider - Provider ID path.\n * @returns The payment methods response containing payments array.\n */\nexport type RampsControllerGetPaymentMethodsAction = {\n type: `RampsController:getPaymentMethods`;\n handler: RampsController['getPaymentMethods'];\n};\n\n/**\n * Sets the user's selected payment method.\n *\n * Accepts either a payment method ID (looked up from state) or a full\n * PaymentMethod object (stored directly). The object form is preferred\n * when the caller already has the full data (e.g. from React Query cache),\n * as it avoids depending on controller state being populated.\n *\n * @param paymentMethodOrId - A PaymentMethod object, a payment method ID string, or undefined/null to clear.\n */\nexport type RampsControllerSetSelectedPaymentMethodAction = {\n type: `RampsController:setSelectedPaymentMethod`;\n handler: RampsController['setSelectedPaymentMethod'];\n};\n\n/**\n * Fetches quotes from all providers for a given set of parameters.\n * Uses the controller's request cache; callers manage the response in local state.\n *\n * @param options - The parameters for fetching quotes.\n * @param options.region - User's region code. If not provided, uses userRegion from state.\n * @param options.fiat - Fiat currency code. If not provided, uses userRegion currency.\n * @param options.assetId - CAIP-19 cryptocurrency identifier.\n * @param options.amount - The amount (in fiat for buy, crypto for sell).\n * @param options.walletAddress - The destination wallet address.\n * @param options.paymentMethods - Array of payment method IDs. If not provided, uses paymentMethods from state.\n * @param options.providers - Optional provider IDs to filter quotes.\n * @param options.autoSelectProvider - When true and `providers` is omitted,\n * resolves a provider that supports `assetId` for this request only (no\n * state mutation). Ignored when `providers` is passed.\n * @param options.preferredProviderIds - Optional provider IDs to prefer\n * during auto-selection, in priority order (e.g. derived by the caller\n * from completed-order history). Only used when `autoSelectProvider` is\n * true and `providers` is omitted.\n * @param options.restrictToKnownOrNativeProviders - Headless-buy v0 gating. When\n * true, auto-selection resolves only a native provider, and an explicitly\n * passed `providers` list is filtered to those supporting the region and\n * asset. If nothing qualifies, `getQuotes` returns an empty response\n * instead of quoting other providers.\n * @param options.surface - Optional consumer surface key for the\n * `moneyHeadlessAllProviders` flag payload's `surfaces` map (canonical\n * values: `money` | `perps` | `predictions`). Selects that surface's\n * provider allowlist over the payload's top-level `providerIds`. Only\n * consulted on the widened all-providers path; has no effect on fetching\n * or caching, and a surface absent from the payload falls back to the\n * top-level list.\n * @param options.redirectUrl - Optional redirect URL after order completion.\n * @param options.action - The ramp action type. Defaults to 'buy'.\n * @param options.forceRefresh - Whether to bypass cache.\n * @param options.ttl - Custom TTL for this request.\n * @returns The quotes response containing success, sorted, error, and customActions.\n */\nexport type RampsControllerGetQuotesAction = {\n type: `RampsController:getQuotes`;\n handler: RampsController['getQuotes'];\n};\n\n/**\n * Adds or updates a V2 order in controller state.\n * If an order with the same internal order code already exists, the incoming\n * fields are merged on top of the existing order so that fields not present\n * in the update (e.g. paymentDetails from the Transak API) are preserved.\n *\n * @param order - The RampsOrder to add or update.\n */\nexport type RampsControllerAddOrderAction = {\n type: `RampsController:addOrder`;\n handler: RampsController['addOrder'];\n};\n\n/**\n * Removes a V2 order from controller state by providerOrderId.\n *\n * @param providerOrderId - The provider order ID to remove.\n */\nexport type RampsControllerRemoveOrderAction = {\n type: `RampsController:removeOrder`;\n handler: RampsController['removeOrder'];\n};\n\n/**\n * Starts polling all pending V2 orders at a fixed interval.\n * Each poll cycle iterates orders with non-terminal statuses,\n * respects pollingSecondsMinimum and backoff from error count.\n */\nexport type RampsControllerStartOrderPollingAction = {\n type: `RampsController:startOrderPolling`;\n handler: RampsController['startOrderPolling'];\n};\n\n/**\n * Stops order polling and clears the interval.\n */\nexport type RampsControllerStopOrderPollingAction = {\n type: `RampsController:stopOrderPolling`;\n handler: RampsController['stopOrderPolling'];\n};\n\n/**\n * Fetches the widget data from a quote for redirect providers.\n * Makes a request to the buyURL endpoint via the RampsService to get the\n * actual provider widget URL and optional order ID for polling.\n *\n * @param quote - The quote to fetch the widget URL from.\n * @returns Promise resolving to the full BuyWidget (url, browser, orderId), or null if not available (missing buyURL or empty url in response).\n * @throws Rethrows errors from the RampsService (e.g. HttpError, network failures) so clients can react to fetch failures.\n */\nexport type RampsControllerGetBuyWidgetDataAction = {\n type: `RampsController:getBuyWidgetData`;\n handler: RampsController['getBuyWidgetData'];\n};\n\n/**\n * Registers an order ID for polling until the order is created or resolved.\n * Adds a minimal stub order to controller state; the existing order polling\n * will fetch the full order when the provider has created it.\n *\n * @param params - Object containing order identifiers and wallet info.\n * @param params.orderId - Full order ID (e.g. \"/providers/paypal/orders/abc123\") or order code.\n * @param params.providerCode - Canonical provider code (e.g. \"paypal\", \"transak\").\n * @param params.walletAddress - Wallet address for the order.\n * @param params.chainId - Optional chain ID for the order.\n */\nexport type RampsControllerAddPrecreatedOrderAction = {\n type: `RampsController:addPrecreatedOrder`;\n handler: RampsController['addPrecreatedOrder'];\n};\n\n/**\n * Fetches an order from the unified V2 API endpoint.\n * Returns a normalized RampsOrder for all provider types (aggregator and native).\n *\n * @param providerCode - The provider code (e.g., \"transak\", \"transak-native\", \"moonpay\").\n * @param orderCode - The order identifier.\n * @param wallet - The wallet address associated with the order.\n * @returns The unified order data.\n */\nexport type RampsControllerGetOrderAction = {\n type: `RampsController:getOrder`;\n handler: RampsController['getOrder'];\n};\n\n/**\n * Extracts an order from a provider callback URL.\n * Sends the callback URL to the V2 backend for provider-specific parsing,\n * then fetches the full order. This is the V2 equivalent of the aggregator\n * SDK's `getOrderFromCallback`.\n *\n * @param providerCode - The provider code (e.g., \"transak\", \"moonpay\").\n * @param callbackUrl - The full callback URL the provider redirected to.\n * @param wallet - The wallet address associated with the order.\n * @returns The unified order data.\n */\nexport type RampsControllerGetOrderFromCallbackAction = {\n type: `RampsController:getOrderFromCallback`;\n handler: RampsController['getOrderFromCallback'];\n};\n\n/**\n * Sets the Transak API key used for all Transak API requests.\n *\n * @param apiKey - The Transak API key.\n */\nexport type RampsControllerTransakSetApiKeyAction = {\n type: `RampsController:transakSetApiKey`;\n handler: RampsController['transakSetApiKey'];\n};\n\n/**\n * Sets the Transak access token and marks the user as authenticated.\n *\n * @param token - The access token received from Transak auth.\n */\nexport type RampsControllerTransakSetAccessTokenAction = {\n type: `RampsController:transakSetAccessToken`;\n handler: RampsController['transakSetAccessToken'];\n};\n\n/**\n * Clears the Transak access token and marks the user as unauthenticated.\n */\nexport type RampsControllerTransakClearAccessTokenAction = {\n type: `RampsController:transakClearAccessToken`;\n handler: RampsController['transakClearAccessToken'];\n};\n\n/**\n * Updates the Transak authentication flag in controller state.\n *\n * @param isAuthenticated - Whether the user is authenticated with Transak.\n */\nexport type RampsControllerTransakSetAuthenticatedAction = {\n type: `RampsController:transakSetAuthenticated`;\n handler: RampsController['transakSetAuthenticated'];\n};\n\n/**\n * Resets all Transak state back to defaults (unauthenticated, no data).\n */\nexport type RampsControllerTransakResetStateAction = {\n type: `RampsController:transakResetState`;\n handler: RampsController['transakResetState'];\n};\n\n/**\n * Sends a one-time password to the user's email for Transak authentication.\n *\n * @param email - The user's email address.\n * @returns The OTP response containing a state token for verification.\n */\nexport type RampsControllerTransakSendUserOtpAction = {\n type: `RampsController:transakSendUserOtp`;\n handler: RampsController['transakSendUserOtp'];\n};\n\n/**\n * Verifies a one-time password and authenticates the user with Transak.\n * Updates the controller's authentication state on success.\n *\n * @param email - The user's email address.\n * @param verificationCode - The OTP code entered by the user.\n * @param stateToken - The state token from the sendUserOtp response.\n * @returns The access token for subsequent authenticated requests.\n */\nexport type RampsControllerTransakVerifyUserOtpAction = {\n type: `RampsController:transakVerifyUserOtp`;\n handler: RampsController['transakVerifyUserOtp'];\n};\n\n/**\n * Logs the user out of Transak. Clears authentication state and user details\n * regardless of whether the API call succeeds or fails.\n *\n * @returns A message indicating the logout result.\n */\nexport type RampsControllerTransakLogoutAction = {\n type: `RampsController:transakLogout`;\n handler: RampsController['transakLogout'];\n};\n\n/**\n * Fetches the authenticated user's details from Transak.\n * Updates the userDetails resource state with loading/success/error states.\n *\n * @returns The user's profile and KYC details.\n */\nexport type RampsControllerTransakGetUserDetailsAction = {\n type: `RampsController:transakGetUserDetails`;\n handler: RampsController['transakGetUserDetails'];\n};\n\n/**\n * Fetches a buy quote from Transak for the given parameters.\n * Updates the buyQuote resource state with loading/success/error states.\n *\n * @param fiatCurrency - The fiat currency code (e.g., \"USD\").\n * @param cryptoCurrency - The cryptocurrency identifier.\n * @param network - The blockchain network identifier.\n * @param paymentMethod - The payment method identifier.\n * @param fiatAmount - The fiat amount as a string.\n * @returns The buy quote with pricing and fee details.\n */\nexport type RampsControllerTransakGetBuyQuoteAction = {\n type: `RampsController:transakGetBuyQuote`;\n handler: RampsController['transakGetBuyQuote'];\n};\n\n/**\n * Fetches the KYC requirement for a given quote.\n * Updates the kycRequirement resource state with loading/success/error states.\n *\n * @param quoteId - The quote ID to check KYC requirements for.\n * @returns The KYC requirement status and whether the user can place an order.\n */\nexport type RampsControllerTransakGetKycRequirementAction = {\n type: `RampsController:transakGetKycRequirement`;\n handler: RampsController['transakGetKycRequirement'];\n};\n\n/**\n * Fetches additional KYC requirements (e.g., ID proof, address proof) for a quote.\n *\n * @param quoteId - The quote ID to check additional requirements for.\n * @returns The list of additional forms required.\n */\nexport type RampsControllerTransakGetAdditionalRequirementsAction = {\n type: `RampsController:transakGetAdditionalRequirements`;\n handler: RampsController['transakGetAdditionalRequirements'];\n};\n\n/**\n * Creates a new order on Transak. If an existing order conflicts (HTTP 409),\n * active orders are cancelled and the creation is retried.\n *\n * @param quoteId - The quote ID to create an order from.\n * @param walletAddress - The destination wallet address.\n * @param paymentMethodId - The payment method to use.\n * @returns The created deposit order.\n */\nexport type RampsControllerTransakCreateOrderAction = {\n type: `RampsController:transakCreateOrder`;\n handler: RampsController['transakCreateOrder'];\n};\n\n/**\n * Fetches an existing order from Transak by order ID.\n *\n * @param orderId - The order ID (deposit format or raw Transak format).\n * @param wallet - The wallet address associated with the order.\n * @param paymentDetails - Optional payment details to attach to the order.\n * @returns The deposit order details.\n */\nexport type RampsControllerTransakGetOrderAction = {\n type: `RampsController:transakGetOrder`;\n handler: RampsController['transakGetOrder'];\n};\n\n/**\n * Fetches the user's spending limits for a given currency and payment method.\n *\n * @param fiatCurrency - The fiat currency code.\n * @param paymentMethod - The payment method identifier.\n * @param kycType - The KYC level type.\n * @returns The user's limits, spending, and remaining amounts.\n */\nexport type RampsControllerTransakGetUserLimitsAction = {\n type: `RampsController:transakGetUserLimits`;\n handler: RampsController['transakGetUserLimits'];\n};\n\n/**\n * Requests a one-time token (OTT) for the Transak payment widget.\n *\n * @returns The OTT response containing the token.\n */\nexport type RampsControllerTransakRequestOttAction = {\n type: `RampsController:transakRequestOtt`;\n handler: RampsController['transakRequestOtt'];\n};\n\n/**\n * Generates a URL for the Transak payment widget with pre-filled parameters.\n *\n * @param ottToken - The one-time token for widget authentication.\n * @param quote - The buy quote to pre-fill in the widget.\n * @param walletAddress - The destination wallet address.\n * @param extraParams - Optional additional URL parameters.\n * @returns The fully constructed widget URL string.\n */\nexport type RampsControllerTransakGeneratePaymentWidgetUrlAction = {\n type: `RampsController:transakGeneratePaymentWidgetUrl`;\n handler: RampsController['transakGeneratePaymentWidgetUrl'];\n};\n\n/**\n * Submits the user's purpose of usage form for KYC compliance.\n *\n * @param purpose - Array of purpose strings selected by the user.\n * @returns A promise that resolves when the form is submitted.\n */\nexport type RampsControllerTransakSubmitPurposeOfUsageFormAction = {\n type: `RampsController:transakSubmitPurposeOfUsageForm`;\n handler: RampsController['transakSubmitPurposeOfUsageForm'];\n};\n\n/**\n * Updates the user's personal or address details on Transak.\n *\n * @param data - The user data fields to update.\n * @returns The API response data.\n */\nexport type RampsControllerTransakPatchUserAction = {\n type: `RampsController:transakPatchUser`;\n handler: RampsController['transakPatchUser'];\n};\n\n/**\n * Submits the user's SSN for identity verification.\n *\n * @param ssn - The Social Security Number.\n * @param quoteId - The quote ID associated with the order requiring SSN.\n * @returns The API response data.\n */\nexport type RampsControllerTransakSubmitSsnDetailsAction = {\n type: `RampsController:transakSubmitSsnDetails`;\n handler: RampsController['transakSubmitSsnDetails'];\n};\n\n/**\n * Confirms payment for an order after the user has completed payment.\n *\n * @param orderId - The order ID to confirm payment for.\n * @param paymentMethodId - The payment method used.\n * @returns Whether the payment confirmation was successful.\n */\nexport type RampsControllerTransakConfirmPaymentAction = {\n type: `RampsController:transakConfirmPayment`;\n handler: RampsController['transakConfirmPayment'];\n};\n\n/**\n * Translates generic ramps identifiers to Transak-specific identifiers.\n *\n * @param request - The translation request with optional identifiers to translate.\n * @returns The translated Transak-specific identifiers.\n */\nexport type RampsControllerTransakGetTranslationAction = {\n type: `RampsController:transakGetTranslation`;\n handler: RampsController['transakGetTranslation'];\n};\n\n/**\n * Checks the status of an ID proof submission for KYC.\n *\n * @param workFlowRunId - The workflow run ID to check status for.\n * @returns The current ID proof status.\n */\nexport type RampsControllerTransakGetIdProofStatusAction = {\n type: `RampsController:transakGetIdProofStatus`;\n handler: RampsController['transakGetIdProofStatus'];\n};\n\n/**\n * Cancels a specific Transak order.\n *\n * @param depositOrderId - The deposit order ID to cancel.\n * @returns A promise that resolves when the order is cancelled.\n */\nexport type RampsControllerTransakCancelOrderAction = {\n type: `RampsController:transakCancelOrder`;\n handler: RampsController['transakCancelOrder'];\n};\n\n/**\n * Cancels all active Transak orders. Individual cancellation failures\n * are collected and returned rather than thrown.\n *\n * @returns An array of errors from any failed cancellations (empty if all succeeded).\n */\nexport type RampsControllerTransakCancelAllActiveOrdersAction = {\n type: `RampsController:transakCancelAllActiveOrders`;\n handler: RampsController['transakCancelAllActiveOrders'];\n};\n\n/**\n * Fetches all active Transak orders for the authenticated user.\n *\n * @returns The list of active orders.\n */\nexport type RampsControllerTransakGetActiveOrdersAction = {\n type: `RampsController:transakGetActiveOrders`;\n handler: RampsController['transakGetActiveOrders'];\n};\n\n/**\n * Union of all RampsController action types.\n */\nexport type RampsControllerMethodActions =\n | RampsControllerExecuteRequestAction\n | RampsControllerAbortRequestAction\n | RampsControllerGetRequestStateAction\n | RampsControllerSetUserRegionAction\n | RampsControllerSetSelectedProviderAction\n | RampsControllerInitAction\n | RampsControllerGetCountriesAction\n | RampsControllerGetTokensAction\n | RampsControllerSetSelectedTokenAction\n | RampsControllerGetProvidersAction\n | RampsControllerGetPaymentMethodsAction\n | RampsControllerSetSelectedPaymentMethodAction\n | RampsControllerGetQuotesAction\n | RampsControllerAddOrderAction\n | RampsControllerRemoveOrderAction\n | RampsControllerStartOrderPollingAction\n | RampsControllerStopOrderPollingAction\n | RampsControllerGetBuyWidgetDataAction\n | RampsControllerAddPrecreatedOrderAction\n | RampsControllerGetOrderAction\n | RampsControllerGetOrderFromCallbackAction\n | RampsControllerTransakSetApiKeyAction\n | RampsControllerTransakSetAccessTokenAction\n | RampsControllerTransakClearAccessTokenAction\n | RampsControllerTransakSetAuthenticatedAction\n | RampsControllerTransakResetStateAction\n | RampsControllerTransakSendUserOtpAction\n | RampsControllerTransakVerifyUserOtpAction\n | RampsControllerTransakLogoutAction\n | RampsControllerTransakGetUserDetailsAction\n | RampsControllerTransakGetBuyQuoteAction\n | RampsControllerTransakGetKycRequirementAction\n | RampsControllerTransakGetAdditionalRequirementsAction\n | RampsControllerTransakCreateOrderAction\n | RampsControllerTransakGetOrderAction\n | RampsControllerTransakGetUserLimitsAction\n | RampsControllerTransakRequestOttAction\n | RampsControllerTransakGeneratePaymentWidgetUrlAction\n | RampsControllerTransakSubmitPurposeOfUsageFormAction\n | RampsControllerTransakPatchUserAction\n | RampsControllerTransakSubmitSsnDetailsAction\n | RampsControllerTransakConfirmPaymentAction\n | RampsControllerTransakGetTranslationAction\n | RampsControllerTransakGetIdProofStatusAction\n | RampsControllerTransakCancelOrderAction\n | RampsControllerTransakCancelAllActiveOrdersAction\n | RampsControllerTransakGetActiveOrdersAction;\n"]}
@@ -10,7 +10,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
10
10
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
11
11
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12
12
  };
13
- var _RampsController_instances, _RampsController_requestCacheTTL, _RampsController_requestCacheMaxSize, _RampsController_getDefaultRedirectUrl, _RampsController_pendingRequests, _RampsController_pendingResourceCount, _RampsController_pendingResourceGeneration, _RampsController_orderPollingMeta, _RampsController_orderPollingTimer, _RampsController_isPolling, _RampsController_initPromise, _RampsController_clearPendingResourceCountForDependentResources, _RampsController_abortDependentRequests, _RampsController_isAllProvidersEnabled, _RampsController_mutateRequests, _RampsController_removeRequestState, _RampsController_cleanupState, _RampsController_requireRegion, _RampsController_isRegionCurrent, _RampsController_isTokenCurrent, _RampsController_isProviderCurrent, _RampsController_updateResourceField, _RampsController_setResourceLoading, _RampsController_setResourceError, _RampsController_updateRequestState, _RampsController_runInit, _RampsController_syncUserRegionFromCountriesCatalog, _RampsController_pickWidenedQuote, _RampsController_getSupportingProvidersForRegion, _RampsController_filterProviderIdsBySupport, _RampsController_resolveProviderIdsForQuote, _RampsController_getPreferredProviderIdsFromOrders, _RampsController_refreshOrder, _RampsController_pollPendingOrders, _RampsController_syncTransakAuthOnError, _RampsController_getNormalizedTransakError;
13
+ var _RampsController_instances, _RampsController_requestCacheTTL, _RampsController_requestCacheMaxSize, _RampsController_getDefaultRedirectUrl, _RampsController_pendingRequests, _RampsController_pendingResourceCount, _RampsController_pendingResourceGeneration, _RampsController_orderPollingMeta, _RampsController_orderPollingTimer, _RampsController_isPolling, _RampsController_initPromise, _RampsController_clearPendingResourceCountForDependentResources, _RampsController_abortDependentRequests, _RampsController_resolveAllProvidersFlag, _RampsController_mutateRequests, _RampsController_removeRequestState, _RampsController_cleanupState, _RampsController_requireRegion, _RampsController_isRegionCurrent, _RampsController_isTokenCurrent, _RampsController_isProviderCurrent, _RampsController_updateResourceField, _RampsController_setResourceLoading, _RampsController_setResourceError, _RampsController_updateRequestState, _RampsController_runInit, _RampsController_syncUserRegionFromCountriesCatalog, _RampsController_pickWidenedQuote, _RampsController_getSupportingProvidersForRegion, _RampsController_filterProviderIdsBySupport, _RampsController_resolveProviderIdsForQuote, _RampsController_getPreferredProviderIdsFromOrders, _RampsController_refreshOrder, _RampsController_pollPendingOrders, _RampsController_syncTransakAuthOnError, _RampsController_getNormalizedTransakError;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.RampsController = exports.getInternalOrderCode = exports.getDefaultRampsControllerState = exports.RAMPS_CONTROLLER_REQUIRED_SERVICE_ACTIONS = exports.controllerName = void 0;
16
16
  const base_controller_1 = require("@metamask/base-controller");
@@ -986,6 +986,13 @@ class RampsController extends base_controller_1.BaseController {
986
986
  * passed `providers` list is filtered to those supporting the region and
987
987
  * asset. If nothing qualifies, `getQuotes` returns an empty response
988
988
  * instead of quoting other providers.
989
+ * @param options.surface - Optional consumer surface key for the
990
+ * `moneyHeadlessAllProviders` flag payload's `surfaces` map (canonical
991
+ * values: `money` | `perps` | `predictions`). Selects that surface's
992
+ * provider allowlist over the payload's top-level `providerIds`. Only
993
+ * consulted on the widened all-providers path; has no effect on fetching
994
+ * or caching, and a surface absent from the payload falls back to the
995
+ * top-level list.
989
996
  * @param options.redirectUrl - Optional redirect URL after order completion.
990
997
  * @param options.action - The ramp action type. Defaults to 'buy'.
991
998
  * @param options.forceRefresh - Whether to bypass cache.
@@ -1014,7 +1021,13 @@ class RampsController extends base_controller_1.BaseController {
1014
1021
  const wantsAutoSelection = !options.providers &&
1015
1022
  (options.autoSelectProvider === true ||
1016
1023
  options.restrictToKnownOrNativeProviders === true);
1017
- const widenToAllProviders = wantsAutoSelection && __classPrivateFieldGet(this, _RampsController_instances, "m", _RampsController_isAllProvidersEnabled).call(this);
1024
+ // Single flag read per call: the enabled bit and the allowlist come from
1025
+ // the same `RemoteFeatureFlagController` state snapshot, so a flag edit
1026
+ // during the awaited quote fetch cannot produce a mixed read.
1027
+ const { enabled: allProvidersEnabled, allowlist: providerAllowlist } = wantsAutoSelection
1028
+ ? __classPrivateFieldGet(this, _RampsController_instances, "m", _RampsController_resolveAllProvidersFlag).call(this, options.surface)
1029
+ : { enabled: false, allowlist: undefined };
1030
+ const widenToAllProviders = wantsAutoSelection && allProvidersEnabled;
1018
1031
  let providersToUse;
1019
1032
  let widenedProviderCatalog = this.state.providers.data;
1020
1033
  if (options.providers) {
@@ -1125,6 +1138,7 @@ class RampsController extends base_controller_1.BaseController {
1125
1138
  amount: options.amount,
1126
1139
  fiat: normalizedFiat,
1127
1140
  providers: widenedProviderCatalog,
1141
+ allowlist: providerAllowlist,
1128
1142
  });
1129
1143
  if (!selectedQuote) {
1130
1144
  // No quote fits the published provider limits: surface "no quote"
@@ -1773,13 +1787,16 @@ _RampsController_requestCacheTTL = new WeakMap(), _RampsController_requestCacheM
1773
1787
  __classPrivateFieldGet(this, _RampsController_instances, "m", _RampsController_removeRequestState).call(this, cacheKey);
1774
1788
  }
1775
1789
  }
1776
- }, _RampsController_isAllProvidersEnabled = function _RampsController_isAllProvidersEnabled() {
1790
+ }, _RampsController_resolveAllProvidersFlag = function _RampsController_resolveAllProvidersFlag(surface) {
1777
1791
  try {
1778
1792
  const remoteFeatureFlagState = this.messenger.call('RemoteFeatureFlagController:getState');
1779
- return (0, featureFlags_1.isHeadlessAllProvidersEnabled)(remoteFeatureFlagState);
1793
+ return {
1794
+ enabled: (0, featureFlags_1.isHeadlessAllProvidersEnabled)(remoteFeatureFlagState),
1795
+ allowlist: (0, featureFlags_1.getHeadlessProviderAllowlist)(remoteFeatureFlagState, surface),
1796
+ };
1780
1797
  }
1781
1798
  catch {
1782
- return false;
1799
+ return { enabled: false };
1783
1800
  }
1784
1801
  }, _RampsController_mutateRequests = function _RampsController_mutateRequests(fn) {
1785
1802
  this.update((state) => {
@@ -1892,8 +1909,13 @@ _RampsController_requestCacheTTL = new WeakMap(), _RampsController_requestCacheM
1892
1909
  this.update((state) => {
1893
1910
  state.userRegion = userRegion;
1894
1911
  });
1895
- }, _RampsController_pickWidenedQuote = function _RampsController_pickWidenedQuote(response, { amount, fiat, providers, }) {
1912
+ }, _RampsController_pickWidenedQuote = function _RampsController_pickWidenedQuote(response, { amount, fiat, providers, allowlist, }) {
1896
1913
  const providerByCode = new Map(providers.map((provider) => [provider.id, provider]));
1914
+ const allowedProviderIds = allowlist && allowlist.length > 0
1915
+ ? new Set(allowlist.map(featureFlags_1.normalizeHeadlessProviderId))
1916
+ : undefined;
1917
+ const isAllowedProvider = (quote) => !allowedProviderIds ||
1918
+ allowedProviderIds.has((0, featureFlags_1.normalizeHeadlessProviderId)(quote.provider));
1897
1919
  const fitsProviderLimits = (quote) => {
1898
1920
  const provider = providerByCode.get(quote.provider);
1899
1921
  const limit = provider?.limits?.fiat?.[fiat]?.[quote.quote.paymentMethod];
@@ -1904,7 +1926,7 @@ _RampsController_requestCacheTTL = new WeakMap(), _RampsController_requestCacheM
1904
1926
  }
1905
1927
  return amount >= limit.minAmount && amount <= limit.maxAmount;
1906
1928
  };
1907
- const candidates = response.success.filter(fitsProviderLimits);
1929
+ const candidates = response.success.filter((quote) => isAllowedProvider(quote) && fitsProviderLimits(quote));
1908
1930
  if (candidates.length === 0) {
1909
1931
  return undefined;
1910
1932
  }