@unifold/core 0.1.75 → 0.1.77

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/dist/index.d.mts CHANGED
@@ -352,8 +352,10 @@ interface OnrampQuote {
352
352
  destination_network: string;
353
353
  exchange_rate: number;
354
354
  /**
355
- * Unified payment method type (`card` / `apple_pay` / `sepa`). Provider-native
356
- * values (e.g. Meld's `credit_debit_card`) are normalized to this vocabulary.
355
+ * Unified payment method type (`card` / `apple_pay` / `sepa` / `upi`).
356
+ * Provider-native values (e.g. Meld's `CREDIT_DEBIT_CARD`, `UPI`) are
357
+ * normalized to this vocabulary. Pass it back on the session request to keep
358
+ * the rail this quote priced.
357
359
  */
358
360
  payment_method_type: OnrampSessionPaymentMethodType;
359
361
  /** @deprecated Use `payment_method_type` instead (same value). */
@@ -402,11 +404,13 @@ declare function getOnrampQuotes(request: OnrampQuotesRequest, publishableKey?:
402
404
  * - `us_bank_account` — US bank transfer (HiFi). One account accepts ACH, wire
403
405
  * and RTP; the payer picks the rail at their bank, so it is not split into
404
406
  * per-rail methods.
407
+ * - `upi` — India's instant rail, served inside the provider's widget by the
408
+ * Indian onramps (Onramp Money, Onmeta).
405
409
  *
406
410
  * This is the account/rail family the user pays over, not how the receiving
407
411
  * account is provisioned (pooled vs dedicated) — that's a backend detail.
408
412
  */
409
- type OnrampSessionPaymentMethodType = 'card' | 'apple_pay' | 'sepa' | 'us_bank_account';
413
+ type OnrampSessionPaymentMethodType = 'card' | 'apple_pay' | 'sepa' | 'us_bank_account' | 'upi';
410
414
  /**
411
415
  * @deprecated Use `OnrampSessionPaymentMethodType` instead. Retained as an alias so
412
416
  * previously-released SDK consumers keep compiling.
@@ -429,8 +433,9 @@ interface OnrampSessionRequest {
429
433
  external_id?: string;
430
434
  email?: string;
431
435
  /**
432
- * Payment method type for the session (`card` / `sepa` / `apple_pay`).
433
- * Defaults to `card`.
436
+ * Payment method type for the session (`card` / `sepa` / `apple_pay` / `upi`).
437
+ * Defaults to `card`. Send back what the chosen quote reported; a method the
438
+ * provider cannot serve is rejected rather than downgraded.
434
439
  */
435
440
  payment_method_type?: OnrampSessionPaymentMethodType;
436
441
  /** @deprecated Use `payment_method_type` instead (same value). */
@@ -454,35 +459,37 @@ interface OnrampSessionResponse {
454
459
  */
455
460
  declare function createOnrampSession(request: OnrampSessionRequest, publishableKey?: string): Promise<OnrampSessionResponse>;
456
461
  /**
457
- * A bank-transfer onramp provider returned by `getBankTransferProviders()`.
458
- * Mirrors the shape of `IntegrationExchangeInfo` so SDK consumers can render
459
- * exchanges + bank-transfer with the same UI primitives.
462
+ * One bank-transfer rail from `getBankTransferProviders()`. **A row is a rail,
463
+ * not a provider**, so two rows can share a `service_provider` the response is
464
+ * the currency selector's option list, ordered usable-first, so `data[0]` is the
465
+ * right default. `unifold` never names the provider behind a rail; what to do
466
+ * next comes off the session.
460
467
  */
461
468
  interface BankTransferProvider {
469
+ /** Not unique within a response — see the note above. */
462
470
  service_provider: string;
463
471
  service_provider_display_name: string;
464
472
  description: string;
465
473
  icon_url: string;
466
474
  icon_urls: IconUrl[];
467
475
  /**
468
- * True when the provider is configured AND the rail supports the caller's
469
- * country. Use this to decide whether the row is clickable.
476
+ * Whether this rail serves the caller's country. Unusable rails are still
477
+ * returned so a selector can grey them out rather than making "EUR only" look
478
+ * like "no bank transfer".
470
479
  */
471
480
  enabled: boolean;
472
481
  /**
473
- * Payment methods this provider supports. Forward one of these as
474
- * `payment_method` when calling `/onramps/sessions`. Stored as an array so
475
- * a single provider can light up multiple rails (e.g. SEPA + ACH) without
476
- * forking the row.
482
+ * Always one element, like `supported_currencies` a row is one rail. Read
483
+ * `[0]` and forward as `payment_method_type`. Corridor-level, never
484
+ * network-level: one account accepts ACH / wire / RTP at once and the payer's
485
+ * bank picks, so the networks arrive on the deposit instructions.
477
486
  */
478
- payment_methods: OnrampSessionPaymentMethodType[];
479
- /** All fiat currencies the rail accepts (e.g. ['eur', 'gbp']). */
487
+ payment_method_types: OnrampSessionPaymentMethodType[];
488
+ /** Always one element read `[0]` and forward as `source_currency`. */
480
489
  supported_currencies: string[];
481
- /**
482
- * Preferred fiat for the caller's country, picked from `supported_currencies`.
483
- * Forward as `source_currency` to `/onramps/sessions` — avoids the SDK
484
- * re-implementing the country → fiat mapping.
485
- */
490
+ /** @deprecated Read `payment_method_types`. Identical contents. */
491
+ payment_methods: OnrampSessionPaymentMethodType[];
492
+ /** @deprecated Read `supported_currencies[0]`. */
486
493
  source_currency: string;
487
494
  }
488
495
  interface BankTransferProvidersResponse {
@@ -811,7 +818,7 @@ interface AddressBalancesResponse {
811
818
  */
812
819
  declare function getAddressBalances(address: string, chainType: ChainType, publishableKey?: string): Promise<AddressBalancesResponse>;
813
820
  /** Wallet ids supported by the connect-wallet flow. */
814
- type WalletMobileDeepLinkWallet = 'phantom' | 'metamask' | 'coinbase' | 'trust' | 'rainbow' | 'rabby' | 'okx' | 'solflare' | 'backpack';
821
+ type WalletMobileDeepLinkWallet = 'phantom' | 'metamask' | 'coinbase' | 'trust' | 'rainbow' | 'rabby' | 'okx' | 'robinhood' | 'solflare' | 'backpack';
815
822
  /** Chain types an external wallet can connect on. */
816
823
  type ExternalWalletChainType = 'ethereum' | 'solana';
817
824
  /** A supported external (self-custody) wallet from the directory endpoint. */
@@ -833,6 +840,19 @@ interface ExternalWalletInfo {
833
840
  * client to only offer mobile-browse on those platforms.
834
841
  */
835
842
  mobile_browse_platforms: ('ios' | 'android')[] | null;
843
+ /**
844
+ * Whether the wallet ships a browser extension, so a desktop page can get an
845
+ * injected provider from it. `false` for mobile-only wallets: a desktop row
846
+ * could only ever offer an app download, never a connection, so clients should
847
+ * omit them on desktop unless the provider is already injected.
848
+ *
849
+ * Describes the wallet, not what Unifold supports, so it does not change as
850
+ * connectors are added — a wallet reachable only through a protocol the SDK has
851
+ * to implement (e.g. WalletConnect) keeps this `false` and advertises that
852
+ * through a separate additive field, so an SDK that can't speak the protocol
853
+ * keeps hiding it.
854
+ */
855
+ supports_desktop_extension: boolean;
836
856
  }
837
857
  interface ExternalWalletsResponse {
838
858
  data: ExternalWalletInfo[];
@@ -877,7 +897,7 @@ interface WalletMobileDeepLinkResponse {
877
897
  * on the merchant's site. `deeplink` is `null` for wallets without a reliable
878
898
  * dapp-browser deep link.
879
899
  *
880
- * @param wallet - Wallet id (phantom, metamask, coinbase, trust, rainbow, rabby, okx)
900
+ * @param wallet - Wallet id (phantom, metamask, coinbase, trust, rainbow, rabby, okx, robinhood)
881
901
  * @param depositAddresses - Unifold deposit addresses (one per source chain) to embed in the hosted pay URL
882
902
  * @param publishableKey - Optional publishable key, defaults to configured key
883
903
  * @param amountUsd - Optional USD amount to pre-fill on the hosted pay page so the user
@@ -1967,6 +1987,11 @@ interface CreateOnrampVerificationSessionRequest {
1967
1987
  email_already_verified?: boolean;
1968
1988
  /** Optional correlation id for a planned order. */
1969
1989
  external_id?: string;
1990
+ /**
1991
+ * Your end-user id. When set, a successful OTP persists a global identity
1992
+ * and records umbrella ToS. Omit for the Coinbase JWT path.
1993
+ */
1994
+ external_user_id?: string;
1970
1995
  }
1971
1996
  interface OnrampVerificationTokenResponse {
1972
1997
  token: string;
@@ -2219,6 +2244,23 @@ declare function generateKSUID(): string;
2219
2244
  */
2220
2245
  declare function generatePrefixedKSUID(prefix: string): string;
2221
2246
 
2247
+ /**
2248
+ * The settlement event names, defined once here because every surface emits
2249
+ * the same ones: the modal ({@link DepositEventType},
2250
+ * {@link WithdrawEventType}) and the headless controllers
2251
+ * (`DepositSessionEventType`, `OnrampSessionEventType`) all alias these
2252
+ * members, so one host-side handler can serve any of them. Aliasing rather
2253
+ * than restating the strings is what keeps that promise from drifting — the
2254
+ * enums stay distinct types, but they cannot disagree on a value.
2255
+ */
2256
+ declare enum DirectExecutionEventType {
2257
+ /** A deposit matching the session's addresses was first observed. */
2258
+ DETECTED = "direct_execution.detected",
2259
+ /** An observed execution changed status. */
2260
+ UPDATED = "direct_execution.updated",
2261
+ SUCCEEDED = "direct_execution.succeeded",
2262
+ FAILED = "direct_execution.failed"
2263
+ }
2222
2264
  /** Event types emitted by the deposit flow, following `resource.action` convention */
2223
2265
  declare enum DepositEventType {
2224
2266
  ONRAMP_SESSION_CREATED = "onramp_session.created",
@@ -2753,6 +2795,79 @@ declare function mapWalletToDepositAddress(wallet: Wallet): DepositAddress;
2753
2795
  * which custom (headless) UIs need to render an execution timeline.
2754
2796
  */
2755
2797
  declare function mapDirectExecution(execution: DirectExecutionResponse): DirectExecution;
2798
+ /**
2799
+ * One provider's quote for a fiat → crypto onramp purchase.
2800
+ *
2801
+ * camelCase SDK projection of the wire {@link OnrampQuote} returned by
2802
+ * `POST /v1/public/onramps/quotes`. Amounts are denominated in
2803
+ * `sourceCurrency` (fees, source) and `destinationCurrency` (destination).
2804
+ */
2805
+ interface OnrampProviderQuote {
2806
+ /** Stable provider identifier — pass to `selectQuote()` / session creation. */
2807
+ serviceProvider: string;
2808
+ serviceProviderDisplayName: string;
2809
+ paymentMethodType: OnrampSessionPaymentMethodType;
2810
+ sourceCurrency: string;
2811
+ countryCode: string;
2812
+ sourceAmount: number;
2813
+ sourceAmountWithoutFees: number;
2814
+ totalFee: number;
2815
+ networkFee: number;
2816
+ transactionFee: number;
2817
+ /** Provider-charged partner fee, when disclosed. */
2818
+ partnerFee: number | null;
2819
+ destinationAmount: number;
2820
+ destinationAmountWithoutFees: number | null;
2821
+ destinationCurrency: string;
2822
+ destinationNetwork: string;
2823
+ exchangeRate: number;
2824
+ /** Backend ranking signal (higher is better) used for the default ordering. */
2825
+ customerScore: number;
2826
+ /** True when the provider settles without a document-upload KYC step. */
2827
+ lowKyc: boolean;
2828
+ iconUrl: string;
2829
+ iconUrls: IconUrl[];
2830
+ institutionName: string | null;
2831
+ }
2832
+ /** Map a wire {@link OnrampQuote} to the SDK-facing {@link OnrampProviderQuote}. */
2833
+ declare function mapOnrampQuote(quote: OnrampQuote): OnrampProviderQuote;
2834
+ /**
2835
+ * The onramp-side destination for a card purchase: which provider network /
2836
+ * currency the funds are bought on, and the token that lands there before
2837
+ * Unifold converts it to the host's destination.
2838
+ *
2839
+ * camelCase SDK projection of the wire {@link DefaultTokenResponse} returned
2840
+ * by `GET /v1/public/onramps/default_token`.
2841
+ */
2842
+ interface OnrampDestinationToken {
2843
+ /** Provider-side network identifier — the `destination_network` for quotes/sessions. */
2844
+ network: string;
2845
+ /** Provider-side currency code — the `destination_currency` for quotes/sessions. */
2846
+ currency: string;
2847
+ /**
2848
+ * Whether the token the host asked to receive is a stablecoin. Quoting by a
2849
+ * fixed `destinationAmount` prices an exact quantity of the provider-side
2850
+ * currency above, so it only matches the requested token when that token is
2851
+ * a stablecoin too — the session refuses destination mode otherwise.
2852
+ */
2853
+ isStablecoin: boolean;
2854
+ token: {
2855
+ symbol: string;
2856
+ name: string;
2857
+ tokenAddress: string;
2858
+ decimals: number;
2859
+ chainId: string;
2860
+ chainType: ChainType;
2861
+ chainName: string;
2862
+ iconUrl: string;
2863
+ iconUrls: IconUrl[];
2864
+ chainIconUrl: string;
2865
+ };
2866
+ /** Estimated provider processing time in seconds, when known. */
2867
+ estimatedProcessingTimeSeconds: number | null;
2868
+ }
2869
+ /** Map a wire {@link DefaultTokenResponse} to the SDK-facing {@link OnrampDestinationToken}. */
2870
+ declare function mapDefaultOnrampToken(response: DefaultTokenResponse): OnrampDestinationToken;
2756
2871
 
2757
2872
  /** How often `/direct_executions/query` is polled (modal: POLL_INTERVAL_MS). */
2758
2873
  declare const DETECTION_POLL_INTERVAL_MS = 2500;
@@ -2788,7 +2903,6 @@ declare enum DepositSessionEventType {
2788
2903
  EXECUTION_DETECTED = "direct_execution.detected",
2789
2904
  /** Any status transition on a tracked execution. */
2790
2905
  EXECUTION_UPDATED = "direct_execution.updated",
2791
- /** Kept byte-compatible with the modal's DepositEventType member. */
2792
2906
  EXECUTION_SUCCEEDED = "direct_execution.succeeded",
2793
2907
  EXECUTION_FAILED = "direct_execution.failed"
2794
2908
  }
@@ -3074,6 +3188,523 @@ declare class DepositSession {
3074
3188
  private emitExecutionEvent;
3075
3189
  }
3076
3190
 
3191
+ /** How often quotes auto-refresh while awaiting checkout (modal: 60s countdown). */
3192
+ declare const QUOTE_REFRESH_INTERVAL_MS = 60000;
3193
+ /**
3194
+ * Events emitted by {@link OnrampSession}, following the
3195
+ * `resource.action` convention. Two names are intentionally byte-compatible
3196
+ * with existing surfaces so one host-side handler can serve modal `onEvent`
3197
+ * events and headless session events — both are **aliased** from their
3198
+ * defining enum rather than restated, so the two can never drift apart:
3199
+ *
3200
+ * - `onramp_session.created` from the modal's
3201
+ * {@link DepositEventType.ONRAMP_SESSION_CREATED} (its `data.object` is a
3202
+ * superset of the modal's `{ externalId }`),
3203
+ * - `direct_execution.*` from the shared {@link DirectExecutionEventType} —
3204
+ * the onramp settlement is the same direct-execution resource as a manual
3205
+ * transfer, so `DepositSessionEventType` aliases the same members.
3206
+ */
3207
+ declare enum OnrampSessionEventType {
3208
+ SESSION_STARTED = "onramp_session.started",
3209
+ ADDRESSES_CREATED = "onramp_session.addresses_created",
3210
+ /** A fresh set of provider quotes was fetched (initial, refresh, or after updateQuoteRequest). */
3211
+ QUOTES_UPDATED = "onramp_session.quotes_updated",
3212
+ /** Provider checkout created — the modal's `onramp_session.created`. */
3213
+ CHECKOUT_CREATED = "onramp_session.created",
3214
+ SESSION_STOPPED = "onramp_session.stopped",
3215
+ /** Non-fatal (quote refresh / polling outage) and fatal errors; `data.object.fatal` distinguishes. */
3216
+ SESSION_ERRORED = "onramp_session.errored",
3217
+ EXECUTION_DETECTED = "direct_execution.detected",
3218
+ EXECUTION_UPDATED = "direct_execution.updated",
3219
+ EXECUTION_SUCCEEDED = "direct_execution.succeeded",
3220
+ EXECUTION_FAILED = "direct_execution.failed"
3221
+ }
3222
+ type OnrampSessionErrorCode = 'ADDRESS_CREATION_FAILED' | 'DESTINATION_TOKEN_FAILED' | 'DESTINATION_AMOUNT_UNSUPPORTED' | 'QUOTES_FAILED' | 'POLLING_ERROR' | 'DEPOSIT_FAILED' | 'INVALID_RECIPIENT';
3223
+ interface OnrampSessionError {
3224
+ code: OnrampSessionErrorCode;
3225
+ message: string;
3226
+ /** Fatal errors end the run (status 'error'); non-fatal ones don't stop the flow. */
3227
+ fatal: boolean;
3228
+ cause?: unknown;
3229
+ }
3230
+ interface OnrampSessionEventDataMap {
3231
+ [OnrampSessionEventType.SESSION_STARTED]: {
3232
+ sessionId: string;
3233
+ };
3234
+ [OnrampSessionEventType.ADDRESSES_CREATED]: {
3235
+ sessionId: string;
3236
+ addresses: DepositAddress[];
3237
+ };
3238
+ [OnrampSessionEventType.QUOTES_UPDATED]: {
3239
+ sessionId: string;
3240
+ quotes: OnrampProviderQuote[];
3241
+ selectedQuote: OnrampProviderQuote | null;
3242
+ };
3243
+ [OnrampSessionEventType.CHECKOUT_CREATED]: {
3244
+ /** Kept first-class for byte-compatibility with the modal's `{ externalId }`. */
3245
+ externalId: string;
3246
+ sessionId: string;
3247
+ url: string;
3248
+ serviceProvider: string;
3249
+ };
3250
+ [OnrampSessionEventType.SESSION_STOPPED]: {
3251
+ sessionId: string;
3252
+ };
3253
+ [OnrampSessionEventType.SESSION_ERRORED]: {
3254
+ sessionId: string;
3255
+ code: OnrampSessionErrorCode;
3256
+ message: string;
3257
+ fatal: boolean;
3258
+ };
3259
+ [OnrampSessionEventType.EXECUTION_DETECTED]: DirectExecution;
3260
+ [OnrampSessionEventType.EXECUTION_UPDATED]: DirectExecution & {
3261
+ previousStatus: ExecutionStatus | null;
3262
+ };
3263
+ [OnrampSessionEventType.EXECUTION_SUCCEEDED]: DirectExecution;
3264
+ [OnrampSessionEventType.EXECUTION_FAILED]: DirectExecution;
3265
+ }
3266
+ /**
3267
+ * Event envelope emitted by the onramp session. Mirrors the
3268
+ * server-side webhook payload shape (top-level `id`, `type`, `created`,
3269
+ * resource under `data.object`), with `sevt_` IDs to distinguish from
3270
+ * backend `evt_` IDs.
3271
+ */
3272
+ type OnrampSessionEvent = {
3273
+ [K in OnrampSessionEventType]: {
3274
+ id: string;
3275
+ type: K;
3276
+ created: number;
3277
+ /** Rail hint — 'card' (or 'apple_pay' when paymentMethodType is apple_pay). */
3278
+ method?: DepositMethod;
3279
+ data: {
3280
+ object: OnrampSessionEventDataMap[K];
3281
+ };
3282
+ };
3283
+ }[OnrampSessionEventType];
3284
+ /** Map from event type to its fully-narrowed envelope. */
3285
+ type OnrampSessionEventMap = {
3286
+ [K in OnrampSessionEventType]: Extract<OnrampSessionEvent, {
3287
+ type: K;
3288
+ }>;
3289
+ };
3290
+ /**
3291
+ * The mutable amount side of the quote request. Everything else about the
3292
+ * flow (destination, user) is session identity and requires a new session.
3293
+ *
3294
+ * Quoting works in one of two AMOUNT MODES — provide exactly one:
3295
+ *
3296
+ * - **Source mode** (`sourceAmount`): "spend 100 USD" — the user pays exactly
3297
+ * this, fees included; the crypto received is what remains
3298
+ * (`quote.destinationAmount`).
3299
+ * - **Destination mode** (`destinationAmount`): "receive 100 USDC" — the
3300
+ * crypto amount is fixed and provider fees are added on top; the fiat the
3301
+ * user pays is `quote.sourceAmount`. Only providers that can quote by a
3302
+ * fixed destination amount participate (the backend omits the rest from
3303
+ * the results, so `quotes` is already filtered).
3304
+ */
3305
+ interface OnrampQuoteRequest {
3306
+ /**
3307
+ * ISO 3166-1 alpha-2 country of the payer. OPTIONAL — when omitted, the
3308
+ * session auto-detects it from the caller's IP during start() (public
3309
+ * `/ip_address` endpoint, same signal as the modal), falling back to 'US'
3310
+ * when detection fails (modal parity). Provide it only to override
3311
+ * detection with your own geo signal. The effective value is exposed as
3312
+ * `snapshot.countryCode`.
3313
+ */
3314
+ countryCode?: string;
3315
+ /**
3316
+ * ISO 3166-2 subdivision (e.g. 'US-NY') when relevant for provider
3317
+ * routing. Auto-detected alongside the country when `countryCode` is
3318
+ * omitted; never mixed with an explicit `countryCode` (a detected
3319
+ * subdivision only applies to the detected country).
3320
+ */
3321
+ subdivisionCode?: string;
3322
+ /**
3323
+ * Fiat amount to spend, as a decimal string (e.g. '100' / '99.50'), fees
3324
+ * included. Mutually exclusive with `destinationAmount`.
3325
+ */
3326
+ sourceAmount?: string;
3327
+ /**
3328
+ * Fixed crypto (destination) amount to receive, as a decimal string, with
3329
+ * provider fees added on top. Mutually exclusive with `sourceAmount`.
3330
+ *
3331
+ * Only available when the destination token is a stablecoin
3332
+ * (`snapshot.destinationToken.isStablecoin`): the amount prices an exact
3333
+ * quantity of the provider-side currency, which only matches the requested
3334
+ * token 1:1 for stablecoins. Otherwise quoting stops with a non-fatal
3335
+ * `DESTINATION_AMOUNT_UNSUPPORTED` error (modal parity) until the host
3336
+ * switches back to `sourceAmount`.
3337
+ */
3338
+ destinationAmount?: string;
3339
+ /** ISO 4217 fiat currency code the user pays in. @default 'usd' */
3340
+ sourceCurrency?: string;
3341
+ }
3342
+ interface OnrampSessionParams {
3343
+ /** Host platform's stable user identifier (maps to external_user_id). */
3344
+ externalUserId: string;
3345
+ /** Destination — what the purchase converts into and where it lands. */
3346
+ destination: DepositSessionDestination;
3347
+ /** Initial fiat quote request; mutable later via {@link OnrampSession.updateQuoteRequest}. */
3348
+ quoteRequest: OnrampQuoteRequest;
3349
+ /**
3350
+ * Payment rail forwarded to the provider session. @default 'card'
3351
+ * (`apple_pay` / `sepa` / `us_bank_account` reuse the same unified flow).
3352
+ */
3353
+ paymentMethodType?: OnrampSessionPaymentMethodType;
3354
+ /** Prefill email forwarded to the provider checkout. */
3355
+ email?: string;
3356
+ /**
3357
+ * Auto-refresh interval for quotes while awaiting checkout.
3358
+ * Set 0 to disable (call refreshQuotes() yourself). @default 60000
3359
+ */
3360
+ quoteRefreshIntervalMs?: number;
3361
+ }
3362
+ /** Internal construction config — created via `UnifoldClient.createOnrampSession`. */
3363
+ interface OnrampSessionConfig extends OnrampSessionParams {
3364
+ publishableKey: string;
3365
+ }
3366
+ /**
3367
+ * Session status is LIFECYCLE-ONLY (same principle as {@link DepositSession}):
3368
+ * a card purchase can settle as multiple executions, so execution outcomes
3369
+ * never appear here — they live on `snapshot.executions` / `latestExecution`,
3370
+ * the `direct_execution.succeeded`/`.failed` events, and `waitForSuccess()`.
3371
+ */
3372
+ type OnrampSessionStatus = 'idle' | 'preparing' | 'quoting' | 'ready' | 'awaiting_payment' | 'processing' | 'error';
3373
+ /** A provider-hosted checkout created by {@link OnrampSession.createCheckout}. */
3374
+ interface OnrampCheckout {
3375
+ /**
3376
+ * Single-use redirect URL to the provider's hosted checkout. Open it
3377
+ * synchronously from your click handler (`window.open(checkout.url)`) —
3378
+ * building it requires no network round-trip, so popup blockers stay happy.
3379
+ */
3380
+ url: string;
3381
+ /** Correlation id (`orsext_*`) stamped on the provider session. */
3382
+ externalId: string;
3383
+ serviceProvider: string;
3384
+ /** The quote the checkout was created from (price shown to the user). */
3385
+ quote: OnrampProviderQuote;
3386
+ /** Requested fiat spend; null in destination mode (read `quote.sourceAmount` for the fee-inclusive fiat). */
3387
+ sourceAmount: string | null;
3388
+ /** Requested fixed crypto amount; null in source mode. */
3389
+ destinationAmount: string | null;
3390
+ sourceCurrency: string;
3391
+ /** Epoch ms the checkout was created. */
3392
+ createdAt: number;
3393
+ }
3394
+ interface OnrampSessionSnapshot {
3395
+ status: OnrampSessionStatus;
3396
+ /**
3397
+ * Effective payer country driving quotes: the host-supplied override when
3398
+ * given, otherwise the IP-detected country ('US' when detection failed).
3399
+ * Null until known (before start() finishes preparing, when no override).
3400
+ */
3401
+ countryCode: string | null;
3402
+ /** Deposit addresses backing the purchase (one per chain type); empty until created. */
3403
+ addresses: DepositAddress[];
3404
+ /**
3405
+ * Provider-side network/currency the fiat is converted on; null until
3406
+ * resolved, and briefly again while a payer-country change is re-resolving
3407
+ * it (the routing is geo-dependent).
3408
+ */
3409
+ destinationToken: OnrampDestinationToken | null;
3410
+ /** Latest provider quotes, backend priority order; empty while loading or on failure. */
3411
+ quotes: OnrampProviderQuote[];
3412
+ /** Quote used by createCheckout() — auto-picked (quotes[0]) unless selectQuote() was called. */
3413
+ selectedQuote: OnrampProviderQuote | null;
3414
+ /** False once the host picked a provider via selectQuote() (sticky across refreshes). */
3415
+ isQuoteAutoSelected: boolean;
3416
+ /**
3417
+ * True when there is more than one quote to pick between — gate your
3418
+ * provider-picker UI on this. False when the project's fiat-onramp smart
3419
+ * routing is enabled (the backend collapses the list to a single routed
3420
+ * quote; there is no dedicated response flag) or when only one provider
3421
+ * quotes this request.
3422
+ */
3423
+ canSelectProvider: boolean;
3424
+ /** True while a (re)fetch of quotes is in flight. */
3425
+ isRefreshingQuotes: boolean;
3426
+ /** Epoch ms of the last successful quote fetch — drive your own countdown. */
3427
+ quotesUpdatedAt: number | null;
3428
+ /** The active provider checkout; null until createCheckout(). */
3429
+ checkout: OnrampCheckout | null;
3430
+ /** All executions observed since checkout, newest first. */
3431
+ executions: DirectExecution[];
3432
+ latestExecution: DirectExecution | null;
3433
+ /** True while the backend is actively scanning for the provider's transfer. */
3434
+ isCheckingDeposit: boolean;
3435
+ /** Latest non-fatal (quote refresh / polling outage) or fatal error, if any. */
3436
+ error: OnrampSessionError | null;
3437
+ }
3438
+ interface OnrampSessionWaitOptions {
3439
+ /**
3440
+ * Abort the wait (reject with code 'ABORTED'). Cancels only the wait — the
3441
+ * session keeps watching, because a card purchase is not cancelable from
3442
+ * the SDK once the user has paid at the provider. For a deadline, compose
3443
+ * `waitForSuccess({ signal: AbortSignal.timeout(60_000) })` and treat it as
3444
+ * "outcome unknown", not "outcome bad".
3445
+ */
3446
+ signal?: AbortSignal;
3447
+ }
3448
+ type OnrampSessionWaitErrorCode = 'ABORTED' | 'DESTROYED' | 'DEPOSIT_FAILED' | 'SESSION_ERROR';
3449
+ /** Rejection type for {@link OnrampSession.waitForStatus} / {@link OnrampSession.waitForSuccess}. */
3450
+ declare class OnrampSessionWaitError extends Error {
3451
+ readonly code: OnrampSessionWaitErrorCode;
3452
+ /** Failed execution (`DEPOSIT_FAILED`) or fatal {@link OnrampSessionError} (`SESSION_ERROR`). */
3453
+ readonly cause?: unknown;
3454
+ constructor(code: OnrampSessionWaitErrorCode, message: string, cause?: unknown);
3455
+ }
3456
+ /**
3457
+ * Headless controller for one attempt by one user to buy crypto with a card
3458
+ * (fiat onramp) into a destination — the no-UI equivalent of the modal's
3459
+ * `beginDeposit({ initialScreen: 'card' })`. Owns:
3460
+ *
3461
+ * 1. creating/fetching the deposit addresses the provider settles into,
3462
+ * 2. resolving the onramp destination token (provider network/currency),
3463
+ * 3. fetching + auto-refreshing provider quotes, with sticky manual selection,
3464
+ * 4. building the provider checkout URL (synchronous — popup-blocker safe),
3465
+ * 5. watching for the provider's on-chain settlement by composing a
3466
+ * {@link DepositSession} (method 'card') — same detection polling, scan
3467
+ * nudge, lookback window, and `direct_execution.*` events as a transfer.
3468
+ *
3469
+ * UI state should come from {@link getSnapshot} (or the React hook built on
3470
+ * it); events are for side effects (analytics, toasts, navigation).
3471
+ *
3472
+ * Geo: the payer country drives quoting, so when the host doesn't supply
3473
+ * `countryCode` the session auto-detects it from the caller's IP (public
3474
+ * `/ip_address` endpoint; 'US' fallback — modal parity). An explicit
3475
+ * `countryCode` always overrides and suppresses detection. This deliberately
3476
+ * differs from DepositSession's not-IP-aware stance: there geo is a policy
3477
+ * gate the host opts into; here it is a functional input of the quote.
3478
+ * Fiat min/max validation is host-side against `getFiatCurrencies()` — the
3479
+ * session only requires a parseable amount > 0.
3480
+ */
3481
+ declare class OnrampSession {
3482
+ /** Immutable id for correlation, `osess_<ksuid>`. Client-generated. */
3483
+ readonly id: string;
3484
+ private readonly emitter;
3485
+ private readonly listeners;
3486
+ private readonly publishableKey;
3487
+ private readonly externalUserId;
3488
+ private readonly destination;
3489
+ private readonly paymentMethodType;
3490
+ private readonly email?;
3491
+ private readonly quoteRefreshIntervalMs;
3492
+ private readonly method;
3493
+ private explicitCountryCode?;
3494
+ private explicitSubdivisionCode?;
3495
+ private detectedCountryCode;
3496
+ private detectedSubdivisionCode;
3497
+ private sourceAmount?;
3498
+ private destinationAmount?;
3499
+ private sourceCurrency;
3500
+ private runToken;
3501
+ private startPromise;
3502
+ private destroyed;
3503
+ /** Pending waiter rejections, invoked by destroy() so waiters never hang. */
3504
+ private waiterDestroyCallbacks;
3505
+ /** In-flight destination-token + quotes pipeline (see syncQuoteInputs). */
3506
+ private syncPromise;
3507
+ /** A sync was asked for mid-pipeline; the loop owes it another pass. */
3508
+ private syncRequested;
3509
+ /** Code of the non-fatal error already reported, so a streak emits once. */
3510
+ private nonFatalErrorLatch;
3511
+ /** True once run() got past preparing — gates live quote-input syncing. */
3512
+ private prepared;
3513
+ private refreshTimer;
3514
+ /** service_provider chosen via selectQuote(); sticky across quote refreshes. */
3515
+ private manualSelection;
3516
+ /** First execution to succeed this run — waitForSuccess's one-shot answer. */
3517
+ private firstSuccess;
3518
+ private watcher;
3519
+ private watcherOffs;
3520
+ private status;
3521
+ private addresses;
3522
+ private destinationToken;
3523
+ /** Geo `destinationToken` was resolved for; null while unresolved. */
3524
+ private destinationTokenGeoKey;
3525
+ private quotes;
3526
+ private selectedQuote;
3527
+ private isRefreshingQuotes;
3528
+ private quotesUpdatedAt;
3529
+ private checkout;
3530
+ private executions;
3531
+ private checkingDeposit;
3532
+ private error;
3533
+ private snapshot;
3534
+ constructor(config: OnrampSessionConfig);
3535
+ /** Synchronous snapshot; the reference is stable until state changes. */
3536
+ getSnapshot(): OnrampSessionSnapshot;
3537
+ /**
3538
+ * Subscribe to snapshot changes (external-store contract; drives
3539
+ * `useSyncExternalStore` in the React binding). Returns an unsubscribe fn.
3540
+ */
3541
+ subscribe(listener: () => void): () => void;
3542
+ /** Typed event subscription. Returns an unsubscribe function. */
3543
+ on<K extends OnrampSessionEventType>(type: K, handler: (event: OnrampSessionEventMap[K]) => void): () => void;
3544
+ on(type: '*', handler: (event: OnrampSessionEvent) => void): () => void;
3545
+ /**
3546
+ * Creates/fetches addresses, resolves the onramp destination token (both
3547
+ * with fail-fast recipient validation), and fetches the first quotes.
3548
+ * Idempotent while running; callable again after stop() or a fatal error.
3549
+ */
3550
+ start(): Promise<void>;
3551
+ /**
3552
+ * Update the quote request (amount / currency / country) and refetch
3553
+ * quotes. Debounce keystrokes host-side — every call that changes
3554
+ * something hits the quotes API. No-op after createCheckout().
3555
+ *
3556
+ * Amount-mode switching: patching `sourceAmount` while in destination mode
3557
+ * (or `destinationAmount` while in source mode) switches modes — the other
3558
+ * amount is cleared. Patching BOTH to truthy values in one call throws
3559
+ * (exactly one drives quoting).
3560
+ */
3561
+ updateQuoteRequest(patch: Partial<OnrampQuoteRequest>): void;
3562
+ /** Refetch quotes with the current request. Resolves when the fetch settles. */
3563
+ refreshQuotes(): Promise<void>;
3564
+ /**
3565
+ * Pick a provider quote by `serviceProvider`. The selection is sticky
3566
+ * across refreshes: while the provider keeps quoting it stays selected
3567
+ * (with fresh pricing); if it drops out, selection falls back to the
3568
+ * backend's top quote and auto-selection resumes.
3569
+ *
3570
+ * Returns the selected quote, or null when no quote matches.
3571
+ */
3572
+ selectQuote(serviceProvider: string): OnrampProviderQuote | null;
3573
+ /**
3574
+ * Build the provider-hosted checkout and start watching the deposit
3575
+ * addresses for the provider's on-chain settlement.
3576
+ *
3577
+ * Uses `snapshot.selectedQuote` (backend's top quote unless the host called
3578
+ * selectQuote()). Hosts that manage their own selection UI can instead pass
3579
+ * `options.serviceProvider` for a one-shot choice without mutating the
3580
+ * sticky selection.
3581
+ *
3582
+ * Synchronous by design: the URL is assembled locally (single-use token
3583
+ * exchange happens when it is opened), so hosts can `window.open()` the
3584
+ * result inside the click handler without tripping popup blockers.
3585
+ *
3586
+ * Throws when the session is not ready (no matching quote / addresses or
3587
+ * destination token missing) — gate your button on `status === 'ready'`
3588
+ * and `selectedQuote`.
3589
+ */
3590
+ createCheckout(options?: {
3591
+ serviceProvider?: string;
3592
+ email?: string;
3593
+ externalId?: string;
3594
+ }): OnrampCheckout;
3595
+ /**
3596
+ * Stops quote refresh and settlement watching. The session can be
3597
+ * restarted with start(), which resets quotes/checkout/executions
3598
+ * (fresh run).
3599
+ */
3600
+ stop(): void;
3601
+ /** stop() + release all listeners. Terminal — start() rejects afterwards. */
3602
+ destroy(): void;
3603
+ /**
3604
+ * Resolve when the session reaches one of the given statuses (immediately
3605
+ * if it's already there) — e.g. `waitForStatus('ready')` awaits quotes,
3606
+ * `waitForStatus('processing')` awaits detection of the settlement.
3607
+ * Statuses carry no outcomes; await those with {@link waitForSuccess}.
3608
+ *
3609
+ * Rejects with {@link OnrampSessionWaitError} on abort or destroy().
3610
+ * Does not start or stop the session — it only listens.
3611
+ */
3612
+ waitForStatus(status: OnrampSessionStatus | OnrampSessionStatus[], options?: OnrampSessionWaitOptions): Promise<OnrampSessionSnapshot>;
3613
+ /**
3614
+ * Resolve with the **first** succeeded {@link DirectExecution} observed by
3615
+ * this session — same one-shot first-completion contract as
3616
+ * {@link DepositSession.waitForSuccess}. A failure only rejects
3617
+ * (`DEPOSIT_FAILED`) when no other observed execution is still in flight;
3618
+ * fatal session errors reject with `SESSION_ERROR`. The session keeps
3619
+ * watching after success — subscribe to `direct_execution.succeeded` to
3620
+ * react to every settlement.
3621
+ */
3622
+ waitForSuccess(options?: OnrampSessionWaitOptions): Promise<DirectExecution>;
3623
+ /** Shared waiter plumbing — AbortSignal / destroy() rejection with single settlement. */
3624
+ private installWaiter;
3625
+ private run;
3626
+ private failFatally;
3627
+ private createAddressesWithRetry;
3628
+ /** Host-supplied geo wins; otherwise the IP-detected value; 'US' as a last resort. */
3629
+ private effectiveCountryCode;
3630
+ /**
3631
+ * Explicit subdivision wins. A detected subdivision applies only while the
3632
+ * country is also detected — mixing a detected subdivision into an
3633
+ * explicitly-set country would pin quotes to a region of the wrong country.
3634
+ */
3635
+ private effectiveSubdivisionCode;
3636
+ /**
3637
+ * Auto-detect the payer's country from their IP when the host didn't
3638
+ * supply one — so integrators don't need to build geo plumbing to render
3639
+ * a buy screen. Never fatal: detection failure falls back to 'US' (modal
3640
+ * parity — BuyWithCard quotes with `userIpInfo?.alpha2 || 'US'`). The
3641
+ * detection result is cached for the session's lifetime (restarts reuse
3642
+ * it); an explicit countryCode — at construction or via
3643
+ * updateQuoteRequest — always overrides.
3644
+ */
3645
+ private resolveCountry;
3646
+ /** Identity of the geo a destination-token resolution was made for. */
3647
+ private geoKey;
3648
+ /**
3649
+ * Resolve the provider-side network/currency the destination maps to. The
3650
+ * geo it was resolved for travels with the result: routing is
3651
+ * geo-dependent, so the caller has to know when a later country change
3652
+ * invalidates it.
3653
+ */
3654
+ private resolveDestinationToken;
3655
+ /**
3656
+ * Fail-fast recipient validation — parity with DepositSession. Fails open
3657
+ * on network errors (the backend still enforces at execution time), but a
3658
+ * definitive negative result is fatal.
3659
+ */
3660
+ private runStartChecks;
3661
+ /**
3662
+ * Bring the quote inputs and the destination token back in sync, then
3663
+ * fetch quotes. Destination-token routing is geo-dependent (the modal
3664
+ * re-runs its default-token effect whenever `userIpInfo` changes), so a
3665
+ * payer-country change has to re-resolve it first — quoting on the network
3666
+ * and currency routed for the previous geo would also carry into the
3667
+ * checkout built from those quotes.
3668
+ */
3669
+ private syncQuoteInputs;
3670
+ /** Loops until the session state matches the inputs it was built from. */
3671
+ private syncQuoteInputsUntilFresh;
3672
+ /**
3673
+ * Re-resolve the destination token for the current geo. Returns false when
3674
+ * the run ended or the lookup failed.
3675
+ */
3676
+ private resolveDestinationTokenForGeo;
3677
+ /** Returns true when the request inputs moved and quotes must be refetched. */
3678
+ private fetchQuotesOnce;
3679
+ /**
3680
+ * Record a non-fatal error and announce it once per streak — auto-refresh
3681
+ * keeps retrying, and repeating the event every 60s would be noise.
3682
+ */
3683
+ private raiseNonFatal;
3684
+ /** Sticky manual selection: keep the host's provider while it still quotes. */
3685
+ private reconcileSelection;
3686
+ /**
3687
+ * Start (once) the composed {@link DepositSession} that watches the deposit
3688
+ * addresses for the provider's on-chain settlement. Its baseline starts at
3689
+ * checkout time — correct for card rails, where funds can only arrive after
3690
+ * the user pays at the provider. Detection polling, the backend scan nudge
3691
+ * (auto-armed), the lookback window, and `direct_execution.*` semantics are
3692
+ * all inherited rather than reimplemented.
3693
+ */
3694
+ private startWatcher;
3695
+ private syncFromWatcher;
3696
+ private forwardExecutionEvent;
3697
+ private teardownWatcher;
3698
+ private anyExecutionInFlight;
3699
+ private setStatus;
3700
+ private clearRefreshTimer;
3701
+ private buildSnapshot;
3702
+ /** Rebuild the snapshot so getSnapshot() reflects current state. */
3703
+ private commit;
3704
+ private notify;
3705
+ private emitSessionEvent;
3706
+ }
3707
+
3077
3708
  interface UnifoldClientOptions {
3078
3709
  /** Publishable key (`pk_test_*` / `pk_live_*`). */
3079
3710
  publishableKey: string;
@@ -3127,6 +3758,8 @@ declare class UnifoldClient {
3127
3758
  constructor(options: UnifoldClientOptions);
3128
3759
  /** Create a headless deposit-session flow controller. */
3129
3760
  createDepositSession(params: DepositSessionParams): DepositSession;
3761
+ /** Create a headless fiat-onramp flow controller (buy with card by default). */
3762
+ createOnrampSession(params: OnrampSessionParams): OnrampSession;
3130
3763
  /**
3131
3764
  * Create (idempotently) and return the user's deposit addresses for a
3132
3765
  * destination — `POST /v1/public/deposit_addresses`.
@@ -3269,4 +3902,4 @@ declare const i18n: {
3269
3902
  };
3270
3903
  type I18nStrings = typeof i18n;
3271
3904
 
3272
- export { type AccountConnectionData, ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AddressVerification, type ApplePayLimitUpgradeStatus, type ApplePayProvider, type ApplePayProvidersResponse, type AuthenticateOAuthResult, type AutoSwapRequest, type AutoSwapResponse, type BankTransferConfig, type BankTransferProvider, type BankTransferProvidersResponse, type BlockedCountrySubdivision, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CashAppLimits, type CashAppSessionRequest, type CashAppSessionResponse, type CashAppSessionStatusResponse, type ChainType, type CheckoutEvent, CheckoutEventType, type CheckoutFlowFailedData, type CheckoutFlowStartedData, type CheckoutMethod, type CheckoutMethodSelectedData, type CheckoutPaymentIntent, type CheckoutPaymentIntentData, type CheckoutPaymentIntentSucceededEvent, type CoinbaseApplePayLimit, type CoinbaseApplePayLimitUpgradeOption, type CoinbaseApplePayLimitsResponse, type CoinbaseApplePaySessionResponse, type CoinbaseGooglePaySessionResponse, type CoinbaseLegalAgreement, type CoinbaseLegalAgreementsResponse, type CoinbaseWalletPayLimit, type CoinbaseWalletPayLimitUpgradeOption, type CoinbaseWalletPayLimitsResponse, type CoinbaseWalletPaySessionResponse, type ConfirmIntegrationTransferResult, type CreateCoinbaseApplePaySessionRequest, type CreateCoinbaseGooglePaySessionRequest, type CreateCoinbaseWalletPaySessionRequest, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type CreateIntegrationExchangeSessionRequest, type CreateIntegrationExchangeSessionResponse, type CreateIntegrationTransferParams, type CreateIntegrationTransferResult, type CreateOnrampVerificationSessionRequest, DETECTION_ARM_DELAY_MS, DETECTION_POLL_INTERVAL_MS, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddress, type DepositAddressParams, type DepositAddressResponse, DepositAddressValidationError, type DepositEvent, DepositEventType, type DepositFlowFailedData, type DepositFlowStartedData, type DepositLimitReachedData, type DepositMethod, type DepositMethodSelectedData, type DepositQuote, type DepositQuoteRequest, DepositSession, type DepositSessionConfig, type DepositSessionDestination, type DepositSessionError, type DepositSessionErrorCode, type DepositSessionEvent, type DepositSessionEventMap, DepositSessionEventType, type DepositSessionParams, type DepositSessionSnapshot, type DepositSessionStatus, DepositSessionWaitError, type DepositSessionWaitErrorCode, type DepositSessionWaitOptions, type DestinationToken, type DestinationTokenChain, type DirectExecution, type DirectExecutionFailedEvent, type DirectExecutionResponse, type DirectExecutionSucceededEvent, type EvmContractCall, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type ExternalWalletChainType, type ExternalWalletInfo, type ExternalWalletsResponse, type FeaturedToken, type FeaturedWallet, type FiatCurrenciesResponse, type FiatCurrency, type GetBankTransferProvidersOptions, type GetExchangesQuery, type GetIntegrationExchangesQuery, type GooglePayProvider, type GooglePayProvidersResponse, type HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IntegrationAccount, type IntegrationConnectionMethod, type IntegrationExchangeInfo, type IntegrationExchangeSessionStartParams, type IntegrationExchangesResponse, type IntegrationFeeAmount, type IntegrationHoldingsResponse, IntegrationProvider, IntegrationTransferError, type IntegrationTransferErrorType, type IpAddressResponse, LOOKBACK_MS, type ListExecutionsParams, type LockedQuoteLimits, type LockedQuotePreview, type LockedQuotePreviewRequest, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionCreatedData, type OnrampSessionCreatedEvent, type OnrampSessionPaymentMethod, type OnrampSessionPaymentMethodType, type OnrampSessionRequest, type OnrampSessionResponse, type OnrampSessionStatusResponse, type OnrampSessionStatusValue, type OnrampVerificationFactor, type OnrampVerificationFactorStatus, type OnrampVerificationSession, type OnrampVerificationStatus, type OnrampVerificationTokenResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentIntentStatus, type PaymentIntentType, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProductType, type ProjectConfigResponse, type ProviderSelectedData, type PublicIncidentResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, type RefreshIntegrationTokenResult, type RequestCoinbaseApplePayLimitUpgradeRequest, type RequestCoinbaseApplePayLimitUpgradeResponse, type RequestCoinbaseWalletPayLimitUpgradeRequest, type RequestCoinbaseWalletPayLimitUpgradeResponse, SCAN_NUDGE_INTERVAL_MS, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SourceToken, type SourceTokenNetwork, type StartIntegrationOAuthResult, type StripeAccessTokenResponse, StripeApiResponseError, type StripeAuthIntentResponse, type StripeConfigResponse, type StripeConfirmRequest, type StripeConsumerWallet, type StripeCreateSessionRequest, type StripeCryptoCustomer, type StripeCustomerVerification, type StripeDefaultTokenResponse, type StripeListResponse, type StripeOnrampErrorType, type StripeOnrampSession, type StripeOnrampTransactionDetails, type StripePaymentToken, type StripeQuoteRequest, type StripeQuotesResponse, type StripeTransactionLimitEntry, type StripeTransactionLimitsResponse, type SupportedChain, type SupportedDepositTokensParams, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedSourceTokensQuery, type SupportedSourceTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenDisplayMetadata, type TokenIconUrl, type TokenInfo, type TokenMetadata, type TokenSelectedData, type TransferDefaultTokenParams, type TransferDefaultTokenResult, UnifoldClient, type UnifoldClientOptions, type UserIpInfo, type VerificationData, type VerifyAddressParams, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, type WalletConnectionData, type WalletMobileDeepLinkDepositAddress, type WalletMobileDeepLinkResponse, type WalletMobileDeepLinkWallet, type WalletPayLimitUpgradeStatus, type WalletPayMethod, type WalletPayProvider, type WalletPayProvidersResponse, type WalletSelectedData, type WithdrawDirectExecutionFailedEvent, type WithdrawDirectExecutionSucceededEvent, type WithdrawEvent, WithdrawEventType, type WithdrawFlowStartedData, authenticateIntegrationOAuth, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, confirmIntegrationTransfer, createCashAppSession, createCoinbaseApplePaySession, createCoinbaseGooglePaySession, createCoinbaseWalletPaySession, createDepositAddress, createExchangeSession, createIntegrationExchangeSession, createIntegrationTransfer, createOnrampSession, createOnrampVerificationSession, createUnifoldClient, exchangeOnrampVerificationToken, formatStablecoinAmount, generateKSUID, generatePrefixedKSUID, getAddressBalance, getAddressBalances, getApiBaseUrl, getApplePayLimitUpgradeStatus, getApplePayProviders, getBankTransferProviders, getCashAppLimits, getCashAppSessionStatus, getChainName, getCoinbaseApplePayLimits, getCoinbaseLegalAgreements, getCoinbaseWalletPayLimits, getDefaultOnrampToken, getDepositAddress, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getExternalWallets, getFiatCurrencies, getFiatExchangeRates, getGooglePayLimitUpgradeStatus, getGooglePayProviders, getIconUrl, getIconUrlWithCdn, getIntegrationExchangeSessionStartUrl, getIntegrationExchanges, getIntegrationHoldings, getIntegrationTransferDefaultToken, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getOnrampSessionStatus, getOnrampVerificationSession, getPreferredIconUrl, getProjectConfig, getPublicIncident, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, getWalletMobileDeepLink, getWalletPayLimitUpgradeStatus, getWalletPayProviders, i18n, isApplePayLimitReached, isDepositAddressValidationError, isGooglePayLimitReached, isWalletPayLimitReached, listPaymentIntentExecutions, mapDirectExecution, mapWalletToDepositAddress, pollDirectExecutions, queryExecutions, refreshIntegrationToken, requestCoinbaseApplePayLimitUpgrade, requestCoinbaseWalletPayLimitUpgrade, retrievePaymentIntent, revokeIntegrationToken, sendHypercoreTransaction, sendOnrampVerificationOtp, sendSolanaTransaction, setApiConfig, startIntegrationOAuth, stripeConfirmSession, stripeCreateAuthIntent, stripeCreateSession, stripeExchangeTokens, stripeGetConfig, stripeGetCustomer, stripeGetDefaultToken, stripeGetQuotes, stripeGetSession, stripeGetTransactionLimits, stripeListPaymentTokens, stripeListWallets, stripeRefreshQuote, stripeRefreshToken, useUserIp, verifyOnrampVerificationOtp, verifyRecipientAddress };
3905
+ export { type AccountConnectionData, ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AddressVerification, type ApplePayLimitUpgradeStatus, type ApplePayProvider, type ApplePayProvidersResponse, type AuthenticateOAuthResult, type AutoSwapRequest, type AutoSwapResponse, type BankTransferConfig, type BankTransferProvider, type BankTransferProvidersResponse, type BlockedCountrySubdivision, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CashAppLimits, type CashAppSessionRequest, type CashAppSessionResponse, type CashAppSessionStatusResponse, type ChainType, type CheckoutEvent, CheckoutEventType, type CheckoutFlowFailedData, type CheckoutFlowStartedData, type CheckoutMethod, type CheckoutMethodSelectedData, type CheckoutPaymentIntent, type CheckoutPaymentIntentData, type CheckoutPaymentIntentSucceededEvent, type CoinbaseApplePayLimit, type CoinbaseApplePayLimitUpgradeOption, type CoinbaseApplePayLimitsResponse, type CoinbaseApplePaySessionResponse, type CoinbaseGooglePaySessionResponse, type CoinbaseLegalAgreement, type CoinbaseLegalAgreementsResponse, type CoinbaseWalletPayLimit, type CoinbaseWalletPayLimitUpgradeOption, type CoinbaseWalletPayLimitsResponse, type CoinbaseWalletPaySessionResponse, type ConfirmIntegrationTransferResult, type CreateCoinbaseApplePaySessionRequest, type CreateCoinbaseGooglePaySessionRequest, type CreateCoinbaseWalletPaySessionRequest, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type CreateIntegrationExchangeSessionRequest, type CreateIntegrationExchangeSessionResponse, type CreateIntegrationTransferParams, type CreateIntegrationTransferResult, type CreateOnrampVerificationSessionRequest, DETECTION_ARM_DELAY_MS, DETECTION_POLL_INTERVAL_MS, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddress, type DepositAddressParams, type DepositAddressResponse, DepositAddressValidationError, type DepositEvent, DepositEventType, type DepositFlowFailedData, type DepositFlowStartedData, type DepositLimitReachedData, type DepositMethod, type DepositMethodSelectedData, type DepositQuote, type DepositQuoteRequest, DepositSession, type DepositSessionConfig, type DepositSessionDestination, type DepositSessionError, type DepositSessionErrorCode, type DepositSessionEvent, type DepositSessionEventMap, DepositSessionEventType, type DepositSessionParams, type DepositSessionSnapshot, type DepositSessionStatus, DepositSessionWaitError, type DepositSessionWaitErrorCode, type DepositSessionWaitOptions, type DestinationToken, type DestinationTokenChain, type DirectExecution, DirectExecutionEventType, type DirectExecutionFailedEvent, type DirectExecutionResponse, type DirectExecutionSucceededEvent, type EvmContractCall, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type ExternalWalletChainType, type ExternalWalletInfo, type ExternalWalletsResponse, type FeaturedToken, type FeaturedWallet, type FiatCurrenciesResponse, type FiatCurrency, type GetBankTransferProvidersOptions, type GetExchangesQuery, type GetIntegrationExchangesQuery, type GooglePayProvider, type GooglePayProvidersResponse, type HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IntegrationAccount, type IntegrationConnectionMethod, type IntegrationExchangeInfo, type IntegrationExchangeSessionStartParams, type IntegrationExchangesResponse, type IntegrationFeeAmount, type IntegrationHoldingsResponse, IntegrationProvider, IntegrationTransferError, type IntegrationTransferErrorType, type IpAddressResponse, LOOKBACK_MS, type ListExecutionsParams, type LockedQuoteLimits, type LockedQuotePreview, type LockedQuotePreviewRequest, type OnrampCheckout, type OnrampDestinationToken, type OnrampProviderQuote, type OnrampQuote, type OnrampQuoteRequest, type OnrampQuotesRequest, type OnrampQuotesResponse, OnrampSession, type OnrampSessionConfig, type OnrampSessionCreatedData, type OnrampSessionCreatedEvent, type OnrampSessionError, type OnrampSessionErrorCode, type OnrampSessionEvent, type OnrampSessionEventMap, OnrampSessionEventType, type OnrampSessionParams, type OnrampSessionPaymentMethod, type OnrampSessionPaymentMethodType, type OnrampSessionRequest, type OnrampSessionResponse, type OnrampSessionSnapshot, type OnrampSessionStatus, type OnrampSessionStatusResponse, type OnrampSessionStatusValue, OnrampSessionWaitError, type OnrampSessionWaitErrorCode, type OnrampSessionWaitOptions, type OnrampVerificationFactor, type OnrampVerificationFactorStatus, type OnrampVerificationSession, type OnrampVerificationStatus, type OnrampVerificationTokenResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentIntentStatus, type PaymentIntentType, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProductType, type ProjectConfigResponse, type ProviderSelectedData, type PublicIncidentResponse, QUOTE_REFRESH_INTERVAL_MS, type QueryExecutionsRequest, type QueryExecutionsResponse, type RefreshIntegrationTokenResult, type RequestCoinbaseApplePayLimitUpgradeRequest, type RequestCoinbaseApplePayLimitUpgradeResponse, type RequestCoinbaseWalletPayLimitUpgradeRequest, type RequestCoinbaseWalletPayLimitUpgradeResponse, SCAN_NUDGE_INTERVAL_MS, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SourceToken, type SourceTokenNetwork, type StartIntegrationOAuthResult, type StripeAccessTokenResponse, StripeApiResponseError, type StripeAuthIntentResponse, type StripeConfigResponse, type StripeConfirmRequest, type StripeConsumerWallet, type StripeCreateSessionRequest, type StripeCryptoCustomer, type StripeCustomerVerification, type StripeDefaultTokenResponse, type StripeListResponse, type StripeOnrampErrorType, type StripeOnrampSession, type StripeOnrampTransactionDetails, type StripePaymentToken, type StripeQuoteRequest, type StripeQuotesResponse, type StripeTransactionLimitEntry, type StripeTransactionLimitsResponse, type SupportedChain, type SupportedDepositTokensParams, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedSourceTokensQuery, type SupportedSourceTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenDisplayMetadata, type TokenIconUrl, type TokenInfo, type TokenMetadata, type TokenSelectedData, type TransferDefaultTokenParams, type TransferDefaultTokenResult, UnifoldClient, type UnifoldClientOptions, type UserIpInfo, type VerificationData, type VerifyAddressParams, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, type WalletConnectionData, type WalletMobileDeepLinkDepositAddress, type WalletMobileDeepLinkResponse, type WalletMobileDeepLinkWallet, type WalletPayLimitUpgradeStatus, type WalletPayMethod, type WalletPayProvider, type WalletPayProvidersResponse, type WalletSelectedData, type WithdrawDirectExecutionFailedEvent, type WithdrawDirectExecutionSucceededEvent, type WithdrawEvent, WithdrawEventType, type WithdrawFlowStartedData, authenticateIntegrationOAuth, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, confirmIntegrationTransfer, createCashAppSession, createCoinbaseApplePaySession, createCoinbaseGooglePaySession, createCoinbaseWalletPaySession, createDepositAddress, createExchangeSession, createIntegrationExchangeSession, createIntegrationTransfer, createOnrampSession, createOnrampVerificationSession, createUnifoldClient, exchangeOnrampVerificationToken, formatStablecoinAmount, generateKSUID, generatePrefixedKSUID, getAddressBalance, getAddressBalances, getApiBaseUrl, getApplePayLimitUpgradeStatus, getApplePayProviders, getBankTransferProviders, getCashAppLimits, getCashAppSessionStatus, getChainName, getCoinbaseApplePayLimits, getCoinbaseLegalAgreements, getCoinbaseWalletPayLimits, getDefaultOnrampToken, getDepositAddress, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getExternalWallets, getFiatCurrencies, getFiatExchangeRates, getGooglePayLimitUpgradeStatus, getGooglePayProviders, getIconUrl, getIconUrlWithCdn, getIntegrationExchangeSessionStartUrl, getIntegrationExchanges, getIntegrationHoldings, getIntegrationTransferDefaultToken, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getOnrampSessionStatus, getOnrampVerificationSession, getPreferredIconUrl, getProjectConfig, getPublicIncident, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, getWalletMobileDeepLink, getWalletPayLimitUpgradeStatus, getWalletPayProviders, i18n, isApplePayLimitReached, isDepositAddressValidationError, isGooglePayLimitReached, isWalletPayLimitReached, listPaymentIntentExecutions, mapDefaultOnrampToken, mapDirectExecution, mapOnrampQuote, mapWalletToDepositAddress, pollDirectExecutions, queryExecutions, refreshIntegrationToken, requestCoinbaseApplePayLimitUpgrade, requestCoinbaseWalletPayLimitUpgrade, retrievePaymentIntent, revokeIntegrationToken, sendHypercoreTransaction, sendOnrampVerificationOtp, sendSolanaTransaction, setApiConfig, startIntegrationOAuth, stripeConfirmSession, stripeCreateAuthIntent, stripeCreateSession, stripeExchangeTokens, stripeGetConfig, stripeGetCustomer, stripeGetDefaultToken, stripeGetQuotes, stripeGetSession, stripeGetTransactionLimits, stripeListPaymentTokens, stripeListWallets, stripeRefreshQuote, stripeRefreshToken, useUserIp, verifyOnrampVerificationOtp, verifyRecipientAddress };