@ensofinance/checkout-widget 0.0.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 (128) hide show
  1. package/dist/checkout-widget.es.js +52889 -0
  2. package/dist/checkout-widget.es.js.map +1 -0
  3. package/dist/checkout-widget.umd.js +203 -0
  4. package/dist/checkout-widget.umd.js.map +1 -0
  5. package/dist/index.d.ts +23 -0
  6. package/enso-api.yaml +1982 -0
  7. package/orval.config.ts +25 -0
  8. package/package.json +79 -0
  9. package/src/assets/BinanceBadge.svg +4 -0
  10. package/src/assets/CoinbaseIcon.svg +4 -0
  11. package/src/assets/USD Coin (USDC).svg +5 -0
  12. package/src/assets/avecIcon.svg +5 -0
  13. package/src/assets/base.webp +0 -0
  14. package/src/assets/depositIcon.svg +6 -0
  15. package/src/assets/eth.webp +0 -0
  16. package/src/assets/ethMainnetIcon.svg +10 -0
  17. package/src/assets/fail.svg +5 -0
  18. package/src/assets/kraken.png +0 -0
  19. package/src/assets/logo.svg +10 -0
  20. package/src/assets/mastercard.png +0 -0
  21. package/src/assets/metamask.png +0 -0
  22. package/src/assets/rabby.png +0 -0
  23. package/src/assets/success.svg +4 -0
  24. package/src/assets/usdc.webp +0 -0
  25. package/src/assets/usdt.webp +0 -0
  26. package/src/assets/visa.png +0 -0
  27. package/src/assets/visa.webp +0 -0
  28. package/src/components/BridgeFee.tsx +58 -0
  29. package/src/components/ChakraProvider.tsx +372 -0
  30. package/src/components/Checkout.tsx +127 -0
  31. package/src/components/CheckoutModal.tsx +22 -0
  32. package/src/components/CircleTimer.tsx +66 -0
  33. package/src/components/CurrencySwapDisplay.tsx +153 -0
  34. package/src/components/DepositProcessing.tsx +116 -0
  35. package/src/components/ExchangeConfirmSecurity.tsx +110 -0
  36. package/src/components/QuoteParameters.tsx +341 -0
  37. package/src/components/TransactionDetailRow.tsx +124 -0
  38. package/src/components/cards/AssetCard.tsx +167 -0
  39. package/src/components/cards/ExchangeCard.tsx +53 -0
  40. package/src/components/cards/OptionCard.tsx +59 -0
  41. package/src/components/cards/WalletCard.tsx +99 -0
  42. package/src/components/cards/index.ts +6 -0
  43. package/src/components/modal.tsx +83 -0
  44. package/src/components/steps/ExchangeFlow.tsx +1402 -0
  45. package/src/components/steps/InitialStep.tsx +169 -0
  46. package/src/components/steps/QuoteStep.tsx +121 -0
  47. package/src/components/steps/WalletAmountStep.tsx +258 -0
  48. package/src/components/steps/WalletConfirmStep.tsx +404 -0
  49. package/src/components/steps/WalletTokenStep.tsx +128 -0
  50. package/src/components/ui/index.tsx +394 -0
  51. package/src/components/ui/styled.tsx +85 -0
  52. package/src/components/ui/toaster.tsx +43 -0
  53. package/src/components/ui/tooltip.tsx +46 -0
  54. package/src/enso-api/api.ts +173 -0
  55. package/src/enso-api/custom-instance.ts +35 -0
  56. package/src/enso-api/index.ts +5119 -0
  57. package/src/enso-api/model/action.ts +17 -0
  58. package/src/enso-api/model/actionAction.ts +52 -0
  59. package/src/enso-api/model/actionInputs.ts +12 -0
  60. package/src/enso-api/model/actionToBundle.ts +19 -0
  61. package/src/enso-api/model/actionToBundleAction.ts +53 -0
  62. package/src/enso-api/model/actionToBundleArgs.ts +12 -0
  63. package/src/enso-api/model/bundleControllerBundleShortcutTransactionParams.ts +53 -0
  64. package/src/enso-api/model/bundleControllerBundleShortcutTransactionRoutingStrategy.ts +23 -0
  65. package/src/enso-api/model/bundleShortcutTransaction.ts +35 -0
  66. package/src/enso-api/model/bundleShortcutTransactionAmountsOut.ts +15 -0
  67. package/src/enso-api/model/bundleShortcutTransactionFeeAmount.ts +12 -0
  68. package/src/enso-api/model/connectedNetwork.ts +16 -0
  69. package/src/enso-api/model/hop.ts +24 -0
  70. package/src/enso-api/model/hopArgs.ts +12 -0
  71. package/src/enso-api/model/index.ts +70 -0
  72. package/src/enso-api/model/iporControllerIporShortcutTransactionParams.ts +21 -0
  73. package/src/enso-api/model/iporShortcutInput.ts +33 -0
  74. package/src/enso-api/model/iporShortcutTransaction.ts +22 -0
  75. package/src/enso-api/model/lZDestinationTokenData.ts +19 -0
  76. package/src/enso-api/model/lZPoolLookupResponse.ts +26 -0
  77. package/src/enso-api/model/layerZeroControllerGetPoolAddressParams.ts +29 -0
  78. package/src/enso-api/model/network.ts +15 -0
  79. package/src/enso-api/model/networksControllerNetworksParams.ts +21 -0
  80. package/src/enso-api/model/nonTokenizedControllerTokens200.ts +15 -0
  81. package/src/enso-api/model/nonTokenizedControllerTokens200AllOf.ts +16 -0
  82. package/src/enso-api/model/nonTokenizedControllerTokensParams.ts +41 -0
  83. package/src/enso-api/model/nonTokenizedModel.ts +27 -0
  84. package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionParams.ts +64 -0
  85. package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy.ts +22 -0
  86. package/src/enso-api/model/paginatedResult.ts +16 -0
  87. package/src/enso-api/model/paginationMeta.ts +27 -0
  88. package/src/enso-api/model/positionModel.ts +77 -0
  89. package/src/enso-api/model/price.ts +20 -0
  90. package/src/enso-api/model/pricesControllerGetPricesParams.ts +17 -0
  91. package/src/enso-api/model/project.ts +15 -0
  92. package/src/enso-api/model/protocol.ts +15 -0
  93. package/src/enso-api/model/protocolModel.ts +26 -0
  94. package/src/enso-api/model/protocolsControllerFindAllParams.ts +21 -0
  95. package/src/enso-api/model/routeShortcutTransaction.ts +33 -0
  96. package/src/enso-api/model/routeShortcutVariableInputs.ts +68 -0
  97. package/src/enso-api/model/routeShortcutVariableInputsRoutingStrategy.ts +27 -0
  98. package/src/enso-api/model/routeShortcutVariableInputsVariableEstimates.ts +14 -0
  99. package/src/enso-api/model/routerControllerRouteShortcutTransactionParams.ts +91 -0
  100. package/src/enso-api/model/routerControllerRouteShortcutTransactionRoutingStrategy.ts +23 -0
  101. package/src/enso-api/model/standard.ts +18 -0
  102. package/src/enso-api/model/standardAction.ts +20 -0
  103. package/src/enso-api/model/standardActionAction.ts +53 -0
  104. package/src/enso-api/model/tokenModel.ts +36 -0
  105. package/src/enso-api/model/tokensControllerTokens200.ts +15 -0
  106. package/src/enso-api/model/tokensControllerTokens200AllOf.ts +16 -0
  107. package/src/enso-api/model/tokensControllerTokensParams.ts +91 -0
  108. package/src/enso-api/model/tokensControllerTokensType.ts +19 -0
  109. package/src/enso-api/model/transaction.ts +17 -0
  110. package/src/enso-api/model/userOperation.ts +28 -0
  111. package/src/enso-api/model/walletApproveTransaction.ts +24 -0
  112. package/src/enso-api/model/walletApproveTransactionTx.ts +15 -0
  113. package/src/enso-api/model/walletBalance.ts +29 -0
  114. package/src/enso-api/model/walletControllerCreateApproveTransactionParams.ts +35 -0
  115. package/src/enso-api/model/walletControllerCreateApproveTransactionRoutingStrategy.ts +23 -0
  116. package/src/enso-api/model/walletControllerWalletBalancesParams.ts +25 -0
  117. package/src/index.ts +17 -0
  118. package/src/store.ts +68 -0
  119. package/src/types/assets.d.ts +29 -0
  120. package/src/types/index.ts +21 -0
  121. package/src/util/common.tsx +324 -0
  122. package/src/util/constants.tsx +213 -0
  123. package/src/util/enso-hooks.tsx +203 -0
  124. package/src/util/index.tsx +68 -0
  125. package/src/util/tx-tracker.tsx +301 -0
  126. package/src/util/wallet.tsx +258 -0
  127. package/tsconfig.json +13 -0
  128. package/vite.config.ts +51 -0
