@tokenflight/swap 0.3.0-rc.0 → 0.3.0-rc.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.
Files changed (43) hide show
  1. package/dist/ReceiveComponent-Cyn4ECRG.js +1 -0
  2. package/dist/ReceiveComponent.module-BGpemTAX.js +1 -0
  3. package/dist/SwapComponent-BwfaI3D9.js +1 -0
  4. package/dist/bridge-Bq0QUltI.js +1 -0
  5. package/dist/bridge.d.ts +17 -1
  6. package/dist/bridge.js +1 -1
  7. package/dist/custom-elements.d.ts +1 -27
  8. package/dist/defaults-loader-DfcaO9j5.js +1 -0
  9. package/dist/en-US-CU2aSy93.js +1 -0
  10. package/dist/errors-Nd9setTj.js +3 -0
  11. package/dist/iframe-entry.d.ts +21 -0
  12. package/dist/iframe-entry.js +29 -0
  13. package/dist/iframe-receiver-PfhKUIZW.js +1 -0
  14. package/dist/iframe.d.ts +78 -10
  15. package/dist/iframe.js +45 -1
  16. package/dist/ja-JP-BoipV6-j.js +1 -0
  17. package/dist/ko-KR-DyFXZJsF.js +1 -0
  18. package/dist/protocol-CDxgudrl.js +1 -0
  19. package/dist/rank-offers-CR-1NeiW.js +1 -0
  20. package/dist/register-defaults-C_q7CG7x.js +1 -0
  21. package/dist/register-widget-DOzDJD94.js +1 -0
  22. package/dist/shared.module-C-kWMzqW.js +1 -0
  23. package/dist/solid-iWr5Czxc.js +1 -0
  24. package/dist/swap.css +1 -1
  25. package/dist/theme-C9tsVWlo.js +2 -0
  26. package/dist/tokenflight-swap.d.ts +88 -250
  27. package/dist/tokenflight-swap.js +1 -2
  28. package/dist/tokenflight-swap.umd.cjs +5 -6
  29. package/dist/widget-BadYytj9.js +2 -0
  30. package/dist/widget.d.ts +307 -25
  31. package/dist/widget.js +1 -1
  32. package/dist/zh-CN-epCUm9Io.js +1 -0
  33. package/dist/zh-TW-DSEboEJV.js +1 -0
  34. package/package.json +6 -2
  35. package/dist/bridge-C9uFKAdS.js +0 -1
  36. package/dist/en-US-ChmhdVUe.js +0 -1
  37. package/dist/ja-JP-BAX9fLqV.js +0 -1
  38. package/dist/ko-KR-jwhmhUqJ.js +0 -1
  39. package/dist/register-defaults-lIJMUU-P.js +0 -1
  40. package/dist/register-widget-DQAzucnZ.js +0 -5
  41. package/dist/zh-CN-fKcRI4Y8.js +0 -1
  42. package/dist/zh-TW-gFEUAIR6.js +0 -1
  43. /package/dist/{active-bridge-DTyKObda.js → active-bridge-V8lTJ2Js.js} +0 -0
package/dist/widget.d.ts CHANGED
@@ -1,7 +1,23 @@
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';
2
18
 
3
19
  /** Amount change data */
