@unifold/ui-react 0.1.79 → 0.1.80
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 +217 -30
- package/dist/index.d.ts +217 -30
- package/dist/index.js +4148 -399
- package/dist/index.mjs +3925 -177
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { DirectExecutionSucceededEvent, DirectExecutionFailedEvent, DirectExecutionResponse, ChainType, EvmContractCall, DepositMethod, DepositEvent, Wallet, ProductType, WalletPayMethod, CoinbaseWalletPaySessionResponse, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, DefaultTokenResponse, ConfirmIntegrationTransferResult, CheckoutMethod, CheckoutPaymentIntent, CheckoutEvent, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, PublicIncidentResponse, WithdrawDirectExecutionFailedEvent, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
2
|
+
import { DirectExecutionSucceededEvent, DirectExecutionFailedEvent, DirectExecutionResponse, ChainType, EvmContractCall, DepositMethod, DepositEvent, Wallet, ProductType, WalletPayMethod, CoinbaseWalletPaySessionResponse, FiatCurrency, ExecutionStatus, FeaturedToken, PaymentNetwork, DefaultTokenResponse, ConfirmIntegrationTransferResult, CheckoutMethod, CheckoutPaymentIntent, CheckoutEvent, WithdrawDirectExecutionSucceededEvent, WithdrawEvent, DestinationToken, DestinationTokenChain, PaymentIntent, DepositQuote, PublicIncidentResponse, WithdrawDirectExecutionFailedEvent, ActionType, SupportedDestinationTokensResponse, SupportedDepositTokensResponse, VerifyAddressResponse } from '@unifold/core';
|
|
3
3
|
export { ChainType, DepositMethod } from '@unifold/core';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import { MutableRefObject } from 'react';
|
|
@@ -289,7 +289,7 @@ interface DepositModalProps {
|
|
|
289
289
|
applePayTitle?: string;
|
|
290
290
|
/**
|
|
291
291
|
* Subtitle shown for the Apple Pay row in the main menu.
|
|
292
|
-
* @default `"Instant"` (localized from `depositModal.applePayMenu.subtitle`)
|
|
292
|
+
* @default `"Instant • Debit card only"` (localized from `depositModal.applePayMenu.subtitle`)
|
|
293
293
|
*/
|
|
294
294
|
applePaySubTitle?: string;
|
|
295
295
|
/**
|
|
@@ -306,7 +306,7 @@ interface DepositModalProps {
|
|
|
306
306
|
googlePayTitle?: string;
|
|
307
307
|
/**
|
|
308
308
|
* Subtitle shown for the Google Pay row in the main menu.
|
|
309
|
-
* @default `"Instant"` (localized from `depositModal.googlePayMenu.subtitle`)
|
|
309
|
+
* @default `"Instant • Debit card only"` (localized from `depositModal.googlePayMenu.subtitle`)
|
|
310
310
|
*/
|
|
311
311
|
googlePaySubTitle?: string;
|
|
312
312
|
/**
|
|
@@ -1119,7 +1119,15 @@ interface WithdrawTransactionInfo {
|
|
|
1119
1119
|
amount: string;
|
|
1120
1120
|
/** Token amount in base units (smallest denomination). */
|
|
1121
1121
|
amountBaseUnit: string;
|
|
1122
|
-
/**
|
|
1122
|
+
/**
|
|
1123
|
+
* The Unifold deposit wallet address to send funds to.
|
|
1124
|
+
*
|
|
1125
|
+
* Normally on `sourceChainType`. Withdrawing off a chain Unifold can't monitor
|
|
1126
|
+
* (N1) instead gives an address on the chain the funds have to be bridged to
|
|
1127
|
+
* first — for N1 that's Solana, which shares N1's address format, so the two
|
|
1128
|
+
* are indistinguishable by inspection. Send there and Unifold routes the funds
|
|
1129
|
+
* on to `recipientAddress`.
|
|
1130
|
+
*/
|
|
1123
1131
|
withdrawIntentAddress: string;
|
|
1124
1132
|
/** The user-provided final destination address */
|
|
1125
1133
|
recipientAddress: string;
|
|
@@ -1145,6 +1153,24 @@ interface WithdrawModalProps {
|
|
|
1145
1153
|
sourceTokenSymbol?: string;
|
|
1146
1154
|
recipientAddress?: string;
|
|
1147
1155
|
senderAddress: string;
|
|
1156
|
+
/**
|
|
1157
|
+
* Sender token balance in smallest units (e.g. `"1500000"` for 1.5 USDC).
|
|
1158
|
+
* When provided, skips `/addresses/balance` and is the source of truth for
|
|
1159
|
+
* max withdraw, over-balance checks, and amount conversion.
|
|
1160
|
+
*/
|
|
1161
|
+
balanceInBaseUnit?: string;
|
|
1162
|
+
/**
|
|
1163
|
+
* USD value of {@link WithdrawModalProps.balanceInBaseUnit}. When provided,
|
|
1164
|
+
* used for fiat display, max, and crypto↔USD conversion. When omitted, the
|
|
1165
|
+
* modal prices the token (stablecoins assume $1) to compute USD.
|
|
1166
|
+
*/
|
|
1167
|
+
balanceUsd?: string | number;
|
|
1168
|
+
/**
|
|
1169
|
+
* Source token decimals (e.g. `6` for USDC). Used with `balanceInBaseUnit`
|
|
1170
|
+
* to format the human amount without waiting on the token catalog. Falls
|
|
1171
|
+
* back to catalog decimals when omitted.
|
|
1172
|
+
*/
|
|
1173
|
+
sourceTokenDecimals?: number;
|
|
1148
1174
|
/**
|
|
1149
1175
|
* Pre-select the destination (receive) token/chain in the withdraw view.
|
|
1150
1176
|
* All four props are optional. To match a specific token, provide `chainType` + `chainId` + (`symbol` OR `tokenAddress`).
|
|
@@ -1173,7 +1199,7 @@ interface WithdrawModalProps {
|
|
|
1173
1199
|
theme?: 'light' | 'dark' | 'auto';
|
|
1174
1200
|
hideOverlay?: boolean;
|
|
1175
1201
|
}
|
|
1176
|
-
declare function WithdrawModal({ open, onOpenChange, publishableKey, modalTitle, externalUserId, sourceChainType, sourceChainId, sourceTokenAddress, sourceTokenSymbol, recipientAddress: recipientAddressProp, senderAddress, defaultDestinationChainType, defaultDestinationChainId, defaultDestinationTokenAddress, defaultDestinationSymbol, onWithdraw, onWithdrawSuccess, onWithdrawError, onEvent, theme, hideOverlay, }: WithdrawModalProps): react_jsx_runtime.JSX.Element;
|
|
1202
|
+
declare function WithdrawModal({ open, onOpenChange, publishableKey, modalTitle, externalUserId, sourceChainType, sourceChainId, sourceTokenAddress, sourceTokenSymbol, recipientAddress: recipientAddressProp, senderAddress, balanceInBaseUnit, balanceUsd, sourceTokenDecimals, defaultDestinationChainType, defaultDestinationChainId, defaultDestinationTokenAddress, defaultDestinationSymbol, onWithdraw, onWithdrawSuccess, onWithdrawError, onEvent, theme, hideOverlay, }: WithdrawModalProps): react_jsx_runtime.JSX.Element;
|
|
1177
1203
|
|
|
1178
1204
|
interface WithdrawTokenSelectorProps {
|
|
1179
1205
|
tokens: DestinationToken[];
|
|
@@ -1192,7 +1218,11 @@ interface WithdrawDoubleInputProps {
|
|
|
1192
1218
|
}
|
|
1193
1219
|
declare function WithdrawDoubleInput({ tokens, selectedTokenSymbol, selectedChainKey, onTokenChange, onChainChange, isLoading, }: WithdrawDoubleInputProps): react_jsx_runtime.JSX.Element;
|
|
1194
1220
|
|
|
1195
|
-
|
|
1221
|
+
/**
|
|
1222
|
+
* Token amount helpers: base-unit ↔ human formatting, host-supplied
|
|
1223
|
+
* balance/decimals parsing, and proportional base-unit scaling.
|
|
1224
|
+
*/
|
|
1225
|
+
interface TokenBalance {
|
|
1196
1226
|
balanceBaseUnit: string;
|
|
1197
1227
|
balanceHuman: string;
|
|
1198
1228
|
balanceUsd: string | null;
|
|
@@ -1200,6 +1230,8 @@ interface AddressBalanceResult {
|
|
|
1200
1230
|
decimals: number;
|
|
1201
1231
|
symbol: string;
|
|
1202
1232
|
}
|
|
1233
|
+
|
|
1234
|
+
type AddressBalanceResult = TokenBalance;
|
|
1203
1235
|
/**
|
|
1204
1236
|
* Hook to fetch a token balance for a given address.
|
|
1205
1237
|
* Uses React Query for caching and deduplication.
|
|
@@ -1211,7 +1243,7 @@ declare function useAddressBalance(params: {
|
|
|
1211
1243
|
tokenAddress?: string;
|
|
1212
1244
|
publishableKey: string;
|
|
1213
1245
|
enabled?: boolean;
|
|
1214
|
-
}): _tanstack_react_query.UseQueryResult<
|
|
1246
|
+
}): _tanstack_react_query.UseQueryResult<TokenBalance | null, Error>;
|
|
1215
1247
|
|
|
1216
1248
|
interface WithdrawFormProps {
|
|
1217
1249
|
publishableKey: string;
|
|
@@ -1271,8 +1303,14 @@ interface WithdrawConfirmingViewProps {
|
|
|
1271
1303
|
executions: DirectExecutionResponse[];
|
|
1272
1304
|
onClose: () => void;
|
|
1273
1305
|
onViewTracker: () => void;
|
|
1306
|
+
/**
|
|
1307
|
+
* Seconds until the funds are expected to land. Worth surfacing while the
|
|
1308
|
+
* spinner is up because a bridged withdrawal (N1) takes about an hour, and
|
|
1309
|
+
* without a number the user has no way to tell that from a stuck transfer.
|
|
1310
|
+
*/
|
|
1311
|
+
estimatedProcessingTime?: number | null;
|
|
1274
1312
|
}
|
|
1275
|
-
declare function WithdrawConfirmingView({ txInfo, executions, onClose, onViewTracker, }: WithdrawConfirmingViewProps): react_jsx_runtime.JSX.Element;
|
|
1313
|
+
declare function WithdrawConfirmingView({ txInfo, executions, onClose, onViewTracker, estimatedProcessingTime, }: WithdrawConfirmingViewProps): react_jsx_runtime.JSX.Element;
|
|
1276
1314
|
|
|
1277
1315
|
declare const HYPERCORE_CHAIN_ID = "1337";
|
|
1278
1316
|
|
|
@@ -1434,7 +1472,8 @@ var common = {
|
|
|
1434
1472
|
balance: "Balance: {{amount}}",
|
|
1435
1473
|
balanceWithProject: "{{projectName}} Balance: {{amount}}",
|
|
1436
1474
|
balanceWithToken: "Balance: {{amount}} ({{tokenAmount}})",
|
|
1437
|
-
amountDue: "Amount due: {{amount}}"
|
|
1475
|
+
amountDue: "Amount due: {{amount}}",
|
|
1476
|
+
back: "Back"
|
|
1438
1477
|
};
|
|
1439
1478
|
var executionDetails = {
|
|
1440
1479
|
processing: "Processing",
|
|
@@ -1522,6 +1561,32 @@ var connectWallet = {
|
|
|
1522
1561
|
connectFailed: "Failed to connect wallet",
|
|
1523
1562
|
transactionFailed: "Transaction failed"
|
|
1524
1563
|
};
|
|
1564
|
+
var walletErrors = {
|
|
1565
|
+
insufficientGas: "You don't have enough to cover the network fee.",
|
|
1566
|
+
insufficientBalance: "Not enough balance for this transaction.",
|
|
1567
|
+
activationFeeRequired: "This transfer is too small to cover the one-time activation fee.",
|
|
1568
|
+
nonceConflict: "A previous transaction is still pending. Wait for it to finish, then try again.",
|
|
1569
|
+
gasTooLow: "The network fee was set too low. Raise it in your wallet and try again.",
|
|
1570
|
+
reverted: "The network rejected the transaction.",
|
|
1571
|
+
networkNotAdded: "That network isn't set up in your wallet. Add it, then try again.",
|
|
1572
|
+
networkSwitchDeclined: "Switch to the right network in your wallet to continue.",
|
|
1573
|
+
wrongNetwork: "Your wallet is on the wrong network. Switch it, then try again.",
|
|
1574
|
+
requestPending: "Your wallet already has a request open. Finish it there, then try again.",
|
|
1575
|
+
walletNotFound: "We couldn't reach your wallet. Make sure it's installed and unlocked.",
|
|
1576
|
+
noAccounts: "No account was shared. Unlock your wallet and try again.",
|
|
1577
|
+
invalidRecipient: "That deposit address looks wrong. Contact support before retrying.",
|
|
1578
|
+
noDepositAddress: "No deposit address is available for that network. Try a different wallet.",
|
|
1579
|
+
rpcUnavailable: "The network is unreachable right now. Try again in a moment.",
|
|
1580
|
+
walletLocked: "Unlock your wallet and try again.",
|
|
1581
|
+
unsupportedMethod: "Your wallet doesn't support this action. Try a different wallet.",
|
|
1582
|
+
chainDisconnected: "Your wallet is disconnected. Reconnect it and try again.",
|
|
1583
|
+
chainDisconnectedNetwork: "Your wallet is disconnected from this network. Reconnect and try again.",
|
|
1584
|
+
walletRejectedTransaction: "Your wallet rejected the transaction.",
|
|
1585
|
+
connectDeclined: "Connection declined.",
|
|
1586
|
+
signatureDeclined: "Signature declined.",
|
|
1587
|
+
connectFailed: "Connection failed.",
|
|
1588
|
+
transactionFailed: "Transaction failed."
|
|
1589
|
+
};
|
|
1525
1590
|
var transferCrypto = {
|
|
1526
1591
|
priceImpact: {
|
|
1527
1592
|
label: "Price impact",
|
|
@@ -1596,7 +1661,8 @@ var transferCrypto = {
|
|
|
1596
1661
|
},
|
|
1597
1662
|
defaultError: "The recipient address cannot receive funds for the selected token"
|
|
1598
1663
|
},
|
|
1599
|
-
selectNetworkPlaceholder: "Select network"
|
|
1664
|
+
selectNetworkPlaceholder: "Select network",
|
|
1665
|
+
recipientAddress: "Recipient address"
|
|
1600
1666
|
};
|
|
1601
1667
|
var glossary = {
|
|
1602
1668
|
title: "Glossary",
|
|
@@ -1633,13 +1699,14 @@ var depositModal = {
|
|
|
1633
1699
|
},
|
|
1634
1700
|
stripeLink: {
|
|
1635
1701
|
title: "Pay with Link",
|
|
1636
|
-
subtitle: "Buy with
|
|
1702
|
+
subtitle: "Buy with debit or credit card",
|
|
1637
1703
|
unavailableInRegionMessage: "Pay with Link is currently unavailable in your region."
|
|
1638
1704
|
},
|
|
1639
1705
|
browserWallet: {
|
|
1640
1706
|
title: "Connect Wallet",
|
|
1641
1707
|
subtitle: "Deposit from your wallet",
|
|
1642
|
-
disconnect: "Disconnect"
|
|
1708
|
+
disconnect: "Disconnect",
|
|
1709
|
+
balanceWithInstant: "${{balance}} • Instant"
|
|
1643
1710
|
},
|
|
1644
1711
|
cashApp: {
|
|
1645
1712
|
creatingOrder: "Creating order...",
|
|
@@ -1665,11 +1732,11 @@ var depositModal = {
|
|
|
1665
1732
|
},
|
|
1666
1733
|
applePayMenu: {
|
|
1667
1734
|
title: "Pay with Apple Pay",
|
|
1668
|
-
subtitle: "Instant"
|
|
1735
|
+
subtitle: "Instant • Debit card only"
|
|
1669
1736
|
},
|
|
1670
1737
|
googlePayMenu: {
|
|
1671
1738
|
title: "Pay with Google Pay",
|
|
1672
|
-
subtitle: "Instant"
|
|
1739
|
+
subtitle: "Instant • Debit card only"
|
|
1673
1740
|
},
|
|
1674
1741
|
cardMethodName: "Card",
|
|
1675
1742
|
applePayMethodName: "Apple Pay",
|
|
@@ -1750,7 +1817,13 @@ var payWithExchange = {
|
|
|
1750
1817
|
completeTransaction: "Complete transfer with {{provider}}",
|
|
1751
1818
|
canCloseModal: "You can close this modal.",
|
|
1752
1819
|
reopenExchange: "Reopen exchange window",
|
|
1753
|
-
walletOrTokenUnavailable: "Wallet address or token information not available"
|
|
1820
|
+
walletOrTokenUnavailable: "Wallet address or token information not available",
|
|
1821
|
+
creatingOrder: "Creating order...",
|
|
1822
|
+
tokenUnavailable: "Token information not available",
|
|
1823
|
+
walletUnavailable: "Wallet address not available",
|
|
1824
|
+
enterAmountToTransfer: "Enter an amount to transfer",
|
|
1825
|
+
createSessionFailed: "Failed to create transfer session",
|
|
1826
|
+
transferFailed: "Transfer failed"
|
|
1754
1827
|
};
|
|
1755
1828
|
var connectExchange = {
|
|
1756
1829
|
title: "Connect Exchange",
|
|
@@ -1833,7 +1906,20 @@ var connectExchange = {
|
|
|
1833
1906
|
errors: {
|
|
1834
1907
|
oauthStartFailed: "Failed to start OAuth",
|
|
1835
1908
|
createTransferFailed: "Failed to create transfer",
|
|
1836
|
-
transferFailed: "Transfer failed"
|
|
1909
|
+
transferFailed: "Transfer failed",
|
|
1910
|
+
noDepositWallet: "No deposit wallet available",
|
|
1911
|
+
noDepositWalletForNetwork: "No deposit wallet available for the {{network}} network",
|
|
1912
|
+
paymentFailed: "Payment failed",
|
|
1913
|
+
createSessionFailed: "Failed to create exchange transfer session",
|
|
1914
|
+
transferDetailsNotReady: "Transfer details not ready. Please try again.",
|
|
1915
|
+
sessionExpired: "Session expired. Please reconnect your exchange."
|
|
1916
|
+
},
|
|
1917
|
+
transferFrom: "Transfer from {{exchange}}",
|
|
1918
|
+
redirect: {
|
|
1919
|
+
paymentReceived: "Payment received",
|
|
1920
|
+
paymentProcessing: "Payment processing",
|
|
1921
|
+
converting: "Converting to your destination token...",
|
|
1922
|
+
confirmingPayment: "Your {{exchange}} payment is being confirmed..."
|
|
1837
1923
|
}
|
|
1838
1924
|
};
|
|
1839
1925
|
var buyWithCard = {
|
|
@@ -1858,7 +1944,9 @@ var buyWithCard = {
|
|
|
1858
1944
|
bankTransferWalletUnavailable: "Wallet address not available for bank transfer"
|
|
1859
1945
|
},
|
|
1860
1946
|
refreshingIn: "Refreshing in {{seconds}}s",
|
|
1861
|
-
estimatedDeliveryTime: "Estimated delivery time: {{time}}"
|
|
1947
|
+
estimatedDeliveryTime: "Estimated delivery time: {{time}}",
|
|
1948
|
+
thisToken: "this token",
|
|
1949
|
+
destinationNotStablecoin: "Buying a fixed amount with card is only available for stablecoins (e.g. USDC, USDT). {{token}} isn't supported for this option."
|
|
1862
1950
|
};
|
|
1863
1951
|
var buyWithApplePay = {
|
|
1864
1952
|
email: {
|
|
@@ -1877,7 +1965,8 @@ var buyWithApplePay = {
|
|
|
1877
1965
|
placeholder: "000000",
|
|
1878
1966
|
incorrect: "Incorrect code. Please try again.",
|
|
1879
1967
|
resend: "Resend code",
|
|
1880
|
-
resendIn: "Resend in {{seconds}}s"
|
|
1968
|
+
resendIn: "Resend in {{seconds}}s",
|
|
1969
|
+
verify: "Verify"
|
|
1881
1970
|
},
|
|
1882
1971
|
amount: {
|
|
1883
1972
|
enterAmount: "Enter amount",
|
|
@@ -2173,7 +2262,8 @@ var withdrawModal = {
|
|
|
2173
2262
|
history: "Withdrawal History",
|
|
2174
2263
|
status: "Withdrawal Status",
|
|
2175
2264
|
checking: "Checking Withdrawal",
|
|
2176
|
-
empty: "No withdrawals to track yet"
|
|
2265
|
+
empty: "No withdrawals to track yet",
|
|
2266
|
+
estimatedTime: "Estimated delivery time: {{time}}. You can close this and check back later."
|
|
2177
2267
|
},
|
|
2178
2268
|
executionItem: {
|
|
2179
2269
|
processing: "Withdrawal processing",
|
|
@@ -2197,6 +2287,7 @@ var en = {
|
|
|
2197
2287
|
executionDetails: executionDetails,
|
|
2198
2288
|
depositTracker: depositTracker,
|
|
2199
2289
|
connectWallet: connectWallet,
|
|
2290
|
+
walletErrors: walletErrors,
|
|
2200
2291
|
transferCrypto: transferCrypto,
|
|
2201
2292
|
glossary: glossary,
|
|
2202
2293
|
depositModal: depositModal,
|
|
@@ -2217,14 +2308,20 @@ var en = {
|
|
|
2217
2308
|
*/
|
|
2218
2309
|
type I18nStrings = typeof en;
|
|
2219
2310
|
/**
|
|
2220
|
-
* Canonical locale codes we ship a translation table for.
|
|
2311
|
+
* Canonical locale codes we ship a translation table for. Codes follow Stripe's
|
|
2312
|
+
* style: language-only unless a region split is required (`zh` vs `zh-TW`).
|
|
2313
|
+
* - `en` → English
|
|
2221
2314
|
* - `zh` → Simplified Chinese (Mainland China, Singapore)
|
|
2222
2315
|
* - `zh-TW` → Traditional Chinese (Taiwan, Hong Kong, Macau)
|
|
2316
|
+
* - `fr` → French (France)
|
|
2317
|
+
* - `th` → Thai (Thailand)
|
|
2318
|
+
* - `ja` → Japanese (Japan)
|
|
2319
|
+
* - `ko` → Korean (South Korea)
|
|
2223
2320
|
*
|
|
2224
|
-
* Callers may pass any BCP-47 tag (e.g. `zh-CN`, `
|
|
2321
|
+
* Callers may pass any BCP-47 tag (e.g. `zh-CN`, `fr-FR`, `ja-JP`); it is
|
|
2225
2322
|
* mapped onto one of these via `normalizeLocale`.
|
|
2226
2323
|
*/
|
|
2227
|
-
type LocaleCode = 'en' | 'zh' | 'zh-TW';
|
|
2324
|
+
type LocaleCode = 'en' | 'zh' | 'zh-TW' | 'fr' | 'th' | 'ja' | 'ko';
|
|
2228
2325
|
/** Locales with a bundled translation table. */
|
|
2229
2326
|
declare const SUPPORTED_LOCALES: LocaleCode[];
|
|
2230
2327
|
/**
|
|
@@ -2273,6 +2370,7 @@ declare const i18n: {
|
|
|
2273
2370
|
balanceWithProject: string;
|
|
2274
2371
|
balanceWithToken: string;
|
|
2275
2372
|
amountDue: string;
|
|
2373
|
+
back: string;
|
|
2276
2374
|
};
|
|
2277
2375
|
executionDetails: {
|
|
2278
2376
|
processing: string;
|
|
@@ -2360,6 +2458,32 @@ declare const i18n: {
|
|
|
2360
2458
|
connectFailed: string;
|
|
2361
2459
|
transactionFailed: string;
|
|
2362
2460
|
};
|
|
2461
|
+
walletErrors: {
|
|
2462
|
+
insufficientGas: string;
|
|
2463
|
+
insufficientBalance: string;
|
|
2464
|
+
activationFeeRequired: string;
|
|
2465
|
+
nonceConflict: string;
|
|
2466
|
+
gasTooLow: string;
|
|
2467
|
+
reverted: string;
|
|
2468
|
+
networkNotAdded: string;
|
|
2469
|
+
networkSwitchDeclined: string;
|
|
2470
|
+
wrongNetwork: string;
|
|
2471
|
+
requestPending: string;
|
|
2472
|
+
walletNotFound: string;
|
|
2473
|
+
noAccounts: string;
|
|
2474
|
+
invalidRecipient: string;
|
|
2475
|
+
noDepositAddress: string;
|
|
2476
|
+
rpcUnavailable: string;
|
|
2477
|
+
walletLocked: string;
|
|
2478
|
+
unsupportedMethod: string;
|
|
2479
|
+
chainDisconnected: string;
|
|
2480
|
+
chainDisconnectedNetwork: string;
|
|
2481
|
+
walletRejectedTransaction: string;
|
|
2482
|
+
connectDeclined: string;
|
|
2483
|
+
signatureDeclined: string;
|
|
2484
|
+
connectFailed: string;
|
|
2485
|
+
transactionFailed: string;
|
|
2486
|
+
};
|
|
2363
2487
|
transferCrypto: {
|
|
2364
2488
|
priceImpact: {
|
|
2365
2489
|
label: string;
|
|
@@ -2435,6 +2559,7 @@ declare const i18n: {
|
|
|
2435
2559
|
defaultError: string;
|
|
2436
2560
|
};
|
|
2437
2561
|
selectNetworkPlaceholder: string;
|
|
2562
|
+
recipientAddress: string;
|
|
2438
2563
|
};
|
|
2439
2564
|
glossary: {
|
|
2440
2565
|
title: string;
|
|
@@ -2478,6 +2603,7 @@ declare const i18n: {
|
|
|
2478
2603
|
title: string;
|
|
2479
2604
|
subtitle: string;
|
|
2480
2605
|
disconnect: string;
|
|
2606
|
+
balanceWithInstant: string;
|
|
2481
2607
|
};
|
|
2482
2608
|
cashApp: {
|
|
2483
2609
|
creatingOrder: string;
|
|
@@ -2589,6 +2715,12 @@ declare const i18n: {
|
|
|
2589
2715
|
canCloseModal: string;
|
|
2590
2716
|
reopenExchange: string;
|
|
2591
2717
|
walletOrTokenUnavailable: string;
|
|
2718
|
+
creatingOrder: string;
|
|
2719
|
+
tokenUnavailable: string;
|
|
2720
|
+
walletUnavailable: string;
|
|
2721
|
+
enterAmountToTransfer: string;
|
|
2722
|
+
createSessionFailed: string;
|
|
2723
|
+
transferFailed: string;
|
|
2592
2724
|
};
|
|
2593
2725
|
connectExchange: {
|
|
2594
2726
|
title: string;
|
|
@@ -2672,6 +2804,19 @@ declare const i18n: {
|
|
|
2672
2804
|
oauthStartFailed: string;
|
|
2673
2805
|
createTransferFailed: string;
|
|
2674
2806
|
transferFailed: string;
|
|
2807
|
+
noDepositWallet: string;
|
|
2808
|
+
noDepositWalletForNetwork: string;
|
|
2809
|
+
paymentFailed: string;
|
|
2810
|
+
createSessionFailed: string;
|
|
2811
|
+
transferDetailsNotReady: string;
|
|
2812
|
+
sessionExpired: string;
|
|
2813
|
+
};
|
|
2814
|
+
transferFrom: string;
|
|
2815
|
+
redirect: {
|
|
2816
|
+
paymentReceived: string;
|
|
2817
|
+
paymentProcessing: string;
|
|
2818
|
+
converting: string;
|
|
2819
|
+
confirmingPayment: string;
|
|
2675
2820
|
};
|
|
2676
2821
|
};
|
|
2677
2822
|
buyWithCard: {
|
|
@@ -2697,6 +2842,8 @@ declare const i18n: {
|
|
|
2697
2842
|
};
|
|
2698
2843
|
refreshingIn: string;
|
|
2699
2844
|
estimatedDeliveryTime: string;
|
|
2845
|
+
thisToken: string;
|
|
2846
|
+
destinationNotStablecoin: string;
|
|
2700
2847
|
};
|
|
2701
2848
|
buyWithApplePay: {
|
|
2702
2849
|
email: {
|
|
@@ -2716,6 +2863,7 @@ declare const i18n: {
|
|
|
2716
2863
|
incorrect: string;
|
|
2717
2864
|
resend: string;
|
|
2718
2865
|
resendIn: string;
|
|
2866
|
+
verify: string;
|
|
2719
2867
|
};
|
|
2720
2868
|
amount: {
|
|
2721
2869
|
enterAmount: string;
|
|
@@ -3012,6 +3160,7 @@ declare const i18n: {
|
|
|
3012
3160
|
status: string;
|
|
3013
3161
|
checking: string;
|
|
3014
3162
|
empty: string;
|
|
3163
|
+
estimatedTime: string;
|
|
3015
3164
|
};
|
|
3016
3165
|
executionItem: {
|
|
3017
3166
|
processing: string;
|
|
@@ -3045,18 +3194,21 @@ declare function interpolate(template: string, params?: Record<string, string |
|
|
|
3045
3194
|
*
|
|
3046
3195
|
* Chinese is resolved by script rather than a single region: any Traditional
|
|
3047
3196
|
* signal (script `Hant`, or region TW/HK/MO) maps to `zh-TW` (Traditional);
|
|
3048
|
-
* every other `zh` tag maps to `zh` (Simplified).
|
|
3197
|
+
* every other `zh` tag maps to `zh` (Simplified). Other languages collapse to
|
|
3198
|
+
* their language-only Stripe-style code (`fr-FR` → `fr`, `ja-JP` → `ja`).
|
|
3049
3199
|
*
|
|
3050
3200
|
* @example normalizeLocale("zh-CN") // "zh" (Simplified)
|
|
3051
3201
|
* @example normalizeLocale("zh-TW") // "zh-TW" (Traditional)
|
|
3052
3202
|
* @example normalizeLocale("zh-HK") // "zh-TW" (Traditional)
|
|
3053
3203
|
* @example normalizeLocale("zh-Hant-TW") // "zh-TW" (Traditional)
|
|
3204
|
+
* @example normalizeLocale("fr-FR") // "fr"
|
|
3205
|
+
* @example normalizeLocale("ja-JP") // "ja"
|
|
3054
3206
|
* @example normalizeLocale("en_US") // "en"
|
|
3055
3207
|
*/
|
|
3056
3208
|
declare function normalizeLocale(tag?: string | null): LocaleCode;
|
|
3057
3209
|
/**
|
|
3058
3210
|
* Best-effort browser locale detection. Walks `navigator.languages` in the
|
|
3059
|
-
* user's own order and takes the first language we ship, so `["
|
|
3211
|
+
* user's own order and takes the first language we ship, so `["de", "zh-TW"]`
|
|
3060
3212
|
* resolves to `zh-TW` while `["en-US", "zh-CN"]` stays English. Returns "en"
|
|
3061
3213
|
* during SSR or when nothing matches.
|
|
3062
3214
|
*/
|
|
@@ -3080,8 +3232,8 @@ interface I18nContextValue {
|
|
|
3080
3232
|
interface I18nProviderProps {
|
|
3081
3233
|
children: React$1.ReactNode;
|
|
3082
3234
|
/**
|
|
3083
|
-
* Locale tag (e.g. "zh", "zh-CN", "en-US"). When omitted, the
|
|
3084
|
-
* is auto-detected. Unsupported locales fall back to English.
|
|
3235
|
+
* Locale tag (e.g. "zh", "zh-CN", "fr", "ja-JP", "en-US"). When omitted, the
|
|
3236
|
+
* browser locale is auto-detected. Unsupported locales fall back to English.
|
|
3085
3237
|
*/
|
|
3086
3238
|
locale?: string;
|
|
3087
3239
|
}
|
|
@@ -3183,7 +3335,19 @@ interface UseDepositQuoteParams {
|
|
|
3183
3335
|
sourceChainType: string;
|
|
3184
3336
|
sourceChainId: string;
|
|
3185
3337
|
sourceTokenAddress: string;
|
|
3186
|
-
|
|
3338
|
+
/**
|
|
3339
|
+
* Exact-in: how much the user will send. Mutually exclusive with
|
|
3340
|
+
* `destinationAmount` — provide exactly one.
|
|
3341
|
+
*/
|
|
3342
|
+
sourceAmount?: string;
|
|
3343
|
+
/**
|
|
3344
|
+
* Exact-out: how much the recipient should receive. Mutually exclusive with
|
|
3345
|
+
* `sourceAmount` — provide exactly one.
|
|
3346
|
+
*
|
|
3347
|
+
* Checkout (CheckoutModal / WalletConnect / BrowserWalletModal) only sends
|
|
3348
|
+
* this field. Omitting `sourceAmount` keeps that historic path.
|
|
3349
|
+
*/
|
|
3350
|
+
destinationAmount?: string;
|
|
3187
3351
|
destinationChainType: string;
|
|
3188
3352
|
destinationChainId: string;
|
|
3189
3353
|
destinationTokenAddress: string;
|
|
@@ -3196,8 +3360,10 @@ interface UseDepositQuoteParams {
|
|
|
3196
3360
|
/**
|
|
3197
3361
|
* Hook to fetch a deposit quote via react-query.
|
|
3198
3362
|
*
|
|
3199
|
-
*
|
|
3200
|
-
* destination amount
|
|
3363
|
+
* Exact-out (`destinationAmount`): estimated source token needed to receive
|
|
3364
|
+
* that destination amount. Exact-in (`sourceAmount`): estimated destination
|
|
3365
|
+
* amount received for that source amount. The response includes the project's
|
|
3366
|
+
* platform fee from billing (`platform_fee_percent`).
|
|
3201
3367
|
* Server-side cached for 1 minute; client re-fetches on param change.
|
|
3202
3368
|
*/
|
|
3203
3369
|
declare function useDepositQuote(params: UseDepositQuoteParams): _tanstack_react_query.UseQueryResult<DepositQuote, Error>;
|
|
@@ -3237,14 +3403,24 @@ interface UseWithdrawPollingResult {
|
|
|
3237
3403
|
}
|
|
3238
3404
|
declare function useWithdrawPolling({ userId, publishableKey, depositWalletId, enabled, onWithdrawSuccess, onWithdrawError, }: UseWithdrawPollingOptions): UseWithdrawPollingResult;
|
|
3239
3405
|
|
|
3406
|
+
interface UseSupportedDestinationTokensOptions {
|
|
3407
|
+
/** Which surface the list is for; only read by the API alongside `sourceChainType`. */
|
|
3408
|
+
actionType?: ActionType;
|
|
3409
|
+
/**
|
|
3410
|
+
* Chain the funds are being sent from, so the API can drop destinations it
|
|
3411
|
+
* can't reach (a withdrawal bridged off N1 can't land back on N1).
|
|
3412
|
+
*/
|
|
3413
|
+
sourceChainType?: ChainType;
|
|
3414
|
+
}
|
|
3240
3415
|
/**
|
|
3241
3416
|
* Hook to fetch supported destination tokens with caching and deduplication via react-query.
|
|
3242
3417
|
* Used in the withdraw flow to show available tokens the user can withdraw to.
|
|
3243
3418
|
*
|
|
3244
3419
|
* @param publishableKey - Publishable key for API calls
|
|
3245
3420
|
* @param enabled - Whether to fetch (defaults to true)
|
|
3421
|
+
* @param options - Optional surface + source filters
|
|
3246
3422
|
*/
|
|
3247
|
-
declare function useSupportedDestinationTokens(publishableKey: string, enabled?: boolean): _tanstack_react_query.UseQueryResult<SupportedDestinationTokensResponse, Error>;
|
|
3423
|
+
declare function useSupportedDestinationTokens(publishableKey: string, enabled?: boolean, options?: UseSupportedDestinationTokensOptions): _tanstack_react_query.UseQueryResult<SupportedDestinationTokensResponse, Error>;
|
|
3248
3424
|
|
|
3249
3425
|
interface UseSupportedDepositTokensOptions {
|
|
3250
3426
|
destination_token_address?: string;
|
|
@@ -3281,6 +3457,10 @@ declare function useVerifyRecipientAddress(params: UseVerifyRecipientAddressPara
|
|
|
3281
3457
|
interface SourceTokenValidationResult {
|
|
3282
3458
|
isSupported: boolean;
|
|
3283
3459
|
isStablecoin: boolean;
|
|
3460
|
+
/** Decimals of the matched source token, when found in the catalog. */
|
|
3461
|
+
decimals: number | null;
|
|
3462
|
+
/** Catalog symbol of the matched source token, when found. */
|
|
3463
|
+
symbol: string | null;
|
|
3284
3464
|
minimumAmountUsd: number | null;
|
|
3285
3465
|
estimatedProcessingTime: number | null;
|
|
3286
3466
|
maxSlippagePercent: number | null;
|
|
@@ -3296,6 +3476,13 @@ declare function useSourceTokenValidation(params: {
|
|
|
3296
3476
|
sourceChainId?: string;
|
|
3297
3477
|
sourceTokenAddress?: string;
|
|
3298
3478
|
sourceTokenSymbol?: string;
|
|
3479
|
+
/**
|
|
3480
|
+
* Which catalog to validate against. `withdraw` also matches chains that can
|
|
3481
|
+
* only ever be a withdrawal source, because their funds are bridged onto a
|
|
3482
|
+
* settlement chain (N1) — the deposit catalog deliberately hides those, since
|
|
3483
|
+
* nothing can be routed off them directly. Omitted defers to the API default.
|
|
3484
|
+
*/
|
|
3485
|
+
actionType?: ActionType;
|
|
3299
3486
|
publishableKey: string;
|
|
3300
3487
|
enabled?: boolean;
|
|
3301
3488
|
}): _tanstack_react_query.UseQueryResult<SourceTokenValidationResult, Error>;
|