@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.
- package/dist/checkout-widget.es.js +52889 -0
- package/dist/checkout-widget.es.js.map +1 -0
- package/dist/checkout-widget.umd.js +203 -0
- package/dist/checkout-widget.umd.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/enso-api.yaml +1982 -0
- package/orval.config.ts +25 -0
- package/package.json +79 -0
- package/src/assets/BinanceBadge.svg +4 -0
- package/src/assets/CoinbaseIcon.svg +4 -0
- package/src/assets/USD Coin (USDC).svg +5 -0
- package/src/assets/avecIcon.svg +5 -0
- package/src/assets/base.webp +0 -0
- package/src/assets/depositIcon.svg +6 -0
- package/src/assets/eth.webp +0 -0
- package/src/assets/ethMainnetIcon.svg +10 -0
- package/src/assets/fail.svg +5 -0
- package/src/assets/kraken.png +0 -0
- package/src/assets/logo.svg +10 -0
- package/src/assets/mastercard.png +0 -0
- package/src/assets/metamask.png +0 -0
- package/src/assets/rabby.png +0 -0
- package/src/assets/success.svg +4 -0
- package/src/assets/usdc.webp +0 -0
- package/src/assets/usdt.webp +0 -0
- package/src/assets/visa.png +0 -0
- package/src/assets/visa.webp +0 -0
- package/src/components/BridgeFee.tsx +58 -0
- package/src/components/ChakraProvider.tsx +372 -0
- package/src/components/Checkout.tsx +127 -0
- package/src/components/CheckoutModal.tsx +22 -0
- package/src/components/CircleTimer.tsx +66 -0
- package/src/components/CurrencySwapDisplay.tsx +153 -0
- package/src/components/DepositProcessing.tsx +116 -0
- package/src/components/ExchangeConfirmSecurity.tsx +110 -0
- package/src/components/QuoteParameters.tsx +341 -0
- package/src/components/TransactionDetailRow.tsx +124 -0
- package/src/components/cards/AssetCard.tsx +167 -0
- package/src/components/cards/ExchangeCard.tsx +53 -0
- package/src/components/cards/OptionCard.tsx +59 -0
- package/src/components/cards/WalletCard.tsx +99 -0
- package/src/components/cards/index.ts +6 -0
- package/src/components/modal.tsx +83 -0
- package/src/components/steps/ExchangeFlow.tsx +1402 -0
- package/src/components/steps/InitialStep.tsx +169 -0
- package/src/components/steps/QuoteStep.tsx +121 -0
- package/src/components/steps/WalletAmountStep.tsx +258 -0
- package/src/components/steps/WalletConfirmStep.tsx +404 -0
- package/src/components/steps/WalletTokenStep.tsx +128 -0
- package/src/components/ui/index.tsx +394 -0
- package/src/components/ui/styled.tsx +85 -0
- package/src/components/ui/toaster.tsx +43 -0
- package/src/components/ui/tooltip.tsx +46 -0
- package/src/enso-api/api.ts +173 -0
- package/src/enso-api/custom-instance.ts +35 -0
- package/src/enso-api/index.ts +5119 -0
- package/src/enso-api/model/action.ts +17 -0
- package/src/enso-api/model/actionAction.ts +52 -0
- package/src/enso-api/model/actionInputs.ts +12 -0
- package/src/enso-api/model/actionToBundle.ts +19 -0
- package/src/enso-api/model/actionToBundleAction.ts +53 -0
- package/src/enso-api/model/actionToBundleArgs.ts +12 -0
- package/src/enso-api/model/bundleControllerBundleShortcutTransactionParams.ts +53 -0
- package/src/enso-api/model/bundleControllerBundleShortcutTransactionRoutingStrategy.ts +23 -0
- package/src/enso-api/model/bundleShortcutTransaction.ts +35 -0
- package/src/enso-api/model/bundleShortcutTransactionAmountsOut.ts +15 -0
- package/src/enso-api/model/bundleShortcutTransactionFeeAmount.ts +12 -0
- package/src/enso-api/model/connectedNetwork.ts +16 -0
- package/src/enso-api/model/hop.ts +24 -0
- package/src/enso-api/model/hopArgs.ts +12 -0
- package/src/enso-api/model/index.ts +70 -0
- package/src/enso-api/model/iporControllerIporShortcutTransactionParams.ts +21 -0
- package/src/enso-api/model/iporShortcutInput.ts +33 -0
- package/src/enso-api/model/iporShortcutTransaction.ts +22 -0
- package/src/enso-api/model/lZDestinationTokenData.ts +19 -0
- package/src/enso-api/model/lZPoolLookupResponse.ts +26 -0
- package/src/enso-api/model/layerZeroControllerGetPoolAddressParams.ts +29 -0
- package/src/enso-api/model/network.ts +15 -0
- package/src/enso-api/model/networksControllerNetworksParams.ts +21 -0
- package/src/enso-api/model/nonTokenizedControllerTokens200.ts +15 -0
- package/src/enso-api/model/nonTokenizedControllerTokens200AllOf.ts +16 -0
- package/src/enso-api/model/nonTokenizedControllerTokensParams.ts +41 -0
- package/src/enso-api/model/nonTokenizedModel.ts +27 -0
- package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionParams.ts +64 -0
- package/src/enso-api/model/nontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy.ts +22 -0
- package/src/enso-api/model/paginatedResult.ts +16 -0
- package/src/enso-api/model/paginationMeta.ts +27 -0
- package/src/enso-api/model/positionModel.ts +77 -0
- package/src/enso-api/model/price.ts +20 -0
- package/src/enso-api/model/pricesControllerGetPricesParams.ts +17 -0
- package/src/enso-api/model/project.ts +15 -0
- package/src/enso-api/model/protocol.ts +15 -0
- package/src/enso-api/model/protocolModel.ts +26 -0
- package/src/enso-api/model/protocolsControllerFindAllParams.ts +21 -0
- package/src/enso-api/model/routeShortcutTransaction.ts +33 -0
- package/src/enso-api/model/routeShortcutVariableInputs.ts +68 -0
- package/src/enso-api/model/routeShortcutVariableInputsRoutingStrategy.ts +27 -0
- package/src/enso-api/model/routeShortcutVariableInputsVariableEstimates.ts +14 -0
- package/src/enso-api/model/routerControllerRouteShortcutTransactionParams.ts +91 -0
- package/src/enso-api/model/routerControllerRouteShortcutTransactionRoutingStrategy.ts +23 -0
- package/src/enso-api/model/standard.ts +18 -0
- package/src/enso-api/model/standardAction.ts +20 -0
- package/src/enso-api/model/standardActionAction.ts +53 -0
- package/src/enso-api/model/tokenModel.ts +36 -0
- package/src/enso-api/model/tokensControllerTokens200.ts +15 -0
- package/src/enso-api/model/tokensControllerTokens200AllOf.ts +16 -0
- package/src/enso-api/model/tokensControllerTokensParams.ts +91 -0
- package/src/enso-api/model/tokensControllerTokensType.ts +19 -0
- package/src/enso-api/model/transaction.ts +17 -0
- package/src/enso-api/model/userOperation.ts +28 -0
- package/src/enso-api/model/walletApproveTransaction.ts +24 -0
- package/src/enso-api/model/walletApproveTransactionTx.ts +15 -0
- package/src/enso-api/model/walletBalance.ts +29 -0
- package/src/enso-api/model/walletControllerCreateApproveTransactionParams.ts +35 -0
- package/src/enso-api/model/walletControllerCreateApproveTransactionRoutingStrategy.ts +23 -0
- package/src/enso-api/model/walletControllerWalletBalancesParams.ts +25 -0
- package/src/index.ts +17 -0
- package/src/store.ts +68 -0
- package/src/types/assets.d.ts +29 -0
- package/src/types/index.ts +21 -0
- package/src/util/common.tsx +324 -0
- package/src/util/constants.tsx +213 -0
- package/src/util/enso-hooks.tsx +203 -0
- package/src/util/index.tsx +68 -0
- package/src/util/tx-tracker.tsx +301 -0
- package/src/util/wallet.tsx +258 -0
- package/tsconfig.json +13 -0
- package/vite.config.ts +51 -0
|
@@ -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
|
+
import type { ActionAction } from "./actionAction";
|
|
12
|
+
import type { ActionInputs } from "./actionInputs";
|
|
13
|
+
|
|
14
|
+
export interface Action {
|
|
15
|
+
action: ActionAction;
|
|
16
|
+
inputs: ActionInputs;
|
|
17
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 ActionAction = (typeof ActionAction)[keyof typeof ActionAction];
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
15
|
+
export const ActionAction = {
|
|
16
|
+
approve: "approve",
|
|
17
|
+
borrow: "borrow",
|
|
18
|
+
borrowwithpositionid: "borrowwithpositionid",
|
|
19
|
+
bridge: "bridge",
|
|
20
|
+
deposit: "deposit",
|
|
21
|
+
singledeposit: "singledeposit",
|
|
22
|
+
singledepositwithpositionid: "singledepositwithpositionid",
|
|
23
|
+
multideposit: "multideposit",
|
|
24
|
+
tokenizedsingledeposit: "tokenizedsingledeposit",
|
|
25
|
+
tokenizedmultideposit: "tokenizedmultideposit",
|
|
26
|
+
multioutsingledeposit: "multioutsingledeposit",
|
|
27
|
+
depositclmm: "depositclmm",
|
|
28
|
+
harvest: "harvest",
|
|
29
|
+
permittransferfrom: "permittransferfrom",
|
|
30
|
+
redeem: "redeem",
|
|
31
|
+
singleredeem: "singleredeem",
|
|
32
|
+
singleredeemwithpositionid: "singleredeemwithpositionid",
|
|
33
|
+
multiredeem: "multiredeem",
|
|
34
|
+
tokenizedsingleredeem: "tokenizedsingleredeem",
|
|
35
|
+
tokenizedmultiredeem: "tokenizedmultiredeem",
|
|
36
|
+
redeemclmm: "redeemclmm",
|
|
37
|
+
repay: "repay",
|
|
38
|
+
repaywithpositionid: "repaywithpositionid",
|
|
39
|
+
swap: "swap",
|
|
40
|
+
transfer: "transfer",
|
|
41
|
+
transferfrom: "transferfrom",
|
|
42
|
+
route: "route",
|
|
43
|
+
call: "call",
|
|
44
|
+
split: "split",
|
|
45
|
+
merge: "merge",
|
|
46
|
+
balance: "balance",
|
|
47
|
+
minamountout: "minamountout",
|
|
48
|
+
slippage: "slippage",
|
|
49
|
+
fee: "fee",
|
|
50
|
+
ensofee: "ensofee",
|
|
51
|
+
paymasterfee: "paymasterfee",
|
|
52
|
+
} as const;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 ActionInputs = { [key: string]: string };
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { ActionToBundleAction } from "./actionToBundleAction";
|
|
12
|
+
import type { ActionToBundleArgs } from "./actionToBundleArgs";
|
|
13
|
+
|
|
14
|
+
export interface ActionToBundle {
|
|
15
|
+
/** Protocol to interact with */
|
|
16
|
+
protocol: string;
|
|
17
|
+
action: ActionToBundleAction;
|
|
18
|
+
args: ActionToBundleArgs;
|
|
19
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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 ActionToBundleAction =
|
|
13
|
+
(typeof ActionToBundleAction)[keyof typeof ActionToBundleAction];
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
16
|
+
export const ActionToBundleAction = {
|
|
17
|
+
approve: "approve",
|
|
18
|
+
borrow: "borrow",
|
|
19
|
+
borrowwithpositionid: "borrowwithpositionid",
|
|
20
|
+
bridge: "bridge",
|
|
21
|
+
deposit: "deposit",
|
|
22
|
+
singledeposit: "singledeposit",
|
|
23
|
+
singledepositwithpositionid: "singledepositwithpositionid",
|
|
24
|
+
multideposit: "multideposit",
|
|
25
|
+
tokenizedsingledeposit: "tokenizedsingledeposit",
|
|
26
|
+
tokenizedmultideposit: "tokenizedmultideposit",
|
|
27
|
+
multioutsingledeposit: "multioutsingledeposit",
|
|
28
|
+
depositclmm: "depositclmm",
|
|
29
|
+
harvest: "harvest",
|
|
30
|
+
permittransferfrom: "permittransferfrom",
|
|
31
|
+
redeem: "redeem",
|
|
32
|
+
singleredeem: "singleredeem",
|
|
33
|
+
singleredeemwithpositionid: "singleredeemwithpositionid",
|
|
34
|
+
multiredeem: "multiredeem",
|
|
35
|
+
tokenizedsingleredeem: "tokenizedsingleredeem",
|
|
36
|
+
tokenizedmultiredeem: "tokenizedmultiredeem",
|
|
37
|
+
redeemclmm: "redeemclmm",
|
|
38
|
+
repay: "repay",
|
|
39
|
+
repaywithpositionid: "repaywithpositionid",
|
|
40
|
+
swap: "swap",
|
|
41
|
+
transfer: "transfer",
|
|
42
|
+
transferfrom: "transferfrom",
|
|
43
|
+
route: "route",
|
|
44
|
+
call: "call",
|
|
45
|
+
split: "split",
|
|
46
|
+
merge: "merge",
|
|
47
|
+
balance: "balance",
|
|
48
|
+
minamountout: "minamountout",
|
|
49
|
+
slippage: "slippage",
|
|
50
|
+
fee: "fee",
|
|
51
|
+
ensofee: "ensofee",
|
|
52
|
+
paymasterfee: "paymasterfee",
|
|
53
|
+
} as const;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 ActionToBundleArgs = { [key: string]: unknown };
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { BundleControllerBundleShortcutTransactionRoutingStrategy } from "./bundleControllerBundleShortcutTransactionRoutingStrategy";
|
|
12
|
+
|
|
13
|
+
export type BundleControllerBundleShortcutTransactionParams = {
|
|
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
|
+
* Referral code that will be included in an on-chain event.
|
|
24
|
+
* @maxLength 16
|
|
25
|
+
*/
|
|
26
|
+
referralCode?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Routing strategy to use
|
|
29
|
+
* @nullable
|
|
30
|
+
*/
|
|
31
|
+
routingStrategy?: BundleControllerBundleShortcutTransactionRoutingStrategy;
|
|
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
|
+
* A list of swap aggregators to be ignored from consideration
|
|
46
|
+
* @nullable
|
|
47
|
+
*/
|
|
48
|
+
ignoreAggregators?: string[] | null;
|
|
49
|
+
/**
|
|
50
|
+
* Flag to skip quoting (if true, amountOut and gas will not be returned)
|
|
51
|
+
*/
|
|
52
|
+
skipQuote?: boolean;
|
|
53
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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 BundleControllerBundleShortcutTransactionRoutingStrategy =
|
|
13
|
+
| (typeof BundleControllerBundleShortcutTransactionRoutingStrategy)[keyof typeof BundleControllerBundleShortcutTransactionRoutingStrategy]
|
|
14
|
+
| null;
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
17
|
+
export const BundleControllerBundleShortcutTransactionRoutingStrategy = {
|
|
18
|
+
ensowallet: "ensowallet",
|
|
19
|
+
router: "router",
|
|
20
|
+
delegate: "delegate",
|
|
21
|
+
"router-legacy": "router-legacy",
|
|
22
|
+
"delegate-legacy": "delegate-legacy",
|
|
23
|
+
} as const;
|
|
@@ -0,0 +1,35 @@
|
|
|
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 { ActionToBundle } from "./actionToBundle";
|
|
12
|
+
import type { BundleShortcutTransactionAmountsOut } from "./bundleShortcutTransactionAmountsOut";
|
|
13
|
+
import type { Hop } from "./hop";
|
|
14
|
+
import type { Transaction } from "./transaction";
|
|
15
|
+
import type { BundleShortcutTransactionFeeAmount } from "./bundleShortcutTransactionFeeAmount";
|
|
16
|
+
import type { UserOperation } from "./userOperation";
|
|
17
|
+
|
|
18
|
+
export interface BundleShortcutTransaction {
|
|
19
|
+
bundle: ActionToBundle[];
|
|
20
|
+
/** Gas estimate for the transaction */
|
|
21
|
+
gas?: string;
|
|
22
|
+
/** Expected output amounts by token address */
|
|
23
|
+
amountsOut?: BundleShortcutTransactionAmountsOut;
|
|
24
|
+
/** The route the shortcut will use */
|
|
25
|
+
route: Hop[];
|
|
26
|
+
/** Block number the transaction was created on */
|
|
27
|
+
createdAt: number;
|
|
28
|
+
/** The tx object to use in `ethers` */
|
|
29
|
+
tx: Transaction;
|
|
30
|
+
/** Price impact in basis points, null if USD price not found */
|
|
31
|
+
priceImpact: number;
|
|
32
|
+
feeAmount: BundleShortcutTransactionFeeAmount;
|
|
33
|
+
/** The ERC-4337 user operation object */
|
|
34
|
+
userOp: UserOperation;
|
|
35
|
+
}
|
|
@@ -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
|
+
/**
|
|
13
|
+
* Expected output amounts by token address
|
|
14
|
+
*/
|
|
15
|
+
export type BundleShortcutTransactionAmountsOut = { [key: string]: unknown };
|
|
@@ -0,0 +1,12 @@
|
|
|
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 BundleShortcutTransactionFeeAmount = { [key: string]: unknown };
|
|
@@ -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
|
+
|
|
12
|
+
export interface ConnectedNetwork {
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
isConnected: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 { HopArgs } from "./hopArgs";
|
|
12
|
+
|
|
13
|
+
export interface Hop {
|
|
14
|
+
tokenIn: string[];
|
|
15
|
+
tokenOut: string[];
|
|
16
|
+
protocol: string;
|
|
17
|
+
action: string;
|
|
18
|
+
primary: string;
|
|
19
|
+
internalRoutes: string[];
|
|
20
|
+
args: HopArgs;
|
|
21
|
+
chainId?: number;
|
|
22
|
+
sourceChainId?: number;
|
|
23
|
+
destinationChainId?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 HopArgs = { [key: string]: unknown };
|
|
@@ -0,0 +1,70 @@
|
|
|
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 * from "./action";
|
|
13
|
+
export * from "./actionAction";
|
|
14
|
+
export * from "./actionInputs";
|
|
15
|
+
export * from "./actionToBundle";
|
|
16
|
+
export * from "./actionToBundleAction";
|
|
17
|
+
export * from "./actionToBundleArgs";
|
|
18
|
+
export * from "./bundleControllerBundleShortcutTransactionParams";
|
|
19
|
+
export * from "./bundleControllerBundleShortcutTransactionRoutingStrategy";
|
|
20
|
+
export * from "./bundleShortcutTransaction";
|
|
21
|
+
export * from "./bundleShortcutTransactionAmountsOut";
|
|
22
|
+
export * from "./connectedNetwork";
|
|
23
|
+
export * from "./hop";
|
|
24
|
+
export * from "./hopArgs";
|
|
25
|
+
export * from "./iporControllerIporShortcutTransactionParams";
|
|
26
|
+
export * from "./iporShortcutInput";
|
|
27
|
+
export * from "./iporShortcutTransaction";
|
|
28
|
+
export * from "./network";
|
|
29
|
+
export * from "./networksControllerNetworksParams";
|
|
30
|
+
export * from "./nonTokenizedControllerTokens200";
|
|
31
|
+
export * from "./nonTokenizedControllerTokens200AllOf";
|
|
32
|
+
export * from "./nonTokenizedControllerTokensParams";
|
|
33
|
+
export * from "./nonTokenizedModel";
|
|
34
|
+
export * from "./nontokenizedControllerRouteNontokenizedShorcutTransactionParams";
|
|
35
|
+
export * from "./nontokenizedControllerRouteNontokenizedShorcutTransactionRoutingStrategy";
|
|
36
|
+
export * from "./paginatedResult";
|
|
37
|
+
export * from "./paginationMeta";
|
|
38
|
+
export * from "./positionModel";
|
|
39
|
+
export * from "./price";
|
|
40
|
+
export * from "./pricesControllerGetPricesParams";
|
|
41
|
+
export * from "./project";
|
|
42
|
+
export * from "./protocol";
|
|
43
|
+
export * from "./protocolModel";
|
|
44
|
+
export * from "./protocolsControllerFindAllParams";
|
|
45
|
+
export * from "./routeShortcutTransaction";
|
|
46
|
+
export * from "./routeShortcutVariableInputs";
|
|
47
|
+
export * from "./routeShortcutVariableInputsRoutingStrategy";
|
|
48
|
+
export * from "./routeShortcutVariableInputsVariableEstimates";
|
|
49
|
+
export * from "./routerControllerRouteShortcutTransactionParams";
|
|
50
|
+
export * from "./routerControllerRouteShortcutTransactionRoutingStrategy";
|
|
51
|
+
export * from "./standard";
|
|
52
|
+
export * from "./standardAction";
|
|
53
|
+
export * from "./standardActionAction";
|
|
54
|
+
export * from "./tokenModel";
|
|
55
|
+
export * from "./tokensControllerTokens200";
|
|
56
|
+
export * from "./tokensControllerTokens200AllOf";
|
|
57
|
+
export * from "./tokensControllerTokensParams";
|
|
58
|
+
export * from "./tokensControllerTokensType";
|
|
59
|
+
export * from "./transaction";
|
|
60
|
+
export * from "./userOperation";
|
|
61
|
+
export * from "./walletApproveTransaction";
|
|
62
|
+
export * from "./walletApproveTransactionTx";
|
|
63
|
+
export * from "./walletBalance";
|
|
64
|
+
export * from "./walletControllerCreateApproveTransactionParams";
|
|
65
|
+
export * from "./walletControllerCreateApproveTransactionRoutingStrategy";
|
|
66
|
+
export * from "./walletControllerWalletBalancesParams";
|
|
67
|
+
export * from "./bundleShortcutTransactionFeeAmount";
|
|
68
|
+
export * from "./lZDestinationTokenData";
|
|
69
|
+
export * from "./lZPoolLookupResponse";
|
|
70
|
+
export * from "./layerZeroControllerGetPoolAddressParams";
|
|
@@ -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 IporControllerIporShortcutTransactionParams = {
|
|
13
|
+
/**
|
|
14
|
+
* Chain ID of the network to execute the transaction on
|
|
15
|
+
*/
|
|
16
|
+
chainId?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Ethereum address of the wallet to send the transaction from
|
|
19
|
+
*/
|
|
20
|
+
fromAddress?: string;
|
|
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
|
+
|
|
12
|
+
export interface IporShortcutInput {
|
|
13
|
+
/**
|
|
14
|
+
* Flag that indicates whether to use the shared router
|
|
15
|
+
* @nullable
|
|
16
|
+
*/
|
|
17
|
+
isRouter?: boolean | null;
|
|
18
|
+
/** Amount of tokenIn in wei */
|
|
19
|
+
amountIn: string;
|
|
20
|
+
/** Address of the tokenIn. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee */
|
|
21
|
+
tokenIn: string;
|
|
22
|
+
/** Address of the tokenBToBuy */
|
|
23
|
+
tokenBToBuy: string;
|
|
24
|
+
/** Percentage of tokenB to buy in basis points (1/10000) */
|
|
25
|
+
percentageForTokenB: string;
|
|
26
|
+
/** Slippage in basis points (1/10000). Default is 300 */
|
|
27
|
+
slippage?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Flag that indicates whether to simulate the transaction, verify some assertions, return simulationURL and events
|
|
30
|
+
* @nullable
|
|
31
|
+
*/
|
|
32
|
+
simulate?: boolean | null;
|
|
33
|
+
}
|
|
@@ -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
|
+
import type { Transaction } from "./transaction";
|
|
12
|
+
|
|
13
|
+
export interface IporShortcutTransaction {
|
|
14
|
+
/** Block number the transaction was created on */
|
|
15
|
+
createdAt: number;
|
|
16
|
+
/** The tx object to use in `ethers` */
|
|
17
|
+
tx: Transaction;
|
|
18
|
+
/** Logs from the simulated transaction */
|
|
19
|
+
logs: string[];
|
|
20
|
+
/** Tenderly simulation URL */
|
|
21
|
+
simulationURL: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 LZDestinationTokenData {
|
|
13
|
+
/** LayerZero pool address on the destination chain */
|
|
14
|
+
pool: string;
|
|
15
|
+
/** Token address on the destination chain */
|
|
16
|
+
token: string;
|
|
17
|
+
/** Decimals of the token on the destination chain */
|
|
18
|
+
decimals: number;
|
|
19
|
+
}
|
|
@@ -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 { LZDestinationTokenData } from "./lZDestinationTokenData";
|
|
12
|
+
|
|
13
|
+
export interface LZPoolLookupResponse {
|
|
14
|
+
/** LayerZero pool address for the source token */
|
|
15
|
+
pool: string;
|
|
16
|
+
/** Source chain ID */
|
|
17
|
+
chainId: number;
|
|
18
|
+
/** Destination chain ID */
|
|
19
|
+
destinationChainId: number;
|
|
20
|
+
/** Source token address */
|
|
21
|
+
token: string;
|
|
22
|
+
/** Decimals of the source token */
|
|
23
|
+
decimals: number;
|
|
24
|
+
/** Details about the destination pool and token */
|
|
25
|
+
destinationData: LZDestinationTokenData;
|
|
26
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
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 LayerZeroControllerGetPoolAddressParams = {
|
|
13
|
+
/**
|
|
14
|
+
* Chain ID
|
|
15
|
+
*/
|
|
16
|
+
chainId: number;
|
|
17
|
+
/**
|
|
18
|
+
* Token address on source chain
|
|
19
|
+
*/
|
|
20
|
+
token: string;
|
|
21
|
+
/**
|
|
22
|
+
* Chain ID of destination chain
|
|
23
|
+
*/
|
|
24
|
+
destinationChainId?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Token address on destination chain
|
|
27
|
+
*/
|
|
28
|
+
destinationToken?: string;
|
|
29
|
+
};
|
|
@@ -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 Network {
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
@@ -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 NetworksControllerNetworksParams = {
|
|
13
|
+
/**
|
|
14
|
+
* Title of the network to search for
|
|
15
|
+
*/
|
|
16
|
+
name?: unknown;
|
|
17
|
+
/**
|
|
18
|
+
* Chain ID of the network to search for
|
|
19
|
+
*/
|
|
20
|
+
chainId?: unknown;
|
|
21
|
+
};
|
|
@@ -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
|
+
import type { PaginatedResult } from "./paginatedResult";
|
|
12
|
+
import type { NonTokenizedControllerTokens200AllOf } from "./nonTokenizedControllerTokens200AllOf";
|
|
13
|
+
|
|
14
|
+
export type NonTokenizedControllerTokens200 = PaginatedResult &
|
|
15
|
+
NonTokenizedControllerTokens200AllOf;
|