4
- declare interface AmountChangedData {
20
+ export declare interface AmountChangedData {
5
21
  amount: string;
6
22
  direction: "from" | "to";
7
23
  }
@@ -12,9 +28,24 @@ declare interface AmountChangedData {
12
28
  */
13
29
  declare type BooleanAttribute = boolean | "true" | "false" | "1" | "0" | "yes" | "no" | "";
14
30
 
15
- /** Callback interfaces for widget events */
31
+ /**
32
+ * Callback interfaces for widget events.
33
+ *
34
+ * **Crypto outcome routing** (mutually exclusive — pick the channel that matches
35
+ * the active flow):
36
+ * - `EXACT_INPUT` (`<tokenflight-widget trade-type="EXACT_INPUT">` / default,
37
+ * "spend exactly N of X") → fires `onSwapSuccess` / `onSwapError`
38
+ * - `EXACT_OUTPUT` (`<tokenflight-widget trade-type="EXACT_OUTPUT">`,
39
+ * "receive exactly N of Y") → fires `onDepositSuccess` / `onDepositError`
40
+ *
41
+ * **Fiat (card) outcomes** route through the same `onSwap*` / `onDeposit*`
42
+ * channels for errors (matched to the host flow) and through
43
+ * `onFiatOrderCreated` / `onFiatOrderCompleted` for fiat-specific lifecycle.
44
+ */
16
45
  export declare interface Callbacks {
46
+ /** EXACT_INPUT crypto success. */
17
47
  onSwapSuccess?(data: SwapSuccessData): void;
48
+ /** EXACT_INPUT errors (crypto execution + card flow when in EXACT_INPUT mode). */
18
49
  onSwapError?(data: SwapErrorData): void;
19
50
  onWalletConnected?(data: WalletConnectedData): void;
20
51
  onQuoteReceived?(data: QuoteResponse): void;
@@ -34,14 +65,18 @@ export declare interface Callbacks {
34
65
  status: string;
35
66
  txHash?: string;
36
67
  }): void;
37
- /** Called when a deposit completes successfully */
68
+ /** EXACT_OUTPUT crypto success. */
38
69
  onDepositSuccess?(data: SwapSuccessData): void;
39
- /** Called when a deposit fails */
70
+ /** EXACT_OUTPUT errors (crypto execution + card flow when in EXACT_OUTPUT mode). */
40
71
  onDepositError?(data: SwapErrorData): void;
41
72
  }
42
73
 
74
+ export declare type ChainInfo = HyperstreamApi.Chain;
75
+
43
76
  /** Chain type for multi-chain support */
44
- declare type ChainType = "evm" | "solana";
77
+ export declare type ChainType = "evm" | "solana";
78
+
79
+ export declare type ContractCallDeposit = HyperstreamApi.ContractCallDeposit;
45
80
 
46
81
  /**
47
82
  * Custom color overrides — keys are CSS variable names.
@@ -58,14 +93,89 @@ declare type ChainType = "evm" | "solana";
58
93
  */
59
94
  export declare type CustomColors = Partial<Record<TfCssVar, string>> & Record<string, string>;
60
95
 
96
+ export declare type DepositApproval = HyperstreamApi.Approval;
97
+
98
+ export declare type DepositBuildResponse = HyperstreamApi.Deposit;
99
+
100
+ export declare type EIP1193RequestApproval = HyperstreamApi.EIP1193RequestApproval;
101
+
102
+ /**
103
+ * Swap-side error codes for failures that originate inside the widget
104
+ * itself (config validation, wallet interaction, transaction signing).
105
+ * Merged with the API codes from `@tokenflight/api` into a unified
106
+ * `ErrorCode` constant so callers only see one enum.
107
+ */
108
+ export declare const ErrorCode: {
109
+ readonly INVALID_CONFIG: "TF1001";
110
+ readonly INVALID_TOKEN_IDENTIFIER: "TF1002";
111
+ readonly INVALID_AMOUNT: "TF1003";
112
+ readonly WALLET_CONNECTION_FAILED: "TF2002";
113
+ readonly WALLET_ACTION_FAILED: "TF2003";
114
+ readonly TRANSACTION_FAILED: "TF4001";
115
+ readonly ELEMENT_NOT_FOUND: "TF5001";
116
+ readonly API_REQUEST_FAILED: "TF3001";
117
+ readonly API_TIMEOUT: "TF3002";
118
+ readonly API_INVALID_RESPONSE: "TF3003";
119
+ readonly QUOTE_FAILED: "TF3004";
120
+ readonly QUOTE_EXPIRED: "TF3005";
121
+ readonly DEPOSIT_BUILD_FAILED: "TF3006";
122
+ readonly DEPOSIT_SUBMIT_FAILED: "TF3007";
123
+ readonly ORDER_FAILED: "TF3008";
124
+ readonly API_ABORTED: "TF3009";
125
+ readonly FIAT_QUOTE_FAILED: "TF6001";
126
+ readonly FIAT_ORDER_FAILED: "TF6002";
127
+ readonly FIAT_STATUS_FAILED: "TF6003";
128
+ readonly FIAT_PROVIDER_ERROR: "TF6004";
129
+ readonly FIAT_AMOUNT_OUT_OF_RANGE: "TF6005";
130
+ readonly FIAT_POPUP_BLOCKED: "TF6006";
131
+ readonly FIAT_CHECKOUT_UNAVAILABLE: "TF6007";
132
+ };
133
+
134
+ export declare type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];
135
+
61
136
  /** EVM wallet action via EIP-1193 */
