@unifold/core 0.1.69 → 0.1.70-beta.1
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 +471 -2
- package/dist/index.d.ts +471 -2
- package/dist/index.js +877 -2
- package/dist/index.mjs +865 -2
- package/package.json +6 -3
package/dist/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -605,6 +617,12 @@ interface ProjectConfigResponse {
|
|
|
605
617
|
enabled: boolean;
|
|
606
618
|
};
|
|
607
619
|
}
|
|
620
|
+
interface PublicIncidentResponse {
|
|
621
|
+
enabled: boolean;
|
|
622
|
+
severity: 'info' | 'degraded' | 'outage';
|
|
623
|
+
messages: string[];
|
|
624
|
+
status_page_url?: string;
|
|
625
|
+
}
|
|
608
626
|
/**
|
|
609
627
|
* Bank-transfer project-level toggle returned by `/projects/config`.
|
|
610
628
|
*
|
|
@@ -633,6 +651,11 @@ interface GetProjectConfigOptions {
|
|
|
633
651
|
subdivisionCode?: string;
|
|
634
652
|
}
|
|
635
653
|
declare function getProjectConfig(publishableKey?: string, options?: GetProjectConfigOptions): Promise<ProjectConfigResponse>;
|
|
654
|
+
/**
|
|
655
|
+
* Get the env-driven public incident payload used for in-product outage messaging.
|
|
656
|
+
* Requires a publishable key for consistency with other public widget endpoints.
|
|
657
|
+
*/
|
|
658
|
+
declare function getPublicIncident(publishableKey?: string): Promise<PublicIncidentResponse>;
|
|
636
659
|
interface IpAddressResponse {
|
|
637
660
|
alpha2: string;
|
|
638
661
|
alpha3: string;
|
|
@@ -761,8 +784,10 @@ interface WalletMobileDeepLinkResponse {
|
|
|
761
784
|
* @param wallet - Wallet id (phantom, metamask, coinbase, trust, rainbow, rabby, okx)
|
|
762
785
|
* @param depositAddresses - Unifold deposit addresses (one per source chain) to embed in the hosted pay URL
|
|
763
786
|
* @param publishableKey - Optional publishable key, defaults to configured key
|
|
787
|
+
* @param amountUsd - Optional USD amount to pre-fill on the hosted pay page so the user
|
|
788
|
+
* doesn't have to re-enter it after the mobile wallet redirect
|
|
764
789
|
*/
|
|
765
|
-
declare function getWalletMobileDeepLink(wallet: WalletMobileDeepLinkWallet, depositAddresses: WalletMobileDeepLinkDepositAddress[], publishableKey?: string): Promise<WalletMobileDeepLinkResponse>;
|
|
790
|
+
declare function getWalletMobileDeepLink(wallet: WalletMobileDeepLinkWallet, depositAddresses: WalletMobileDeepLinkDepositAddress[], publishableKey?: string, amountUsd?: string): Promise<WalletMobileDeepLinkResponse>;
|
|
766
791
|
interface AddressBalanceResponse {
|
|
767
792
|
address: string;
|
|
768
793
|
chain_type: string;
|
|
@@ -799,6 +824,8 @@ interface VerifyAddressResponse {
|
|
|
799
824
|
valid: boolean;
|
|
800
825
|
/** Standardized error code for frontend i18n */
|
|
801
826
|
failure_code?: AddressValidationFailureCode;
|
|
827
|
+
/** Optional human-readable message from backend */
|
|
828
|
+
message?: string;
|
|
802
829
|
/** Metadata for message interpolation */
|
|
803
830
|
metadata?: AddressValidationMetadata;
|
|
804
831
|
}
|
|
@@ -1973,6 +2000,32 @@ interface DirectExecution {
|
|
|
1973
2000
|
destinationTransactionHashes: string[];
|
|
1974
2001
|
status: ExecutionStatus;
|
|
1975
2002
|
failureReason: string | null;
|
|
2003
|
+
/** ISO timestamp the execution was created. */
|
|
2004
|
+
createdAt?: string;
|
|
2005
|
+
/** ISO timestamp the execution was last updated. */
|
|
2006
|
+
updatedAt?: string;
|
|
2007
|
+
/** Block explorer URL for the source transaction. */
|
|
2008
|
+
explorerUrl?: string;
|
|
2009
|
+
/** Block explorer URL for the destination transaction, when available. */
|
|
2010
|
+
destinationExplorerUrl?: string | null;
|
|
2011
|
+
/** Display metadata (icon, decimals) for the source token. */
|
|
2012
|
+
sourceTokenMetadata?: {
|
|
2013
|
+
iconUrl?: string;
|
|
2014
|
+
iconUrls?: {
|
|
2015
|
+
url: string;
|
|
2016
|
+
format: 'svg' | 'png';
|
|
2017
|
+
}[];
|
|
2018
|
+
decimals?: number;
|
|
2019
|
+
};
|
|
2020
|
+
/** Display metadata (icon, decimals) for the destination token. */
|
|
2021
|
+
destinationTokenMetadata?: {
|
|
2022
|
+
iconUrl?: string;
|
|
2023
|
+
iconUrls?: {
|
|
2024
|
+
url: string;
|
|
2025
|
+
format: 'svg' | 'png';
|
|
2026
|
+
}[];
|
|
2027
|
+
decimals?: number;
|
|
2028
|
+
};
|
|
1976
2029
|
}
|
|
1977
2030
|
/** Map from event type to its `data.object` shape */
|
|
1978
2031
|
interface DepositEventDataMap {
|
|
@@ -2055,6 +2108,422 @@ type CheckoutPaymentIntentSucceededEvent = Extract<CheckoutEvent, {
|
|
|
2055
2108
|
type: CheckoutEventType.PAYMENT_INTENT_SUCCEEDED;
|
|
2056
2109
|
}>;
|
|
2057
2110
|
|
|
2111
|
+
/**
|
|
2112
|
+
* Display metadata for a token involved in an execution (camelCase projection
|
|
2113
|
+
* of the wire `*_token_metadata` objects).
|
|
2114
|
+
*/
|
|
2115
|
+
interface TokenDisplayMetadata {
|
|
2116
|
+
iconUrl?: string;
|
|
2117
|
+
iconUrls?: IconUrl[];
|
|
2118
|
+
decimals?: number;
|
|
2119
|
+
}
|
|
2120
|
+
/**
|
|
2121
|
+
* A deposit address the user can fund on a given chain type.
|
|
2122
|
+
*
|
|
2123
|
+
* camelCase SDK projection of the wire {@link Wallet} shape returned by
|
|
2124
|
+
* `POST /v1/public/deposit_addresses`. Named `DepositAddress` (not "wallet")
|
|
2125
|
+
* because "wallet" is overloaded across the SDK (browser wallets, exchange
|
|
2126
|
+
* wallets); this resource is the address an integrator shows the user.
|
|
2127
|
+
*/
|
|
2128
|
+
interface DepositAddress {
|
|
2129
|
+
id: string;
|
|
2130
|
+
chainType: ChainType;
|
|
2131
|
+
addressType: string | null;
|
|
2132
|
+
address: string;
|
|
2133
|
+
destinationChainType: ChainType;
|
|
2134
|
+
destinationChainId: string;
|
|
2135
|
+
destinationTokenAddress: string;
|
|
2136
|
+
recipientAddress: string;
|
|
2137
|
+
isPrimary: boolean;
|
|
2138
|
+
}
|
|
2139
|
+
/** Map a wire {@link Wallet} to the SDK-facing {@link DepositAddress}. */
|
|
2140
|
+
declare function mapWalletToDepositAddress(wallet: Wallet): DepositAddress;
|
|
2141
|
+
/**
|
|
2142
|
+
* Map a wire {@link DirectExecutionResponse} to the SDK-facing
|
|
2143
|
+
* {@link DirectExecution} used in events and callbacks.
|
|
2144
|
+
*
|
|
2145
|
+
* Superset of the mapping historically done inside the deposit polling hook:
|
|
2146
|
+
* additionally carries timestamps, explorer URLs, and token display metadata,
|
|
2147
|
+
* which custom (headless) UIs need to render an execution timeline.
|
|
2148
|
+
*/
|
|
2149
|
+
declare function mapDirectExecution(execution: DirectExecutionResponse): DirectExecution;
|
|
2150
|
+
|
|
2151
|
+
/** How often `/direct_executions/query` is polled (modal: POLL_INTERVAL_MS). */
|
|
2152
|
+
declare const DETECTION_POLL_INTERVAL_MS = 2500;
|
|
2153
|
+
/** How often `/direct_executions/poll` is nudged once armed (modal: POLL_ENDPOINT_INTERVAL_MS). */
|
|
2154
|
+
declare const SCAN_NUDGE_INTERVAL_MS = 5000;
|
|
2155
|
+
/** Delay before the scan nudge auto-arms in 'auto' mode (modal: DEPOSIT_CONFIRM_DELAY_MS). */
|
|
2156
|
+
declare const DETECTION_ARM_DELAY_MS = 5000;
|
|
2157
|
+
/**
|
|
2158
|
+
* Lookback window for catching deposits sent just before start() — fixed, not
|
|
2159
|
+
* host-configurable (modal: CUTOFF_BUFFER_MS). In-flight (non-terminal)
|
|
2160
|
+
* executions created up to this long before the session baseline are detected
|
|
2161
|
+
* and their settlement fires live; executions created before the baseline that
|
|
2162
|
+
* are ALREADY terminal at first sight are ignored as history (prevents
|
|
2163
|
+
* duplicate success side effects on quick re-entry); anything older is
|
|
2164
|
+
* ignored entirely.
|
|
2165
|
+
*/
|
|
2166
|
+
declare const LOOKBACK_MS = 60000;
|
|
2167
|
+
/**
|
|
2168
|
+
* Events emitted by {@link DepositSession}, following the `resource.action`
|
|
2169
|
+
* convention. `direct_execution.succeeded` intentionally matches the existing
|
|
2170
|
+
* {@link DepositEventType.DIRECT_EXECUTION_SUCCEEDED} name so one host-side
|
|
2171
|
+
* handler can serve modal `onEvent` events and headless session events.
|
|
2172
|
+
*/
|
|
2173
|
+
declare enum DepositSessionEventType {
|
|
2174
|
+
SESSION_STARTED = "deposit_session.started",
|
|
2175
|
+
ADDRESSES_CREATED = "deposit_session.addresses_created",
|
|
2176
|
+
/** The backend scan nudge (/poll) was armed — auto timer or confirmFundsSent(). */
|
|
2177
|
+
CONFIRMATION_STARTED = "deposit_session.confirmation_started",
|
|
2178
|
+
SESSION_STOPPED = "deposit_session.stopped",
|
|
2179
|
+
/** Non-fatal (transient polling outage) and fatal errors; `data.object.fatal` distinguishes. */
|
|
2180
|
+
SESSION_ERRORED = "deposit_session.errored",
|
|
2181
|
+
/** First time an execution is seen this session. */
|
|
2182
|
+
EXECUTION_DETECTED = "direct_execution.detected",
|
|
2183
|
+
/** Any status transition on a tracked execution. */
|
|
2184
|
+
EXECUTION_UPDATED = "direct_execution.updated",
|
|
2185
|
+
/** Kept byte-compatible with the modal's DepositEventType member. */
|
|
2186
|
+
EXECUTION_SUCCEEDED = "direct_execution.succeeded",
|
|
2187
|
+
EXECUTION_FAILED = "direct_execution.failed"
|
|
2188
|
+
}
|
|
2189
|
+
type DepositSessionErrorCode = 'ADDRESS_CREATION_FAILED' | 'POLLING_ERROR' | 'DEPOSIT_FAILED' | 'INVALID_RECIPIENT';
|
|
2190
|
+
interface DepositSessionError {
|
|
2191
|
+
code: DepositSessionErrorCode;
|
|
2192
|
+
message: string;
|
|
2193
|
+
/** Fatal errors end the run (status 'error'); non-fatal ones don't stop polling. */
|
|
2194
|
+
fatal: boolean;
|
|
2195
|
+
cause?: unknown;
|
|
2196
|
+
}
|
|
2197
|
+
interface DepositSessionEventDataMap {
|
|
2198
|
+
[DepositSessionEventType.SESSION_STARTED]: {
|
|
2199
|
+
sessionId: string;
|
|
2200
|
+
};
|
|
2201
|
+
[DepositSessionEventType.ADDRESSES_CREATED]: {
|
|
2202
|
+
sessionId: string;
|
|
2203
|
+
addresses: DepositAddress[];
|
|
2204
|
+
};
|
|
2205
|
+
[DepositSessionEventType.CONFIRMATION_STARTED]: {
|
|
2206
|
+
sessionId: string;
|
|
2207
|
+
trigger: 'auto' | 'manual';
|
|
2208
|
+
};
|
|
2209
|
+
[DepositSessionEventType.SESSION_STOPPED]: {
|
|
2210
|
+
sessionId: string;
|
|
2211
|
+
};
|
|
2212
|
+
[DepositSessionEventType.SESSION_ERRORED]: {
|
|
2213
|
+
sessionId: string;
|
|
2214
|
+
code: DepositSessionErrorCode;
|
|
2215
|
+
message: string;
|
|
2216
|
+
fatal: boolean;
|
|
2217
|
+
};
|
|
2218
|
+
[DepositSessionEventType.EXECUTION_DETECTED]: DirectExecution;
|
|
2219
|
+
[DepositSessionEventType.EXECUTION_UPDATED]: DirectExecution & {
|
|
2220
|
+
previousStatus: ExecutionStatus | null;
|
|
2221
|
+
};
|
|
2222
|
+
[DepositSessionEventType.EXECUTION_SUCCEEDED]: DirectExecution;
|
|
2223
|
+
[DepositSessionEventType.EXECUTION_FAILED]: DirectExecution;
|
|
2224
|
+
}
|
|
2225
|
+
/**
|
|
2226
|
+
* Event envelope emitted by the deposit session. Mirrors the server-side
|
|
2227
|
+
* webhook payload shape (top-level `id`, `type`, `created`, resource under
|
|
2228
|
+
* `data.object`), with `sevt_` IDs to distinguish from backend `evt_` IDs.
|
|
2229
|
+
*/
|
|
2230
|
+
type DepositSessionEvent = {
|
|
2231
|
+
[K in DepositSessionEventType]: {
|
|
2232
|
+
id: string;
|
|
2233
|
+
type: K;
|
|
2234
|
+
created: number;
|
|
2235
|
+
/**
|
|
2236
|
+
* Host-provided rail hint ({@link DepositSessionParams.method}, default
|
|
2237
|
+
* 'transfer'). The session can't observe how funds were sent — a host
|
|
2238
|
+
* driving its own wallet integration sets 'wallet_connect'.
|
|
2239
|
+
*/
|
|
2240
|
+
method?: DepositMethod;
|
|
2241
|
+
data: {
|
|
2242
|
+
object: DepositSessionEventDataMap[K];
|
|
2243
|
+
};
|
|
2244
|
+
};
|
|
2245
|
+
}[DepositSessionEventType];
|
|
2246
|
+
/** Map from event type to its fully-narrowed envelope. */
|
|
2247
|
+
type DepositSessionEventMap = {
|
|
2248
|
+
[K in DepositSessionEventType]: Extract<DepositSessionEvent, {
|
|
2249
|
+
type: K;
|
|
2250
|
+
}>;
|
|
2251
|
+
};
|
|
2252
|
+
interface DepositSessionDestination {
|
|
2253
|
+
chainType: ChainType;
|
|
2254
|
+
chainId: string;
|
|
2255
|
+
tokenAddress: string;
|
|
2256
|
+
/** Address that receives the deposited funds. */
|
|
2257
|
+
recipientAddress: string;
|
|
2258
|
+
/** EVM-only post-delivery calls; same constraints as DepositConfig.contractCalls. */
|
|
2259
|
+
contractCalls?: EvmContractCall[];
|
|
2260
|
+
}
|
|
2261
|
+
interface DepositSessionParams {
|
|
2262
|
+
/** Host platform's stable user identifier (maps to external_user_id). */
|
|
2263
|
+
externalUserId: string;
|
|
2264
|
+
/** Destination — what the deposit converts into and where it lands. */
|
|
2265
|
+
destination: DepositSessionDestination;
|
|
2266
|
+
/**
|
|
2267
|
+
* When the backend scan nudge (/poll) is armed:
|
|
2268
|
+
* - 'auto' (default): armed automatically DETECTION_ARM_DELAY_MS after start.
|
|
2269
|
+
* - 'manual': armed only when the host calls session.confirmFundsSent().
|
|
2270
|
+
* Detection polling of /query runs from start() in both modes.
|
|
2271
|
+
*/
|
|
2272
|
+
confirmationMode?: 'auto' | 'manual';
|
|
2273
|
+
/** Rail hint stamped onto emitted events' `method` field. @default 'transfer' */
|
|
2274
|
+
method?: DepositMethod;
|
|
2275
|
+
}
|
|
2276
|
+
/** Internal construction config — created via `UnifoldClient.createDepositSession`. */
|
|
2277
|
+
interface DepositSessionConfig extends DepositSessionParams {
|
|
2278
|
+
publishableKey: string;
|
|
2279
|
+
}
|
|
2280
|
+
type DepositSessionStatus = 'idle' | 'creating_addresses' | 'awaiting_funds' | 'processing' | 'succeeded' | 'failed' | 'error';
|
|
2281
|
+
interface DepositSessionSnapshot {
|
|
2282
|
+
status: DepositSessionStatus;
|
|
2283
|
+
/** Deposit addresses (one per chain type); empty until created. */
|
|
2284
|
+
addresses: DepositAddress[];
|
|
2285
|
+
/** All executions observed this session, newest first. */
|
|
2286
|
+
executions: DirectExecution[];
|
|
2287
|
+
latestExecution: DirectExecution | null;
|
|
2288
|
+
/**
|
|
2289
|
+
* True while the backend is actively checking for the deposit — i.e. the
|
|
2290
|
+
* scan nudge (/poll) is armed (auto timer elapsed or confirmFundsSent()).
|
|
2291
|
+
*/
|
|
2292
|
+
isCheckingDeposit: boolean;
|
|
2293
|
+
/** Latest non-fatal (e.g. transient polling outage) or fatal error, if any. */
|
|
2294
|
+
error: DepositSessionError | null;
|
|
2295
|
+
}
|
|
2296
|
+
interface DepositSessionWaitOptions {
|
|
2297
|
+
/**
|
|
2298
|
+
* Abort the wait (reject with code 'ABORTED'; the signal's abort `reason`
|
|
2299
|
+
* is passed through as the error's `cause`). Cancels only the wait — the
|
|
2300
|
+
* session keeps polling, because a deposit is not cancelable: once the user
|
|
2301
|
+
* has sent funds they will arrive regardless of who is still awaiting.
|
|
2302
|
+
*
|
|
2303
|
+
* For a deadline, compose the platform primitive:
|
|
2304
|
+
* `waitForSuccess({ signal: AbortSignal.timeout(60_000) })`.
|
|
2305
|
+
* There is deliberately no `timeoutMs` option — a timeout is "outcome
|
|
2306
|
+
* unknown", not "outcome bad", and modeling it as a distinct failure code
|
|
2307
|
+
* tempts hosts into rendering a deposit as failed right before it lands.
|
|
2308
|
+
*/
|
|
2309
|
+
signal?: AbortSignal;
|
|
2310
|
+
}
|
|
2311
|
+
type DepositSessionWaitErrorCode = 'ABORTED' | 'DESTROYED' | 'DEPOSIT_FAILED' | 'SESSION_ERROR';
|
|
2312
|
+
/** Rejection type for {@link DepositSession.waitForStatus} / {@link DepositSession.waitForSuccess}. */
|
|
2313
|
+
declare class DepositSessionWaitError extends Error {
|
|
2314
|
+
readonly code: DepositSessionWaitErrorCode;
|
|
2315
|
+
/** Failed execution (`DEPOSIT_FAILED`) or fatal {@link DepositSessionError} (`SESSION_ERROR`). */
|
|
2316
|
+
readonly cause?: unknown;
|
|
2317
|
+
constructor(code: DepositSessionWaitErrorCode, message: string, cause?: unknown);
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* Headless controller for one attempt by one user to fund a destination via
|
|
2321
|
+
* their deposit addresses — regardless of rail (manual transfer, host-broadcast
|
|
2322
|
+
* wallet transaction, exchange push). Owns:
|
|
2323
|
+
*
|
|
2324
|
+
* 1. creating/fetching the deposit addresses,
|
|
2325
|
+
* 2. detection polling (`/direct_executions/query` every 2.5s),
|
|
2326
|
+
* 3. the backend scan nudge (`/direct_executions/poll` every 5s, once armed),
|
|
2327
|
+
* 4. execution tracking (lookback window, new-execution detection,
|
|
2328
|
+
* status-transition detection, poll-error latching) — ported from the
|
|
2329
|
+
* modal's `useDepositPolling`,
|
|
2330
|
+
* 5. a status state machine and a typed event stream.
|
|
2331
|
+
*
|
|
2332
|
+
* UI state should come from {@link getSnapshot} (or the React hook built on
|
|
2333
|
+
* it); events are for side effects (analytics, toasts, navigation).
|
|
2334
|
+
*/
|
|
2335
|
+
declare class DepositSession {
|
|
2336
|
+
/** Immutable id for correlation, `dsess_<ksuid>`. Client-generated. */
|
|
2337
|
+
readonly id: string;
|
|
2338
|
+
private readonly emitter;
|
|
2339
|
+
private readonly listeners;
|
|
2340
|
+
private readonly publishableKey;
|
|
2341
|
+
private readonly externalUserId;
|
|
2342
|
+
private readonly destination;
|
|
2343
|
+
private readonly confirmationMode;
|
|
2344
|
+
private readonly method;
|
|
2345
|
+
private runToken;
|
|
2346
|
+
private startPromise;
|
|
2347
|
+
private destroyed;
|
|
2348
|
+
/** Pending waiter rejections, invoked by destroy() so waiters never hang. */
|
|
2349
|
+
private waiterDestroyCallbacks;
|
|
2350
|
+
private baselineMs;
|
|
2351
|
+
private tracked;
|
|
2352
|
+
private pollErrorLatched;
|
|
2353
|
+
private detectionTimer;
|
|
2354
|
+
private nudgeTimer;
|
|
2355
|
+
private armTimer;
|
|
2356
|
+
private status;
|
|
2357
|
+
private addresses;
|
|
2358
|
+
private addressIds;
|
|
2359
|
+
private executions;
|
|
2360
|
+
private checkingDeposit;
|
|
2361
|
+
private error;
|
|
2362
|
+
private snapshot;
|
|
2363
|
+
constructor(config: DepositSessionConfig);
|
|
2364
|
+
/** Synchronous snapshot; the reference is stable until state changes. */
|
|
2365
|
+
getSnapshot(): DepositSessionSnapshot;
|
|
2366
|
+
/**
|
|
2367
|
+
* Subscribe to snapshot changes (external-store contract; drives
|
|
2368
|
+
* `useSyncExternalStore` in the React binding). Returns an unsubscribe fn.
|
|
2369
|
+
*/
|
|
2370
|
+
subscribe(listener: () => void): () => void;
|
|
2371
|
+
/** Typed event subscription. Returns an unsubscribe function. */
|
|
2372
|
+
on<K extends DepositSessionEventType>(type: K, handler: (event: DepositSessionEventMap[K]) => void): () => void;
|
|
2373
|
+
on(type: '*', handler: (event: DepositSessionEvent) => void): () => void;
|
|
2374
|
+
/**
|
|
2375
|
+
* Creates/fetches addresses (with a fail-fast recipient check) and starts
|
|
2376
|
+
* detection polling. Idempotent while running; callable again after stop()
|
|
2377
|
+
* or a fatal error (fresh baseline).
|
|
2378
|
+
*/
|
|
2379
|
+
start(): Promise<void>;
|
|
2380
|
+
/** Arms the backend scan nudge in 'manual' mode. No-op if already armed. */
|
|
2381
|
+
confirmFundsSent(): void;
|
|
2382
|
+
/**
|
|
2383
|
+
* Stops all polling. The session can be restarted with start(), which
|
|
2384
|
+
* resets the baseline and tracked executions (fresh run).
|
|
2385
|
+
*/
|
|
2386
|
+
stop(): void;
|
|
2387
|
+
/** stop() + release all listeners. Terminal — start() rejects afterwards. */
|
|
2388
|
+
destroy(): void;
|
|
2389
|
+
/**
|
|
2390
|
+
* Resolve when the session reaches one of the given statuses (immediately
|
|
2391
|
+
* if it's already there). Generic primitive over the status state machine:
|
|
2392
|
+
* `waitForStatus('processing')` awaits detection; `waitForStatus(['succeeded',
|
|
2393
|
+
* 'failed'])` awaits a terminal outcome.
|
|
2394
|
+
*
|
|
2395
|
+
* Rejects with {@link DepositSessionWaitError} on abort or destroy().
|
|
2396
|
+
* Does not start or stop the session — it only listens.
|
|
2397
|
+
*/
|
|
2398
|
+
waitForStatus(status: DepositSessionStatus | DepositSessionStatus[], options?: DepositSessionWaitOptions): Promise<DepositSessionSnapshot>;
|
|
2399
|
+
/**
|
|
2400
|
+
* Resolve with the **first** succeeded {@link DirectExecution} observed by
|
|
2401
|
+
* this session — the one-liner for the 90% case. Mirrors `beginDeposit()`'s
|
|
2402
|
+
* promise contract: resolve on success, reject on failure.
|
|
2403
|
+
*
|
|
2404
|
+
* Multi-execution semantics (unlike quote-scoped models such as Privy's,
|
|
2405
|
+
* one session can observe many executions — a user may send twice, or on
|
|
2406
|
+
* two chains): this waiter is one-shot "first completion" detection. If an
|
|
2407
|
+
* execution has already succeeded, it resolves immediately with that
|
|
2408
|
+
* execution. The session keeps polling after success — to react to every
|
|
2409
|
+
* settlement, subscribe to `direct_execution.succeeded` events or read
|
|
2410
|
+
* `snapshot.executions` instead.
|
|
2411
|
+
*
|
|
2412
|
+
* Rejects with {@link DepositSessionWaitError}:
|
|
2413
|
+
* - `DEPOSIT_FAILED` (cause: the failed execution) when a deposit fails
|
|
2414
|
+
* before any succeeds,
|
|
2415
|
+
* - `SESSION_ERROR` (cause: the fatal {@link DepositSessionError}) on fatal
|
|
2416
|
+
* session errors (e.g. address creation failed),
|
|
2417
|
+
* - `ABORTED` / `DESTROYED` per the wait options and session lifecycle.
|
|
2418
|
+
*/
|
|
2419
|
+
waitForSuccess(options?: DepositSessionWaitOptions): Promise<DirectExecution>;
|
|
2420
|
+
/**
|
|
2421
|
+
* Shared waiter plumbing: AbortSignal and destroy() rejection, with
|
|
2422
|
+
* single-settlement and cleanup. `subscribe` installs the wait condition
|
|
2423
|
+
* and returns its unsubscribe fn; it settles via `settle(fn)`.
|
|
2424
|
+
*/
|
|
2425
|
+
private installWaiter;
|
|
2426
|
+
private run;
|
|
2427
|
+
private failFatally;
|
|
2428
|
+
private createAddressesWithRetry;
|
|
2429
|
+
/**
|
|
2430
|
+
* Fail-fast recipient validation (e.g. Algorand asset opt-in). Fails open
|
|
2431
|
+
* on network errors — the backend still enforces at execution time — but a
|
|
2432
|
+
* definitive negative result is fatal.
|
|
2433
|
+
*
|
|
2434
|
+
* Deliberately NOT IP/geo-aware: generating deposit addresses headless
|
|
2435
|
+
* carries no region gate. Hosts that want the modal's geo behavior render
|
|
2436
|
+
* against the opt-in `useAllowedCountry` hook instead.
|
|
2437
|
+
*/
|
|
2438
|
+
private runStartChecks;
|
|
2439
|
+
private startDetectionLoop;
|
|
2440
|
+
private pollExecutions;
|
|
2441
|
+
private processExecutionChange;
|
|
2442
|
+
private armConfirmation;
|
|
2443
|
+
private setStatus;
|
|
2444
|
+
private clearTimers;
|
|
2445
|
+
private buildSnapshot;
|
|
2446
|
+
/** Rebuild the snapshot so getSnapshot() reflects current state. */
|
|
2447
|
+
private commit;
|
|
2448
|
+
private notify;
|
|
2449
|
+
private executionEventTimestamp;
|
|
2450
|
+
private emitSessionEvent;
|
|
2451
|
+
private emitExecutionEvent;
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
interface UnifoldClientOptions {
|
|
2455
|
+
/** Publishable key (`pk_test_*` / `pk_live_*`). */
|
|
2456
|
+
publishableKey: string;
|
|
2457
|
+
}
|
|
2458
|
+
interface DepositAddressParams {
|
|
2459
|
+
externalUserId: string;
|
|
2460
|
+
destination: {
|
|
2461
|
+
chainType: ChainType;
|
|
2462
|
+
chainId: string;
|
|
2463
|
+
tokenAddress: string;
|
|
2464
|
+
recipientAddress: string;
|
|
2465
|
+
contractCalls?: EvmContractCall[];
|
|
2466
|
+
};
|
|
2467
|
+
}
|
|
2468
|
+
interface ListExecutionsParams {
|
|
2469
|
+
externalUserId: string;
|
|
2470
|
+
/** @default ActionType.Deposit */
|
|
2471
|
+
actionType?: ActionType;
|
|
2472
|
+
}
|
|
2473
|
+
interface SupportedDepositTokensParams {
|
|
2474
|
+
destination?: {
|
|
2475
|
+
chainType: string;
|
|
2476
|
+
chainId: string;
|
|
2477
|
+
tokenAddress: string;
|
|
2478
|
+
};
|
|
2479
|
+
productType?: ProductType;
|
|
2480
|
+
}
|
|
2481
|
+
interface VerifyAddressParams {
|
|
2482
|
+
chainType: string;
|
|
2483
|
+
chainId: string;
|
|
2484
|
+
tokenAddress: string;
|
|
2485
|
+
recipientAddress: string;
|
|
2486
|
+
}
|
|
2487
|
+
interface AddressVerification {
|
|
2488
|
+
valid: boolean;
|
|
2489
|
+
failureCode: AddressValidationFailureCode | null;
|
|
2490
|
+
metadata: {
|
|
2491
|
+
chain_name?: string;
|
|
2492
|
+
token_symbol?: string;
|
|
2493
|
+
} | null;
|
|
2494
|
+
}
|
|
2495
|
+
/**
|
|
2496
|
+
* Configured entry object for the headless SDK — mirrors `loadStripe(pk)`.
|
|
2497
|
+
*
|
|
2498
|
+
* All resource methods return camelCase SDK types; snake_case wire shapes
|
|
2499
|
+
* stay internal. Flow controllers (deposit sessions) are created from here so
|
|
2500
|
+
* they inherit the client's publishable key.
|
|
2501
|
+
*/
|
|
2502
|
+
declare class UnifoldClient {
|
|
2503
|
+
readonly publishableKey: string;
|
|
2504
|
+
constructor(options: UnifoldClientOptions);
|
|
2505
|
+
/** Create a headless deposit-session flow controller. */
|
|
2506
|
+
createDepositSession(params: DepositSessionParams): DepositSession;
|
|
2507
|
+
/**
|
|
2508
|
+
* Create (idempotently) and return the user's deposit addresses for a
|
|
2509
|
+
* destination — `POST /v1/public/deposit_addresses`.
|
|
2510
|
+
*/
|
|
2511
|
+
getDepositAddresses(params: DepositAddressParams): Promise<DepositAddress[]>;
|
|
2512
|
+
/** List the user's executions — `POST /v1/public/direct_executions/query`. */
|
|
2513
|
+
listExecutions(params: ListExecutionsParams): Promise<DirectExecution[]>;
|
|
2514
|
+
/** Source tokens/chains a user can deposit from for a destination. */
|
|
2515
|
+
getSupportedDepositTokens(params?: SupportedDepositTokensParams): Promise<SupportedToken[]>;
|
|
2516
|
+
/** Validate a recipient address for a destination (e.g. Algorand opt-in). */
|
|
2517
|
+
verifyAddress(params: VerifyAddressParams): Promise<AddressVerification>;
|
|
2518
|
+
/** Project-level configuration (feature flags, blocked countries, ...). */
|
|
2519
|
+
getProjectConfig(options?: {
|
|
2520
|
+
countryCode?: string;
|
|
2521
|
+
subdivisionCode?: string;
|
|
2522
|
+
}): Promise<ProjectConfigResponse>;
|
|
2523
|
+
}
|
|
2524
|
+
/** Create a configured {@link UnifoldClient} — mirrors `loadStripe(pk)`. */
|
|
2525
|
+
declare function createUnifoldClient(options: UnifoldClientOptions): UnifoldClient;
|
|
2526
|
+
|
|
2058
2527
|
/**
|
|
2059
2528
|
* User IP information interface
|
|
2060
2529
|
*/
|
|
@@ -2177,4 +2646,4 @@ declare const i18n: {
|
|
|
2177
2646
|
};
|
|
2178
2647
|
type I18nStrings = typeof i18n;
|
|
2179
2648
|
|
|
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 };
|
|
2649
|
+
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 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 };
|