@ensofinance/checkout-widget 0.1.8 → 0.1.9

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 (61) hide show
  1. package/dist/checkout-widget.es.js +24133 -25422
  2. package/dist/checkout-widget.umd.js +59 -65
  3. package/dist/index.d.ts +1 -3
  4. package/package.json +2 -2
  5. package/src/assets/usdc.webp +0 -0
  6. package/src/assets/usdt.webp +0 -0
  7. package/src/components/AmountInput.tsx +25 -41
  8. package/src/components/ChakraProvider.tsx +13 -36
  9. package/src/components/Checkout.tsx +0 -3
  10. package/src/components/CurrencySwapDisplay.tsx +22 -59
  11. package/src/components/DepositProcessing.tsx +1 -1
  12. package/src/components/ExchangeConfirmSecurity.tsx +1 -1
  13. package/src/components/QuoteParameters.tsx +1 -1
  14. package/src/components/TransactionDetailRow.tsx +2 -2
  15. package/src/components/cards/ExchangeCard.tsx +1 -1
  16. package/src/components/cards/OptionCard.tsx +1 -2
  17. package/src/components/cards/WalletCard.tsx +1 -1
  18. package/src/components/modal.tsx +3 -3
  19. package/src/components/steps/ExchangeFlow.tsx +1404 -231
  20. package/src/components/steps/FlowSelector.tsx +60 -117
  21. package/src/components/steps/WalletFlow/WalletAmountStep.tsx +2 -2
  22. package/src/components/steps/WalletFlow/WalletConfirmStep.tsx +51 -92
  23. package/src/components/steps/WalletFlow/WalletFlow.tsx +16 -17
  24. package/src/components/steps/WalletFlow/WalletQuoteStep.tsx +2 -2
  25. package/src/components/steps/WalletFlow/WalletTokenStep.tsx +4 -6
  26. package/src/components/ui/index.tsx +6 -23
  27. package/src/components/ui/toaster.tsx +1 -2
  28. package/src/types/index.ts +0 -97
  29. package/src/util/constants.tsx +0 -27
  30. package/src/util/enso-hooks.tsx +61 -75
  31. package/dist/checkout-widget.es.js.map +0 -1
  32. package/dist/checkout-widget.umd.js.map +0 -1
  33. package/src/assets/providers/alchemypay.svg +0 -21
  34. package/src/assets/providers/banxa.svg +0 -21
  35. package/src/assets/providers/binanceconnect.svg +0 -14
  36. package/src/assets/providers/kryptonim.svg +0 -6
  37. package/src/assets/providers/mercuryo.svg +0 -21
  38. package/src/assets/providers/moonpay.svg +0 -14
  39. package/src/assets/providers/stripe.svg +0 -16
  40. package/src/assets/providers/swapped.svg +0 -1
  41. package/src/assets/providers/topper.svg +0 -14
  42. package/src/assets/providers/transak.svg +0 -21
  43. package/src/assets/providers/unlimit.svg +0 -21
  44. package/src/components/steps/CardBuyFlow/CardBuyFlow.tsx +0 -412
  45. package/src/components/steps/CardBuyFlow/ChooseAmountStep.tsx +0 -352
  46. package/src/components/steps/CardBuyFlow/OpenWidgetStep.tsx +0 -193
  47. package/src/components/steps/SmartAccountFlow.tsx +0 -372
  48. package/src/components/steps/shared/ChooseAmountStep.tsx +0 -325
  49. package/src/components/steps/shared/SignUserOpStep.tsx +0 -117
  50. package/src/components/steps/shared/TrackUserOpStep.tsx +0 -625
  51. package/src/components/steps/shared/exchangeIntegration.ts +0 -19
  52. package/src/components/steps/shared/types.ts +0 -22
  53. package/src/components/ui/transitions.tsx +0 -16
  54. package/src/enso-api/model/bridgeTransactionResponse.ts +0 -37
  55. package/src/enso-api/model/bridgeTransactionResponseStatus.ts +0 -25
  56. package/src/enso-api/model/ensoEvent.ts +0 -30
  57. package/src/enso-api/model/ensoMetadata.ts +0 -23
  58. package/src/enso-api/model/layerZeroControllerCheckBridgeTransactionParams.ts +0 -21
  59. package/src/enso-api/model/layerZeroMessageStatus.ts +0 -39
  60. package/src/enso-api/model/refundDetails.ts +0 -21
  61. package/src/util/meld-hooks.tsx +0 -533