@@ -0,0 +1,16 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { NonTokenizedModel } from "./nonTokenizedModel";
12
+
13
+ export type NonTokenizedControllerTokens200AllOf = {
14
+ /** Returned data for current page */
15
+ data?: NonTokenizedModel[];
16
+ };
@@ -0,0 +1,41 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export type NonTokenizedControllerTokensParams = {
13
+ /**
14
+ * The overarching project or platform associated with the DeFi token
15
+ */
16
+ project?: string;
17
+ /**
18
+ * The specific standard integration or version of the DeFi project
19
+ */
20
+ protocolSlug?: string;
21
+ /**
22
+ * Chain ID of the network of the nontokenized position
23
+ */
24
+ chainId?: number;
25
+ /**
26
+ * Ethereum addresses of the nontokenized positions
27
+ */
28
+ address?: string[];
29
+ /**
30
+ * Ethereum addresses for contract interaction of nontokenized position
31
+ */
32
+ primaryAddress?: string[];
33
+ /**
34
+ * Pagination page number. Pages are of length 1000
35
+ */
36
+ page?: number;
37
+ /**
38
+ * Cursor for pagination. Pages are of length 1000
39
+ */
40
+ cursor?: number;
41
+ };
@@ -0,0 +1,27 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { TokenModel } from "./tokenModel";
12
+
13
+ export interface NonTokenizedModel {
14
+ /** Chain ID of the network of the nontokenized position */
15
+ chainId: number;
16
+ /** The specific standard integration or version of the nontokenized position */
17
+ protocol: string;
18
+ /** Ethereum address of the nontokenized position */
19
+ address: string;
20
+ /** Ethereum address of the nontokenized position */
21
+ primaryAddress: string;
22
+ /**
23
+ * Underlying tokens of nontokenized position
24
+ * @nullable
25
+ */
26
+ underlyingTokens: TokenModel[] | null;
27
+ }
@@ -0,0 +1,64 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { NontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy } from "./nontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy";
12
+
13
+ export type NontokenizedControllerRouteNontokenizedShorcutTransactionParams = {
14
+ /**
15
+ * Chain ID of the network to execute the transaction on
16
+ */
17
+ chainId?: number;
18
+ /**
19
+ * Ethereum address of the wallet to send the transaction from
20
+ */
21
+ fromAddress?: string;
22
+ /**
23
+ * Routing strategy to use
24
+ * @nullable
25
+ */
26
+ routingStrategy?: NontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy;
27
+ /**
28
+ * Referral code that will be included in an on-chain event.
29
+ * @maxLength 16
30
+ */
31
+ referralCode?: string;
32
+ /**
33
+ * Ethereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
34
+ */
35
+ tokenIn: string[];
36
+ /**
37
+ * Ethereum address of the position to receive
38
+ */
39
+ positionOut: string;
40
+ /**
41
+ * Slippage in basis points (1/10000). If specified, minAmountOut should not be specified
42
+ */
43
+ slippage?: string;
44
+ /**
45
+ * Fee in basis points (1/10000) for each amountIn value. Must be in range 0-100. If specified, this percentage of each amountIn value will be sent to feeReceiver
46
+ */
47
+ fee?: string[];
48
+ /**
49
+ * The Ethereum address that will receive the collected fee. Required if fee is provided
50
+ */
51
+ feeReceiver?: string;
52
+ /**
53
+ * Amount of tokenIn to swap in wei
54
+ */
55
+ amountIn: string[];
56
+ /**
57
+ * Ethereum address of the receiver of the positionOut
58
+ */
59
+ receiver: string;
60
+ /**
61
+ * Ethereum address of the spender of the tokenIn
62
+ */
63
+ spender?: string;
64
+ };
@@ -0,0 +1,22 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export type NontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy =
13
+
14
+ | (typeof NontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy)[keyof typeof NontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy]
15
+ | null;
16
+
17
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
18
+ export const NontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy =
19
+ {
20
+ delegate: "delegate",
21
+ "delegate-legacy": "delegate-legacy",
22
+ } as const;
@@ -0,0 +1,16 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { PaginationMeta } from "./paginationMeta";
12
+
13
+ export interface PaginatedResult {
14
+ /** Metadata for pagination */
15
+ meta: PaginationMeta;
16
+ }
@@ -0,0 +1,27 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export interface PaginationMeta {
13
+ /** Total amount of pages */
14
+ total: number;
15
+ /** Last page number */
16
+ lastPage: number;
17
+ /** Current page number */
18
+ currentPage: number;
19
+ /** Amount of elements per page */
20
+ perPage: number;
21
+ /** Previous page */
22
+ prev: number;
23
+ /** Next page */
24
+ next: number;
25
+ /** Cursor for pagination */
26
+ cursor: number;
27
+ }
@@ -0,0 +1,77 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { TokenModel } from "./tokenModel";
12
+
13
+ export interface PositionModel {
14
+ /** Ethereum address of the token */
15
+ address: string;
16
+ /** Chain ID of the network of the token */
17
+ chainId: number;
18
+ /** Type of token */
19
+ type: string;
20
+ /** Token decimals */
21
+ decimals: number;
22
+ /**
23
+ * Token name
24
+ * @nullable
25
+ */
26
+ symbol: string | null;
27
+ /**
28
+ * Token symbol
29
+ * @nullable
30
+ */
31
+ name: string | null;
32
+ /**
33
+ * A list of logos for the token
34
+ * @nullable
35
+ */
36
+ logosUri: string[] | null;
37
+ /**
38
+ * Underlying tokens of defi token
39
+ * @nullable
40
+ */
41
+ underlyingTokens: TokenModel[] | null;
42
+ /**
43
+ * The overarching project or platform associated with the DeFi token
44
+ * @nullable
45
+ */
46
+ project: string | null;
47
+ /**
48
+ * The specific standard integration or version of the DeFi project
49
+ * @nullable
50
+ */
51
+ protocolSlug: string | null;
52
+ /**
53
+ * The defi position APY
54
+ * @nullable
55
+ */
56
+ apy: number | null;
57
+ /**
58
+ * The defi position base APY
59
+ * @nullable
60
+ */
61
+ apyBase: number | null;
62
+ /**
63
+ * The defi position reward APY
64
+ * @nullable
65
+ */
66
+ apyReward: number | null;
67
+ /**
68
+ * The defi position TVL
69
+ * @nullable
70
+ */
71
+ tvl: number | null;
72
+ /**
73
+ * Ethereum address for contract interaction of defi token
74
+ * @nullable
75
+ */
76
+ primaryAddress: string | null;
77
+ }
@@ -0,0 +1,20 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export interface Price {
13
+ decimals: number;
14
+ price: number;
15
+ address: string;
16
+ symbol?: string;
17
+ timestamp?: number;
18
+ chainId: number;
19
+ confidence?: number;
20
+ }
@@ -0,0 +1,17 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export type PricesControllerGetPricesParams = {
13
+ /**
14
+ * Ethereum address of the token to check price for (max 100 addresses).
15
+ */
16
+ addresses: string[];
17
+ };
@@ -0,0 +1,15 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export interface Project {
13
+ id: string;
14
+ chains: string[];
15
+ }
@@ -0,0 +1,15 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export interface Protocol {
13
+ slug: string;
14
+ url: string;
15
+ }
@@ -0,0 +1,26 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { Network } from "./network";
12
+
13
+ export interface ProtocolModel {
14
+ project: string;
15
+ slug: string;
16
+ /** @nullable */
17
+ name: string | null;
18
+ /** @nullable */
19
+ description: string | null;
20
+ /** @nullable */
21
+ url: string | null;
22
+ /** @nullable */
23
+ logosUri: string[] | null;
24
+ /** @nullable */
25
+ chains: Network[] | null;
26
+ }
@@ -0,0 +1,21 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export type ProtocolsControllerFindAllParams = {
13
+ /**
14
+ * Chain ID of the network to search for
15
+ */
16
+ chainId?: unknown;
17
+ /**
18
+ * slug of the project to search for
19
+ */
20
+ slug?: unknown;
21
+ };
@@ -0,0 +1,33 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { Transaction } from "./transaction";
12
+ import type { Hop } from "./hop";
13
+ import type { UserOperation } from "./userOperation";
14
+
15
+ export interface RouteShortcutTransaction {
16
+ gas: string;
17
+ amountOut: string;
18
+ /** Price impact in basis points, null if USD price not found */
19
+ priceImpact: number;
20
+ /** An array of the fee amount collected for each tokenIn */
21
+ feeAmount: string[];
22
+ /** The minimum allowable amount out after slippage */
23
+ minAmountOut: string;
24
+ /** Block number the transaction was created on */
25
+ createdAt: number;
26
+ /** The tx object to use in `ethers` */
27
+ tx: Transaction;
28
+ /** The route the shortcut will use */
29
+ route: Hop[];
30
+ ensoFeeAmount: string[];
31
+ /** The ERC-4337 user operation object */
32
+ userOp: UserOperation;
33
+ }
@@ -0,0 +1,68 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { RouteShortcutVariableInputsRoutingStrategy } from "./routeShortcutVariableInputsRoutingStrategy";
12
+ import type { RouteShortcutVariableInputsVariableEstimates } from "./routeShortcutVariableInputsVariableEstimates";
13
+
14
+ export interface RouteShortcutVariableInputs {
15
+ /** Chain ID of the network to execute the transaction on */
16
+ chainId?: number;
17
+ /** Ethereum address of the wallet to send the transaction from */
18
+ fromAddress: string;
19
+ /**
20
+ * Routing strategy to use
21
+ * @nullable
22
+ */
23
+ routingStrategy?: RouteShortcutVariableInputsRoutingStrategy;
24
+ /**
25
+ * Flag that indicates if gained tokenOut should be sent to EOA
26
+ * @deprecated
27
+ * @nullable
28
+ */
29
+ toEoa?: boolean | null;
30
+ /** Ethereum address of the receiver of the tokenOut */
31
+ receiver?: string;
32
+ /** Ethereum address of the spender of the tokenIn */
33
+ spender?: string;
34
+ /** Ethereum address of the receiver of any dust tokens that might be produced during the execution of actions */
35
+ refundReceiver?: string;
36
+ /** Amount of tokenIn to swap in wei */
37
+ amountIn: string[];
38
+ /** Minimum amount out in wei. If specified, slippage should not be specified */
39
+ minAmountOut?: string[];
40
+ /** Slippage in basis points (1/10000). e.g. 50 = 0.50%. If specified, minAmountOut should not be specified */
41
+ slippage?: string;
42
+ /** Fee in basis points (1/10000) for each amountIn value. Must be in range 0-100. If specified, this percentage of each amountIn value will be sent to feeReceiver */
43
+ fee?: string[];
44
+ /** The Ethereum address that will receive the collected fee. Required if fee is provided */
45
+ feeReceiver?: string;
46
+ /**
47
+ * A list of swap aggregators to be ignored from consideration
48
+ * @nullable
49
+ */
50
+ ignoreAggregators?: string[] | null;
51
+ /**
52
+ * A list of standards to be ignored from consideration
53
+ * @nullable
54
+ */
55
+ ignoreStandards?: string[] | null;
56
+ /**
57
+ * Referral code that will be included in an on-chain event.
58
+ * @maxLength 16
59
+ */
60
+ referralCode?: string;
61
+ /** Ethereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee */
62
+ tokenIn: string[];
63
+ /** Ethereum address of the token to swap to. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee */
64
+ tokenOut: string[];
65
+ /** Chain ID of the network to bridge to and receive tokenOut */
66
+ destinationChainId?: number;
67
+ variableEstimates: RouteShortcutVariableInputsVariableEstimates;
68
+ }
@@ -0,0 +1,27 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ /**
13
+ * Routing strategy to use
14
+ * @nullable
15
+ */
16
+ export type RouteShortcutVariableInputsRoutingStrategy =
17
+ | (typeof RouteShortcutVariableInputsRoutingStrategy)[keyof typeof RouteShortcutVariableInputsRoutingStrategy]
18
+ | null;
19
+
20
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
21
+ export const RouteShortcutVariableInputsRoutingStrategy = {
22
+ ensowallet: "ensowallet",
23
+ router: "router",
24
+ delegate: "delegate",
25
+ "router-legacy": "router-legacy",
26
+ "delegate-legacy": "delegate-legacy",
27
+ } as const;
@@ -0,0 +1,14 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+
12
+ export type RouteShortcutVariableInputsVariableEstimates = {
13
+ [key: string]: unknown;
14
+ };
@@ -0,0 +1,91 @@
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://enso.finance/developers).
9
+ * OpenAPI spec version: 1.0
10
+ */
11
+ import type { RouterControllerRouteShortcutTransactionRoutingStrategy } from "./routerControllerRouteShortcutTransactionRoutingStrategy";
12
+
13
+ export type RouterControllerRouteShortcutTransactionParams = {
14
+ /**
15
+ * Chain ID of the network to execute the transaction on
16
+ */
17
+ chainId?: number;
18
+ /**
19
+ * Ethereum address of the wallet to send the transaction from
20
+ */
21
+ fromAddress?: string;
22
+ /**
23
+ * Routing strategy to use
24
+ * @nullable
25
+ */
26
+ routingStrategy?: RouterControllerRouteShortcutTransactionRoutingStrategy;
27
+ /**
28
+ * Flag that indicates if gained tokenOut should be sent to EOA
29
+ * @nullable
30
+ */
31
+ toEoa?: boolean | null;
32
+ /**
33
+ * Ethereum address of the receiver of the tokenOut
34
+ */
35
+ receiver?: string;
36
+ /**
37
+ * Ethereum address of the spender of the tokenIn
38
+ */
39
+ spender?: string;
40
+ /**
41
+ * Ethereum address of the receiver of any dust tokens that might be produced during the execution of actions
42
+ */
43
+ refundReceiver?: string;
44
+ /**
45
+ * Amount of tokenIn to swap in wei
46
+ */
47
+ amountIn: string[];
48
+ /**
49
+ * Minimum amount out in wei. If specified, slippage should not be specified
50
+ */
51
+ minAmountOut?: string[];
52
+ /**
53
+ * Slippage in basis points (1/10000). e.g. 50 = 0.50%. If specified, minAmountOut should not be specified
54
+ */
55
+ slippage?: string;
56
+ /**
57
+ * Fee in basis points (1/10000) for each amountIn value. Must be in range 0-100. If specified, this percentage of each amountIn value will be sent to feeReceiver
58
+ */
59
+ fee?: string[];
60
+ /**
61
+ * The Ethereum address that will receive the collected fee. Required if fee is provided
62
+ */
63
+ feeReceiver?: string;
64
+ /**
65
+ * A list of swap aggregators to be ignored from consideration
66
+ * @nullable
67
+ */
68
+ ignoreAggregators?: string[] | null;
69
+ /**
70
+ * A list of standards to be ignored from consideration
71
+ * @nullable
72
+ */
73
+ ignoreStandards?: string[] | null;
74
+ /**
75
+ * Referral code that will be included in an on-chain event.
76
+ * @maxLength 16
77
+ */
78
+ referralCode?: string;
79
+ /**
80
+ * Ethereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
81
+ */
82
+ tokenIn: string[];
83
+ /**
84
+ * Ethereum address of the token to swap to. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
85
+ */
86
+ tokenOut: string[];
87
+ /**
88
+ * Chain ID of the network to bridge to and receive tokenOut
89
+ */
90
+ destinationChainId?: number;
91
+ };