62
- declare interface EvmWalletAction {
137
+ export declare interface EvmWalletAction {
63
138
  type: "eip1193_request";
64
139
  chainId: number;
65
140
  method: string;
66
141
  params: unknown[];
67
142
  }
68
143
 
144
+ export declare type ExactOutMethod = HyperstreamApi.ExactOutMethod;
145
+
146
+ /** Execution-only phases for the async build→wallet→submit→track→success flow */
147
+ export declare type ExecPhase = "building" | "awaiting-wallet" | "submitting" | "tracking" | "success";
148
+
149
+ /** Execution-only phases for the fiat flow */
150
+ export declare type FiatExecPhase = "creating-order" | "awaiting-payment" | "tracking" | "success";
151
+
152
+ export { FiatJumpRoute }
153
+
154
+ export { FiatOrderRequest }
155
+
156
+ export { FiatOrderResponse }
157
+
158
+ export { FiatOrderStatus }
159
+
160
+ export { FiatPaymentMethod }
161
+
162
+ /** UI phases for the fiat flow (derived from signals + queries) */
163
+ export declare type FiatPhase = "idle" | "quoting" | "quoted" | "creating-order" | "awaiting-payment" | "tracking" | "success" | "error";
164
+
165
+ export { FiatProviderInfo }
166
+
167
+ export { FiatProvidersResponse }
168
+
169
+ export { FiatQuoteItem }
170
+
171
+ export { FiatQuoteRequest }
172
+
173
+ export { FiatQuoteResponse }
174
+
175
+ export { FiatQuotesResponse }
176
+
177
+ export { FiatStatusResponse }
178
+
69
179
  declare interface ImperativeWidgetOptions<TConfig> {
70
180
  container: string | HTMLElement;
71
181
  config: TConfig;
@@ -105,7 +215,51 @@ export declare interface IWalletAdapter {
105
215
  off(event: WalletEventType, handler: (event: WalletEvent) => void): void;
106
216
  }
107
217
 
108
- declare type QuoteResponse = HyperstreamApi.GetQuotesResponse;
218
+ export declare type OnChainTx = HyperstreamApi.OnChainTx;
219
+
220
+ export declare type OrderListResponse = HyperstreamApi.GetOrderResponse;
221
+
222
+ export declare type OrderResponse = HyperstreamApi.Order;
223
+
224
+ export declare type OrderStatus = HyperstreamApi.OrderStatus;
225
+
226
+ export declare type OrderTimestamps = HyperstreamApi.OrderTimestamps;
227
+
228
+ export declare type OrderTransactions = HyperstreamApi.OrderTransactions;
229
+
230
+ /** Quote detail card display mode. */
231
+ export declare type QuoteCardVisibility = "hidden" | "visible";
232
+
233
+ export declare type QuoteRequest = HyperstreamApi.QuoteRequest;
234
+
235
+ export declare type QuoteResponse = HyperstreamApi.GetQuotesResponse;
236
+
237
+ export declare type QuoteRoute = HyperstreamApi.Route;
238
+
239
+ /** Receive component mode: crypto-only, fiat-only, or both */
240
+ export declare type ReceiveMode = "crypto" | "fiat" | "all";
241
+
242
+ /**
243
+ * Non-derivable state for the Receive (EXACT_OUTPUT) flow inside
244
+ * `<tokenflight-widget>`.
245
+ *
246
+ * Derivable values (phase, selectedQuote, paymentTokens) are computed in
247
+ * ReceiveComponent from payTokenQuotes + loadingQuotes + these signals.
248
+ */
249
+ export declare interface ReceiveState {
250
+ targetToken: ResolvedToken | null;
251
+ targetAmount: string;
252
+ /** Set before execution starts for TransactionComplete display */
253
+ fromToken: ResolvedToken | null;
254
+ /** Recipient address for cross-chain swaps */
255
+ recipient: string | null;
256
+ walletAddress: string | null;
257
+ /** Current execution phase, or null when idle/quoting/quoted */
258
+ execPhase: ExecPhase | null;
259
+ order: OrderResponse | null;
260
+ error: string | null;
261
+ errorCode: string | null;
262
+ }
109
263
 
110
264
  export declare interface RegisterElementsOptions {
111
265
  walletAdapter?: IWalletAdapter;
@@ -127,6 +281,8 @@ export declare interface RegisterElementsOptions {
127
281
  hideTitle?: boolean;
128
282
  /** Default hide-powered-by flag. */
129
283
  hidePoweredBy?: boolean;
284
+ /** Default hide-provider flag (hides "via {provider}" badge on the tracking page). */
285
+ hideProvider?: boolean;
130
286
  /** Default no-background flag. */
131
287
  noBackground?: boolean;
132
288
  /** Default no-border flag. */
@@ -137,27 +293,50 @@ export declare interface RegisterElementsOptions {
137
293
  rpcOverrides?: Record<string, string>;
138
294
  /** Default supported chain id allowlist. */
139
295
  supportedChainIds?: number[];
296
+ /** Referrer address that receives the fee. Passed through to quote API. */
297
+ referrer?: string;
298
+ /** Referrer fee in basis points (e.g. 30 = 0.3%). Passed through to quote API. */
299
+ referrerFeeBps?: number;
140
300
  }
141
301
 
142
302
  export declare function registerWidgetElement(options?: RegisterElementsOptions): void;
143
303
 
304
+ /** Resolved token with full metadata for local display state */
305
+ export declare interface ResolvedToken {
306
+ chainId: number;
307
+ address: string;
308
+ symbol?: string;
309
+ name?: string;
310
+ decimals?: number;
311
+ logoURI?: string;
312
+ priceUsd?: number;
313
+ }
314
+
315
+ export declare type RouteQuote = HyperstreamApi.Quote;
316
+
317
+ export declare type RouteTag = HyperstreamApi.RouteTag;
318
+
319
+ export declare type SolanaApproval = HyperstreamApi.SolanaApproval;
320
+
144
321
  /** Solana sign and send transaction action */
145
- declare interface SolanaSignAndSendAction {
322
+ export declare interface SolanaSignAndSendAction {
146
323
  type: "solana_signAndSendTransaction";
147
324
  transaction: string;
148
325
  }
149
326
 
150
327
  /** Solana sign transaction action */
151
- declare interface SolanaSignTransactionAction {
328
+ export declare interface SolanaSignTransactionAction {
152
329
  type: "solana_signTransaction";
153
330
  transaction: string;
154
331
  }
155
332
 
333
+ export declare type SubmitDepositResponse = HyperstreamApi.SubmitDepositResponse;
334
+
156
335
  /** Supported locale identifiers. Accepts any string for forward-compat; known values get bundled translations. */
157
336
  export declare type SupportedLocale = "en-US" | "zh-CN" | "zh-TW" | "ja-JP" | "ko-KR" | (string & {});
158
337
 
159
338
  /** Data emitted on swap error */
160
- declare interface SwapErrorData {
339
+ export declare interface SwapErrorData {
161
340
  code: string;
162
341
  message: string;
163
342
  details?: unknown;
@@ -166,8 +345,33 @@ declare interface SwapErrorData {
166
345
  /** Payment methods available in swap widget */
167
346
  export declare type SwapPayMethod = "crypto" | "card";
168
347
 
348
+ /** Swap flow phases */
349
+ export declare type SwapPhase = "idle" | "quoting" | "quoted" | "building" | "awaiting-wallet" | "submitting" | "tracking" | "success" | "error";
350
+
351
+ /**
352
+ * Non-derivable state for `<tokenflight-swap>`.
353
+ *
354
+ * Derivable values (routes, quoteId, selectedRouteId, outputAmount, phase)
355
+ * are computed in SwapComponent from TanStack Query + these signals.
356
+ */
357
+ export declare interface SwapState {
358
+ fromToken: ResolvedToken | null;
359
+ toToken: ResolvedToken | null;
360
+ inputAmount: string;
361
+ /** Recipient address for cross-chain swaps */
362
+ recipient: string | null;
363
+ walletAddress: string | null;
364
+ /** Current execution phase, or null when idle/quoting/quoted */
365
+ execPhase: ExecPhase | null;
366
+ order: OrderResponse | null;
367
+ error: string | null;
368
+ errorCode: string | null;
369
+ }
370
+
371
+ export { SwapStrategy }
372
+
169
373
  /** Data emitted on swap success */
170
- declare interface SwapSuccessData {
374
+ export declare interface SwapSuccessData {
171
375
  orderId: string;
172
376
  fromToken: string;
173
377
  toToken: string;
@@ -176,8 +380,9 @@ declare interface SwapSuccessData {
176
380
  txHash: string;
177
381
  }
178
382
 
179
- /** @deprecated Use `SwapPayMethod` instead. */
180
- declare type SwapV2PayMethod = SwapPayMethod;
383
+ export { TERMINAL_FIAT_STATUSES }
384
+
385
+ export { TERMINAL_ORDER_STATUSES }
181
386
 
182
387
  /**
183
388
  * Override specific UI labels without switching locale. Use for white-label
@@ -189,11 +394,43 @@ declare type SwapV2PayMethod = SwapPayMethod;
189
394
  * Keys are semantic (not i18n message IDs) so they remain stable across widget
190
395
  * versions and don't leak internal implementation details.
191
396
  */
192
- declare interface TextOverrides {
397
+ export declare interface TextOverrides {
193
398
  /** Label above the source/from token panel. Default: "You pay" */
194
399
  youPay?: string;
195
400
  /** Label above the destination/to token panel. Default: "You receive" */
196
401
  youReceive?: string;
402
+ /** Step 1 title (pending). Default: "Sign in wallet" */
403
+ trackingSignTitle?: string;
404
+ /** Step 1 title (done). Default: "Signed in wallet" */
405
+ trackingSignedTitle?: string;
406
+ /** Step 1 subtitle (pending). Default: "Confirm in your wallet..." */
407
+ trackingSignSubtitle?: string;
408
+ /** Step 1 subtitle (done). Default: "Signature submitted" */
409
+ trackingSignedSubtitle?: string;
410
+ /** Step 2 title. Default: "Deposit on {chain}" */
411
+ trackingDepositTitle?: string;
412
+ /** Step 2 subtitle (pending). Default: "Waiting for confirmation..." */
413
+ trackingDepositSubtitle?: string;
414
+ /** Step 2 subtitle (done). Default: "Confirmed on-chain" */
415
+ trackingDepositConfirmedSubtitle?: string;
416
+ /** Step 3 title. Default: "Provider filling your order" */
417
+ trackingFillTitle?: string;
418
+ /** Step 3 subtitle. Default: "Via {provider}" */
419
+ trackingFillSubtitle?: string;
420
+ /** Step 4 title. Default: "Filled on {chain}" */
421
+ trackingCompleteTitle?: string;
422
+ /** Step 4 subtitle. Default: "Tokens delivered" */
423
+ trackingCompleteSubtitle?: string;
424
+ /** Fiat step 1 title. Default: "Awaiting payment" */
425
+ trackingPaymentTitle?: string;
426
+ /** Fiat step 1 subtitle (done). Default: "Payment confirmed" */
427
+ trackingPaymentConfirmedSubtitle?: string;
428
+ /** Fiat swap step title (jump strategy). Default: "Swapping tokens" */
429
+ trackingSwapTitle?: string;
430
+ /** Fiat final step title. Default: "Purchase complete" */
431
+ trackingPurchaseTitle?: string;
432
+ /** Fiat final step subtitle (done). Default: "Tokens delivered to your wallet" */
433
+ trackingDeliverySubtitle?: string;
197
434
  }
198
435
 
199
436
  /** All first-party CSS custom properties exposed for theming. */
@@ -202,8 +439,10 @@ declare type TfCssVar = "--tf-bg" | "--tf-bg-secondary" | "--tf-bg-elevated" | "
202
439
  /** Visual theme mode. */
203
440
  export declare type Theme = "light" | "dark" | "auto";
204
441
 
442
+ export declare type TokenExtensions = HyperstreamApi.TokenExtensions;
443
+
205
444
  /** Shared configuration fields for both widgets */
206
- declare interface TokenFlightConfigBase {
445
+ export declare interface TokenFlightConfigBase {
207
446
  /** HyperStream API endpoint */
208
447
  apiEndpoint?: string;
209
448
  /** Fiat on-ramp API endpoint (default: https://fiat.hyperstream.dev) */
@@ -222,6 +461,10 @@ declare interface TokenFlightConfigBase {
222
461
  hideTitle?: boolean;
223
462
  /** Hide "Powered by TokenFlight" footer */
224
463
  hidePoweredBy?: boolean;
464
+ /** Hide the "via {provider}" badge on the order tracking page */
465
+ hideProvider?: boolean;
466
+ /** Quote card display mode. EXACT_INPUT Swap defaults to "hidden". */
467
+ quoteCard?: QuoteCardVisibility;
225
468
  /** Remove container background (transparent) */
226
469
  noBackground?: boolean;
227
470
  /** Remove container border and shadow */
@@ -232,6 +475,31 @@ declare interface TokenFlightConfigBase {
232
475
  * are decimal chain IDs as strings.
233
476
  */
234
477
  rpcOverrides?: Record<string, string>;
478
+ /** Referrer address that receives the fee. Passed through to the quote API. */
479
+ referrer?: string;
480
+ /** Referrer fee in basis points (e.g. 30 = 0.3%). Passed through to the quote API. */
481
+ referrerFeeBps?: number;
482
+ }
483
+
484
+ export { TokenFlightError }
485
+
486
+ /** Attributes accepted by `<tokenflight-fiat>`. */
487
+ export declare interface TokenFlightFiatAttributes {
488
+ "api-endpoint"?: string;
489
+ target?: string;
490
+ recipient?: string;
491
+ "fiat-currency"?: string;
492
+ "title-text"?: string;
493
+ "title-image"?: string;
494
+ theme?: Theme;
495
+ locale?: SupportedLocale;
496
+ "csp-nonce"?: string;
497
+ icon?: string;
498
+ "hide-title"?: BooleanAttribute;
499
+ "hide-powered-by"?: BooleanAttribute;
500
+ "hide-provider"?: BooleanAttribute;
501
+ "no-background"?: BooleanAttribute;
502
+ "no-border"?: BooleanAttribute;
235
503
  }
236
504
 
237
505
  export declare const TokenFlightWidget: {
@@ -279,8 +547,12 @@ export declare interface TokenFlightWidgetAttributes {
279
547
  "csp-nonce"?: string;
280
548
  "hide-title"?: BooleanAttribute;
281
549
  "hide-powered-by"?: BooleanAttribute;
550
+ "hide-provider"?: BooleanAttribute;
551
+ "quote-card"?: "hidden" | "visible";
282
552
  "no-background"?: BooleanAttribute;
283
553
  "no-border"?: BooleanAttribute;
554
+ "referrer"?: string;
555
+ "referrer-fee-bps"?: string | number;
284
556
  }
285
557
 
286
558
  /** Configuration for Widget component (auto-selects Swap or Deposit UX based on config) */
@@ -303,9 +575,9 @@ export declare interface TokenFlightWidgetConfig extends TokenFlightConfigBase {
303
575
  /** Address the filler should refund to if the fill fails (sent as `refundTo` on quote requests). */
304
576
  refundTo?: string;
305
577
  /** Payment methods to offer (default: ["crypto"]) */
306
- methods?: SwapV2PayMethod[];
578
+ methods?: SwapPayMethod[];
307
579
  /** Default active pay method tab (default: "crypto") */
308
- defaultPayMethod?: SwapV2PayMethod;
580
+ defaultPayMethod?: SwapPayMethod;
309
581
  /** Fiat currency code for card payments (default: "USD") */
310
582
  fiatCurrency?: string;
311
583
  /** Whitelist of allowed source tokens (CAIP-10) */
@@ -333,19 +605,29 @@ export declare interface TokenFlightWidgetOptions {
333
605
  * - CAIP-10 string: "eip155:1:0x..."
334
606
  * - JSON string: '{"chainId":1,"address":"0x..."}'
335
607
  */
336
- declare type TokenIdentifier = string | TokenTarget;
608
+ export declare type TokenIdentifier = string | TokenTarget;
609
+
610
+ export declare type TokenInfo = HyperstreamApi.Token;
611
+
612
+ export declare type TokenListResponse = HyperstreamApi.GetTokensResponse;
613
+
614
+ export declare type TokenMeta = HyperstreamApi.TokenMeta;
615
+
616
+ export declare type TokenSearchResponse = HyperstreamApi.TokenSearchResponse;
337
617
 
338
618
  /** Token target as chain + address pair */
339
- declare interface TokenTarget {
619
+ export declare interface TokenTarget {
340
620
  chainId: number;
341
621
  address: string;
342
622
  }
343
623
 
624
+ export declare type TradeType = HyperstreamApi.TradeType;
625
+
344
626
  /** Union of all wallet action types */
345
- declare type WalletAction = EvmWalletAction | SolanaSignTransactionAction | SolanaSignAndSendAction;
627
+ export declare type WalletAction = EvmWalletAction | SolanaSignTransactionAction | SolanaSignAndSendAction;
346
628
 
347
629
  /** Result of executing a wallet action */
348
- declare interface WalletActionResult {
630
+ export declare interface WalletActionResult {
349
631
  success: boolean;
350
632
  data?: unknown;
351
633
  error?: string;
@@ -353,21 +635,21 @@ declare interface WalletActionResult {
353
635
  }
354
636
 
355
637
  /** Wallet action types */
356
- declare type WalletActionType = "eip1193_request" | "solana_signTransaction" | "solana_signAndSendTransaction";
638
+ export declare type WalletActionType = "eip1193_request" | "solana_signTransaction" | "solana_signAndSendTransaction";
357
639
 
358
640
  /** Data emitted when wallet is connected */
359
- declare interface WalletConnectedData {
641
+ export declare interface WalletConnectedData {
360
642
  address: string;
361
643
  chainType: string;
362
644
  }
363
645
 
364
646
  /** Wallet event payload */
365
- declare interface WalletEvent {
647
+ export declare interface WalletEvent {
366
648
  type: WalletEventType;
367
649
  data?: unknown;
368
650
  }
369
651
 
370
652
  /** Wallet event types */
371
- declare type WalletEventType = "connect" | "disconnect" | "chainChanged" | "accountsChanged";
653
+ export declare type WalletEventType = "connect" | "disconnect" | "chainChanged" | "accountsChanged";
372
654
 
373
655
  export { }
package/dist/widget.js CHANGED
@@ -1 +1 @@
1
- import{r as e,t}from"./register-widget-DQAzucnZ.js";export{e as TokenFlightWidget,t as registerWidgetElement};
1
+ import{a as e,c as t,r as n,t as r}from"./errors-Nd9setTj.js";import"./shared.module-C-kWMzqW.js";import{n as i,t as a}from"./register-widget-DOzDJD94.js";import"./widget-BadYytj9.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.0",
3
+ "version": "0.3.0-rc.1",
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.0"
57
+ "@tokenflight/api": "0.3.0-rc.1"
54
58
  },
55
59
  "devDependencies": {
56
60
  "@fluenti/cli": "^0.6.2",
@@ -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};
@@ -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};
@@ -1 +0,0 @@
1
- var e=`確認待ち...`,ee=`エクスプローラーで表示`,te=`送達に失敗しました`,t=`法定通貨プロバイダーを選択`,n=`金額を入力`,r=`最適な価格を検索中...`,i=`注文が期限切れ`,a=e=>`${e.provider} で ${e.amount} を支払う`,o=`最適なレートをお探しします`,s=e=>`${e.provider}で続行`,c=`別のチェーンを選択するか、特定のトークンを検索してください`,ne=void 0,l=e=>`${e.provider}経由`,u=`入金を確認`,d=`入金`,f=`トークンがウォレットに送達されました`,p=`支払い`,m=`トークンが送達されました`,h=e=>`≈ $${e.formatUsd}`,g=`受取アドレス`,_=`確認`,v=`ウォレットを接続して支払いオプションを表示`,y=`トークンが見つかりません`,b=`ウォレットを接続するかアドレスを入力して見積もりを取得`,x=`ウォレットで確認してください...`,S=`返金トランザクション`,C=e=>`${e.amt} ${e.sym} を購入`,re=void 0,w=`DEXでスワップ中...`,T=`通貨を選択`,E=`取引失敗 — 再試行`,D=`フィラーが注文を受け付けませんでした`,O=`戻る`,k=`支払い`,A=`実行中...`,j=`受取りトークンを選択`,M=e=>`${e.chain}で完了`,N=`支払い確認済み`,P=`購入`,F=`閉じる`,I=`またはカードで支払う`,L=e=>`他${e.count}件と比較`,R=`利用可能なオファーがありません`,z=`返金処理中`,B=e=>`${e.chain}への入金`,V=`暗号通貨`,H=`署名完了`,U=`注文が失敗`,W=`金額を入力して開始`,G=`受取アドレス`,K=e=>`≈ $${e.addThousandsSeparator}`,q=`入金先`,J=`クレジットカードまたはデビットカードで購入`,Y=`すべてのチェーンを表示`,X=`スワップ`,Z=`送信者`,Q=`支払いトークンを選択`,ie=e=>`${e.provider}経由`,ae=`合計手数料`,oe=`支払い済み`,se=`再試行`,ce=`スワップを確認`,le=`プロバイダーが注文を処理中`,ue=`トークンをスワップ中`,de=e=>`${e.chain}でトークンを返還中`,fe=`カード`,pe=`トークンを交換`,me=`法定通貨支払い`,he=`処理中...`,ge=`購入失敗`,_e=`新しい購入`,ve=`クレジットカードまたはデビットカードで支払う`,$=`オンチェーンで確認済み`,ye=`ウォレットで署名`,be=`送金元`,xe=`トークン受け取りに必要`,Se=`最大`,Ce=`手数料`,we=`完了できませんでした`,Te=`トークンを選択`,Ee=`完了取引`,De=e=>`${e.seconds}秒で送達`,Oe=`支払い方法`,ke=e=>`${e.store_targetToken} を直接購入`,Ae=`スワップ成功`,je=`トークンが送達されました`,Me=`受取`,Ne=`最低`,Pe=`名前またはアドレスで検索`,Fe=e=>`~${e.value}秒`,Ie=`0`,Le=`プロバイダー`,Re=`推定時間`,ze=`残高不足`,Be=`このチェーンのアドレス形式が無効です`,Ve=`宛先アドレスを入力`,He=`利用可能なトークンがありません`,Ue=`最高`,We=`送金トランザクション`,Ge=`スワップを実行`,Ke=`このトークンはカードで直接購入できません。まず USDC を購入し、自動的にご希望のトークンに交換します。`,qe=`見積もり失敗`,Je=e=>`${e.arg0} を直接購入`,Ye=e=>`${e.chain}上`,Xe=e=>`~${e.value}分`,Ze=`利用可能なルートがありません`,Qe=`トークンが到着しました!`,$e=`支払い待ち`,et=e=>`最良レートのため${e.token}経由でルーティング`,tt=`新しいスワップ`,nt=`受取アドレスを入力`,rt=`ウォレットがソースチェーンと一致しません`,it=`表示`,at=`最良レート`,ot=`注文を完了できませんでした。`,st=e=>`${e.symbol}をウォレットに送信中...`,ct=`資金がウォレットに返金されました。`,lt=`署名を提出しました`,ut=`入金取引`,dt=`ウォレットを接続`,ft=`ウォレットのトークンで支払う`,pt=`受取り`,mt=`購入完了`,ht=`選択したトークンは現在この購入には利用できません`,gt=`受取アドレスを入力`,_t=`おすすめ`,vt=`ウォレットアカウント`,yt=e=>`残高: ${e.fromBalance}`,bt=`購入完了`,xt=`リトライ`,St=`トークンを選択`,Ct={"10ioi7e":e,"10v0i5g":ee,"115lknq":te,"118a77s":t,"119fv83":n,"12rnjtt":r,"12rrl0i":i,"132vna6":a,"13i9oqu":o,"13l4n4r":s,"13x5i2v":c,"14ho4vt":void 0,"14j1lze":l,"15lxzx":u,"15lz1at":d,"1685rko":f,"17kq51m":p,"17wtaao":m,"188897k":h,"18cmny0":g,"18tbqwf":_,"18y1lrp":v,"19is1h8":y,"19ne1ha":b,"1bze7sg":x,"1c5n7ll":S,"1cei180":C,"1dyojgg":void 0,"1g8tdk7":w,"1gx00do":T,"1hb73om":E,"1hdpo6q":D,"1hzmxtu":O,"1i7coq1":k,"1ih47b3":A,"1ix1b7w":j,"1ixbbo7":M,"1jhuo24":N,"1ka8utn":P,"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":Se,"9l4mg3":Ce,"9p7amh":we,axj370:Te,bdo3n8:Ee,biwlqk:De,cgzgvn:Oe,chajkh:ke,cjn1xs:Ae,cnwfg3:je,cwk7r6:Me,cx9lh3:Ne,dizog6:Pe,ek03j3:Fe,epw9f3:`0`,evz7q4:Le,f45rwo:Re,fcy4ey:ze,fo0vw0:Be,fpand1:Ve,g7pjpv:He,gtvgs9:Ue,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,p as _113vzpe,nt as _11ncipg,V as _11p3b1r,Ze as _12qyh2x,z as _13ym6k2,fe as _14oyo32,b as _15vbpgm,Ke as _16ln1wz,Ae as _16pzx0g,we as _16rump9,j as _17g2rjk,h as _18346vt,P as _1982g2x,vt as _1biskvr,w 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,re 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,C as _1jvje3y,Ce as _1kd3yrp,O as _1kez60s,ue as _1krtsvx,et as _1kvlpuf,ve as _1l1rqi2,X as _1l2nmmx,k as _1lra4kg,ht as _1n1igys,E as _1na1vy4,a as _1nwhws6,Fe as _1o0vi1j,We as _1o2h7a2,s as _1o8feo7,He as _1om32zr,S as _1oqs23j,xt as _1popw3r,e as _1qamgmj,I as _1s3hwm,Xe as _1s54fdc,o as _1s9ryeq,ye as _1t3gki9,T as _1uje2mm,f as _1urf8wf,t as _1w2bswr,M as _1wwy4yj,st as _1y7hba4,y 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,_ as _5r87wo,v as _78b61s,d as _89hoyp,be as _8edkty,Ee as _a5vz6z,Pe as _al7a0k,Se as _bii6w9,Ie as _cnghfj,A as _czpegb,ut as _d7bf51,qe as _doc1yy,u as _fdcaz1,R as _g3pfjv,ke as _g88yty,$e as _gkmqsa,l as _hyiyqa,ne as _i9ury1,g as _ide9vv,dt as _ig1w2,yt as _jpt8np,ae as _kmeu9o,le as _kqdlbv,_t as _l5s0fl,Je as _l78r94,m as _ly147p,Te as _m8t1qc,Me as _mdvri5,i as _nrzzox,Ye as _o3um2w,N as _oj2fr8,mt as _p5ybee,L as _peuj54,q as _pkny2p,D as _pqml54,ge as _pr6lte,he as _q0rsrj,ct as _qm85b2,x 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};
@@ -1 +0,0 @@
1
- var e=`확인 대기 중...`,ee=`익스플로러에서 보기`,te=`전달 실패`,t=`법정화폐 제공업체 선택`,n=`금액 입력`,r=`최적 가격 검색 중...`,i=`주문 만료`,a=e=>`${e.provider}에서 ${e.amount} 결제`,o=`최적의 환율을 찾아드립니다`,s=e=>`${e.provider}를 통해 계속`,c=`다른 체인을 선택하거나 특정 토큰을 검색해 보세요`,ne=void 0,l=e=>`${e.provider} 경유`,u=`입금 확인`,d=`입금`,f=`토큰이 지갑에 전달되었습니다`,p=`지불`,m=`토큰이 전달되었습니다`,h=e=>`≈ $${e.formatUsd}`,g=`수신 주소`,_=`확인`,v=`지갑을 연결하여 결제 옵션을 확인하세요`,y=`토큰을 찾을 수 없습니다`,b=`지갑을 연결하거나 주소를 입력하여 견적 받기`,x=`지갑에서 확인해 주세요...`,S=`환불 트랜잭션`,C=e=>`${e.amt} ${e.sym} 구매`,re=void 0,w=`DEX를 통해 스왑 중...`,T=`통화 선택`,E=`거래 실패 — 재시도`,D=`필러가 주문을 수락하지 않았습니다`,O=`뒤로`,k=`결제`,A=`실행 중...`,j=`수령 토큰 선택`,M=e=>`${e.chain}에서 완료`,N=`결제 확인됨`,P=`구매`,F=`닫기`,I=`또는 카드로 결제`,L=e=>`${e.count}곳 더 비교`,R=`이용 가능한 오퍼가 없습니다`,z=`환불 진행 중`,B=e=>`${e.chain}에 입금`,V=`암호화폐`,H=`서명 완료`,U=`주문 실패`,W=`금액을 입력하여 시작`,G=`수신 주소`,K=e=>`≈ $${e.addThousandsSeparator}`,q=`입금 대상`,J=`신용카드 또는 체크카드로 구매`,Y=`모든 체인 보기`,X=`스왑`,Z=`보낸 사람`,Q=`결제 토큰 선택`,ie=e=>`${e.provider} 경유`,ae=`총 수수료`,oe=`결제 완료`,se=`재시도`,ce=`스왑 확인`,le=`제공자가 주문 처리 중`,ue=`토큰 스왑 중`,de=e=>`${e.chain}에서 토큰 반환 중`,fe=`카드`,pe=`토큰 교환`,me=`법정화폐 결제`,he=`처리 중...`,ge=`구매 실패`,_e=`새 구매`,ve=`신용카드 또는 체크카드로 결제`,$=`온체인에서 확인됨`,ye=`지갑에서 서명`,be=`보낸 곳`,xe=`토큰 수령에 필요`,Se=`최대`,Ce=`수수료`,we=`완료할 수 없습니다`,Te=`토큰 선택`,Ee=`완료 트랜잭션`,De=e=>`${e.seconds}초 만에 전달`,Oe=`결제 수단`,ke=e=>`${e.store_targetToken} 직접 구매`,Ae=`스왑 성공`,je=`토큰이 전달되었습니다`,Me=`수령`,Ne=`최소`,Pe=`이름 또는 주소로 검색`,Fe=e=>`~${e.value}초`,Ie=`0`,Le=`제공자`,Re=`예상 시간`,ze=`잔액 부족`,Be=`이 체인의 주소 형식이 올바르지 않습니다`,Ve=`대상 주소 입력`,He=`사용 가능한 토큰이 없습니다`,Ue=`최대`,We=`전송 트랜잭션`,Ge=`스왑 실행`,Ke=`이 토큰은 카드로 직접 구매할 수 없습니다. 먼저 USDC를 구매한 후 원하는 토큰으로 자동 교환합니다.`,qe=`견적 실패`,Je=e=>`${e.arg0} 직접 구매`,Ye=e=>`${e.chain}에서`,Xe=e=>`~${e.value}분`,Ze=`사용 가능한 경로 없음`,Qe=`토큰이 도착했습니다!`,$e=`결제 대기`,et=e=>`최적 가격을 위해 ${e.token}을 통해 라우팅`,tt=`새 스왑`,nt=`수신 주소 입력`,rt=`지갑이 소스 체인과 일치하지 않습니다`,it=`보기`,at=`최적 가격`,ot=`주문을 완료할 수 없습니다.`,st=e=>`${e.symbol}을 지갑으로 전송 중...`,ct=`자금이 지갑으로 반환되었습니다.`,lt=`서명이 제출되었습니다`,ut=`입금 트랜잭션`,dt=`지갑 연결`,ft=`지갑의 토큰으로 결제`,pt=`수령`,mt=`구매 완료`,ht=`선택한 토큰은 현재 이 구매에 사용할 수 없습니다`,gt=`수신 주소 입력`,_t=`추천`,vt=`지갑 계정`,yt=e=>`잔액: ${e.fromBalance}`,bt=`구매 완료`,xt=`재시도`,St=`토큰 선택`,Ct={"10ioi7e":e,"10v0i5g":ee,"115lknq":te,"118a77s":t,"119fv83":n,"12rnjtt":r,"12rrl0i":i,"132vna6":a,"13i9oqu":o,"13l4n4r":s,"13x5i2v":c,"14ho4vt":void 0,"14j1lze":l,"15lxzx":u,"15lz1at":d,"1685rko":f,"17kq51m":p,"17wtaao":m,"188897k":h,"18cmny0":g,"18tbqwf":_,"18y1lrp":v,"19is1h8":y,"19ne1ha":b,"1bze7sg":x,"1c5n7ll":S,"1cei180":C,"1dyojgg":void 0,"1g8tdk7":w,"1gx00do":T,"1hb73om":E,"1hdpo6q":D,"1hzmxtu":O,"1i7coq1":k,"1ih47b3":A,"1ix1b7w":j,"1ixbbo7":M,"1jhuo24":N,"1ka8utn":P,"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":Se,"9l4mg3":Ce,"9p7amh":we,axj370:Te,bdo3n8:Ee,biwlqk:De,cgzgvn:Oe,chajkh:ke,cjn1xs:Ae,cnwfg3:je,cwk7r6:Me,cx9lh3:Ne,dizog6:Pe,ek03j3:Fe,epw9f3:`0`,evz7q4:Le,f45rwo:Re,fcy4ey:ze,fo0vw0:Be,fpand1:Ve,g7pjpv:He,gtvgs9:Ue,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,p as _113vzpe,nt as _11ncipg,V as _11p3b1r,Ze as _12qyh2x,z as _13ym6k2,fe as _14oyo32,b as _15vbpgm,Ke as _16ln1wz,Ae as _16pzx0g,we as _16rump9,j as _17g2rjk,h as _18346vt,P as _1982g2x,vt as _1biskvr,w 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,re 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,C as _1jvje3y,Ce as _1kd3yrp,O as _1kez60s,ue as _1krtsvx,et as _1kvlpuf,ve as _1l1rqi2,X as _1l2nmmx,k as _1lra4kg,ht as _1n1igys,E as _1na1vy4,a as _1nwhws6,Fe as _1o0vi1j,We as _1o2h7a2,s as _1o8feo7,He as _1om32zr,S as _1oqs23j,xt as _1popw3r,e as _1qamgmj,I as _1s3hwm,Xe as _1s54fdc,o as _1s9ryeq,ye as _1t3gki9,T as _1uje2mm,f as _1urf8wf,t as _1w2bswr,M as _1wwy4yj,st as _1y7hba4,y 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,_ as _5r87wo,v as _78b61s,d as _89hoyp,be as _8edkty,Ee as _a5vz6z,Pe as _al7a0k,Se as _bii6w9,Ie as _cnghfj,A as _czpegb,ut as _d7bf51,qe as _doc1yy,u as _fdcaz1,R as _g3pfjv,ke as _g88yty,$e as _gkmqsa,l as _hyiyqa,ne as _i9ury1,g as _ide9vv,dt as _ig1w2,yt as _jpt8np,ae as _kmeu9o,le as _kqdlbv,_t as _l5s0fl,Je as _l78r94,m as _ly147p,Te as _m8t1qc,Me as _mdvri5,i as _nrzzox,Ye as _o3um2w,N as _oj2fr8,mt as _p5ybee,L as _peuj54,q as _pkny2p,D as _pqml54,ge as _pr6lte,he as _q0rsrj,ct as _qm85b2,x 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};