@@ -1,37 +0,0 @@
1
- /**
2
- * Generated by orval v7.11.1 🍺
3
- * Do not edit manually.
4
- * #### Enso API
5
- - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
- - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
7
- - For testing, Swagger pre-authorizes you using the key: `1e02632d-6feb-4a75-a157-documentation` (1rps).
8
- - Get your own API Key at [enso.finance/developers](https://developers.enso.build/).
9
- * OpenAPI spec version: 1.0
10
- */
11
- import type { BridgeTransactionResponseStatus } from "./bridgeTransactionResponseStatus";
12
- import type { LayerZeroMessageStatus } from "./layerZeroMessageStatus";
13
- import type { EnsoEvent } from "./ensoEvent";
14
- import type { EnsoMetadata } from "./ensoMetadata";
15
-
16
- export interface BridgeTransactionResponse {
17
- /** Source chain ID */
18
- sourceChainId: number;
19
- /** Source transaction hash */
20
- sourceTxHash: string;
21
- /** Destination chain ID (if known) */
22
- destinationChainId?: number;
23
- /** Destination transaction hash (if completed) */
24
- destinationTxHash?: string;
25
- /** Overall bridge status */
26
- status: BridgeTransactionResponseStatus;
27
- /** LayerZero message information */
28
- layerZeroMessage?: LayerZeroMessageStatus;
29
- /** Enso shortcut event from source chain (ShortcutExecuted + execution result) */
30
- ensoSourceEvent?: EnsoEvent;
31
- /** Enso shortcut event from destination chain (ShortcutExecuted + execution result) */
32
- ensoDestinationEvent?: EnsoEvent;
33
- /** Enso transaction metadata */
34
- ensoMetadata?: EnsoMetadata;
35
- /** Error message if something went wrong */
36
- error?: string;
37
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * Generated by orval v7.11.1 🍺
3
- * Do not edit manually.
4
- * #### Enso API
5
- - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
- - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
7
- - For testing, Swagger pre-authorizes you using the key: `1e02632d-6feb-4a75-a157-documentation` (1rps).
8
- - Get your own API Key at [enso.finance/developers](https://developers.enso.build/).
9
- * OpenAPI spec version: 1.0
10
- */
11
-
12
- /**
13
- * Overall bridge status
14
- */
15
- export type BridgeTransactionResponseStatus =
16
- (typeof BridgeTransactionResponseStatus)[keyof typeof BridgeTransactionResponseStatus];
17
-
18
- // eslint-disable-next-line @typescript-eslint/no-redeclare
19
- export const BridgeTransactionResponseStatus = {
20
- pending: "pending",
21
- inflight: "inflight",
22
- delivered: "delivered",
23
- failed: "failed",
24
- unknown: "unknown",
25
- } as const;
@@ -1,30 +0,0 @@
1
- /**
2
- * Generated by orval v7.11.1 🍺
3
- * Do not edit manually.
4
- * #### Enso API
5
- - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
- - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
7
- - For testing, Swagger pre-authorizes you using the key: `1e02632d-6feb-4a75-a157-documentation` (1rps).
8
- - Get your own API Key at [enso.finance/developers](https://developers.enso.build/).
9
- * OpenAPI spec version: 1.0
10
- */
11
- import type { RefundDetails } from "./refundDetails";
12
-
13
- export interface EnsoEvent {
14
- /** Account ID from ShortcutExecuted event */
15
- accountId?: string;
16
- /** Request ID from ShortcutExecuted event */
17
- requestId?: string;
18
- /** Block number where the event was emitted */
19
- blockNumber: number;
20
- /** Transaction hash */
21
- transactionHash: string;
22
- /** Chain ID where the event was emitted */
23
- chainId: number;
24
- /** Whether the shortcut execution was successful */
25
- success: boolean;
26
- /** Error data if execution failed */
27
- error?: string;
28
- /** Refund details if execution failed and funds were returned */
29
- refundDetails?: RefundDetails;
30
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * Generated by orval v7.11.1 🍺
3
- * Do not edit manually.
4
- * #### Enso API
5
- - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
- - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
7
- - For testing, Swagger pre-authorizes you using the key: `1e02632d-6feb-4a75-a157-documentation` (1rps).
8
- - Get your own API Key at [enso.finance/developers](https://developers.enso.build/).
9
- * OpenAPI spec version: 1.0
10
- */
11
-
12
- export interface EnsoMetadata {
13
- /** Token in address */
14
- tokenIn?: string;
15
- /** Token out address */
16
- tokenOut?: string;
17
- /** Amount in */
18
- amountIn?: string;
19
- /** Chain ID from the request */
20
- chainId?: number;
21
- /** Timestamp of the request */
22
- timestamp?: number;
23
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * Generated by orval v7.11.1 🍺
3
- * Do not edit manually.
4
- * #### Enso API
5
- - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
- - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
7
- - For testing, Swagger pre-authorizes you using the key: `1e02632d-6feb-4a75-a157-documentation` (1rps).
8
- - Get your own API Key at [enso.finance/developers](https://developers.enso.build/).
9
- * OpenAPI spec version: 1.0
10
- */
11
-
12
- export type LayerZeroControllerCheckBridgeTransactionParams = {
13
- /**
14
- * Chain ID of the source transaction
15
- */
16
- chainId: number;
17
- /**
18
- * Transaction hash
19
- */
20
- txHash: string;
21
- };
@@ -1,39 +0,0 @@
1
- /**
2
- * Generated by orval v7.11.1 🍺
3
- * Do not edit manually.
4
- * #### Enso API
5
- - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
- - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
7
- - For testing, Swagger pre-authorizes you using the key: `1e02632d-6feb-4a75-a157-documentation` (1rps).
8
- - Get your own API Key at [enso.finance/developers](https://developers.enso.build/).
9
- * OpenAPI spec version: 1.0
10
- */
11
-
12
- export interface LayerZeroMessageStatus {
13
- /** Source chain endpoint ID */
14
- srcEid: number;
15
- /** Destination chain endpoint ID */
16
- dstEid: number;
17
- /** Source chain ID (EVM) */
18
- srcChainId?: number;
19
- /** Destination chain ID (EVM) */
20
- dstChainId?: number;
21
- /** Message status from LayerZero */
22
- status: string;
23
- /** Source transaction hash */
24
- srcTxHash?: string;
25
- /** Destination transaction hash (if delivered) */
26
- dstTxHash?: string;
27
- /** Source block number */
28
- srcBlockNumber?: number;
29
- /** Destination block number (if delivered) */
30
- dstBlockNumber?: number;
31
- /** Source timestamp */
32
- srcTimestamp?: string;
33
- /** Destination timestamp (if delivered) */
34
- dstTimestamp?: string;
35
- /** Sender address */
36
- sender?: string;
37
- /** Receiver address */
38
- receiver?: string;
39
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * Generated by orval v7.11.1 🍺
3
- * Do not edit manually.
4
- * #### Enso API
5
- - Find detailed documentation on [docs.enso.finance](https://docs.enso.finance).
6
- - To use the API, **you must include your API Key in the Authorization header** (Bearer format).
7
- - For testing, Swagger pre-authorizes you using the key: `1e02632d-6feb-4a75-a157-documentation` (1rps).
8
- - Get your own API Key at [enso.finance/developers](https://developers.enso.build/).
9
- * OpenAPI spec version: 1.0
10
- */
11
-
12
- export interface RefundDetails {
13
- /** Token address (0xeee... for native token) */
14
- token: string;
15
- /** Amount refunded */
16
- amount: string;
17
- /** Recipient address */
18
- recipient: string;
19
- /** Whether the refund is in native token */
20
- isNative: boolean;
21
- }