@unifold/core 0.1.69 → 0.1.70

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
@@ -1,4 +1,4 @@
1
- type ChainType = 'ethereum' | 'solana' | 'bitcoin' | 'algorand' | 'xrpl' | 'cardano' | 'n1';
1
+ type ChainType = 'ethereum' | 'solana' | 'bitcoin' | 'algorand' | 'xrpl' | 'cardano' | 'n1' | 'tron';
2
2
 
3
3
  declare function setApiConfig(config: {
4
4
  baseUrl?: string;
@@ -73,6 +73,18 @@ interface CreateDepositAddressRequest {
73
73
  * @param overrides - Override default configuration (external_user_id, recipient_address, etc.)
74
74
  * @param publishableKey - Optional publishable key, defaults to configured key
75
75
  */
76
+ /**
77
+ * Thrown when deposit-address creation fails with a `validation_error` (HTTP 400).
78
+ * In the deposit flow the recipient address is the only user-entered address
79
+ * (the destination token comes from the supported list), so callers treat this
80
+ * as an invalid-recipient signal and can render the invalid-address screen
81
+ * without waiting for the separate /verify call.
82
+ */
83
+ declare class DepositAddressValidationError extends Error {
84
+ readonly isDepositAddressValidationError = true;
85
+ constructor(message: string);
86
+ }
87
+ declare function isDepositAddressValidationError(error: unknown): error is DepositAddressValidationError;
76
88
  declare function createDepositAddress(overrides?: Partial<CreateDepositAddressRequest>, publishableKey?: string): Promise<DepositAddressResponse>;
77
89
  interface GetExistingDepositAddressRequest {
78
90
  external_user_id: string;
@@ -325,7 +337,13 @@ interface OnrampQuote {
325
337
  destination_currency: string;
326
338
  destination_network: string;
327
339
  exchange_rate: number;
328
- payment_method_type: string;
340
+ /**
341
+ * Unified payment method type (`card` / `apple_pay` / `sepa`). Provider-native
342
+ * values (e.g. Meld's `credit_debit_card`) are normalized to this vocabulary.
343
+ */
344
+ payment_method_type: OnrampSessionPaymentMethodType;
345
+ /** @deprecated Use `payment_method_type` instead (same value). */
346
+ payment_method: OnrampSessionPaymentMethodType;
329
347
  customer_score: number;
330
348
  service_provider: string;
331
349
  service_provider_display_name: string;
@@ -359,7 +377,12 @@ declare function getOnrampQuotes(request: OnrampQuotesRequest, publishableKey?:
359
377
  * (Coinbase only) — useful as a fallback when the headless Apple Pay flow
360
378
  * is unavailable.
361
379
  */
362
- type OnrampSessionPaymentMethod = 'card' | 'sepa' | 'apple_pay';
380
+ type OnrampSessionPaymentMethodType = 'card' | 'sepa' | 'apple_pay';
381
+ /**
382
+ * @deprecated Use `OnrampSessionPaymentMethodType` instead. Retained as an alias so
383
+ * previously-released SDK consumers keep compiling.
384
+ */
385
+ type OnrampSessionPaymentMethod = OnrampSessionPaymentMethodType;
363
386
  interface OnrampSessionRequest {
364
387
  service_provider: string;
365
388
  country_code: string;
@@ -372,7 +395,13 @@ interface OnrampSessionRequest {
372
395
  redirect_url?: string;
373
396
  external_id?: string;
374
397
  email?: string;
375
- payment_method?: OnrampSessionPaymentMethod;
398
+ /**
399
+ * Payment method type for the session (`card` / `sepa` / `apple_pay`).
400
+ * Defaults to `card`.
401
+ */
402
+ payment_method_type?: OnrampSessionPaymentMethodType;
403
+ /** @deprecated Use `payment_method_type` instead (same value). */
404
+ payment_method?: OnrampSessionPaymentMethodType;
376
405
  }
377
406
  interface OnrampSessionResponse {
378
407
  url: string;
@@ -406,7 +435,7 @@ interface BankTransferProvider {
406
435
  * a single provider can light up multiple rails (e.g. SEPA + ACH) without
407
436
  * forking the row.
408
437
  */
409
- payment_methods: OnrampSessionPaymentMethod[];
438
+ payment_methods: OnrampSessionPaymentMethodType[];
410
439
  /** All fiat currencies the rail accepts (e.g. ['eur', 'gbp']). */
411
440
  supported_currencies: string[];
412
441
  /**
@@ -605,6 +634,12 @@ interface ProjectConfigResponse {
605
634
  enabled: boolean;
606
635
  };
607
636
  }
637
+ interface PublicIncidentResponse {
638
+ enabled: boolean;
639
+ severity: 'info' | 'degraded' | 'outage';
640
+ messages: string[];
641
+ status_page_url?: string;
642
+ }
608
643
  /**
609
644
  * Bank-transfer project-level toggle returned by `/projects/config`.
610
645
  *
@@ -633,6 +668,11 @@ interface GetProjectConfigOptions {
633
668
  subdivisionCode?: string;
634
669
  }
635
670
  declare function getProjectConfig(publishableKey?: string, options?: GetProjectConfigOptions): Promise<ProjectConfigResponse>;
671
+ /**
672
+ * Get the env-driven public incident payload used for in-product outage messaging.
673
+ * Requires a publishable key for consistency with other public widget endpoints.
674
+ */
675
+ declare function getPublicIncident(publishableKey?: string): Promise<PublicIncidentResponse>;
636
676
  interface IpAddressResponse {
637
677
  alpha2: string;
638
678
  alpha3: string;
@@ -761,8 +801,10 @@ interface WalletMobileDeepLinkResponse {
761
801
  * @param wallet - Wallet id (phantom, metamask, coinbase, trust, rainbow, rabby, okx)
762
802
  * @param depositAddresses - Unifold deposit addresses (one per source chain) to embed in the hosted pay URL
763
803
  * @param publishableKey - Optional publishable key, defaults to configured key
804
+ * @param amountUsd - Optional USD amount to pre-fill on the hosted pay page so the user
805
+ * doesn't have to re-enter it after the mobile wallet redirect
764
806
  */
765
- declare function getWalletMobileDeepLink(wallet: WalletMobileDeepLinkWallet, depositAddresses: WalletMobileDeepLinkDepositAddress[], publishableKey?: string): Promise<WalletMobileDeepLinkResponse>;
807
+ declare function getWalletMobileDeepLink(wallet: WalletMobileDeepLinkWallet, depositAddresses: WalletMobileDeepLinkDepositAddress[], publishableKey?: string, amountUsd?: string): Promise<WalletMobileDeepLinkResponse>;
766
808
  interface AddressBalanceResponse {
767
809
  address: string;
768
810
  chain_type: string;
@@ -799,6 +841,8 @@ interface VerifyAddressResponse {
799
841
  valid: boolean;
800
842
  /** Standardized error code for frontend i18n */
801
843
  failure_code?: AddressValidationFailureCode;
844
+ /** Optional human-readable message from backend */
845
+ message?: string;
802
846
  /** Metadata for message interpolation */
803
847
  metadata?: AddressValidationMetadata;
804
848
  }
@@ -1560,18 +1604,32 @@ interface StripeQuotesResponse {
1560
1604
  * Backend error_type values for headless Stripe onramp failures. The SDK can
1561
1605
  * branch on these instead of string-matching Stripe messages.
1562
1606
  */
1563
- type StripeOnrampErrorType = 'stripe_onramp_missing_minimum_identity_verification' | 'stripe_onramp_missing_identity_verification' | 'stripe_onramp_missing_document_verification' | 'stripe_onramp_purchase_limit_reached' | 'stripe_onramp_bad_request' | 'stripe_onramp_forbidden' | 'stripe_onramp_not_found' | 'stripe_onramp_upstream_error' | (string & NonNullable<unknown>);
1607
+ type StripeOnrampErrorType = 'stripe_onramp_missing_minimum_identity_verification' | 'stripe_onramp_missing_identity_verification' | 'stripe_onramp_missing_document_verification' | 'stripe_onramp_purchase_limit_reached' | 'stripe_onramp_payment_method_consumed' | 'stripe_onramp_bad_request' | 'stripe_onramp_forbidden' | 'stripe_onramp_not_found' | 'stripe_onramp_upstream_error' | (string & NonNullable<unknown>);
1564
1608
  declare class StripeApiResponseError extends Error {
1565
1609
  readonly statusCode: number;
1566
1610
  /** Underlying Stripe error code (e.g. `crypto_onramp_session_error`), when available */
1567
1611
  readonly stripeCode?: string | undefined;
1568
1612
  /** Unifold backend error_type (e.g. `stripe_onramp_missing_document_verification`) */
1569
1613
  readonly errorType?: StripeOnrampErrorType | undefined;
1614
+ /**
1615
+ * The raw Stripe error message (from `details.stripe_error.message`), without
1616
+ * the operation prefix baked into `message`. This is the human-readable text
1617
+ * Stripe returns (e.g. "Your card was declined.") and is safe to show to the
1618
+ * user directly when there's no more specific mapped message.
1619
+ */
1620
+ readonly stripeMessage?: string | undefined;
1570
1621
  constructor(message: string, statusCode: number,
1571
1622
  /** Underlying Stripe error code (e.g. `crypto_onramp_session_error`), when available */
1572
1623
  stripeCode?: string | undefined,
1573
1624
  /** Unifold backend error_type (e.g. `stripe_onramp_missing_document_verification`) */
1574
- errorType?: StripeOnrampErrorType | undefined);
1625
+ errorType?: StripeOnrampErrorType | undefined,
1626
+ /**
1627
+ * The raw Stripe error message (from `details.stripe_error.message`), without
1628
+ * the operation prefix baked into `message`. This is the human-readable text
1629
+ * Stripe returns (e.g. "Your card was declined.") and is safe to show to the
1630
+ * user directly when there's no more specific mapped message.
1631
+ */
1632
+ stripeMessage?: string | undefined);
1575
1633
  }
1576
1634
  /**
1577
1635
  * Fetch Stripe config (publishable key + merchant ID) for SDK initialization.
@@ -1973,6 +2031,32 @@ interface DirectExecution {
1973
2031
  destinationTransactionHashes: string[];
1974
2032
  status: ExecutionStatus;
1975
2033
  failureReason: string | null;
2034
+ /** ISO timestamp the execution was created. */
2035
+ createdAt?: string;
2036
+ /** ISO timestamp the execution was last updated. */
2037
+ updatedAt?: string;
2038
+ /** Block explorer URL for the source transaction. */
2039
+ explorerUrl?: string;
2040
+ /** Block explorer URL for the destination transaction, when available. */
2041
+ destinationExplorerUrl?: string | null;
2042
+ /** Display metadata (icon, decimals) for the source token. */
2043
+ sourceTokenMetadata?: {
2044
+ iconUrl?: string;
2045
+ iconUrls?: {
2046
+ url: string;
2047
+ format: 'svg' | 'png';
2048
+ }[];
2049
+ decimals?: number;
2050
+ };
2051
+ /** Display metadata (icon, decimals) for the destination token. */
2052
+ destinationTokenMetadata?: {
2053
+ iconUrl?: string;
2054
+ iconUrls?: {
2055
+ url: string;
2056
+ format: 'svg' | 'png';
2057
+ }[];
2058
+ decimals?: number;
2059
+ };
1976
2060
  }
1977
2061
  /** Map from event type to its `data.object` shape */
1978
2062
  interface DepositEventDataMap {
@@ -2055,6 +2139,439 @@ type CheckoutPaymentIntentSucceededEvent = Extract<CheckoutEvent, {
2055
2139
  type: CheckoutEventType.PAYMENT_INTENT_SUCCEEDED;
2056
2140
  }>;
2057
2141
 
2142
+ /**
2143
+ * Display metadata for a token involved in an execution (camelCase projection
2144
+ * of the wire `*_token_metadata` objects).
2145
+ */
2146
+ interface TokenDisplayMetadata {
2147
+ iconUrl?: string;
2148
+ iconUrls?: IconUrl[];
2149
+ decimals?: number;
2150
+ }
2151
+ /**
2152
+ * A deposit address the user can fund on a given chain type.
2153
+ *
2154
+ * camelCase SDK projection of the wire {@link Wallet} shape returned by
2155
+ * `POST /v1/public/deposit_addresses`. Named `DepositAddress` (not "wallet")
2156
+ * because "wallet" is overloaded across the SDK (browser wallets, exchange
2157
+ * wallets); this resource is the address an integrator shows the user.
2158
+ */
2159
+ interface DepositAddress {
2160
+ id: string;
2161
+ chainType: ChainType;
2162
+ addressType: string | null;
2163
+ address: string;
2164
+ destinationChainType: ChainType;
2165
+ destinationChainId: string;
2166
+ destinationTokenAddress: string;
2167
+ recipientAddress: string;
2168
+ isPrimary: boolean;
2169
+ }
2170
+ /** Map a wire {@link Wallet} to the SDK-facing {@link DepositAddress}. */
2171
+ declare function mapWalletToDepositAddress(wallet: Wallet): DepositAddress;
2172
+ /**
2173
+ * Map a wire {@link DirectExecutionResponse} to the SDK-facing
2174
+ * {@link DirectExecution} used in events and callbacks.
2175
+ *
2176
+ * Superset of the mapping historically done inside the deposit polling hook:
2177
+ * additionally carries timestamps, explorer URLs, and token display metadata,
2178
+ * which custom (headless) UIs need to render an execution timeline.
2179
+ */
2180
+ declare function mapDirectExecution(execution: DirectExecutionResponse): DirectExecution;
2181
+
2182
+ /** How often `/direct_executions/query` is polled (modal: POLL_INTERVAL_MS). */
2183
+ declare const DETECTION_POLL_INTERVAL_MS = 2500;
2184
+ /** How often `/direct_executions/poll` is nudged once armed (modal: POLL_ENDPOINT_INTERVAL_MS). */
2185
+ declare const SCAN_NUDGE_INTERVAL_MS = 5000;
2186
+ /** Delay before the scan nudge auto-arms in 'auto' mode (modal: DEPOSIT_CONFIRM_DELAY_MS). */
2187
+ declare const DETECTION_ARM_DELAY_MS = 5000;
2188
+ /**
2189
+ * Lookback window for catching deposits sent just before start() — fixed, not
2190
+ * host-configurable (modal: CUTOFF_BUFFER_MS). In-flight (non-terminal)
2191
+ * executions created up to this long before the session baseline are detected
2192
+ * and their settlement fires live; executions created before the baseline that
2193
+ * are ALREADY terminal at first sight are ignored as history (prevents
2194
+ * duplicate success side effects on quick re-entry); anything older is
2195
+ * ignored entirely.
2196
+ */
2197
+ declare const LOOKBACK_MS = 60000;
2198
+ /**
2199
+ * Events emitted by {@link DepositSession}, following the `resource.action`
2200
+ * convention. `direct_execution.succeeded` intentionally matches the existing
2201
+ * {@link DepositEventType.DIRECT_EXECUTION_SUCCEEDED} name so one host-side
2202
+ * handler can serve modal `onEvent` events and headless session events.
2203
+ */
2204
+ declare enum DepositSessionEventType {
2205
+ SESSION_STARTED = "deposit_session.started",
2206
+ ADDRESSES_CREATED = "deposit_session.addresses_created",
2207
+ /** The backend scan nudge (/poll) was armed — auto timer or confirmFundsSent(). */
2208
+ CONFIRMATION_STARTED = "deposit_session.confirmation_started",
2209
+ SESSION_STOPPED = "deposit_session.stopped",
2210
+ /** Non-fatal (transient polling outage) and fatal errors; `data.object.fatal` distinguishes. */
2211
+ SESSION_ERRORED = "deposit_session.errored",
2212
+ /** First time an execution is seen this session. */
2213
+ EXECUTION_DETECTED = "direct_execution.detected",
2214
+ /** Any status transition on a tracked execution. */
2215
+ EXECUTION_UPDATED = "direct_execution.updated",
2216
+ /** Kept byte-compatible with the modal's DepositEventType member. */
2217
+ EXECUTION_SUCCEEDED = "direct_execution.succeeded",
2218
+ EXECUTION_FAILED = "direct_execution.failed"
2219
+ }
2220
+ type DepositSessionErrorCode = 'ADDRESS_CREATION_FAILED' | 'POLLING_ERROR' | 'DEPOSIT_FAILED' | 'INVALID_RECIPIENT';
2221
+ interface DepositSessionError {
2222
+ code: DepositSessionErrorCode;
2223
+ message: string;
2224
+ /** Fatal errors end the run (status 'error'); non-fatal ones don't stop polling. */
2225
+ fatal: boolean;
2226
+ cause?: unknown;
2227
+ }
2228
+ interface DepositSessionEventDataMap {
2229
+ [DepositSessionEventType.SESSION_STARTED]: {
2230
+ sessionId: string;
2231
+ };
2232
+ [DepositSessionEventType.ADDRESSES_CREATED]: {
2233
+ sessionId: string;
2234
+ addresses: DepositAddress[];
2235
+ };
2236
+ [DepositSessionEventType.CONFIRMATION_STARTED]: {
2237
+ sessionId: string;
2238
+ trigger: 'auto' | 'manual';
2239
+ };
2240
+ [DepositSessionEventType.SESSION_STOPPED]: {
2241
+ sessionId: string;
2242
+ };
2243
+ [DepositSessionEventType.SESSION_ERRORED]: {
2244
+ sessionId: string;
2245
+ code: DepositSessionErrorCode;
2246
+ message: string;
2247
+ fatal: boolean;
2248
+ };
2249
+ [DepositSessionEventType.EXECUTION_DETECTED]: DirectExecution;
2250
+ [DepositSessionEventType.EXECUTION_UPDATED]: DirectExecution & {
2251
+ previousStatus: ExecutionStatus | null;
2252
+ };
2253
+ [DepositSessionEventType.EXECUTION_SUCCEEDED]: DirectExecution;
2254
+ [DepositSessionEventType.EXECUTION_FAILED]: DirectExecution;
2255
+ }
2256
+ /**
2257
+ * Event envelope emitted by the deposit session. Mirrors the server-side
2258
+ * webhook payload shape (top-level `id`, `type`, `created`, resource under
2259
+ * `data.object`), with `sevt_` IDs to distinguish from backend `evt_` IDs.
2260
+ */
2261
+ type DepositSessionEvent = {
2262
+ [K in DepositSessionEventType]: {
2263
+ id: string;
2264
+ type: K;
2265
+ created: number;
2266
+ /**
2267
+ * Host-provided rail hint ({@link DepositSessionParams.method}, default
2268
+ * 'transfer'). The session can't observe how funds were sent — a host
2269
+ * driving its own wallet integration sets 'wallet_connect'.
2270
+ */
2271
+ method?: DepositMethod;
2272
+ data: {
2273
+ object: DepositSessionEventDataMap[K];
2274
+ };
2275
+ };
2276
+ }[DepositSessionEventType];
2277
+ /** Map from event type to its fully-narrowed envelope. */
2278
+ type DepositSessionEventMap = {
2279
+ [K in DepositSessionEventType]: Extract<DepositSessionEvent, {
2280
+ type: K;
2281
+ }>;
2282
+ };
2283
+ interface DepositSessionDestination {
2284
+ chainType: ChainType;
2285
+ chainId: string;
2286
+ tokenAddress: string;
2287
+ /** Address that receives the deposited funds. */
2288
+ recipientAddress: string;
2289
+ /** EVM-only post-delivery calls; same constraints as DepositConfig.contractCalls. */
2290
+ contractCalls?: EvmContractCall[];
2291
+ }
2292
+ interface DepositSessionParams {
2293
+ /** Host platform's stable user identifier (maps to external_user_id). */
2294
+ externalUserId: string;
2295
+ /** Destination — what the deposit converts into and where it lands. */
2296
+ destination: DepositSessionDestination;
2297
+ /**
2298
+ * When the backend scan nudge (/poll) is armed:
2299
+ * - 'auto' (default): armed automatically DETECTION_ARM_DELAY_MS after start.
2300
+ * - 'manual': armed only when the host calls session.confirmFundsSent().
2301
+ * Detection polling of /query runs from start() in both modes.
2302
+ */
2303
+ confirmationMode?: 'auto' | 'manual';
2304
+ /** Rail hint stamped onto emitted events' `method` field. @default 'transfer' */
2305
+ method?: DepositMethod;
2306
+ }
2307
+ /** Internal construction config — created via `UnifoldClient.createDepositSession`. */
2308
+ interface DepositSessionConfig extends DepositSessionParams {
2309
+ publishableKey: string;
2310
+ }
2311
+ /**
2312
+ * Session status is LIFECYCLE-ONLY. A DepositSession is an ongoing watcher
2313
+ * that can observe many executions, so execution outcomes deliberately never
2314
+ * appear here — a session-level "succeeded"/"failed" misleads the moment a
2315
+ * second deposit arrives (a failure right after a success would flip the
2316
+ * whole session to "failed"). Outcomes live on the executions themselves:
2317
+ * `snapshot.executions` / `latestExecution` statuses, the
2318
+ * `direct_execution.succeeded`/`.failed` events, and `waitForSuccess()`.
2319
+ */
2320
+ type DepositSessionStatus = 'idle' | 'creating_addresses' | 'ready' | 'processing' | 'error';
2321
+ interface DepositSessionSnapshot {
2322
+ status: DepositSessionStatus;
2323
+ /** Deposit addresses (one per chain type); empty until created. */
2324
+ addresses: DepositAddress[];
2325
+ /** All executions observed this session, newest first. */
2326
+ executions: DirectExecution[];
2327
+ latestExecution: DirectExecution | null;
2328
+ /**
2329
+ * True while the backend is actively checking for the deposit — i.e. the
2330
+ * scan nudge (/poll) is armed (auto timer elapsed or confirmFundsSent()).
2331
+ */
2332
+ isCheckingDeposit: boolean;
2333
+ /** Latest non-fatal (e.g. transient polling outage) or fatal error, if any. */
2334
+ error: DepositSessionError | null;
2335
+ }
2336
+ interface DepositSessionWaitOptions {
2337
+ /**
2338
+ * Abort the wait (reject with code 'ABORTED'; the signal's abort `reason`
2339
+ * is passed through as the error's `cause`). Cancels only the wait — the
2340
+ * session keeps polling, because a deposit is not cancelable: once the user
2341
+ * has sent funds they will arrive regardless of who is still awaiting.
2342
+ *
2343
+ * For a deadline, compose the platform primitive:
2344
+ * `waitForSuccess({ signal: AbortSignal.timeout(60_000) })`.
2345
+ * There is deliberately no `timeoutMs` option — a timeout is "outcome
2346
+ * unknown", not "outcome bad", and modeling it as a distinct failure code
2347
+ * tempts hosts into rendering a deposit as failed right before it lands.
2348
+ */
2349
+ signal?: AbortSignal;
2350
+ }
2351
+ type DepositSessionWaitErrorCode = 'ABORTED' | 'DESTROYED' | 'DEPOSIT_FAILED' | 'SESSION_ERROR';
2352
+ /** Rejection type for {@link DepositSession.waitForStatus} / {@link DepositSession.waitForSuccess}. */
2353
+ declare class DepositSessionWaitError extends Error {
2354
+ readonly code: DepositSessionWaitErrorCode;
2355
+ /** Failed execution (`DEPOSIT_FAILED`) or fatal {@link DepositSessionError} (`SESSION_ERROR`). */
2356
+ readonly cause?: unknown;
2357
+ constructor(code: DepositSessionWaitErrorCode, message: string, cause?: unknown);
2358
+ }
2359
+ /**
2360
+ * Headless controller for one attempt by one user to fund a destination via
2361
+ * their deposit addresses — regardless of rail (manual transfer, host-broadcast
2362
+ * wallet transaction, exchange push). Owns:
2363
+ *
2364
+ * 1. creating/fetching the deposit addresses,
2365
+ * 2. detection polling (`/direct_executions/query` every 2.5s),
2366
+ * 3. the backend scan nudge (`/direct_executions/poll` every 5s, once armed),
2367
+ * 4. execution tracking (lookback window, new-execution detection,
2368
+ * status-transition detection, poll-error latching) — ported from the
2369
+ * modal's `useDepositPolling`,
2370
+ * 5. a status state machine and a typed event stream.
2371
+ *
2372
+ * UI state should come from {@link getSnapshot} (or the React hook built on
2373
+ * it); events are for side effects (analytics, toasts, navigation).
2374
+ */
2375
+ declare class DepositSession {
2376
+ /** Immutable id for correlation, `dsess_<ksuid>`. Client-generated. */
2377
+ readonly id: string;
2378
+ private readonly emitter;
2379
+ private readonly listeners;
2380
+ private readonly publishableKey;
2381
+ private readonly externalUserId;
2382
+ private readonly destination;
2383
+ private readonly confirmationMode;
2384
+ private readonly method;
2385
+ private runToken;
2386
+ private startPromise;
2387
+ private destroyed;
2388
+ /** Pending waiter rejections, invoked by destroy() so waiters never hang. */
2389
+ private waiterDestroyCallbacks;
2390
+ private baselineMs;
2391
+ private tracked;
2392
+ private pollErrorLatched;
2393
+ private pollInFlight;
2394
+ /** First execution to succeed this run — waitForSuccess's one-shot answer. */
2395
+ private firstSuccess;
2396
+ private detectionTimer;
2397
+ private nudgeTimer;
2398
+ private armTimer;
2399
+ private status;
2400
+ private addresses;
2401
+ private addressIds;
2402
+ private executions;
2403
+ private checkingDeposit;
2404
+ private error;
2405
+ private snapshot;
2406
+ constructor(config: DepositSessionConfig);
2407
+ /** Synchronous snapshot; the reference is stable until state changes. */
2408
+ getSnapshot(): DepositSessionSnapshot;
2409
+ /**
2410
+ * Subscribe to snapshot changes (external-store contract; drives
2411
+ * `useSyncExternalStore` in the React binding). Returns an unsubscribe fn.
2412
+ */
2413
+ subscribe(listener: () => void): () => void;
2414
+ /** Typed event subscription. Returns an unsubscribe function. */
2415
+ on<K extends DepositSessionEventType>(type: K, handler: (event: DepositSessionEventMap[K]) => void): () => void;
2416
+ on(type: '*', handler: (event: DepositSessionEvent) => void): () => void;
2417
+ /**
2418
+ * Creates/fetches addresses (with a fail-fast recipient check) and starts
2419
+ * detection polling. Idempotent while running; callable again after stop()
2420
+ * or a fatal error (fresh baseline).
2421
+ */
2422
+ start(): Promise<void>;
2423
+ /** Arms the backend scan nudge in 'manual' mode. No-op if already armed. */
2424
+ confirmFundsSent(): void;
2425
+ /**
2426
+ * Stops all polling. The session can be restarted with start(), which
2427
+ * resets the baseline and tracked executions (fresh run).
2428
+ */
2429
+ stop(): void;
2430
+ /** stop() + release all listeners. Terminal — start() rejects afterwards. */
2431
+ destroy(): void;
2432
+ /**
2433
+ * Resolve when the session reaches one of the given statuses (immediately
2434
+ * if it's already there). Generic primitive over the lifecycle state
2435
+ * machine — e.g. `waitForStatus('processing')` awaits detection of live
2436
+ * activity, `waitForStatus('ready')` awaits readiness. Statuses
2437
+ * carry no outcomes; await those with {@link waitForSuccess} or the
2438
+ * `direct_execution.*` events.
2439
+ *
2440
+ * Rejects with {@link DepositSessionWaitError} on abort or destroy().
2441
+ * Does not start or stop the session — it only listens.
2442
+ */
2443
+ waitForStatus(status: DepositSessionStatus | DepositSessionStatus[], options?: DepositSessionWaitOptions): Promise<DepositSessionSnapshot>;
2444
+ /**
2445
+ * Resolve with the **first** succeeded {@link DirectExecution} observed by
2446
+ * this session — the one-liner for the 90% case. Mirrors `beginDeposit()`'s
2447
+ * promise contract: resolve on success, reject on failure.
2448
+ *
2449
+ * Multi-execution semantics (unlike quote-scoped models such as Privy's,
2450
+ * one session can observe many executions — a user may send twice, or on
2451
+ * two chains): this waiter is one-shot "first completion" detection. If an
2452
+ * execution has already succeeded this run, it resolves immediately with
2453
+ * the FIRST one that did (not the newest). The session keeps polling after
2454
+ * success — to react to every settlement, subscribe to
2455
+ * `direct_execution.succeeded` events or read `snapshot.executions`.
2456
+ *
2457
+ * Rejects with {@link DepositSessionWaitError}:
2458
+ * - `DEPOSIT_FAILED` (cause: the failed execution) when a deposit fails and
2459
+ * NO other observed execution is still in flight — a failure while
2460
+ * another deposit is pending keeps waiting (that one may still succeed),
2461
+ * - `SESSION_ERROR` (cause: the fatal {@link DepositSessionError}) on fatal
2462
+ * session errors (e.g. address creation failed),
2463
+ * - `ABORTED` / `DESTROYED` per the wait options and session lifecycle.
2464
+ */
2465
+ waitForSuccess(options?: DepositSessionWaitOptions): Promise<DirectExecution>;
2466
+ /**
2467
+ * Shared waiter plumbing: AbortSignal and destroy() rejection, with
2468
+ * single-settlement and cleanup. `subscribe` installs the wait condition
2469
+ * and returns its unsubscribe fn; it settles via `settle(fn)`.
2470
+ */
2471
+ private installWaiter;
2472
+ private run;
2473
+ private failFatally;
2474
+ private createAddressesWithRetry;
2475
+ /**
2476
+ * Fail-fast recipient validation (e.g. Algorand asset opt-in). Fails open
2477
+ * on network errors — the backend still enforces at execution time — but a
2478
+ * definitive negative result is fatal.
2479
+ *
2480
+ * Deliberately NOT IP/geo-aware: generating deposit addresses headless
2481
+ * carries no region gate. Hosts that want the modal's geo behavior render
2482
+ * against the opt-in `useAllowedCountry` hook instead.
2483
+ */
2484
+ private runStartChecks;
2485
+ private startDetectionLoop;
2486
+ private pollExecutions;
2487
+ private pollExecutionsOnce;
2488
+ private processExecutionChange;
2489
+ private armConfirmation;
2490
+ private anyExecutionInFlight;
2491
+ private setStatus;
2492
+ private clearTimers;
2493
+ private buildSnapshot;
2494
+ /** Rebuild the snapshot so getSnapshot() reflects current state. */
2495
+ private commit;
2496
+ private notify;
2497
+ private executionEventTimestamp;
2498
+ private emitSessionEvent;
2499
+ private emitExecutionEvent;
2500
+ }
2501
+
2502
+ interface UnifoldClientOptions {
2503
+ /** Publishable key (`pk_test_*` / `pk_live_*`). */
2504
+ publishableKey: string;
2505
+ }
2506
+ interface DepositAddressParams {
2507
+ externalUserId: string;
2508
+ destination: {
2509
+ chainType: ChainType;
2510
+ chainId: string;
2511
+ tokenAddress: string;
2512
+ recipientAddress: string;
2513
+ contractCalls?: EvmContractCall[];
2514
+ };
2515
+ }
2516
+ interface ListExecutionsParams {
2517
+ externalUserId: string;
2518
+ /** @default ActionType.Deposit */
2519
+ actionType?: ActionType;
2520
+ }
2521
+ interface SupportedDepositTokensParams {
2522
+ destination?: {
2523
+ chainType: string;
2524
+ chainId: string;
2525
+ tokenAddress: string;
2526
+ };
2527
+ productType?: ProductType;
2528
+ }
2529
+ interface VerifyAddressParams {
2530
+ chainType: string;
2531
+ chainId: string;
2532
+ tokenAddress: string;
2533
+ recipientAddress: string;
2534
+ }
2535
+ interface AddressVerification {
2536
+ valid: boolean;
2537
+ failureCode: AddressValidationFailureCode | null;
2538
+ metadata: {
2539
+ chain_name?: string;
2540
+ token_symbol?: string;
2541
+ } | null;
2542
+ }
2543
+ /**
2544
+ * Configured entry object for the headless SDK — mirrors `loadStripe(pk)`.
2545
+ *
2546
+ * All resource methods return camelCase SDK types; snake_case wire shapes
2547
+ * stay internal. Flow controllers (deposit sessions) are created from here so
2548
+ * they inherit the client's publishable key.
2549
+ */
2550
+ declare class UnifoldClient {
2551
+ readonly publishableKey: string;
2552
+ constructor(options: UnifoldClientOptions);
2553
+ /** Create a headless deposit-session flow controller. */
2554
+ createDepositSession(params: DepositSessionParams): DepositSession;
2555
+ /**
2556
+ * Create (idempotently) and return the user's deposit addresses for a
2557
+ * destination — `POST /v1/public/deposit_addresses`.
2558
+ */
2559
+ getDepositAddresses(params: DepositAddressParams): Promise<DepositAddress[]>;
2560
+ /** List the user's executions — `POST /v1/public/direct_executions/query`. */
2561
+ listExecutions(params: ListExecutionsParams): Promise<DirectExecution[]>;
2562
+ /** Source tokens/chains a user can deposit from for a destination. */
2563
+ getSupportedDepositTokens(params?: SupportedDepositTokensParams): Promise<SupportedToken[]>;
2564
+ /** Validate a recipient address for a destination (e.g. Algorand opt-in). */
2565
+ verifyAddress(params: VerifyAddressParams): Promise<AddressVerification>;
2566
+ /** Project-level configuration (feature flags, blocked countries, ...). */
2567
+ getProjectConfig(options?: {
2568
+ countryCode?: string;
2569
+ subdivisionCode?: string;
2570
+ }): Promise<ProjectConfigResponse>;
2571
+ }
2572
+ /** Create a configured {@link UnifoldClient} — mirrors `loadStripe(pk)`. */
2573
+ declare function createUnifoldClient(options: UnifoldClientOptions): UnifoldClient;
2574
+
2058
2575
  /**
2059
2576
  * User IP information interface
2060
2577
  */
@@ -2177,4 +2694,4 @@ declare const i18n: {
2177
2694
  };
2178
2695
  type I18nStrings = typeof i18n;
2179
2696
 
2180
- export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, 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 CheckoutMethod, type CheckoutPaymentIntent, type CheckoutPaymentIntentData, type CheckoutPaymentIntentSucceededEvent, type CoinbaseApplePayLimit, type CoinbaseApplePayLimitUpgradeOption, type CoinbaseApplePayLimitsResponse, type CoinbaseApplePaySessionResponse, type CoinbaseLegalAgreement, type CoinbaseLegalAgreementsResponse, type ConfirmIntegrationTransferResult, type CreateCoinbaseApplePaySessionRequest, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type CreateIntegrationTransferParams, type CreateIntegrationTransferResult, type CreateOnrampVerificationSessionRequest, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositEvent, DepositEventType, type DepositMethod, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type DirectExecution, 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 HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IntegrationAccount, type IntegrationExchangeInfo, type IntegrationExchangesResponse, type IntegrationFeeAmount, type IntegrationHoldingsResponse, IntegrationProvider, type IpAddressResponse, type LockedQuoteLimits, type LockedQuotePreview, type LockedQuotePreviewRequest, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionCreatedData, type OnrampSessionCreatedEvent, type OnrampSessionPaymentMethod, type OnrampSessionRequest, type OnrampSessionResponse, 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 QueryExecutionsRequest, type QueryExecutionsResponse, type RefreshIntegrationTokenResult, type RequestCoinbaseApplePayLimitUpgradeRequest, type RequestCoinbaseApplePayLimitUpgradeResponse, 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 SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedSourceTokensQuery, type SupportedSourceTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type TransferDefaultTokenParams, type TransferDefaultTokenResult, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, type WalletMobileDeepLinkDepositAddress, type WalletMobileDeepLinkResponse, type WalletMobileDeepLinkWallet, type WithdrawDirectExecutionSucceededEvent, type WithdrawEvent, WithdrawEventType, authenticateIntegrationOAuth, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, confirmIntegrationTransfer, createCashAppSession, createCoinbaseApplePaySession, createDepositAddress, createExchangeSession, createIntegrationTransfer, createOnrampSession, createOnrampVerificationSession, exchangeOnrampVerificationToken, formatStablecoinAmount, generateKSUID, generatePrefixedKSUID, getAddressBalance, getAddressBalances, getApiBaseUrl, getApplePayLimitUpgradeStatus, getApplePayProviders, getBankTransferProviders, getCashAppLimits, getCashAppSessionStatus, getChainName, getCoinbaseApplePayLimits, getCoinbaseLegalAgreements, getDefaultOnrampToken, getDepositAddress, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getExternalWallets, getFiatCurrencies, getFiatExchangeRates, getIconUrl, getIconUrlWithCdn, getIntegrationExchanges, getIntegrationHoldings, getIntegrationTransferDefaultToken, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getOnrampVerificationSession, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, getWalletMobileDeepLink, i18n, isApplePayLimitReached, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, refreshIntegrationToken, requestCoinbaseApplePayLimitUpgrade, retrievePaymentIntent, revokeIntegrationToken, sendHypercoreTransaction, sendOnrampVerificationOtp, sendSolanaTransaction, setApiConfig, startIntegrationOAuth, stripeConfirmSession, stripeCreateAuthIntent, stripeCreateSession, stripeExchangeTokens, stripeGetConfig, stripeGetCustomer, stripeGetDefaultToken, stripeGetQuotes, stripeGetSession, stripeGetTransactionLimits, stripeListPaymentTokens, stripeListWallets, stripeRefreshQuote, stripeRefreshToken, useUserIp, verifyOnrampVerificationOtp, verifyRecipientAddress };
2697
+ export { 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 CheckoutMethod, type CheckoutPaymentIntent, type CheckoutPaymentIntentData, type CheckoutPaymentIntentSucceededEvent, type CoinbaseApplePayLimit, type CoinbaseApplePayLimitUpgradeOption, type CoinbaseApplePayLimitsResponse, type CoinbaseApplePaySessionResponse, type CoinbaseLegalAgreement, type CoinbaseLegalAgreementsResponse, type ConfirmIntegrationTransferResult, type CreateCoinbaseApplePaySessionRequest, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, 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 DepositMethod, 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 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 HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IntegrationAccount, type IntegrationExchangeInfo, type IntegrationExchangesResponse, type IntegrationFeeAmount, type IntegrationHoldingsResponse, IntegrationProvider, 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 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 PublicIncidentResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, type RefreshIntegrationTokenResult, type RequestCoinbaseApplePayLimitUpgradeRequest, type RequestCoinbaseApplePayLimitUpgradeResponse, 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 TransferDefaultTokenParams, type TransferDefaultTokenResult, UnifoldClient, type UnifoldClientOptions, type UserIpInfo, type VerifyAddressParams, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, type WalletMobileDeepLinkDepositAddress, type WalletMobileDeepLinkResponse, type WalletMobileDeepLinkWallet, type WithdrawDirectExecutionSucceededEvent, type WithdrawEvent, WithdrawEventType, authenticateIntegrationOAuth, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, confirmIntegrationTransfer, createCashAppSession, createCoinbaseApplePaySession, createDepositAddress, createExchangeSession, createIntegrationTransfer, createOnrampSession, createOnrampVerificationSession, createUnifoldClient, exchangeOnrampVerificationToken, formatStablecoinAmount, generateKSUID, generatePrefixedKSUID, getAddressBalance, getAddressBalances, getApiBaseUrl, getApplePayLimitUpgradeStatus, getApplePayProviders, getBankTransferProviders, getCashAppLimits, getCashAppSessionStatus, getChainName, getCoinbaseApplePayLimits, getCoinbaseLegalAgreements, getDefaultOnrampToken, getDepositAddress, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getExternalWallets, getFiatCurrencies, getFiatExchangeRates, getIconUrl, getIconUrlWithCdn, getIntegrationExchanges, getIntegrationHoldings, getIntegrationTransferDefaultToken, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getOnrampVerificationSession, getPreferredIconUrl, getProjectConfig, getPublicIncident, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, getWalletMobileDeepLink, i18n, isApplePayLimitReached, isDepositAddressValidationError, listPaymentIntentExecutions, mapDirectExecution, mapWalletToDepositAddress, pollDirectExecutions, queryExecutions, refreshIntegrationToken, requestCoinbaseApplePayLimitUpgrade, retrievePaymentIntent, revokeIntegrationToken, sendHypercoreTransaction, sendOnrampVerificationOtp, sendSolanaTransaction, setApiConfig, startIntegrationOAuth, stripeConfirmSession, stripeCreateAuthIntent, stripeCreateSession, stripeExchangeTokens, stripeGetConfig, stripeGetCustomer, stripeGetDefaultToken, stripeGetQuotes, stripeGetSession, stripeGetTransactionLimits, stripeListPaymentTokens, stripeListWallets, stripeRefreshQuote, stripeRefreshToken, useUserIp, verifyOnrampVerificationOtp, verifyRecipientAddress };