@tokenflight/swap 0.3.0-rc.0 → 0.3.0-rc.2
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/ReceiveComponent-DIJ4BGPQ.js +1 -0
- package/dist/ReceiveComponent.module-DpNu0IXq.js +1 -0
- package/dist/SwapComponent-BUaJEHfz.js +1 -0
- package/dist/bridge-Bq0QUltI.js +1 -0
- package/dist/bridge.d.ts +66 -1
- package/dist/bridge.js +1 -1
- package/dist/custom-elements.d.ts +1 -27
- package/dist/defaults-loader-DfcaO9j5.js +1 -0
- package/dist/en-US-CU2aSy93.js +1 -0
- package/dist/errors-BZKSEUy5.js +3 -0
- package/dist/iframe-entry.d.ts +21 -0
- package/dist/iframe-entry.js +29 -0
- package/dist/iframe-receiver-PfhKUIZW.js +1 -0
- package/dist/iframe.d.ts +127 -10
- package/dist/iframe.js +45 -1
- package/dist/ja-JP-BoipV6-j.js +1 -0
- package/dist/ko-KR-DyFXZJsF.js +1 -0
- package/dist/protocol-CDxgudrl.js +1 -0
- package/dist/rank-offers-Dt1Mvbrr.js +1 -0
- package/dist/register-defaults-C_q7CG7x.js +1 -0
- package/dist/register-widget-BrN4UxSU.js +1 -0
- package/dist/shared.module-C-kWMzqW.js +1 -0
- package/dist/solid-iWr5Czxc.js +1 -0
- package/dist/swap.css +1 -1
- package/dist/theme-C9tsVWlo.js +2 -0
- package/dist/tokenflight-swap.d.ts +137 -250
- package/dist/tokenflight-swap.js +1 -2
- package/dist/tokenflight-swap.umd.cjs +5 -6
- package/dist/widget-DQLVNkNn.js +2 -0
- package/dist/widget.d.ts +356 -25
- package/dist/widget.js +1 -1
- package/dist/zh-CN-epCUm9Io.js +1 -0
- package/dist/zh-TW-DSEboEJV.js +1 -0
- package/package.json +6 -2
- package/dist/bridge-C9uFKAdS.js +0 -1
- package/dist/en-US-ChmhdVUe.js +0 -1
- package/dist/ja-JP-BAX9fLqV.js +0 -1
- package/dist/ko-KR-jwhmhUqJ.js +0 -1
- package/dist/register-defaults-lIJMUU-P.js +0 -1
- package/dist/register-widget-DQAzucnZ.js +0 -5
- package/dist/zh-CN-fKcRI4Y8.js +0 -1
- package/dist/zh-TW-gFEUAIR6.js +0 -1
- /package/dist/{active-bridge-DTyKObda.js → active-bridge-V8lTJ2Js.js} +0 -0
package/dist/widget.d.ts
CHANGED
|
@@ -1,7 +1,42 @@
|
|
|
1
|
+
import { FiatJumpRoute } from '@tokenflight/api';
|
|
2
|
+
import { FiatOrderRequest } from '@tokenflight/api';
|
|
3
|
+
import { FiatOrderResponse } from '@tokenflight/api';
|
|
4
|
+
import { FiatOrderStatus } from '@tokenflight/api';
|
|
5
|
+
import { FiatPaymentMethod } from '@tokenflight/api';
|
|
6
|
+
import { FiatProviderInfo } from '@tokenflight/api';
|
|
7
|
+
import { FiatProvidersResponse } from '@tokenflight/api';
|
|
8
|
+
import { FiatQuoteItem } from '@tokenflight/api';
|
|
9
|
+
import { FiatQuoteRequest } from '@tokenflight/api';
|
|
10
|
+
import { FiatQuoteResponse } from '@tokenflight/api';
|
|
11
|
+
import { FiatQuotesResponse } from '@tokenflight/api';
|
|
12
|
+
import { FiatStatusResponse } from '@tokenflight/api';
|
|
1
13
|
import { HyperstreamApi } from '@tokenflight/api';
|
|
14
|
+
import { SwapStrategy } from '@tokenflight/api';
|
|
15
|
+
import { TERMINAL_FIAT_STATUSES } from '@tokenflight/api';
|
|
16
|
+
import { TERMINAL_ORDER_STATUSES } from '@tokenflight/api';
|
|
17
|
+
import { TokenFlightError } from '@tokenflight/api';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Parameters for the EIP-3085 `wallet_addEthereumChain` request. Returned by
|
|
21
|
+
* adapters that know the chain's RPC/native-currency metadata so the widget
|
|
22
|
+
* can recover from Coinbase Wallet's "Unrecognized chain" failure by adding
|
|
23
|
+
* the chain before retrying the switch.
|
|
24
|
+
*/
|
|
25
|
+
export declare interface AddEthereumChainParameters {
|
|
26
|
+
chainId: string;
|
|
27
|
+
chainName: string;
|
|
28
|
+
nativeCurrency: {
|
|
29
|
+
name: string;
|
|
30
|
+
symbol: string;
|
|
31
|
+
decimals: number;
|
|
32
|
+
};
|
|
33
|
+
rpcUrls: string[];
|
|
34
|
+
blockExplorerUrls?: string[];
|
|
35
|
+
iconUrls?: string[];
|
|
36
|
+
}
|
|
2
37
|
|
|
3
38
|
/** Amount change data */
|
|
4
|
-
declare interface AmountChangedData {
|
|
39
|
+
export declare interface AmountChangedData {
|
|
5
40
|
amount: string;
|
|
6
41
|
direction: "from" | "to";
|
|
7
42
|
}
|
|
@@ -12,9 +47,24 @@ declare interface AmountChangedData {
|
|
|
12
47
|
*/
|
|
13
48
|
declare type BooleanAttribute = boolean | "true" | "false" | "1" | "0" | "yes" | "no" | "";
|
|
14
49
|
|
|
15
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Callback interfaces for widget events.
|
|
52
|
+
*
|
|
53
|
+
* **Crypto outcome routing** (mutually exclusive — pick the channel that matches
|
|
54
|
+
* the active flow):
|
|
55
|
+
* - `EXACT_INPUT` (`<tokenflight-widget trade-type="EXACT_INPUT">` / default,
|
|
56
|
+
* "spend exactly N of X") → fires `onSwapSuccess` / `onSwapError`
|
|
57
|
+
* - `EXACT_OUTPUT` (`<tokenflight-widget trade-type="EXACT_OUTPUT">`,
|
|
58
|
+
* "receive exactly N of Y") → fires `onDepositSuccess` / `onDepositError`
|
|
59
|
+
*
|
|
60
|
+
* **Fiat (card) outcomes** route through the same `onSwap*` / `onDeposit*`
|
|
61
|
+
* channels for errors (matched to the host flow) and through
|
|
62
|
+
* `onFiatOrderCreated` / `onFiatOrderCompleted` for fiat-specific lifecycle.
|
|
63
|
+
*/
|
|
16
64
|
export declare interface Callbacks {
|
|
65
|
+
/** EXACT_INPUT crypto success. */
|
|
17
66
|
onSwapSuccess?(data: SwapSuccessData): void;
|
|
67
|
+
/** EXACT_INPUT errors (crypto execution + card flow when in EXACT_INPUT mode). */
|
|
18
68
|
onSwapError?(data: SwapErrorData): void;
|
|
19
69
|
onWalletConnected?(data: WalletConnectedData): void;
|
|
20
70
|
onQuoteReceived?(data: QuoteResponse): void;
|
|
@@ -34,14 +84,18 @@ export declare interface Callbacks {
|
|
|
34
84
|
status: string;
|
|
35
85
|
txHash?: string;
|
|
36
86
|
}): void;
|
|
37
|
-
/**
|
|
87
|
+
/** EXACT_OUTPUT crypto success. */
|
|
38
88
|
onDepositSuccess?(data: SwapSuccessData): void;
|
|
39
|
-
/**
|
|
89
|
+
/** EXACT_OUTPUT errors (crypto execution + card flow when in EXACT_OUTPUT mode). */
|
|
40
90
|
onDepositError?(data: SwapErrorData): void;
|
|
41
91
|
}
|
|
42
92
|
|
|
93
|
+
export declare type ChainInfo = HyperstreamApi.Chain;
|
|
94
|
+
|
|
43
95
|
/** Chain type for multi-chain support */
|
|
44
|
-
declare type ChainType = "evm" | "solana";
|
|
96
|
+
export declare type ChainType = "evm" | "solana";
|
|
97
|
+
|
|
98
|
+
export declare type ContractCallDeposit = HyperstreamApi.ContractCallDeposit;
|
|
45
99
|
|
|
46
100
|
/**
|
|
47
101
|
* Custom color overrides — keys are CSS variable names.
|
|
@@ -58,14 +112,89 @@ declare type ChainType = "evm" | "solana";
|
|
|
58
112
|
*/
|
|
59
113
|
export declare type CustomColors = Partial<Record<TfCssVar, string>> & Record<string, string>;
|
|
60
114
|
|
|
115
|
+
export declare type DepositApproval = HyperstreamApi.Approval;
|
|
116
|
+
|
|
117
|
+
export declare type DepositBuildResponse = HyperstreamApi.Deposit;
|
|
118
|
+
|
|
119
|
+
export declare type EIP1193RequestApproval = HyperstreamApi.EIP1193RequestApproval;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Swap-side error codes for failures that originate inside the widget
|
|
123
|
+
* itself (config validation, wallet interaction, transaction signing).
|
|
124
|
+
* Merged with the API codes from `@tokenflight/api` into a unified
|
|
125
|
+
* `ErrorCode` constant so callers only see one enum.
|
|
126
|
+
*/
|
|
127
|
+
export declare const ErrorCode: {
|
|
128
|
+
readonly INVALID_CONFIG: "TF1001";
|
|
129
|
+
readonly INVALID_TOKEN_IDENTIFIER: "TF1002";
|
|
130
|
+
readonly INVALID_AMOUNT: "TF1003";
|
|
131
|
+
readonly WALLET_CONNECTION_FAILED: "TF2002";
|
|
132
|
+
readonly WALLET_ACTION_FAILED: "TF2003";
|
|
133
|
+
readonly TRANSACTION_FAILED: "TF4001";
|
|
134
|
+
readonly ELEMENT_NOT_FOUND: "TF5001";
|
|
135
|
+
readonly API_REQUEST_FAILED: "TF3001";
|
|
136
|
+
readonly API_TIMEOUT: "TF3002";
|
|
137
|
+
readonly API_INVALID_RESPONSE: "TF3003";
|
|
138
|
+
readonly QUOTE_FAILED: "TF3004";
|
|
139
|
+
readonly QUOTE_EXPIRED: "TF3005";
|
|
140
|
+
readonly DEPOSIT_BUILD_FAILED: "TF3006";
|
|
141
|
+
readonly DEPOSIT_SUBMIT_FAILED: "TF3007";
|
|
142
|
+
readonly ORDER_FAILED: "TF3008";
|
|
143
|
+
readonly API_ABORTED: "TF3009";
|
|
144
|
+
readonly FIAT_QUOTE_FAILED: "TF6001";
|
|
145
|
+
readonly FIAT_ORDER_FAILED: "TF6002";
|
|
146
|
+
readonly FIAT_STATUS_FAILED: "TF6003";
|
|
147
|
+
readonly FIAT_PROVIDER_ERROR: "TF6004";
|
|
148
|
+
readonly FIAT_AMOUNT_OUT_OF_RANGE: "TF6005";
|
|
149
|
+
readonly FIAT_POPUP_BLOCKED: "TF6006";
|
|
150
|
+
readonly FIAT_CHECKOUT_UNAVAILABLE: "TF6007";
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export declare type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];
|
|
154
|
+
|
|
61
155
|
/** EVM wallet action via EIP-1193 */
|
|
62
|
-
declare interface EvmWalletAction {
|
|
156
|
+
export declare interface EvmWalletAction {
|
|
63
157
|
type: "eip1193_request";
|
|
64
158
|
chainId: number;
|
|
65
159
|
method: string;
|
|
66
160
|
params: unknown[];
|
|
67
161
|
}
|
|
68
162
|
|
|
163
|
+
export declare type ExactOutMethod = HyperstreamApi.ExactOutMethod;
|
|
164
|
+
|
|
165
|
+
/** Execution-only phases for the async build→wallet→submit→track→success flow */
|
|
166
|
+
export declare type ExecPhase = "building" | "awaiting-wallet" | "submitting" | "tracking" | "success";
|
|
167
|
+
|
|
168
|
+
/** Execution-only phases for the fiat flow */
|
|
169
|
+
export declare type FiatExecPhase = "creating-order" | "awaiting-payment" | "tracking" | "success";
|
|
170
|
+
|
|
171
|
+
export { FiatJumpRoute }
|
|
172
|
+
|
|
173
|
+
export { FiatOrderRequest }
|
|
174
|
+
|
|
175
|
+
export { FiatOrderResponse }
|
|
176
|
+
|
|
177
|
+
export { FiatOrderStatus }
|
|
178
|
+
|
|
179
|
+
export { FiatPaymentMethod }
|
|
180
|
+
|
|
181
|
+
/** UI phases for the fiat flow (derived from signals + queries) */
|
|
182
|
+
export declare type FiatPhase = "idle" | "quoting" | "quoted" | "creating-order" | "awaiting-payment" | "tracking" | "success" | "error";
|
|
183
|
+
|
|
184
|
+
export { FiatProviderInfo }
|
|
185
|
+
|
|
186
|
+
export { FiatProvidersResponse }
|
|
187
|
+
|
|
188
|
+
export { FiatQuoteItem }
|
|
189
|
+
|
|
190
|
+
export { FiatQuoteRequest }
|
|
191
|
+
|
|
192
|
+
export { FiatQuoteResponse }
|
|
193
|
+
|
|
194
|
+
export { FiatQuotesResponse }
|
|
195
|
+
|
|
196
|
+
export { FiatStatusResponse }
|
|
197
|
+
|
|
69
198
|
declare interface ImperativeWidgetOptions<TConfig> {
|
|
70
199
|
container: string | HTMLElement;
|
|
71
200
|
config: TConfig;
|
|
@@ -97,6 +226,22 @@ export declare interface IWalletAdapter {
|
|
|
97
226
|
signMessage?(message: string, chainType?: ChainType): Promise<string>;
|
|
98
227
|
/** Optional: open the wallet's native account/connected modal */
|
|
99
228
|
openAccountModal?(): Promise<void>;
|
|
229
|
+
/**
|
|
230
|
+
* Optional: return `wallet_addEthereumChain` parameters for the given
|
|
231
|
+
* chain, or `undefined` if unknown. Used by the switch-chain fallback to
|
|
232
|
+
* recover from Coinbase Wallet's `-32603` "Unrecognized chain" response
|
|
233
|
+
* (see coinbase/coinbase-wallet-sdk#915) by adding the chain before
|
|
234
|
+
* retrying the switch.
|
|
235
|
+
*/
|
|
236
|
+
getAddEthereumChainParams?(chainId: number): AddEthereumChainParameters | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Optional: read-only, side-effect-free probe for the wallet's current
|
|
239
|
+
* chain ID. MUST NOT trigger a chain switch or any user-facing prompt.
|
|
240
|
+
* Returns `null` if the current chain cannot be determined (e.g. not
|
|
241
|
+
* connected). Used by `safeSwitchChain` to skip no-op switches without
|
|
242
|
+
* opening a wallet prompt first.
|
|
243
|
+
*/
|
|
244
|
+
getCurrentChainId?(): Promise<bigint | null>;
|
|
100
245
|
/** Optional: clean up internal subscriptions and watchers */
|
|
101
246
|
destroy?(): void;
|
|
102
247
|
/** Subscribe to wallet events */
|
|
@@ -105,7 +250,51 @@ export declare interface IWalletAdapter {
|
|
|
105
250
|
off(event: WalletEventType, handler: (event: WalletEvent) => void): void;
|
|
106
251
|
}
|
|
107
252
|
|
|
108
|
-
declare type
|
|
253
|
+
export declare type OnChainTx = HyperstreamApi.OnChainTx;
|
|
254
|
+
|
|
255
|
+
export declare type OrderListResponse = HyperstreamApi.GetOrderResponse;
|
|
256
|
+
|
|
257
|
+
export declare type OrderResponse = HyperstreamApi.Order;
|
|
258
|
+
|
|
259
|
+
export declare type OrderStatus = HyperstreamApi.OrderStatus;
|
|
260
|
+
|
|
261
|
+
export declare type OrderTimestamps = HyperstreamApi.OrderTimestamps;
|
|
262
|
+
|
|
263
|
+
export declare type OrderTransactions = HyperstreamApi.OrderTransactions;
|
|
264
|
+
|
|
265
|
+
/** Quote detail card display mode. */
|
|
266
|
+
export declare type QuoteCardVisibility = "hidden" | "visible";
|
|
267
|
+
|
|
268
|
+
export declare type QuoteRequest = HyperstreamApi.QuoteRequest;
|
|
269
|
+
|
|
270
|
+
export declare type QuoteResponse = HyperstreamApi.GetQuotesResponse;
|
|
271
|
+
|
|
272
|
+
export declare type QuoteRoute = HyperstreamApi.Route;
|
|
273
|
+
|
|
274
|
+
/** Receive component mode: crypto-only, fiat-only, or both */
|
|
275
|
+
export declare type ReceiveMode = "crypto" | "fiat" | "all";
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Non-derivable state for the Receive (EXACT_OUTPUT) flow inside
|
|
279
|
+
* `<tokenflight-widget>`.
|
|
280
|
+
*
|
|
281
|
+
* Derivable values (phase, selectedQuote, paymentTokens) are computed in
|
|
282
|
+
* ReceiveComponent from payTokenQuotes + loadingQuotes + these signals.
|
|
283
|
+
*/
|
|
284
|
+
export declare interface ReceiveState {
|
|
285
|
+
targetToken: ResolvedToken | null;
|
|
286
|
+
targetAmount: string;
|
|
287
|
+
/** Set before execution starts for TransactionComplete display */
|
|
288
|
+
fromToken: ResolvedToken | null;
|
|
289
|
+
/** Recipient address for cross-chain swaps */
|
|
290
|
+
recipient: string | null;
|
|
291
|
+
walletAddress: string | null;
|
|
292
|
+
/** Current execution phase, or null when idle/quoting/quoted */
|
|
293
|
+
execPhase: ExecPhase | null;
|
|
294
|
+
order: OrderResponse | null;
|
|
295
|
+
error: string | null;
|
|
296
|
+
errorCode: string | null;
|
|
297
|
+
}
|
|
109
298
|
|
|
110
299
|
export declare interface RegisterElementsOptions {
|
|
111
300
|
walletAdapter?: IWalletAdapter;
|
|
@@ -127,6 +316,8 @@ export declare interface RegisterElementsOptions {
|
|
|
127
316
|
hideTitle?: boolean;
|
|
128
317
|
/** Default hide-powered-by flag. */
|
|
129
318
|
hidePoweredBy?: boolean;
|
|
319
|
+
/** Default hide-provider flag (hides "via {provider}" badge on the tracking page). */
|
|
320
|
+
hideProvider?: boolean;
|
|
130
321
|
/** Default no-background flag. */
|
|
131
322
|
noBackground?: boolean;
|
|
132
323
|
/** Default no-border flag. */
|
|
@@ -137,27 +328,50 @@ export declare interface RegisterElementsOptions {
|
|
|
137
328
|
rpcOverrides?: Record<string, string>;
|
|
138
329
|
/** Default supported chain id allowlist. */
|
|
139
330
|
supportedChainIds?: number[];
|
|
331
|
+
/** Referrer address that receives the fee. Passed through to quote API. */
|
|
332
|
+
referrer?: string;
|
|
333
|
+
/** Referrer fee in basis points (e.g. 30 = 0.3%). Passed through to quote API. */
|
|
334
|
+
referrerFeeBps?: number;
|
|
140
335
|
}
|
|
141
336
|
|
|
142
337
|
export declare function registerWidgetElement(options?: RegisterElementsOptions): void;
|
|
143
338
|
|
|
339
|
+
/** Resolved token with full metadata for local display state */
|
|
340
|
+
export declare interface ResolvedToken {
|
|
341
|
+
chainId: number;
|
|
342
|
+
address: string;
|
|
343
|
+
symbol?: string;
|
|
344
|
+
name?: string;
|
|
345
|
+
decimals?: number;
|
|
346
|
+
logoURI?: string;
|
|
347
|
+
priceUsd?: number;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export declare type RouteQuote = HyperstreamApi.Quote;
|
|
351
|
+
|
|
352
|
+
export declare type RouteTag = HyperstreamApi.RouteTag;
|
|
353
|
+
|
|
354
|
+
export declare type SolanaApproval = HyperstreamApi.SolanaApproval;
|
|
355
|
+
|
|
144
356
|
/** Solana sign and send transaction action */
|
|
145
|
-
declare interface SolanaSignAndSendAction {
|
|
357
|
+
export declare interface SolanaSignAndSendAction {
|
|
146
358
|
type: "solana_signAndSendTransaction";
|
|
147
359
|
transaction: string;
|
|
148
360
|
}
|
|
149
361
|
|
|
150
362
|
/** Solana sign transaction action */
|
|
151
|
-
declare interface SolanaSignTransactionAction {
|
|
363
|
+
export declare interface SolanaSignTransactionAction {
|
|
152
364
|
type: "solana_signTransaction";
|
|
153
365
|
transaction: string;
|
|
154
366
|
}
|
|
155
367
|
|
|
368
|
+
export declare type SubmitDepositResponse = HyperstreamApi.SubmitDepositResponse;
|
|
369
|
+
|
|
156
370
|
/** Supported locale identifiers. Accepts any string for forward-compat; known values get bundled translations. */
|
|
157
371
|
export declare type SupportedLocale = "en-US" | "zh-CN" | "zh-TW" | "ja-JP" | "ko-KR" | (string & {});
|
|
158
372
|
|
|
159
373
|
/** Data emitted on swap error */
|
|
160
|
-
declare interface SwapErrorData {
|
|
374
|
+
export declare interface SwapErrorData {
|
|
161
375
|
code: string;
|
|
162
376
|
message: string;
|
|
163
377
|
details?: unknown;
|
|
@@ -166,8 +380,33 @@ declare interface SwapErrorData {
|
|
|
166
380
|
/** Payment methods available in swap widget */
|
|
167
381
|
export declare type SwapPayMethod = "crypto" | "card";
|
|
168
382
|
|
|
383
|
+
/** Swap flow phases */
|
|
384
|
+
export declare type SwapPhase = "idle" | "quoting" | "quoted" | "building" | "awaiting-wallet" | "submitting" | "tracking" | "success" | "error";
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Non-derivable state for `<tokenflight-swap>`.
|
|
388
|
+
*
|
|
389
|
+
* Derivable values (routes, quoteId, selectedRouteId, outputAmount, phase)
|
|
390
|
+
* are computed in SwapComponent from TanStack Query + these signals.
|
|
391
|
+
*/
|
|
392
|
+
export declare interface SwapState {
|
|
393
|
+
fromToken: ResolvedToken | null;
|
|
394
|
+
toToken: ResolvedToken | null;
|
|
395
|
+
inputAmount: string;
|
|
396
|
+
/** Recipient address for cross-chain swaps */
|
|
397
|
+
recipient: string | null;
|
|
398
|
+
walletAddress: string | null;
|
|
399
|
+
/** Current execution phase, or null when idle/quoting/quoted */
|
|
400
|
+
execPhase: ExecPhase | null;
|
|
401
|
+
order: OrderResponse | null;
|
|
402
|
+
error: string | null;
|
|
403
|
+
errorCode: string | null;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export { SwapStrategy }
|
|
407
|
+
|
|
169
408
|
/** Data emitted on swap success */
|
|
170
|
-
declare interface SwapSuccessData {
|
|
409
|
+
export declare interface SwapSuccessData {
|
|
171
410
|
orderId: string;
|
|
172
411
|
fromToken: string;
|
|
173
412
|
toToken: string;
|
|
@@ -176,8 +415,9 @@ declare interface SwapSuccessData {
|
|
|
176
415
|
txHash: string;
|
|
177
416
|
}
|
|
178
417
|
|
|
179
|
-
|
|
180
|
-
|
|
418
|
+
export { TERMINAL_FIAT_STATUSES }
|
|
419
|
+
|
|
420
|
+
export { TERMINAL_ORDER_STATUSES }
|
|
181
421
|
|
|
182
422
|
/**
|
|
183
423
|
* Override specific UI labels without switching locale. Use for white-label
|
|
@@ -189,11 +429,43 @@ declare type SwapV2PayMethod = SwapPayMethod;
|
|
|
189
429
|
* Keys are semantic (not i18n message IDs) so they remain stable across widget
|
|
190
430
|
* versions and don't leak internal implementation details.
|
|
191
431
|
*/
|
|
192
|
-
declare interface TextOverrides {
|
|
432
|
+
export declare interface TextOverrides {
|
|
193
433
|
/** Label above the source/from token panel. Default: "You pay" */
|
|
194
434
|
youPay?: string;
|
|
195
435
|
/** Label above the destination/to token panel. Default: "You receive" */
|
|
196
436
|
youReceive?: string;
|
|
437
|
+
/** Step 1 title (pending). Default: "Sign in wallet" */
|
|
438
|
+
trackingSignTitle?: string;
|
|
439
|
+
/** Step 1 title (done). Default: "Signed in wallet" */
|
|
440
|
+
trackingSignedTitle?: string;
|
|
441
|
+
/** Step 1 subtitle (pending). Default: "Confirm in your wallet..." */
|
|
442
|
+
trackingSignSubtitle?: string;
|
|
443
|
+
/** Step 1 subtitle (done). Default: "Signature submitted" */
|
|
444
|
+
trackingSignedSubtitle?: string;
|
|
445
|
+
/** Step 2 title. Default: "Deposit on {chain}" */
|
|
446
|
+
trackingDepositTitle?: string;
|
|
447
|
+
/** Step 2 subtitle (pending). Default: "Waiting for confirmation..." */
|
|
448
|
+
trackingDepositSubtitle?: string;
|
|
449
|
+
/** Step 2 subtitle (done). Default: "Confirmed on-chain" */
|
|
450
|
+
trackingDepositConfirmedSubtitle?: string;
|
|
451
|
+
/** Step 3 title. Default: "Provider filling your order" */
|
|
452
|
+
trackingFillTitle?: string;
|
|
453
|
+
/** Step 3 subtitle. Default: "Via {provider}" */
|
|
454
|
+
trackingFillSubtitle?: string;
|
|
455
|
+
/** Step 4 title. Default: "Filled on {chain}" */
|
|
456
|
+
trackingCompleteTitle?: string;
|
|
457
|
+
/** Step 4 subtitle. Default: "Tokens delivered" */
|
|
458
|
+
trackingCompleteSubtitle?: string;
|
|
459
|
+
/** Fiat step 1 title. Default: "Awaiting payment" */
|
|
460
|
+
trackingPaymentTitle?: string;
|
|
461
|
+
/** Fiat step 1 subtitle (done). Default: "Payment confirmed" */
|
|
462
|
+
trackingPaymentConfirmedSubtitle?: string;
|
|
463
|
+
/** Fiat swap step title (jump strategy). Default: "Swapping tokens" */
|
|
464
|
+
trackingSwapTitle?: string;
|
|
465
|
+
/** Fiat final step title. Default: "Purchase complete" */
|
|
466
|
+
trackingPurchaseTitle?: string;
|
|
467
|
+
/** Fiat final step subtitle (done). Default: "Tokens delivered to your wallet" */
|
|
468
|
+
trackingDeliverySubtitle?: string;
|
|
197
469
|
}
|
|
198
470
|
|
|
199
471
|
/** All first-party CSS custom properties exposed for theming. */
|
|
@@ -202,8 +474,10 @@ declare type TfCssVar = "--tf-bg" | "--tf-bg-secondary" | "--tf-bg-elevated" | "
|
|
|
202
474
|
/** Visual theme mode. */
|
|
203
475
|
export declare type Theme = "light" | "dark" | "auto";
|
|
204
476
|
|
|
477
|
+
export declare type TokenExtensions = HyperstreamApi.TokenExtensions;
|
|
478
|
+
|
|
205
479
|
/** Shared configuration fields for both widgets */
|
|
206
|
-
declare interface TokenFlightConfigBase {
|
|
480
|
+
export declare interface TokenFlightConfigBase {
|
|
207
481
|
/** HyperStream API endpoint */
|
|
208
482
|
apiEndpoint?: string;
|
|
209
483
|
/** Fiat on-ramp API endpoint (default: https://fiat.hyperstream.dev) */
|
|
@@ -222,6 +496,10 @@ declare interface TokenFlightConfigBase {
|
|
|
222
496
|
hideTitle?: boolean;
|
|
223
497
|
/** Hide "Powered by TokenFlight" footer */
|
|
224
498
|
hidePoweredBy?: boolean;
|
|
499
|
+
/** Hide the "via {provider}" badge on the order tracking page */
|
|
500
|
+
hideProvider?: boolean;
|
|
501
|
+
/** Quote card display mode. EXACT_INPUT Swap defaults to "hidden". */
|
|
502
|
+
quoteCard?: QuoteCardVisibility;
|
|
225
503
|
/** Remove container background (transparent) */
|
|
226
504
|
noBackground?: boolean;
|
|
227
505
|
/** Remove container border and shadow */
|
|
@@ -232,6 +510,31 @@ declare interface TokenFlightConfigBase {
|
|
|
232
510
|
* are decimal chain IDs as strings.
|
|
233
511
|
*/
|
|
234
512
|
rpcOverrides?: Record<string, string>;
|
|
513
|
+
/** Referrer address that receives the fee. Passed through to the quote API. */
|
|
514
|
+
referrer?: string;
|
|
515
|
+
/** Referrer fee in basis points (e.g. 30 = 0.3%). Passed through to the quote API. */
|
|
516
|
+
referrerFeeBps?: number;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export { TokenFlightError }
|
|
520
|
+
|
|
521
|
+
/** Attributes accepted by `<tokenflight-fiat>`. */
|
|
522
|
+
export declare interface TokenFlightFiatAttributes {
|
|
523
|
+
"api-endpoint"?: string;
|
|
524
|
+
target?: string;
|
|
525
|
+
recipient?: string;
|
|
526
|
+
"fiat-currency"?: string;
|
|
527
|
+
"title-text"?: string;
|
|
528
|
+
"title-image"?: string;
|
|
529
|
+
theme?: Theme;
|
|
530
|
+
locale?: SupportedLocale;
|
|
531
|
+
"csp-nonce"?: string;
|
|
532
|
+
icon?: string;
|
|
533
|
+
"hide-title"?: BooleanAttribute;
|
|
534
|
+
"hide-powered-by"?: BooleanAttribute;
|
|
535
|
+
"hide-provider"?: BooleanAttribute;
|
|
536
|
+
"no-background"?: BooleanAttribute;
|
|
537
|
+
"no-border"?: BooleanAttribute;
|
|
235
538
|
}
|
|
236
539
|
|
|
237
540
|
export declare const TokenFlightWidget: {
|
|
@@ -279,8 +582,12 @@ export declare interface TokenFlightWidgetAttributes {
|
|
|
279
582
|
"csp-nonce"?: string;
|
|
280
583
|
"hide-title"?: BooleanAttribute;
|
|
281
584
|
"hide-powered-by"?: BooleanAttribute;
|
|
585
|
+
"hide-provider"?: BooleanAttribute;
|
|
586
|
+
"quote-card"?: "hidden" | "visible";
|
|
282
587
|
"no-background"?: BooleanAttribute;
|
|
283
588
|
"no-border"?: BooleanAttribute;
|
|
589
|
+
"referrer"?: string;
|
|
590
|
+
"referrer-fee-bps"?: string | number;
|
|
284
591
|
}
|
|
285
592
|
|
|
286
593
|
/** Configuration for Widget component (auto-selects Swap or Deposit UX based on config) */
|
|
@@ -303,9 +610,9 @@ export declare interface TokenFlightWidgetConfig extends TokenFlightConfigBase {
|
|
|
303
610
|
/** Address the filler should refund to if the fill fails (sent as `refundTo` on quote requests). */
|
|
304
611
|
refundTo?: string;
|
|
305
612
|
/** Payment methods to offer (default: ["crypto"]) */
|
|
306
|
-
methods?:
|
|
613
|
+
methods?: SwapPayMethod[];
|
|
307
614
|
/** Default active pay method tab (default: "crypto") */
|
|
308
|
-
defaultPayMethod?:
|
|
615
|
+
defaultPayMethod?: SwapPayMethod;
|
|
309
616
|
/** Fiat currency code for card payments (default: "USD") */
|
|
310
617
|
fiatCurrency?: string;
|
|
311
618
|
/** Whitelist of allowed source tokens (CAIP-10) */
|
|
@@ -333,41 +640,65 @@ export declare interface TokenFlightWidgetOptions {
|
|
|
333
640
|
* - CAIP-10 string: "eip155:1:0x..."
|
|
334
641
|
* - JSON string: '{"chainId":1,"address":"0x..."}'
|
|
335
642
|
*/
|
|
336
|
-
declare type TokenIdentifier = string | TokenTarget;
|
|
643
|
+
export declare type TokenIdentifier = string | TokenTarget;
|
|
644
|
+
|
|
645
|
+
export declare type TokenInfo = HyperstreamApi.Token;
|
|
646
|
+
|
|
647
|
+
export declare type TokenListResponse = HyperstreamApi.GetTokensResponse;
|
|
648
|
+
|
|
649
|
+
export declare type TokenMeta = HyperstreamApi.TokenMeta;
|
|
650
|
+
|
|
651
|
+
export declare type TokenSearchResponse = HyperstreamApi.TokenSearchResponse;
|
|
337
652
|
|
|
338
653
|
/** Token target as chain + address pair */
|
|
339
|
-
declare interface TokenTarget {
|
|
654
|
+
export declare interface TokenTarget {
|
|
340
655
|
chainId: number;
|
|
341
656
|
address: string;
|
|
342
657
|
}
|
|
343
658
|
|
|
659
|
+
export declare type TradeType = HyperstreamApi.TradeType;
|
|
660
|
+
|
|
344
661
|
/** Union of all wallet action types */
|
|
345
|
-
declare type WalletAction = EvmWalletAction | SolanaSignTransactionAction | SolanaSignAndSendAction;
|
|
662
|
+
export declare type WalletAction = EvmWalletAction | SolanaSignTransactionAction | SolanaSignAndSendAction;
|
|
346
663
|
|
|
347
664
|
/** Result of executing a wallet action */
|
|
348
|
-
declare interface WalletActionResult {
|
|
665
|
+
export declare interface WalletActionResult {
|
|
349
666
|
success: boolean;
|
|
350
667
|
data?: unknown;
|
|
351
668
|
error?: string;
|
|
669
|
+
/**
|
|
670
|
+
* Optional: JSON-RPC / EIP-1193 provider error code (e.g. `-32603`,
|
|
671
|
+
* `4001`). Populated by adapters when the underlying error object
|
|
672
|
+
* exposes a numeric `.code` so downstream callers (notably the
|
|
673
|
+
* Coinbase `-32603` fallback in `safeSwitchChain`) can reliably
|
|
674
|
+
* detect provider signatures without relying on stringified messages.
|
|
675
|
+
*/
|
|
676
|
+
errorCode?: number;
|
|
677
|
+
/**
|
|
678
|
+
* Optional: the provider's structured error data (e.g. `data.cause`),
|
|
679
|
+
* preserved from the thrown error for detectors that inspect nested
|
|
680
|
+
* fields. Adapters may pass through whatever shape the provider gave.
|
|
681
|
+
*/
|
|
682
|
+
errorData?: unknown;
|
|
352
683
|
txHash?: string;
|
|
353
684
|
}
|
|
354
685
|
|
|
355
686
|
/** Wallet action types */
|
|
356
|
-
declare type WalletActionType = "eip1193_request" | "solana_signTransaction" | "solana_signAndSendTransaction";
|
|
687
|
+
export declare type WalletActionType = "eip1193_request" | "solana_signTransaction" | "solana_signAndSendTransaction";
|
|
357
688
|
|
|
358
689
|
/** Data emitted when wallet is connected */
|
|
359
|
-
declare interface WalletConnectedData {
|
|
690
|
+
export declare interface WalletConnectedData {
|
|
360
691
|
address: string;
|
|
361
692
|
chainType: string;
|
|
362
693
|
}
|
|
363
694
|
|
|
364
695
|
/** Wallet event payload */
|
|
365
|
-
declare interface WalletEvent {
|
|
696
|
+
export declare interface WalletEvent {
|
|
366
697
|
type: WalletEventType;
|
|
367
698
|
data?: unknown;
|
|
368
699
|
}
|
|
369
700
|
|
|
370
701
|
/** Wallet event types */
|
|
371
|
-
declare type WalletEventType = "connect" | "disconnect" | "chainChanged" | "accountsChanged";
|
|
702
|
+
export declare type WalletEventType = "connect" | "disconnect" | "chainChanged" | "accountsChanged";
|
|
372
703
|
|
|
373
704
|
export { }
|
package/dist/widget.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e,c as t,r as n,t as r}from"./errors-BZKSEUy5.js";import"./shared.module-C-kWMzqW.js";import{n as i,t as a}from"./register-widget-BrN4UxSU.js";import"./widget-DQLVNkNn.js";export{r as ErrorCode,n as TERMINAL_FIAT_STATUSES,e as TERMINAL_ORDER_STATUSES,t as TokenFlightError,i as TokenFlightWidget,a as registerWidgetElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=e=>`支付 ${e.amount}`,ee=`等待确认中...`,te=`在浏览器中查看`,t=`交付未成功`,n=`选择法币支付通道`,r=`输入金额`,i=e=>`还有 ${e.count} 家`,a=`订单已过期`,o=e=>`通过 ${e.provider} 支付 ${e.amount}`,s=`已复制`,c=`我们将为您找到最优汇率`,l=e=>`通过 ${e.provider} 继续`,u=`尝试选择其他链或搜索特定代币`,d=`即将推出`,f=e=>`通过 ${e.provider}`,p=`搜索结果`,m=`代币已送达您的钱包`,h=`支付`,g=`您的代币已送达`,_=e=>`≈ $${e.formatUsd}`,v=`收款地址`,y=`确认`,b=`连接钱包以查看支付选项`,x=`未找到代币`,S=`连接钱包或输入地址以获取报价`,C=`请在钱包中确认...`,w=`退款交易`,T=e=>`购买 ${e.amt} ${e.sym}`,E=`兑换`,D=`通过 DEX 兑换中...`,O=`交易失败 — 重试`,k=`无做市商接受此订单`,A=`返回`,j=`支付`,M=`执行中...`,N=`选择目标代币`,P=e=>`已在 ${e.chain} 上完成`,F=`支付已确认`,I=`购买`,L=`关闭`,R=`暂无可用报价`,z=`退款进行中`,B=e=>`在 ${e.chain} 上存入`,V=`路由`,H=`加密货币`,U=`已签名`,W=`订单失败`,G=`输入金额以开始`,K=`接收地址`,q=e=>`≈ $${e.addThousandsSeparator}`,J=`使用信用卡或借记卡购买`,Y=`查看所有链`,X=`兑换`,Z=`发送方`,Q=`正在处理您的订单...`,ne=`选择支付代币`,re=e=>`通过 ${e.provider}`,ie=`报价详情`,ae=`总费用`,oe=`已支付`,se=`重试`,ce=`查看兑换`,le=`提供商正在执行订单`,ue=`代币兑换中`,de=`你的代币`,fe=e=>`正在 ${e.chain} 上退还代币`,pe=`银行卡`,me=`交换代币`,he=`复制错误`,ge=`法币支付`,_e=`处理中...`,ve=`购买失败`,$=`新购买`,ye=`使用信用卡或借记卡支付`,be=`已上链确认`,xe=`钱包签名`,Se=`发送`,Ce=`接收代币所必需`,we=`最大`,Te=`费用`,Ee=`无法完成`,De=`热门代币`,Oe=`完成交易`,ke=e=>`${e.seconds}秒内送达`,Ae=`使用支付`,je=`兑换成功`,Me=`代币已送达`,Ne=`收取`,Pe=`最低`,Fe=`按名称或地址搜索`,Ie=e=>`~${e.value}秒`,Le=`0`,Re=`提供商`,ze=`预计时间`,Be=`余额不足`,Ve=`此链地址格式无效`,He=`输入目标地址`,Ue=`没有可用的代币`,We=`最高`,Ge=`转账交易`,Ke=`确认兑换`,qe=`该代币不支持直接刷卡购买,我们会先购买 USDC,再自动兑换为您需要的代币。`,Je=`报价失败`,Ye=e=>`对比其他 ${e.count} 家服务商`,Xe=e=>`直接购买 ${e.arg0}`,Ze=e=>`在 ${e.chain} 上`,Qe=e=>`~${e.value}分钟`,$e=`无可用路径`,et=`代币已到账!`,tt=`等待付款`,nt=e=>`通过 ${e.token} 路由以获取最优价格`,rt=`新交易`,it=`输入收款地址`,at=`钱包与源链不匹配`,ot=`查看`,st=`最优价格`,ct=`您的订单无法完成。`,lt=e=>`正在将 ${e.symbol} 发送到您的钱包...`,ut=`您的资金已退回钱包。`,dt=`查看报价详情`,ft=`签名已提交`,pt=`存入交易`,mt=`连接钱包`,ht=`使用钱包中的代币支付`,gt=`收到`,_t=`购买完成`,vt=`所选代币当前无法用于此次购买`,yt=`输入收款地址`,bt=`推荐`,xt=`钱包账户`,St=e=>`余额: ${e.fromBalance}`,Ct=`购买完成`,wt=`重试`,Tt=`选择代币`,Et={"10189s3":e,"10ioi7e":ee,"10v0i5g":te,"115lknq":t,"118a77s":n,"119fv83":r,"11k1vkl":i,"12rrl0i":a,"132vna6":o,"13bzcw5":s,"13i9oqu":c,"13l4n4r":l,"13x5i2v":u,"14ho4vt":d,"14j1lze":f,"15bw477":p,"1685rko":m,"17kq51m":h,"17wtaao":g,"188897k":_,"18cmny0":v,"18tbqwf":y,"18y1lrp":b,"19is1h8":x,"19ne1ha":S,"1bze7sg":C,"1c5n7ll":w,"1cei180":T,"1dyojgg":E,"1g8tdk7":D,"1hb73om":O,"1hdpo6q":k,"1hzmxtu":A,"1i7coq1":j,"1ih47b3":M,"1ix1b7w":N,"1ixbbo7":P,"1jhuo24":F,"1ka8utn":I,"1l0xxoj":L,"1ne9nkz":R,"1nhkl7x":z,"1nn0owb":B,"1nvxkfy":V,"1o1b4a8":H,"1o4ofyx":U,"1ok4m5g":W,"1olegnl":G,"1oncz6g":K,"1ovj1tk":q,"1q45kup":J,"1qbiehv":Y,"1rkfalq":X,"1rnxx1g":Z,"1spu5st":Q,"1t0r88u":ne,"1t86tnu":re,"1tn6f91":ie,"1viukn9":ae,"1w0n607":oe,"1w68n16":se,"1x5xdes":ce,"1y28pgi":le,"1y6hn5o":ue,"1yijk6g":de,"27fhcv":fe,"2b8ghr":pe,"2eikro":me,"2mzna2":he,"2zh3gr":ge,"344av8":_e,"3pklqf":ve,"3u5vqs":$,"6c0jc7":ye,"6c5l2f":be,"6gkge0":xe,"6s9hn9":Se,"7m2ht3":Ce,"7v6g6x":we,"9l4mg3":Te,"9p7amh":Ee,bdctly:De,bdo3n8:Oe,biwlqk:ke,cgzgvn:Ae,cjn1xs:je,cnwfg3:Me,cwk7r6:Ne,cx9lh3:Pe,dizog6:Fe,ek03j3:Ie,epw9f3:`0`,evz7q4:Re,f45rwo:ze,fcy4ey:Be,fo0vw0:Ve,fpand1:He,g7pjpv:Ue,gtvgs9:We,hzq69q:Ge,ibrnk6:Ke,ifug2i:qe,jf8ts4:Je,jmpbi6:Ye,jnzipx:Xe,k47stp:Ze,knrcsh:Qe,ln9xiv:$e,mnlddk:et,n9zkql:tt,ofi1rq:nt,pmqvh0:rt,pom1h2:it,q4mqcd:at,q5w460:ot,r7v9s7:st,rvctng:ct,sykid7:lt,t1rvqg:ut,tbygoy:dt,tgp8yw:ft,tjg3i3:pt,u61kge:mt,udneg1:ht,va18uh:gt,vum0cd:_t,wuxjl9:vt,wx5bee:yt,xel5qk:bt,xphk5n:xt,y6jqu9:St,yhtv6l:Ct,zkouah:wt,zz4mrw:Tt};export{Ke as _100907z,gt as _108j3sk,oe as _10lgc56,Z as _10n9ta8,h as _113vzpe,it as _11ncipg,H as _11p3b1r,$e as _12qyh2x,z as _13ym6k2,pe as _14oyo32,De as _15iyda3,S as _15vbpgm,s as _16j2pbi,qe as _16ln1wz,je as _16pzx0g,Ee as _16rump9,N as _17g2rjk,_ as _18346vt,I as _1982g2x,xt as _1biskvr,D as _1bjtgx1,Me as _1cmz8k7,ht as _1cpadi9,q as _1d7sodl,at as _1e023il,u as _1e5aqjt,B as _1ea99j0,te as _1f4czmp,be as _1f8nqa3,ce as _1f8umlr,K as _1fe46d3,Ce as _1fikhaa,rt as _1fu9qvd,E as _1g7ofg0,Ae as _1gfjrn0,ke as _1gma9hv,fe as _1hs819x,ft as _1ht75o0,t as _1i8i0au,Ye as _1i9sfkh,L as _1ib6ekl,J as _1ievltk,st as _1in1gel,G as _1in9ocp,He as _1ju6xlj,T as _1jvje3y,Te as _1kd3yrp,A as _1kez60s,ue as _1krtsvx,nt as _1kvlpuf,ye as _1l1rqi2,X as _1l2nmmx,j as _1lra4kg,dt as _1mmcyfz,vt as _1n1igys,O as _1na1vy4,he as _1nd7gbf,o as _1nwhws6,Ie as _1o0vi1j,Ge as _1o2h7a2,l as _1o8feo7,Ue as _1om32zr,w as _1oqs23j,wt as _1popw3r,ee as _1qamgmj,V as _1rggu8s,Qe as _1s54fdc,c as _1s9ryeq,xe as _1t3gki9,i as _1ulsa90,m as _1urf8wf,n as _1w2bswr,P as _1wwy4yj,e as _1wx2fw2,lt as _1y7hba4,x as _1yv1ajq,yt as _3mtvnb,Re as _3w8t28,ne as _41y3qp,Y as _454sub,ot as _49235i,W as _4itr6p,U as _4opuqb,ge as _5af8qp,y as _5r87wo,b as _78b61s,Se as _8edkty,Oe as _a5vz6z,Fe as _al7a0k,we as _bii6w9,Le as _cnghfj,M as _czpegb,pt as _d7bf51,Je as _doc1yy,R as _g3pfjv,tt as _gkmqsa,f as _hyiyqa,d as _i9ury1,v as _ide9vv,mt as _ig1w2,St as _jpt8np,ae as _kmeu9o,le as _kqdlbv,bt as _l5s0fl,Xe as _l78r94,de as _l800fy,g as _ly147p,Ne as _mdvri5,Q as _np8jou,a as _nrzzox,Ze as _o3um2w,F as _oj2fr8,_t as _p5ybee,k as _pqml54,ve as _pr6lte,_e as _q0rsrj,ut as _qm85b2,p as _r3yix2,C as _sf0mgy,Tt as _si8n6l,We as _swoaip,Ct as _t0vnn4,re as _t91lwj,Ve as _ty2nen,ct as _u7tj7p,ze as _uc0jju,r as _uu4paz,et as _vogk37,ie as _wa8i8c,se as _xavgbs,me as _xkdtbf,$ as _ystooe,Pe as _z6jr7i,Be as _zzusn5,Et as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=e=>`支付 ${e.amount}`,ee=`等待確認中...`,te=`在瀏覽器中查看`,t=`交付未成功`,n=`選擇法幣支付通道`,r=`輸入金額`,i=e=>`還有 ${e.count} 家`,a=`訂單已過期`,o=e=>`透過 ${e.provider} 支付 ${e.amount}`,s=`已複製`,c=`我們將為您找到最優匯率`,l=e=>`透過 ${e.provider} 繼續`,u=`嘗試選擇其他鏈或搜索特定代幣`,d=`即將推出`,f=e=>`透過 ${e.provider}`,p=`搜尋結果`,m=`代幣已送達您的錢包`,h=`支付`,g=`您的代幣已送達`,_=e=>`≈ $${e.formatUsd}`,v=`收款地址`,y=`確認`,b=`連接錢包以查看支付選項`,x=`未找到代幣`,S=`連接錢包或輸入地址以獲取報價`,C=`請在錢包中確認...`,w=`退款交易`,T=e=>`購買 ${e.amt} ${e.sym}`,E=`兌換`,D=`透過 DEX 兌換中...`,O=`交易失敗 — 重試`,k=`無做市商接受此訂單`,A=`返回`,j=`支付`,M=`執行中...`,N=`選擇目標代幣`,P=e=>`已在 ${e.chain} 上完成`,F=`支付已確認`,I=`購買`,L=`關閉`,R=`暫無可用報價`,z=`退款進行中`,B=e=>`在 ${e.chain} 上存入`,V=`路由`,H=`加密貨幣`,U=`已簽名`,W=`訂單失敗`,G=`輸入金額以開始`,K=`接收地址`,q=e=>`≈ $${e.addThousandsSeparator}`,J=`使用信用卡或簽帳卡購買`,Y=`查看所有鏈`,X=`兌換`,Z=`發送方`,Q=`正在處理您的訂單...`,ne=`選擇支付代幣`,re=e=>`透過 ${e.provider}`,ie=`報價詳情`,ae=`總費用`,oe=`已支付`,se=`重試`,ce=`查看兌換`,le=`提供商正在執行訂單`,ue=`代幣兌換中`,de=`你的代幣`,fe=e=>`正在 ${e.chain} 上退還代幣`,pe=`銀行卡`,me=`交換代幣`,he=`複製錯誤`,ge=`法幣支付`,_e=`處理中...`,ve=`購買失敗`,$=`新購買`,ye=`使用信用卡或簽帳卡付款`,be=`已上鏈確認`,xe=`錢包簽名`,Se=`發送`,Ce=`接收代幣所必需`,we=`最大`,Te=`費用`,Ee=`無法完成`,De=`熱門代幣`,Oe=`完成交易`,ke=e=>`${e.seconds}秒內送達`,Ae=`使用支付`,je=`兌換成功`,Me=`代幣已送達`,Ne=`收取`,Pe=`最低`,Fe=`按名稱或地址搜索`,Ie=e=>`~${e.value}秒`,Le=`0`,Re=`提供商`,ze=`預計時間`,Be=`餘額不足`,Ve=`此鏈地址格式無效`,He=`輸入目標地址`,Ue=`沒有可用的代幣`,We=`最高`,Ge=`轉帳交易`,Ke=`確認兌換`,qe=`該代幣不支援直接刷卡購買,我們會先購買 USDC,再自動兌換為您需要的代幣。`,Je=`報價失敗`,Ye=e=>`比較其他 ${e.count} 家服務商`,Xe=e=>`直接購買 ${e.arg0}`,Ze=e=>`在 ${e.chain} 上`,Qe=e=>`~${e.value}分鐘`,$e=`無可用路徑`,et=`代幣已到帳!`,tt=`等待付款`,nt=e=>`透過 ${e.token} 路由以獲取最優價格`,rt=`新交易`,it=`輸入收款地址`,at=`錢包與來源鏈不匹配`,ot=`查看`,st=`最優價格`,ct=`您的訂單無法完成。`,lt=e=>`正在將 ${e.symbol} 發送到您的錢包...`,ut=`您的資金已退回錢包。`,dt=`查看報價詳情`,ft=`簽名已提交`,pt=`存入交易`,mt=`連接錢包`,ht=`使用錢包中的代幣支付`,gt=`收到`,_t=`購買完成`,vt=`所選代幣目前無法用於此次購買`,yt=`輸入收款地址`,bt=`推薦`,xt=`錢包帳戶`,St=e=>`餘額: ${e.fromBalance}`,Ct=`購買完成`,wt=`重試`,Tt=`選擇代幣`,Et={"10189s3":e,"10ioi7e":ee,"10v0i5g":te,"115lknq":t,"118a77s":n,"119fv83":r,"11k1vkl":i,"12rrl0i":a,"132vna6":o,"13bzcw5":s,"13i9oqu":c,"13l4n4r":l,"13x5i2v":u,"14ho4vt":d,"14j1lze":f,"15bw477":p,"1685rko":m,"17kq51m":h,"17wtaao":g,"188897k":_,"18cmny0":v,"18tbqwf":y,"18y1lrp":b,"19is1h8":x,"19ne1ha":S,"1bze7sg":C,"1c5n7ll":w,"1cei180":T,"1dyojgg":E,"1g8tdk7":D,"1hb73om":O,"1hdpo6q":k,"1hzmxtu":A,"1i7coq1":j,"1ih47b3":M,"1ix1b7w":N,"1ixbbo7":P,"1jhuo24":F,"1ka8utn":I,"1l0xxoj":L,"1ne9nkz":R,"1nhkl7x":z,"1nn0owb":B,"1nvxkfy":V,"1o1b4a8":H,"1o4ofyx":U,"1ok4m5g":W,"1olegnl":G,"1oncz6g":K,"1ovj1tk":q,"1q45kup":J,"1qbiehv":Y,"1rkfalq":X,"1rnxx1g":Z,"1spu5st":Q,"1t0r88u":ne,"1t86tnu":re,"1tn6f91":ie,"1viukn9":ae,"1w0n607":oe,"1w68n16":se,"1x5xdes":ce,"1y28pgi":le,"1y6hn5o":ue,"1yijk6g":de,"27fhcv":fe,"2b8ghr":pe,"2eikro":me,"2mzna2":he,"2zh3gr":ge,"344av8":_e,"3pklqf":ve,"3u5vqs":$,"6c0jc7":ye,"6c5l2f":be,"6gkge0":xe,"6s9hn9":Se,"7m2ht3":Ce,"7v6g6x":we,"9l4mg3":Te,"9p7amh":Ee,bdctly:De,bdo3n8:Oe,biwlqk:ke,cgzgvn:Ae,cjn1xs:je,cnwfg3:Me,cwk7r6:Ne,cx9lh3:Pe,dizog6:Fe,ek03j3:Ie,epw9f3:`0`,evz7q4:Re,f45rwo:ze,fcy4ey:Be,fo0vw0:Ve,fpand1:He,g7pjpv:Ue,gtvgs9:We,hzq69q:Ge,ibrnk6:Ke,ifug2i:qe,jf8ts4:Je,jmpbi6:Ye,jnzipx:Xe,k47stp:Ze,knrcsh:Qe,ln9xiv:$e,mnlddk:et,n9zkql:tt,ofi1rq:nt,pmqvh0:rt,pom1h2:it,q4mqcd:at,q5w460:ot,r7v9s7:st,rvctng:ct,sykid7:lt,t1rvqg:ut,tbygoy:dt,tgp8yw:ft,tjg3i3:pt,u61kge:mt,udneg1:ht,va18uh:gt,vum0cd:_t,wuxjl9:vt,wx5bee:yt,xel5qk:bt,xphk5n:xt,y6jqu9:St,yhtv6l:Ct,zkouah:wt,zz4mrw:Tt};export{Ke as _100907z,gt as _108j3sk,oe as _10lgc56,Z as _10n9ta8,h as _113vzpe,it as _11ncipg,H as _11p3b1r,$e as _12qyh2x,z as _13ym6k2,pe as _14oyo32,De as _15iyda3,S as _15vbpgm,s as _16j2pbi,qe as _16ln1wz,je as _16pzx0g,Ee as _16rump9,N as _17g2rjk,_ as _18346vt,I as _1982g2x,xt as _1biskvr,D as _1bjtgx1,Me as _1cmz8k7,ht as _1cpadi9,q as _1d7sodl,at as _1e023il,u as _1e5aqjt,B as _1ea99j0,te as _1f4czmp,be as _1f8nqa3,ce as _1f8umlr,K as _1fe46d3,Ce as _1fikhaa,rt as _1fu9qvd,E as _1g7ofg0,Ae as _1gfjrn0,ke as _1gma9hv,fe as _1hs819x,ft as _1ht75o0,t as _1i8i0au,Ye as _1i9sfkh,L as _1ib6ekl,J as _1ievltk,st as _1in1gel,G as _1in9ocp,He as _1ju6xlj,T as _1jvje3y,Te as _1kd3yrp,A as _1kez60s,ue as _1krtsvx,nt as _1kvlpuf,ye as _1l1rqi2,X as _1l2nmmx,j as _1lra4kg,dt as _1mmcyfz,vt as _1n1igys,O as _1na1vy4,he as _1nd7gbf,o as _1nwhws6,Ie as _1o0vi1j,Ge as _1o2h7a2,l as _1o8feo7,Ue as _1om32zr,w as _1oqs23j,wt as _1popw3r,ee as _1qamgmj,V as _1rggu8s,Qe as _1s54fdc,c as _1s9ryeq,xe as _1t3gki9,i as _1ulsa90,m as _1urf8wf,n as _1w2bswr,P as _1wwy4yj,e as _1wx2fw2,lt as _1y7hba4,x as _1yv1ajq,yt as _3mtvnb,Re as _3w8t28,ne as _41y3qp,Y as _454sub,ot as _49235i,W as _4itr6p,U as _4opuqb,ge as _5af8qp,y as _5r87wo,b as _78b61s,Se as _8edkty,Oe as _a5vz6z,Fe as _al7a0k,we as _bii6w9,Le as _cnghfj,M as _czpegb,pt as _d7bf51,Je as _doc1yy,R as _g3pfjv,tt as _gkmqsa,f as _hyiyqa,d as _i9ury1,v as _ide9vv,mt as _ig1w2,St as _jpt8np,ae as _kmeu9o,le as _kqdlbv,bt as _l5s0fl,Xe as _l78r94,de as _l800fy,g as _ly147p,Ne as _mdvri5,Q as _np8jou,a as _nrzzox,Ze as _o3um2w,F as _oj2fr8,_t as _p5ybee,k as _pqml54,ve as _pr6lte,_e as _q0rsrj,ut as _qm85b2,p as _r3yix2,C as _sf0mgy,Tt as _si8n6l,We as _swoaip,Ct as _t0vnn4,re as _t91lwj,Ve as _ty2nen,ct as _u7tj7p,ze as _uc0jju,r as _uu4paz,et as _vogk37,ie as _wa8i8c,se as _xavgbs,me as _xkdtbf,$ as _ystooe,Pe as _z6jr7i,Be as _zzusn5,Et as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenflight/swap",
|
|
3
|
-
"version": "0.3.0-rc.
|
|
3
|
+
"version": "0.3.0-rc.2",
|
|
4
4
|
"description": "Embeddable Web Components for cross-chain token swaps",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Khalani",
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"types": "./dist/iframe.d.ts",
|
|
31
31
|
"import": "./dist/iframe.js"
|
|
32
32
|
},
|
|
33
|
+
"./iframe-entry": {
|
|
34
|
+
"types": "./dist/iframe-entry.d.ts",
|
|
35
|
+
"import": "./dist/iframe-entry.js"
|
|
36
|
+
},
|
|
33
37
|
"./bridge": {
|
|
34
38
|
"types": "./dist/bridge.d.ts",
|
|
35
39
|
"import": "./dist/bridge.js"
|
|
@@ -50,7 +54,7 @@
|
|
|
50
54
|
"access": "public"
|
|
51
55
|
},
|
|
52
56
|
"dependencies": {
|
|
53
|
-
"@tokenflight/api": "0.3.0-rc.
|
|
57
|
+
"@tokenflight/api": "0.3.0-rc.2"
|
|
54
58
|
},
|
|
55
59
|
"devDependencies": {
|
|
56
60
|
"@fluenti/cli": "^0.6.2",
|
package/dist/bridge-C9uFKAdS.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=1,t=0;function n(e,n){return{type:`tf:${e}`,protocolVersion:1,seq:++t,payload:n}}function r(e){if(typeof e!=`object`||!e)return null;let t=e;return typeof t.type!=`string`||!t.type.startsWith(`tf:`)||t.protocolVersion!==1||typeof t.seq!=`number`||!(`payload`in t)?null:e}function i(e,t){return e.type===t}var a=new Set;function o(){return crypto.randomUUID()}function s(e){if(a.has(e))return!1;if(a.add(e),a.size>1e4){let e=[...a];for(let t=0;t<5e3;t++)a.delete(e[t])}return!0}var c=[[/user (rejected|denied|cancelled|refused)/i,`USER_REJECTED`],[/chain.*switch|switch.*chain|network.*change/i,`CHAIN_SWITCH_FAILED`],[/insufficient.*funds|not enough/i,`INSUFFICIENT_FUNDS`],[/timed?\s*out|timeout/i,`TIMEOUT`]];function l(e){for(let[t,n]of c)if(t.test(e))return n;return`UNKNOWN`}function u(e){if(e instanceof Error){let t=e,n=t.code;return{code:typeof n==`string`?n:l(e.message),message:e.message,details:t.details}}if(typeof e==`string`)return{code:l(e),message:e};if(typeof e==`object`&&e){let t=e;return{code:typeof t.code==`string`?t.code:`UNKNOWN`,message:typeof t.message==`string`?t.message:String(e),details:t.details}}return{code:`UNKNOWN`,message:String(e)}}function d(e){let t=Error(e.message);return t.code=e.code,e.details!==void 0&&(t.details=e.details),t}var f,p=`https://embed.tokenflight.ai/widget`,m=15e3,h=500,g=class e{constructor(e){if(this.listeners=new Map,this.ready=!1,this.destroyed=!1,this.readyTimer=null,this.popup=null,this.popupPollTimer=null,this.popupOrderId=null,this.popupMessageHandler=null,this.handleMessage=e=>{if(this.destroyed||e.origin!==this.widgetOrigin||e.source!==this.iframe.contentWindow)return;let t=r(e.data);t&&(i(t,`tf:ready`)?this.handleReady(t.payload.version,t.payload.protocolVersion):i(t,`tf:signRequest`)?this.handleSignRequest(t.payload.requestId,t.payload.action,t.payload.timeoutMs):i(t,`tf:connectWallet`)?this.handleConnectWallet(t.payload.chainType):i(t,`tf:disconnectWallet`)?this.handleDisconnectWallet():i(t,`tf:event`)?this.handleWidgetEvent(t.payload.name,t.payload.data):i(t,`tf:resize`)?this.handleResize(t.payload.height):i(t,`tf:preOpenPopup`)?this.handlePreOpenPopup():i(t,`tf:navigatePopup`)&&this.navigatePopup(t.payload.url,t.payload.orderId))},this.options=e,this.wallet=e.wallet,typeof e.container==`string`){let t=document.querySelector(e.container);if(!t)throw Error(`TokenFlightBridge: container "${e.container}" not found`);this.container=t}else this.container=e.container;let t=e.iframeSrc??p,n=typeof window<`u`?window.location.href:void 0;this.widgetOrigin=new URL(t,n).origin,this.iframe=document.createElement(`iframe`),this.iframe.src=t,this.iframe.style.display=`block`,this.iframe.style.width=`100%`,this.iframe.style.height=`600px`,this.iframe.style.minWidth=`375px`,this.iframe.style.colorScheme=`normal`,this.iframe.style.borderRadius=`var(--tf-radius-xl, 20px)`,this.iframe.style.overflow=`hidden`,e.config.noBackground||(this.iframe.style.background=`var(--tf-bg, #0d0f14)`),e.config.noBorder?this.iframe.style.border=`none`:(this.iframe.style.border=`1px solid var(--tf-border, #252a38)`,this.iframe.style.boxShadow=`var(--tf-shadow-lg, none)`),this.iframe.setAttribute(`allow`,`camera;microphone;payment;clipboard-write`),this.iframe.setAttribute(`title`,`TokenFlight Widget`),this.container.appendChild(this.iframe),window.addEventListener(`message`,this.handleMessage),this.walletHandler=e=>{this.sendWalletState(e.type)},this.subscribeWalletEvents();let a=e.readyTimeout??m;this.readyTimer=setTimeout(()=>{!this.ready&&!this.destroyed&&e.onLoadError?.(Error(`TokenFlightBridge: widget did not send tf:ready within timeout`))},a)}setConfig(e){this.postToIframe(n(`setConfig`,e)),e.noBackground!==void 0&&(this.iframe.style.background=e.noBackground?``:`var(--tf-bg, #0d0f14)`),e.noBorder!==void 0&&(this.iframe.style.border=e.noBorder?`none`:`1px solid var(--tf-border, #252a38)`,this.iframe.style.boxShadow=e.noBorder?`none`:`var(--tf-shadow-lg, none)`)}setStyle(e){this.postToIframe(n(`setStyle`,e))}setWallet(e){this.unsubscribeWalletEvents(),this.wallet=e,this.subscribeWalletEvents(),this.sendWalletState()}on(e,t){let n=this.listeners.get(e);n||(n=new Set,this.listeners.set(e,n)),n.add(t)}off(e,t){this.listeners.get(e)?.delete(t)}destroy(){this.destroyed||(this.destroyed=!0,this.readyTimer&&(clearTimeout(this.readyTimer),this.readyTimer=null),window.removeEventListener(`message`,this.handleMessage),this.unsubscribeWalletEvents(),this.closePopup(),this.iframe.remove(),this.listeners.clear())}async handleReady(e,t){if(t!==1){this.options.onLoadError?.(Error(`TokenFlightBridge: protocol version mismatch (bridge=1, widget=${t})`));return}this.ready=!0,this.readyTimer&&(clearTimeout(this.readyTimer),this.readyTimer=null);let r=this.wallet?.isConnected()??!1,i=null;if(r&&this.wallet)try{i=await this.wallet.getAddress()}catch{}this.postToIframe(n(`init`,{config:this.options.config,style:this.options.style,walletAddress:i,connected:r})),this.options.onReady?.(e),this.emit(`ready`,{version:e})}async handleSignRequest(e,t,r){if(!this.wallet){this.postToIframe(n(`signResult`,{requestId:e,error:{code:`ADAPTER_ERROR`,message:`No wallet adapter configured`}}));return}try{let r=await this.wallet.executeWalletAction(t);this.postToIframe(n(`signResult`,{requestId:e,result:r}))}catch(t){this.postToIframe(n(`signResult`,{requestId:e,error:u(t)}))}}async handleConnectWallet(e){if(this.wallet)try{await this.wallet.connect(e)}catch{}}async handleDisconnectWallet(){if(this.wallet)try{await this.wallet.disconnect()}catch{}}handleWidgetEvent(e,t){let n=_[e];n&&this.emit(n,t)}handleResize(e){this.iframe.style.height=`${e}px`,this.emit(`resize`,{height:e})}handlePreOpenPopup(){this.closePopup(),this.popup=window.open(`about:blank`,`tf-payment`,`width=500,height=700`)}navigatePopup(e,t){if(!this.popup||this.popup.closed){this.postToIframe(n(`fiatPopupClosed`,{orderId:t}));return}try{let r=new URL(e);if(r.protocol!==`https:`&&r.protocol!==`http:`){this.postToIframe(n(`fiatPopupClosed`,{orderId:t}));return}}catch{this.postToIframe(n(`fiatPopupClosed`,{orderId:t}));return}this.popup.location.href=e,this.popupOrderId=t,this.installPopupMessageHandler(),this.popupPollTimer=setInterval(()=>{this.popup?.closed&&(this.closePopup(),this.postToIframe(n(`fiatPopupClosed`,{orderId:this.popupOrderId??t})),this.popupOrderId=null)},h)}installPopupMessageHandler(){if(this.popupMessageHandler)return;let e,t=this.options.config.fiatApiEndpoint;if(!t)return;try{e=new URL(t).origin}catch{return}let r=new Set([`widget_ready`,`order_completed`,`order_failed`,`widget_close`]);this.popupMessageHandler=t=>{if(this.destroyed||t.origin!==e)return;let i=t.data;if(!i||i.type!==`FIAT_WIDGET_EVENT`||typeof i.event!=`string`||!r.has(i.event))return;let a=this.popupOrderId;a&&(typeof i.orderId==`string`&&i.orderId!==a||this.postToIframe(n(`fiatProviderEvent`,{orderId:a,event:i.event,provider:typeof i.provider==`string`?i.provider:void 0,data:i.data??void 0})))},window.addEventListener(`message`,this.popupMessageHandler)}closePopup(){this.popupPollTimer&&(clearInterval(this.popupPollTimer),this.popupPollTimer=null),this.popupMessageHandler&&(window.removeEventListener(`message`,this.popupMessageHandler),this.popupMessageHandler=null),this.popup&&!this.popup.closed&&this.popup.close(),this.popup=null}subscribeWalletEvents(){if(this.wallet)for(let t of e.WALLET_EVENTS)this.wallet.on(t,this.walletHandler)}unsubscribeWalletEvents(){if(this.wallet)for(let t of e.WALLET_EVENTS)this.wallet.off(t,this.walletHandler)}async sendWalletState(e){if(!this.wallet)return;let t=this.wallet.isConnected(),r=null;if(t)try{r=await this.wallet.getAddress()}catch{}this.postToIframe(n(`walletState`,{connected:t,address:r,event:e}))}postToIframe(e){this.destroyed||this.iframe.contentWindow?.postMessage(e,this.widgetOrigin)}emit(e,t){let n=this.listeners.get(e);if(n)for(let e of n)try{e(t)}catch{}}};f=g,f.WALLET_EVENTS=[`connect`,`disconnect`,`chainChanged`,`accountsChanged`];var _={swapComplete:`swapComplete`,error:`error`,fiatOrderCreated:`fiatOrderCreated`,fiatOrderCompleted:`fiatOrderCompleted`};function v(e){return new g(e)}export{o as a,r as c,n as i,u as l,v as n,d as o,s as r,i as s,g as t,e as u};
|
package/dist/en-US-ChmhdVUe.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Waiting for confirmation...`,ee=`View on Explorer`,te=`Delivery unsuccessful`,t=`Select Fiat Provider`,n=`Enter amount`,r=`Finding best price...`,i=`Order expired`,a=e=>`Pay ${e.amount} via ${e.provider}`,o=`We'll find the best rate for you`,s=e=>`Continue via ${e.provider}`,c=`Try selecting a different chain or search for a specific token`,l=`Coming soon`,u=e=>`via ${e.provider}`,d=`Confirm deposit`,f=`Deposit`,p=`Tokens delivered to your wallet`,m=`You pay`,h=`Your tokens have been delivered`,g=e=>`≈ $${e.formatUsd}`,_=`Recipient Address`,v=`Confirm`,y=`Connect your wallet to see payment options`,b=`No tokens found`,x=`Connect wallet or enter an address to get a quote`,S=`Confirm in your wallet...`,C=`Refund tx`,w=e=>`Buy ${e.amt} ${e.sym}`,T=`Exchange`,E=`Swapping via DEX...`,D=`Select currency`,O=`Transaction failed — Retry`,k=`No filler accepted the order`,A=`Back`,ne=`Pay`,j=`Executing...`,M=`Select destination token`,N=e=>`Filled on ${e.chain}`,P=`Payment confirmed`,re=`Buy`,F=`Close`,I=`Or pay with card`,L=e=>`Compare ${e.count} more`,R=`No offer available`,z=`Refund in progress`,B=e=>`Deposit on ${e.chain}`,V=`Crypto`,H=`Signed in wallet`,U=`Order failed`,W=`Enter amount to get started`,G=`Recipient`,K=e=>`≈ $${e.addThousandsSeparator}`,q=`Deposit Destination`,J=`Buy with credit or debit card`,Y=`View All Chains`,X=`Swap`,Z=`Sender`,Q=`Select payment token`,ie=e=>`Via ${e.provider}`,ae=`Total fee`,oe=`Paid`,se=`Try Again`,ce=`Review Swap`,le=`Provider filling your order`,ue=`Swapping tokens`,de=e=>`Returning tokens on ${e.chain}`,fe=`Card`,pe=`Swap tokens`,me=`Fiat payment`,he=`Processing...`,ge=`Purchase failed`,_e=`New Purchase`,ve=`Pay with credit or debit card`,$=`Confirmed on-chain`,ye=`Sign in wallet`,be=`From`,xe=`Required to receive your tokens`,Se=`MAX`,Ce=`Fee`,we=`Could not be completed`,Te=`Select Token`,Ee=`Fill tx`,De=e=>`Delivered in ${e.seconds}s`,Oe=`Pay with`,ke=e=>`Buy ${e.store_targetToken} directly`,Ae=`Swap Successful`,je=`Tokens delivered`,Me=`Receive`,Ne=`Min`,Pe=`Search by name or address`,Fe=e=>`~${e.value}s`,Ie=`0`,Le=`Provider`,Re=`Est. time`,ze=`Insufficient balance`,Be=`Invalid address for this chain`,Ve=`Enter destination address`,He=`No tokens available`,Ue=`Max`,We=`Transfer tx`,Ge=`Confirm Swap`,Ke=`This token is not directly available for card purchase. We buy USDC first, then swap it to your desired token automatically.`,qe=`Quote Failed`,Je=e=>`Buy ${e.arg0} directly`,Ye=e=>`on ${e.chain}`,Xe=e=>`~${e.value}m`,Ze=`No routes available`,Qe=`Tokens Landed!`,$e=`Awaiting payment`,et=e=>`Routed through ${e.token} for the best rate`,tt=`New Swap`,nt=`Enter recipient address`,rt=`Wallet doesn't match source chain`,it=`View`,at=`BEST RATE`,ot=`Your order could not be completed.`,st=e=>`Delivering ${e.symbol} to your wallet...`,ct=`Your funds have been returned to your wallet.`,lt=`Signature submitted`,ut=`Deposit tx`,dt=`Connect Wallet`,ft=`Pay with tokens from your wallet`,pt=`You receive`,mt=`Purchase Complete`,ht=`Selected token is unavailable for this purchase`,gt=`Enter Recipient Address`,_t=`Recommended`,vt=`Wallet account`,yt=e=>`Balance: ${e.fromBalance}`,bt=`Purchase complete`,xt=`Retry`,St=`Select token`,Ct={"10ioi7e":e,"10v0i5g":ee,"115lknq":te,"118a77s":t,"119fv83":n,"12rnjtt":r,"12rrl0i":i,"132vna6":a,"13i9oqu":o,"13l4n4r":s,"13x5i2v":c,"14ho4vt":l,"14j1lze":u,"15lxzx":d,"15lz1at":f,"1685rko":p,"17kq51m":m,"17wtaao":h,"188897k":g,"18cmny0":_,"18tbqwf":v,"18y1lrp":y,"19is1h8":b,"19ne1ha":x,"1bze7sg":S,"1c5n7ll":C,"1cei180":w,"1dyojgg":T,"1g8tdk7":E,"1gx00do":D,"1hb73om":O,"1hdpo6q":k,"1hzmxtu":A,"1i7coq1":`Pay`,"1ih47b3":j,"1ix1b7w":M,"1ixbbo7":N,"1jhuo24":P,"1ka8utn":`Buy`,"1l0xxoj":F,"1l41ftg":I,"1m2n0pw":L,"1ne9nkz":R,"1nhkl7x":z,"1nn0owb":B,"1o1b4a8":V,"1o4ofyx":H,"1ok4m5g":U,"1olegnl":W,"1oncz6g":G,"1ovj1tk":K,"1py89j9":q,"1q45kup":J,"1qbiehv":Y,"1rkfalq":X,"1rnxx1g":Z,"1t0r88u":Q,"1t86tnu":ie,"1viukn9":ae,"1w0n607":oe,"1w68n16":se,"1x5xdes":ce,"1y28pgi":le,"1y6hn5o":ue,"27fhcv":de,"2b8ghr":fe,"2eikro":pe,"2zh3gr":me,"344av8":he,"3pklqf":ge,"3u5vqs":_e,"6c0jc7":ve,"6c5l2f":$,"6gkge0":ye,"6s9hn9":be,"7m2ht3":xe,"7v6g6x":`MAX`,"9l4mg3":`Fee`,"9p7amh":we,axj370:Te,bdo3n8:Ee,biwlqk:De,cgzgvn:Oe,chajkh:ke,cjn1xs:Ae,cnwfg3:je,cwk7r6:Me,cx9lh3:`Min`,dizog6:Pe,ek03j3:Fe,epw9f3:`0`,evz7q4:Le,f45rwo:Re,fcy4ey:ze,fo0vw0:Be,fpand1:Ve,g7pjpv:He,gtvgs9:`Max`,hzq69q:We,ibrnk6:Ge,ifug2i:Ke,jf8ts4:qe,jnzipx:Je,k47stp:Ye,knrcsh:Xe,ln9xiv:Ze,mnlddk:Qe,n9zkql:$e,ofi1rq:et,pmqvh0:tt,pom1h2:nt,q4mqcd:rt,q5w460:it,r7v9s7:at,rvctng:ot,sykid7:st,t1rvqg:ct,tgp8yw:lt,tjg3i3:ut,u61kge:dt,udneg1:ft,va18uh:pt,vum0cd:mt,wuxjl9:ht,wx5bee:gt,xel5qk:_t,xphk5n:vt,y6jqu9:yt,yhtv6l:bt,zkouah:xt,zz4mrw:St};export{Ge as _100907z,pt as _108j3sk,oe as _10lgc56,Z as _10n9ta8,m as _113vzpe,nt as _11ncipg,V as _11p3b1r,Ze as _12qyh2x,z as _13ym6k2,fe as _14oyo32,x as _15vbpgm,Ke as _16ln1wz,Ae as _16pzx0g,we as _16rump9,M as _17g2rjk,g as _18346vt,re as _1982g2x,vt as _1biskvr,E as _1bjtgx1,je as _1cmz8k7,ft as _1cpadi9,K as _1d7sodl,rt as _1e023il,c as _1e5aqjt,B as _1ea99j0,ee as _1f4czmp,$ as _1f8nqa3,ce as _1f8umlr,G as _1fe46d3,xe as _1fikhaa,tt as _1fu9qvd,T as _1g7ofg0,Oe as _1gfjrn0,De as _1gma9hv,de as _1hs819x,lt as _1ht75o0,te as _1i8i0au,F as _1ib6ekl,J as _1ievltk,at as _1in1gel,W as _1in9ocp,Ve as _1ju6xlj,w as _1jvje3y,Ce as _1kd3yrp,A as _1kez60s,ue as _1krtsvx,et as _1kvlpuf,ve as _1l1rqi2,X as _1l2nmmx,ne as _1lra4kg,ht as _1n1igys,O as _1na1vy4,a as _1nwhws6,Fe as _1o0vi1j,We as _1o2h7a2,s as _1o8feo7,He as _1om32zr,C as _1oqs23j,xt as _1popw3r,e as _1qamgmj,I as _1s3hwm,Xe as _1s54fdc,o as _1s9ryeq,ye as _1t3gki9,D as _1uje2mm,p as _1urf8wf,t as _1w2bswr,N as _1wwy4yj,st as _1y7hba4,b as _1yv1ajq,gt as _3mtvnb,Le as _3w8t28,Q as _41y3qp,Y as _454sub,it as _49235i,U as _4itr6p,H as _4opuqb,me as _5af8qp,v as _5r87wo,y as _78b61s,f as _89hoyp,be as _8edkty,Ee as _a5vz6z,Pe as _al7a0k,Se as _bii6w9,Ie as _cnghfj,j as _czpegb,ut as _d7bf51,qe as _doc1yy,d as _fdcaz1,R as _g3pfjv,ke as _g88yty,$e as _gkmqsa,u as _hyiyqa,l as _i9ury1,_ as _ide9vv,dt as _ig1w2,yt as _jpt8np,ae as _kmeu9o,le as _kqdlbv,_t as _l5s0fl,Je as _l78r94,h as _ly147p,Te as _m8t1qc,Me as _mdvri5,i as _nrzzox,Ye as _o3um2w,P as _oj2fr8,mt as _p5ybee,L as _peuj54,q as _pkny2p,k as _pqml54,ge as _pr6lte,he as _q0rsrj,ct as _qm85b2,S as _sf0mgy,St as _si8n6l,Ue as _swoaip,bt as _t0vnn4,ie as _t91lwj,Be as _ty2nen,ot as _u7tj7p,Re as _uc0jju,n as _uu4paz,Qe as _vogk37,se as _xavgbs,pe as _xkdtbf,r as _xpl7mo,_e as _ystooe,Ne as _z6jr7i,ze as _zzusn5,Ct as default};
|