@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
package/enso-api.yaml ADDED
@@ -0,0 +1,1982 @@
1
+ openapi: 3.0.0
2
+ paths:
3
+ /api/v1/networks:
4
+ get:
5
+ operationId: NetworksController_networks
6
+ summary: Returns networks supported by the API
7
+ parameters:
8
+ - name: name
9
+ required: false
10
+ in: query
11
+ description: Title of the network to search for
12
+ schema:
13
+ example: mainnet
14
+ - name: chainId
15
+ required: false
16
+ in: query
17
+ description: Chain ID of the network to search for
18
+ schema:
19
+ example: '1'
20
+ responses:
21
+ '200':
22
+ description: ''
23
+ content:
24
+ application/json:
25
+ schema:
26
+ type: array
27
+ items:
28
+ $ref: '#/components/schemas/ConnectedNetwork'
29
+ tags:
30
+ - metadata
31
+ /api/v1/prices/{chainId}/{address}:
32
+ get:
33
+ operationId: PricesController_getPrice
34
+ summary: Returns price for a token
35
+ parameters:
36
+ - name: address
37
+ required: true
38
+ in: path
39
+ description: Address of the token to search for
40
+ schema:
41
+ example: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
42
+ - name: chainId
43
+ required: true
44
+ in: path
45
+ description: Chain ID of the network to search for
46
+ schema:
47
+ example: '1'
48
+ responses:
49
+ '200':
50
+ description: ''
51
+ content:
52
+ application/json:
53
+ schema:
54
+ $ref: '#/components/schemas/Price'
55
+ tags:
56
+ - metadata
57
+ /api/v1/prices/{chainId}:
58
+ get:
59
+ operationId: PricesController_getPrices
60
+ summary: Returns price for multiple tokens
61
+ parameters:
62
+ - name: chainId
63
+ required: true
64
+ in: path
65
+ description: Chain ID of the network to search for
66
+ schema:
67
+ example: '1'
68
+ type: number
69
+ - name: addresses
70
+ required: true
71
+ in: query
72
+ description: Ethereum address of the token to check price for.
73
+ schema:
74
+ example:
75
+ - '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
76
+ type: array
77
+ items:
78
+ type: string
79
+ responses:
80
+ '200':
81
+ description: ''
82
+ content:
83
+ application/json:
84
+ schema:
85
+ type: array
86
+ items:
87
+ $ref: '#/components/schemas/Price'
88
+ tags:
89
+ - metadata
90
+ /api/v1/aggregators:
91
+ get:
92
+ operationId: AggregatorsController_aggregators
93
+ summary: >-
94
+ Returns aggregators supported by the API (can be controled via
95
+ disableAggregators param)
96
+ parameters: []
97
+ responses:
98
+ '200':
99
+ description: Returns a list of aggregators
100
+ content:
101
+ application/json:
102
+ schema:
103
+ type: array
104
+ items:
105
+ type: string
106
+ tags:
107
+ - metadata
108
+ /api/v1/volume/{chainId}:
109
+ get:
110
+ operationId: VolumeController_getVolume
111
+ summary: Returns chain USD volume and total transactions
112
+ parameters:
113
+ - name: chainId
114
+ required: true
115
+ in: path
116
+ description: Chain ID of the network to search for
117
+ schema:
118
+ default: 1
119
+ example: '1'
120
+ type: number
121
+ responses:
122
+ '200':
123
+ description: ''
124
+ tags:
125
+ - metadata
126
+ /api/v1/account/accountId:
127
+ get:
128
+ operationId: AccountController_accountId
129
+ summary: Returns accountId connected to your api key used in the on-chain event.
130
+ parameters: []
131
+ responses:
132
+ '200':
133
+ description: Your accountId
134
+ content:
135
+ application/json:
136
+ schema:
137
+ type: string
138
+ tags:
139
+ - metadata
140
+ /api/v1/tokens:
141
+ get:
142
+ operationId: TokensController_tokens
143
+ summary: Returns tokens and their details
144
+ parameters:
145
+ - name: project
146
+ required: false
147
+ in: query
148
+ description: The overarching project or platform associated with the DeFi token
149
+ schema:
150
+ example: aave
151
+ type: string
152
+ - name: protocolSlug
153
+ required: false
154
+ in: query
155
+ description: The specific standard integration or version of the DeFi project
156
+ schema:
157
+ example: aave-v2
158
+ type: string
159
+ - name: underlyingTokens
160
+ required: false
161
+ in: query
162
+ description: Underlying tokens of defi token
163
+ schema:
164
+ example:
165
+ - '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
166
+ type: array
167
+ items:
168
+ type: string
169
+ - name: underlyingTokensExact
170
+ required: false
171
+ in: query
172
+ description: Exact composition of underlying tokens of defi token
173
+ schema:
174
+ example:
175
+ - '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
176
+ type: array
177
+ items:
178
+ type: string
179
+ - name: primaryAddress
180
+ required: false
181
+ in: query
182
+ description: Ethereum addresses for contract interaction of defi tokens
183
+ schema:
184
+ example:
185
+ - '0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9'
186
+ type: array
187
+ items:
188
+ type: string
189
+ - name: address
190
+ required: false
191
+ in: query
192
+ description: Ethereum addresses of the tokens
193
+ schema:
194
+ example:
195
+ - '0x030bA81f1c18d280636F32af80b9AAd02Cf0854e'
196
+ type: array
197
+ items:
198
+ type: string
199
+ - name: name
200
+ required: false
201
+ in: query
202
+ description: Names of the tokens
203
+ schema:
204
+ example:
205
+ - Bridged USDT
206
+ type: array
207
+ items:
208
+ type: string
209
+ - name: symbol
210
+ required: false
211
+ in: query
212
+ description: Symbols of the tokens
213
+ schema:
214
+ example:
215
+ - USDC
216
+ type: array
217
+ items:
218
+ type: string
219
+ - name: chainId
220
+ required: false
221
+ in: query
222
+ description: Chain ID of the network of the token
223
+ schema:
224
+ example: 1
225
+ type: number
226
+ - name: type
227
+ required: false
228
+ in: query
229
+ description: |-
230
+ Type of token.
231
+ If not provided, both types will be taken into account
232
+ schema:
233
+ example: defi
234
+ enum:
235
+ - defi
236
+ - base
237
+ type: string
238
+ - name: page
239
+ required: false
240
+ in: query
241
+ description: Pagination page number. Pages are of length 1000
242
+ schema:
243
+ example: '1'
244
+ type: number
245
+ - name: pageSize
246
+ required: false
247
+ in: query
248
+ description: Number of items per page (max 1000)
249
+ schema:
250
+ default: 1000
251
+ example: 100
252
+ type: number
253
+ - name: cursor
254
+ required: false
255
+ in: query
256
+ description: Cursor for pagination. Pages are of length 1000
257
+ schema:
258
+ example: '1233456'
259
+ type: number
260
+ - name: includeMetadata
261
+ required: false
262
+ in: query
263
+ description: Whether to include token metadata (symbol, name and logos)
264
+ schema:
265
+ default: false
266
+ example: false
267
+ type: boolean
268
+ - name: includeUnderlying
269
+ required: false
270
+ in: query
271
+ description: Whether to include underlying tokes
272
+ schema:
273
+ default: true
274
+ example: false
275
+ type: boolean
276
+ - name: apyFrom
277
+ required: false
278
+ in: query
279
+ description: Only include tokens with APY over this value
280
+ schema:
281
+ example: 1
282
+ type: number
283
+ - name: apyTo
284
+ required: false
285
+ in: query
286
+ description: Only include tokens with APY below this value
287
+ schema:
288
+ example: 10
289
+ type: number
290
+ - name: tvlFrom
291
+ required: false
292
+ in: query
293
+ description: Only include tokens with TVL over this value
294
+ schema:
295
+ example: 0
296
+ type: number
297
+ - name: tvlTo
298
+ required: false
299
+ in: query
300
+ description: Only include tokens with TVL below this value
301
+ schema:
302
+ example: 10000000
303
+ type: number
304
+ responses:
305
+ '200':
306
+ description: ''
307
+ content:
308
+ application/json:
309
+ schema:
310
+ allOf:
311
+ - $ref: '#/components/schemas/PaginatedResult'
312
+ - properties:
313
+ data:
314
+ type: array
315
+ description: Returned data for current page
316
+ items:
317
+ $ref: '#/components/schemas/PositionModel'
318
+ tags:
319
+ - metadata
320
+ /api/v1/shortcuts/route:
321
+ get:
322
+ operationId: RouterController_routeShortcutTransaction
323
+ summary: Find optimal route between tokens (direct routes, zaps)
324
+ parameters:
325
+ - name: chainId
326
+ required: false
327
+ in: query
328
+ description: Chain ID of the network to execute the transaction on
329
+ schema:
330
+ default: 1
331
+ type: number
332
+ - name: fromAddress
333
+ required: true
334
+ in: query
335
+ description: Ethereum address of the wallet to send the transaction from
336
+ schema:
337
+ default: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
338
+ type: string
339
+ - name: routingStrategy
340
+ required: false
341
+ in: query
342
+ description: Routing strategy to use
343
+ schema:
344
+ nullable: true
345
+ enum:
346
+ - ensowallet
347
+ - router
348
+ - delegate
349
+ - router-legacy
350
+ - delegate-legacy
351
+ type: string
352
+ - name: toEoa
353
+ required: false
354
+ in: query
355
+ description: Flag that indicates if gained tokenOut should be sent to EOA
356
+ deprecated: true
357
+ schema:
358
+ nullable: true
359
+ type: boolean
360
+ - name: receiver
361
+ required: false
362
+ in: query
363
+ description: Ethereum address of the receiver of the tokenOut
364
+ schema:
365
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
366
+ type: string
367
+ - name: spender
368
+ required: false
369
+ in: query
370
+ description: Ethereum address of the spender of the tokenIn
371
+ schema:
372
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
373
+ type: string
374
+ - name: refundReceiver
375
+ required: false
376
+ in: query
377
+ description: >-
378
+ Ethereum address of the receiver of any dust tokens that might be
379
+ produced during the execution of actions
380
+ schema:
381
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
382
+ type: string
383
+ - name: amountIn
384
+ required: true
385
+ in: query
386
+ description: Amount of tokenIn to swap in wei
387
+ schema:
388
+ example:
389
+ - '1000000000000000000'
390
+ type: array
391
+ items:
392
+ type: string
393
+ - name: minAmountOut
394
+ required: false
395
+ in: query
396
+ description: >-
397
+ Minimum amount out in wei. If specified, slippage should not be
398
+ specified
399
+ schema:
400
+ default: null
401
+ type: array
402
+ items:
403
+ type: string
404
+ - name: slippage
405
+ required: false
406
+ in: query
407
+ description: >-
408
+ Slippage in basis points (1/10000). e.g. 50 = 0.50%. If specified,
409
+ minAmountOut should not be specified
410
+ schema:
411
+ default: '50'
412
+ example: '300'
413
+ type: string
414
+ - name: fee
415
+ required: false
416
+ in: query
417
+ description: >-
418
+ Fee in basis points (1/10000) for each amountIn value. Must be in
419
+ range 0-100. If specified, this percentage of each amountIn value
420
+ will be sent to feeReceiver
421
+ schema:
422
+ example:
423
+ - '100'
424
+ type: array
425
+ items:
426
+ type: string
427
+ - name: feeReceiver
428
+ required: false
429
+ in: query
430
+ description: >-
431
+ The Ethereum address that will receive the collected fee. Required
432
+ if fee is provided
433
+ schema:
434
+ example: '0x220866B1A2219f40e72f5c628B65D54268cA3A9D'
435
+ type: string
436
+ - name: ignoreAggregators
437
+ required: false
438
+ in: query
439
+ description: A list of swap aggregators to be ignored from consideration
440
+ schema:
441
+ nullable: true
442
+ type: array
443
+ items:
444
+ type: string
445
+ - name: ignoreStandards
446
+ required: false
447
+ in: query
448
+ description: A list of standards to be ignored from consideration
449
+ schema:
450
+ nullable: true
451
+ type: array
452
+ items:
453
+ type: string
454
+ - name: referralCode
455
+ required: false
456
+ in: query
457
+ description: Referral code that will be included in an on-chain event.
458
+ schema:
459
+ maxLength: 16
460
+ example: 0123456789ABCDEF
461
+ type: string
462
+ - name: tokenIn
463
+ required: true
464
+ in: query
465
+ description: >-
466
+ Ethereum address of the token to swap from. For ETH, use
467
+ 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
468
+ schema:
469
+ example:
470
+ - '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
471
+ type: array
472
+ items:
473
+ type: string
474
+ - name: tokenOut
475
+ required: true
476
+ in: query
477
+ description: >-
478
+ Ethereum address of the token to swap to. For ETH, use
479
+ 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
480
+ schema:
481
+ example:
482
+ - '0x6b175474e89094c44da98b954eedeac495271d0f'
483
+ type: array
484
+ items:
485
+ type: string
486
+ - name: destinationChainId
487
+ required: false
488
+ in: query
489
+ description: Chain ID of the network to bridge to and receive tokenOut
490
+ schema:
491
+ type: number
492
+ responses:
493
+ '200':
494
+ description: ''
495
+ content:
496
+ application/json:
497
+ schema:
498
+ $ref: '#/components/schemas/RouteShortcutTransaction'
499
+ '400':
500
+ description: ''
501
+ tags:
502
+ - shortcuts
503
+ post:
504
+ operationId: RouterController_postRouteShortcutTransaction
505
+ summary: Find optimal route between tokens (direct routes, zaps)
506
+ parameters: []
507
+ requestBody:
508
+ required: true
509
+ content:
510
+ application/json:
511
+ schema:
512
+ $ref: '#/components/schemas/RouteShortcutVariableInputs'
513
+ responses:
514
+ '200':
515
+ description: ''
516
+ content:
517
+ application/json:
518
+ schema:
519
+ $ref: '#/components/schemas/RouteShortcutTransaction'
520
+ '400':
521
+ description: ''
522
+ tags:
523
+ - shortcuts
524
+ /api/v1/shortcuts/route/nontokenized:
525
+ get:
526
+ operationId: NontokenizedController_routeNontokenizedShorcutTransaction
527
+ summary: Find optimal route between token and nontokenized position
528
+ parameters:
529
+ - name: chainId
530
+ required: false
531
+ in: query
532
+ description: Chain ID of the network to execute the transaction on
533
+ schema:
534
+ default: 1
535
+ example: 80094
536
+ type: number
537
+ - name: fromAddress
538
+ required: true
539
+ in: query
540
+ description: Ethereum address of the wallet to send the transaction from
541
+ schema:
542
+ default: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
543
+ type: string
544
+ - name: routingStrategy
545
+ required: false
546
+ in: query
547
+ description: Routing strategy to use
548
+ schema:
549
+ nullable: true
550
+ enum:
551
+ - delegate
552
+ - delegate-legacy
553
+ type: string
554
+ - name: referralCode
555
+ required: false
556
+ in: query
557
+ description: Referral code that will be included in an on-chain event.
558
+ schema:
559
+ maxLength: 16
560
+ example: 0123456789ABCDEF
561
+ type: string
562
+ - name: tokenIn
563
+ required: true
564
+ in: query
565
+ description: >-
566
+ Ethereum address of the token to swap from. For ETH, use
567
+ 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
568
+ schema:
569
+ example:
570
+ - '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
571
+ type: array
572
+ items:
573
+ type: string
574
+ - name: positionOut
575
+ required: true
576
+ in: query
577
+ description: Ethereum address of the position to receive
578
+ schema:
579
+ example: '0xf99be47baf0c22b7eb5eac42c8d91b9942dc7e84'
580
+ type: string
581
+ - name: slippage
582
+ required: false
583
+ in: query
584
+ description: >-
585
+ Slippage in basis points (1/10000). If specified, minAmountOut
586
+ should not be specified
587
+ schema:
588
+ default: '50'
589
+ example: '300'
590
+ type: string
591
+ - name: fee
592
+ required: false
593
+ in: query
594
+ description: >-
595
+ Fee in basis points (1/10000) for each amountIn value. Must be in
596
+ range 0-100. If specified, this percentage of each amountIn value
597
+ will be sent to feeReceiver
598
+ schema:
599
+ example:
600
+ - '100'
601
+ type: array
602
+ items:
603
+ type: string
604
+ - name: feeReceiver
605
+ required: false
606
+ in: query
607
+ description: >-
608
+ The Ethereum address that will receive the collected fee. Required
609
+ if fee is provided
610
+ schema:
611
+ example: '0x220866B1A2219f40e72f5c628B65D54268cA3A9D'
612
+ type: string
613
+ - name: amountIn
614
+ required: true
615
+ in: query
616
+ description: Amount of tokenIn to swap in wei
617
+ schema:
618
+ example:
619
+ - '1000000000000000000'
620
+ type: array
621
+ items:
622
+ type: string
623
+ - name: receiver
624
+ required: true
625
+ in: query
626
+ description: Ethereum address of the receiver of the positionOut
627
+ schema:
628
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
629
+ type: string
630
+ - name: spender
631
+ required: false
632
+ in: query
633
+ description: Ethereum address of the spender of the tokenIn
634
+ schema:
635
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
636
+ type: string
637
+ responses:
638
+ '200':
639
+ description: ''
640
+ content:
641
+ application/json:
642
+ schema:
643
+ $ref: '#/components/schemas/RouteShortcutTransaction'
644
+ '400':
645
+ description: ''
646
+ tags:
647
+ - shortcuts
648
+ /api/v1/wallet/approve:
649
+ get:
650
+ operationId: WalletController_createApproveTransaction
651
+ summary: Returns transaction that approves your EnsoWallet to spend tokens
652
+ parameters:
653
+ - name: chainId
654
+ required: false
655
+ in: query
656
+ description: Chain ID of the network to execute the transaction on
657
+ schema:
658
+ default: 1
659
+ type: number
660
+ - name: fromAddress
661
+ required: true
662
+ in: query
663
+ description: Ethereum address of the wallet to send the transaction from
664
+ schema:
665
+ default: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
666
+ type: string
667
+ - name: routingStrategy
668
+ required: false
669
+ in: query
670
+ description: Routing strategy to use
671
+ schema:
672
+ nullable: true
673
+ enum:
674
+ - ensowallet
675
+ - router
676
+ - delegate
677
+ - router-legacy
678
+ - delegate-legacy
679
+ type: string
680
+ - name: tokenAddress
681
+ required: true
682
+ in: query
683
+ description: ERC20 token address of the token to approve
684
+ schema:
685
+ default: '0x6b175474e89094c44da98b954eedeac495271d0f'
686
+ type: string
687
+ - name: amount
688
+ required: true
689
+ in: query
690
+ description: Amount of tokens to approve in wei
691
+ schema:
692
+ default: '1000000000000000000000000000'
693
+ type: string
694
+ responses:
695
+ '200':
696
+ description: ''
697
+ content:
698
+ application/json:
699
+ schema:
700
+ $ref: '#/components/schemas/WalletApproveTransaction'
701
+ tags:
702
+ - wallet
703
+ /api/v1/wallet/balances:
704
+ get:
705
+ operationId: WalletController_walletBalances
706
+ summary: Returns all balances for a given wallet
707
+ parameters:
708
+ - name: chainId
709
+ required: true
710
+ in: query
711
+ description: Chain ID (or list of chain IDs) of the network to fetch balances on
712
+ schema:
713
+ example: 1
714
+ type: number
715
+ - name: eoaAddress
716
+ required: true
717
+ in: query
718
+ description: >-
719
+ Address of the eoa with which to associate the ensoWallet for
720
+ balances
721
+ schema:
722
+ default: '0x93621DCA56fE26Cdee86e4F6B18E116e9758Ff11'
723
+ type: string
724
+ - name: useEoa
725
+ required: false
726
+ in: query
727
+ description: >-
728
+ If true returns balances for the provided address, instead of the
729
+ associated ensoWallet
730
+ schema:
731
+ type: boolean
732
+ responses:
733
+ '200':
734
+ description: ''
735
+ content:
736
+ application/json:
737
+ schema:
738
+ type: array
739
+ items:
740
+ $ref: '#/components/schemas/WalletBalance'
741
+ tags:
742
+ - wallet
743
+ /api/v1/actions:
744
+ get:
745
+ operationId: ActionsController_findAll
746
+ summary: Returns actions available to use in bundle shortcuts
747
+ parameters: []
748
+ responses:
749
+ '200':
750
+ description: ''
751
+ content:
752
+ application/json:
753
+ schema:
754
+ type: array
755
+ items:
756
+ $ref: '#/components/schemas/Action'
757
+ tags:
758
+ - standards
759
+ /api/v1/actions/{slug}:
760
+ get:
761
+ operationId: ActionsController_getActionsBySlug
762
+ summary: >-
763
+ Returns actions available to use in bundle shortcuts for a given
764
+ protocol
765
+ parameters:
766
+ - name: slug
767
+ required: true
768
+ in: path
769
+ schema:
770
+ type: string
771
+ responses:
772
+ '200':
773
+ description: ''
774
+ content:
775
+ application/json:
776
+ schema:
777
+ type: array
778
+ items:
779
+ $ref: '#/components/schemas/Action'
780
+ tags:
781
+ - standards
782
+ /api/v1/standards:
783
+ get:
784
+ operationId: StandardsController_standards
785
+ summary: Returns standards and methods available to use in bundle shortcuts
786
+ parameters: []
787
+ responses:
788
+ '200':
789
+ description: ''
790
+ content:
791
+ application/json:
792
+ schema:
793
+ type: array
794
+ items:
795
+ $ref: '#/components/schemas/Standard'
796
+ tags:
797
+ - standards
798
+ /api/v1/standards/{slug}:
799
+ get:
800
+ operationId: StandardsController_getProtocolBySlug
801
+ summary: Returns a standard by slug
802
+ parameters:
803
+ - name: slug
804
+ required: true
805
+ in: path
806
+ description: The protocol slug
807
+ schema:
808
+ example: aave-v2
809
+ type: string
810
+ responses:
811
+ '200':
812
+ description: ''
813
+ content:
814
+ application/json:
815
+ schema:
816
+ type: array
817
+ items:
818
+ $ref: '#/components/schemas/ProtocolModel'
819
+ tags:
820
+ - standards
821
+ /api/v1/shortcuts/bundle:
822
+ post:
823
+ operationId: BundleController_bundleShortcutTransaction
824
+ summary: Bundle a list of actions into a single transaction
825
+ parameters:
826
+ - name: chainId
827
+ required: false
828
+ in: query
829
+ description: Chain ID of the network to execute the transaction on
830
+ schema:
831
+ default: 1
832
+ type: number
833
+ - name: fromAddress
834
+ required: true
835
+ in: query
836
+ description: Ethereum address of the wallet to send the transaction from
837
+ schema:
838
+ default: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
839
+ type: string
840
+ - name: referralCode
841
+ required: false
842
+ in: query
843
+ description: Referral code that will be included in an on-chain event.
844
+ schema:
845
+ maxLength: 16
846
+ example: 0123456789ABCDEF
847
+ type: string
848
+ - name: routingStrategy
849
+ required: false
850
+ in: query
851
+ description: Routing strategy to use
852
+ schema:
853
+ nullable: true
854
+ enum:
855
+ - ensowallet
856
+ - router
857
+ - delegate
858
+ - router-legacy
859
+ - delegate-legacy
860
+ type: string
861
+ - name: receiver
862
+ required: false
863
+ in: query
864
+ description: Ethereum address of the receiver of the tokenOut
865
+ schema:
866
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
867
+ type: string
868
+ - name: spender
869
+ required: false
870
+ in: query
871
+ description: Ethereum address of the spender of the tokenIn
872
+ schema:
873
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
874
+ type: string
875
+ - name: refundReceiver
876
+ required: false
877
+ in: query
878
+ description: >-
879
+ Ethereum address of the receiver of any dust tokens that might be
880
+ produced during the execution of actions
881
+ schema:
882
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
883
+ type: string
884
+ - name: ignoreAggregators
885
+ required: false
886
+ in: query
887
+ description: A list of swap aggregators to be ignored from consideration
888
+ schema:
889
+ nullable: true
890
+ type: array
891
+ items:
892
+ type: string
893
+ - name: skipQuote
894
+ required: false
895
+ in: query
896
+ description: >-
897
+ Flag to skip quoting (if true, amountOut and gas will not be
898
+ returned)
899
+ schema:
900
+ type: boolean
901
+ requestBody:
902
+ required: true
903
+ content:
904
+ application/json:
905
+ schema:
906
+ type: array
907
+ items:
908
+ $ref: '#/components/schemas/ActionToBundle'
909
+ responses:
910
+ '200':
911
+ description: ''
912
+ content:
913
+ application/json:
914
+ schema:
915
+ $ref: '#/components/schemas/BundleShortcutTransaction'
916
+ tags:
917
+ - shortcuts
918
+ /api/v1/shortcuts/static/ipor:
919
+ post:
920
+ operationId: IporController_iporShortcutTransaction
921
+ summary: Get transaction for IPOR shortcut
922
+ parameters:
923
+ - name: chainId
924
+ required: false
925
+ in: query
926
+ description: Chain ID of the network to execute the transaction on
927
+ schema:
928
+ default: 1
929
+ type: number
930
+ - name: fromAddress
931
+ required: true
932
+ in: query
933
+ description: Ethereum address of the wallet to send the transaction from
934
+ schema:
935
+ default: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
936
+ type: string
937
+ requestBody:
938
+ required: true
939
+ content:
940
+ application/json:
941
+ schema:
942
+ $ref: '#/components/schemas/IporShortcutInput'
943
+ responses:
944
+ '200':
945
+ description: ''
946
+ content:
947
+ application/json:
948
+ schema:
949
+ $ref: '#/components/schemas/IporShortcutTransaction'
950
+ tags:
951
+ - shortcuts
952
+ /api/v1/nontokenized:
953
+ get:
954
+ operationId: NonTokenizedController_tokens
955
+ summary: Returns nontokenized positions and their details
956
+ parameters:
957
+ - name: project
958
+ required: false
959
+ in: query
960
+ description: The overarching project or platform associated with the DeFi token
961
+ schema:
962
+ example: beradrome
963
+ type: string
964
+ - name: protocolSlug
965
+ required: false
966
+ in: query
967
+ description: The specific standard integration or version of the DeFi project
968
+ schema:
969
+ example: beradrome-farms
970
+ type: string
971
+ - name: chainId
972
+ required: false
973
+ in: query
974
+ description: Chain ID of the network of the nontokenized position
975
+ schema:
976
+ example: 80094
977
+ type: number
978
+ - name: address
979
+ required: false
980
+ in: query
981
+ description: Ethereum addresses of the nontokenized positions
982
+ schema:
983
+ type: array
984
+ items:
985
+ type: string
986
+ - name: primaryAddress
987
+ required: false
988
+ in: query
989
+ description: Ethereum addresses for contract interaction of nontokenized position
990
+ schema:
991
+ type: array
992
+ items:
993
+ type: string
994
+ - name: page
995
+ required: false
996
+ in: query
997
+ description: Pagination page number. Pages are of length 1000
998
+ schema:
999
+ type: number
1000
+ - name: cursor
1001
+ required: false
1002
+ in: query
1003
+ description: Cursor for pagination. Pages are of length 1000
1004
+ schema:
1005
+ type: number
1006
+ responses:
1007
+ '200':
1008
+ description: ''
1009
+ content:
1010
+ application/json:
1011
+ schema:
1012
+ allOf:
1013
+ - $ref: '#/components/schemas/PaginatedResult'
1014
+ - properties:
1015
+ data:
1016
+ type: array
1017
+ description: Returned data for current page
1018
+ items:
1019
+ $ref: '#/components/schemas/NonTokenizedModel'
1020
+ tags:
1021
+ - metadata
1022
+ /api/v1/projects:
1023
+ get:
1024
+ operationId: ProjectsController_standards
1025
+ summary: >-
1026
+ Returns the overarching projects or platforms associated with the
1027
+ available projects
1028
+ parameters: []
1029
+ responses:
1030
+ '200':
1031
+ description: ''
1032
+ content:
1033
+ application/json:
1034
+ schema:
1035
+ type: array
1036
+ items:
1037
+ $ref: '#/components/schemas/Project'
1038
+ tags:
1039
+ - projects
1040
+ /api/v1/projects/{project}/protocols:
1041
+ get:
1042
+ operationId: ProjectsController_getStandardsByProject
1043
+ summary: Returns protocols available by project
1044
+ parameters:
1045
+ - name: project
1046
+ required: true
1047
+ in: path
1048
+ description: The overarching project or platform
1049
+ schema:
1050
+ example: aave
1051
+ type: string
1052
+ responses:
1053
+ '200':
1054
+ description: ''
1055
+ content:
1056
+ application/json:
1057
+ schema:
1058
+ type: array
1059
+ items:
1060
+ $ref: '#/components/schemas/ProtocolModel'
1061
+ tags:
1062
+ - projects
1063
+ /api/v1/protocols:
1064
+ get:
1065
+ operationId: ProtocolsController_findAll
1066
+ summary: Returns projects and relevant protocols available to use
1067
+ parameters:
1068
+ - name: chainId
1069
+ required: false
1070
+ in: query
1071
+ description: Chain ID of the network to search for
1072
+ schema:
1073
+ example: '1'
1074
+ - name: slug
1075
+ required: false
1076
+ in: query
1077
+ description: slug of the project to search for
1078
+ schema:
1079
+ example: uniswap-v2
1080
+ responses:
1081
+ '200':
1082
+ description: ''
1083
+ content:
1084
+ application/json:
1085
+ schema:
1086
+ type: array
1087
+ items:
1088
+ $ref: '#/components/schemas/ProtocolModel'
1089
+ tags:
1090
+ - metadata
1091
+ info:
1092
+ title: ''
1093
+ description: >-
1094
+ #### Enso API
1095
+
1096
+ - Find detailed documentation on
1097
+ [docs.enso.finance](https://docs.enso.finance).
1098
+
1099
+ - To use the API, **you must include your API Key in the Authorization
1100
+ header** (Bearer format).
1101
+
1102
+ - For testing, Swagger pre-authorizes you using the key:
1103
+ `1e02632d-6feb-4a75-a157-documentation` (1rps).
1104
+
1105
+ - Get your own API Key at
1106
+ [enso.finance/developers](https://enso.finance/developers).
1107
+ version: '1.0'
1108
+ contact: {}
1109
+ tags:
1110
+ - name: shortcuts
1111
+ description: ''
1112
+ servers:
1113
+ - url: https://api.enso.finance
1114
+ components:
1115
+ securitySchemes:
1116
+ bearer:
1117
+ scheme: bearer
1118
+ bearerFormat: apiKey
1119
+ type: http
1120
+ schemas:
1121
+ ConnectedNetwork:
1122
+ type: object
1123
+ properties:
1124
+ id:
1125
+ type: number
1126
+ example: 1
1127
+ name:
1128
+ type: string
1129
+ example: Ethereum
1130
+ isConnected:
1131
+ type: boolean
1132
+ example: true
1133
+ required:
1134
+ - id
1135
+ - name
1136
+ - isConnected
1137
+ Price:
1138
+ type: object
1139
+ properties:
1140
+ decimals:
1141
+ type: number
1142
+ example: 8
1143
+ price:
1144
+ type: number
1145
+ example: 27052
1146
+ address:
1147
+ type: string
1148
+ example: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'
1149
+ symbol:
1150
+ type: string
1151
+ example: WBTC
1152
+ timestamp:
1153
+ type: number
1154
+ example: 1695197412
1155
+ chainId:
1156
+ type: number
1157
+ example: 1
1158
+ confidence:
1159
+ type: number
1160
+ example: 0.99
1161
+ required:
1162
+ - decimals
1163
+ - price
1164
+ - address
1165
+ - chainId
1166
+ PaginationMeta:
1167
+ type: object
1168
+ properties:
1169
+ total:
1170
+ type: number
1171
+ description: Total amount of pages
1172
+ lastPage:
1173
+ type: number
1174
+ description: Last page number
1175
+ currentPage:
1176
+ type: number
1177
+ description: Current page number
1178
+ perPage:
1179
+ type: number
1180
+ description: Amount of elements per page
1181
+ prev:
1182
+ type: number
1183
+ description: Previous page
1184
+ next:
1185
+ type: number
1186
+ description: Next page
1187
+ cursor:
1188
+ type: number
1189
+ description: Cursor for pagination
1190
+ required:
1191
+ - total
1192
+ - lastPage
1193
+ - currentPage
1194
+ - perPage
1195
+ - prev
1196
+ - next
1197
+ - cursor
1198
+ PaginatedResult:
1199
+ type: object
1200
+ properties:
1201
+ meta:
1202
+ description: Metadata for pagination
1203
+ allOf:
1204
+ - $ref: '#/components/schemas/PaginationMeta'
1205
+ required:
1206
+ - meta
1207
+ TokenModel:
1208
+ type: object
1209
+ properties:
1210
+ address:
1211
+ type: string
1212
+ description: Ethereum address of the token
1213
+ chainId:
1214
+ type: number
1215
+ description: Chain ID of the network of the token
1216
+ type:
1217
+ type: string
1218
+ description: Type of token
1219
+ decimals:
1220
+ type: number
1221
+ description: Token decimals
1222
+ symbol:
1223
+ type: string
1224
+ description: Token name
1225
+ nullable: true
1226
+ name:
1227
+ type: string
1228
+ description: Token symbol
1229
+ nullable: true
1230
+ logosUri:
1231
+ description: A list of logos for the token
1232
+ nullable: true
1233
+ type: array
1234
+ items:
1235
+ type: string
1236
+ required:
1237
+ - address
1238
+ - chainId
1239
+ - type
1240
+ - decimals
1241
+ - symbol
1242
+ - name
1243
+ - logosUri
1244
+ PositionModel:
1245
+ type: object
1246
+ properties:
1247
+ address:
1248
+ type: string
1249
+ description: Ethereum address of the token
1250
+ chainId:
1251
+ type: number
1252
+ description: Chain ID of the network of the token
1253
+ type:
1254
+ type: string
1255
+ description: Type of token
1256
+ decimals:
1257
+ type: number
1258
+ description: Token decimals
1259
+ symbol:
1260
+ type: string
1261
+ description: Token name
1262
+ nullable: true
1263
+ name:
1264
+ type: string
1265
+ description: Token symbol
1266
+ nullable: true
1267
+ logosUri:
1268
+ description: A list of logos for the token
1269
+ nullable: true
1270
+ type: array
1271
+ items:
1272
+ type: string
1273
+ underlyingTokens:
1274
+ description: Underlying tokens of defi token
1275
+ nullable: true
1276
+ type: array
1277
+ items:
1278
+ $ref: '#/components/schemas/TokenModel'
1279
+ project:
1280
+ type: string
1281
+ description: The overarching project or platform associated with the DeFi token
1282
+ example: aave
1283
+ nullable: true
1284
+ protocolSlug:
1285
+ type: string
1286
+ description: The specific standard integration or version of the DeFi project
1287
+ nullable: true
1288
+ apy:
1289
+ type: number
1290
+ description: The defi position APY
1291
+ nullable: true
1292
+ example: 3.8
1293
+ apyBase:
1294
+ type: number
1295
+ description: The defi position base APY
1296
+ nullable: true
1297
+ example: 2.6
1298
+ apyReward:
1299
+ type: number
1300
+ description: The defi position reward APY
1301
+ nullable: true
1302
+ example: 1.2
1303
+ tvl:
1304
+ type: number
1305
+ description: The defi position TVL
1306
+ nullable: true
1307
+ example: 3001020.8
1308
+ primaryAddress:
1309
+ type: string
1310
+ description: Ethereum address for contract interaction of defi token
1311
+ nullable: true
1312
+ required:
1313
+ - address
1314
+ - chainId
1315
+ - type
1316
+ - decimals
1317
+ - symbol
1318
+ - name
1319
+ - logosUri
1320
+ - underlyingTokens
1321
+ - project
1322
+ - protocolSlug
1323
+ - apy
1324
+ - apyBase
1325
+ - apyReward
1326
+ - tvl
1327
+ - primaryAddress
1328
+ Transaction:
1329
+ type: object
1330
+ properties:
1331
+ data:
1332
+ type: string
1333
+ to:
1334
+ type: string
1335
+ from:
1336
+ type: string
1337
+ value:
1338
+ type: string
1339
+ required:
1340
+ - data
1341
+ - to
1342
+ - from
1343
+ - value
1344
+ Hop:
1345
+ type: object
1346
+ properties:
1347
+ tokenIn:
1348
+ type: array
1349
+ items:
1350
+ type: string
1351
+ tokenOut:
1352
+ type: array
1353
+ items:
1354
+ type: string
1355
+ protocol:
1356
+ type: string
1357
+ action:
1358
+ type: string
1359
+ primary:
1360
+ type: string
1361
+ internalRoutes:
1362
+ type: array
1363
+ items:
1364
+ type: string
1365
+ args:
1366
+ type: object
1367
+ chainId:
1368
+ type: number
1369
+ sourceChainId:
1370
+ type: number
1371
+ destinationChainId:
1372
+ type: number
1373
+ required:
1374
+ - tokenIn
1375
+ - tokenOut
1376
+ - protocol
1377
+ - action
1378
+ - primary
1379
+ - internalRoutes
1380
+ - args
1381
+ RouteShortcutTransaction:
1382
+ type: object
1383
+ properties:
1384
+ gas:
1385
+ type: string
1386
+ amountOut:
1387
+ type: string
1388
+ priceImpact:
1389
+ type: number
1390
+ description: Price impact in basis points, null if USD price not found
1391
+ feeAmount:
1392
+ description: An array of the fee amount collected for each tokenIn
1393
+ type: array
1394
+ items:
1395
+ type: string
1396
+ createdAt:
1397
+ type: number
1398
+ description: Block number the transaction was created on
1399
+ tx:
1400
+ description: The tx object to use in `ethers`
1401
+ allOf:
1402
+ - $ref: '#/components/schemas/Transaction'
1403
+ route:
1404
+ description: The route the shortcut will use
1405
+ type: array
1406
+ items:
1407
+ $ref: '#/components/schemas/Hop'
1408
+ ensoFeeAmount:
1409
+ type: array
1410
+ items:
1411
+ type: string
1412
+ required:
1413
+ - gas
1414
+ - amountOut
1415
+ - priceImpact
1416
+ - feeAmount
1417
+ - createdAt
1418
+ - tx
1419
+ - route
1420
+ - ensoFeeAmount
1421
+ RouteShortcutVariableInputs:
1422
+ type: object
1423
+ properties:
1424
+ chainId:
1425
+ type: number
1426
+ description: Chain ID of the network to execute the transaction on
1427
+ default: 1
1428
+ fromAddress:
1429
+ type: string
1430
+ description: Ethereum address of the wallet to send the transaction from
1431
+ default: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
1432
+ routingStrategy:
1433
+ type: string
1434
+ description: Routing strategy to use
1435
+ nullable: true
1436
+ enum:
1437
+ - ensowallet
1438
+ - router
1439
+ - delegate
1440
+ - router-legacy
1441
+ - delegate-legacy
1442
+ toEoa:
1443
+ type: boolean
1444
+ description: Flag that indicates if gained tokenOut should be sent to EOA
1445
+ nullable: true
1446
+ deprecated: true
1447
+ receiver:
1448
+ type: string
1449
+ description: Ethereum address of the receiver of the tokenOut
1450
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
1451
+ spender:
1452
+ type: string
1453
+ description: Ethereum address of the spender of the tokenIn
1454
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
1455
+ refundReceiver:
1456
+ type: string
1457
+ description: >-
1458
+ Ethereum address of the receiver of any dust tokens that might be
1459
+ produced during the execution of actions
1460
+ example: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
1461
+ amountIn:
1462
+ description: Amount of tokenIn to swap in wei
1463
+ example:
1464
+ - '1000000000000000000'
1465
+ type: array
1466
+ items:
1467
+ type: string
1468
+ minAmountOut:
1469
+ description: >-
1470
+ Minimum amount out in wei. If specified, slippage should not be
1471
+ specified
1472
+ default: null
1473
+ type: array
1474
+ items:
1475
+ type: string
1476
+ slippage:
1477
+ type: string
1478
+ description: >-
1479
+ Slippage in basis points (1/10000). e.g. 50 = 0.50%. If specified,
1480
+ minAmountOut should not be specified
1481
+ example: '300'
1482
+ default: '50'
1483
+ fee:
1484
+ description: >-
1485
+ Fee in basis points (1/10000) for each amountIn value. Must be in
1486
+ range 0-100. If specified, this percentage of each amountIn value
1487
+ will be sent to feeReceiver
1488
+ example:
1489
+ - '100'
1490
+ type: array
1491
+ items:
1492
+ type: string
1493
+ feeReceiver:
1494
+ type: string
1495
+ description: >-
1496
+ The Ethereum address that will receive the collected fee. Required
1497
+ if fee is provided
1498
+ example: '0x220866B1A2219f40e72f5c628B65D54268cA3A9D'
1499
+ ignoreAggregators:
1500
+ description: A list of swap aggregators to be ignored from consideration
1501
+ nullable: true
1502
+ type: array
1503
+ items:
1504
+ type: string
1505
+ ignoreStandards:
1506
+ description: A list of standards to be ignored from consideration
1507
+ nullable: true
1508
+ type: array
1509
+ items:
1510
+ type: string
1511
+ referralCode:
1512
+ type: string
1513
+ description: Referral code that will be included in an on-chain event.
1514
+ example: 0123456789ABCDEF
1515
+ maxLength: 16
1516
+ tokenIn:
1517
+ description: >-
1518
+ Ethereum address of the token to swap from. For ETH, use
1519
+ 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
1520
+ example:
1521
+ - '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
1522
+ type: array
1523
+ items:
1524
+ type: string
1525
+ tokenOut:
1526
+ description: >-
1527
+ Ethereum address of the token to swap to. For ETH, use
1528
+ 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
1529
+ example:
1530
+ - '0x6b175474e89094c44da98b954eedeac495271d0f'
1531
+ type: array
1532
+ items:
1533
+ type: string
1534
+ destinationChainId:
1535
+ type: number
1536
+ description: Chain ID of the network to bridge to and receive tokenOut
1537
+ variableEstimates:
1538
+ type: object
1539
+ default: null
1540
+ required:
1541
+ - fromAddress
1542
+ - amountIn
1543
+ - tokenIn
1544
+ - tokenOut
1545
+ - variableEstimates
1546
+ WalletApproveTransaction:
1547
+ type: object
1548
+ properties:
1549
+ tx:
1550
+ type: object
1551
+ description: The tx object to use in `ethers`
1552
+ gas:
1553
+ type: string
1554
+ description: The gas estimate for the transaction
1555
+ token:
1556
+ type: string
1557
+ description: The token address to approve
1558
+ amount:
1559
+ type: string
1560
+ description: The amount of tokens to approve
1561
+ spender:
1562
+ type: string
1563
+ description: The spender address to approve
1564
+ required:
1565
+ - tx
1566
+ - gas
1567
+ - token
1568
+ - amount
1569
+ - spender
1570
+ WalletBalance:
1571
+ type: object
1572
+ properties:
1573
+ token:
1574
+ type: string
1575
+ description: The address of the token
1576
+ amount:
1577
+ type: string
1578
+ description: The unformatted balance of the token
1579
+ example: '0x0000000'
1580
+ chainId:
1581
+ type: number
1582
+ description: Chain ID of the network
1583
+ decimals:
1584
+ type: number
1585
+ description: The unformatted balance of the token
1586
+ example: 18
1587
+ price:
1588
+ type: string
1589
+ description: Price of the token in usd
1590
+ example: '0.0'
1591
+ name:
1592
+ type: string
1593
+ description: Name of the token
1594
+ symbol:
1595
+ type: string
1596
+ description: Symbol of the token
1597
+ logoUri:
1598
+ type: string
1599
+ description: Logo of the token
1600
+ required:
1601
+ - token
1602
+ - amount
1603
+ - chainId
1604
+ - decimals
1605
+ - price
1606
+ - name
1607
+ - symbol
1608
+ - logoUri
1609
+ Action:
1610
+ type: object
1611
+ properties:
1612
+ action:
1613
+ type: string
1614
+ enum:
1615
+ - approve
1616
+ - borrow
1617
+ - bridge
1618
+ - deposit
1619
+ - singledeposit
1620
+ - multideposit
1621
+ - tokenizedsingledeposit
1622
+ - tokenizedmultideposit
1623
+ - multioutsingledeposit
1624
+ - depositclmm
1625
+ - harvest
1626
+ - permittransferfrom
1627
+ - redeem
1628
+ - singleredeem
1629
+ - multiredeem
1630
+ - tokenizedsingleredeem
1631
+ - tokenizedmultiredeem
1632
+ - redeemclmm
1633
+ - repay
1634
+ - swap
1635
+ - transfer
1636
+ - transferfrom
1637
+ - route
1638
+ - call
1639
+ - split
1640
+ - merge
1641
+ - balance
1642
+ - minamountout
1643
+ - slippage
1644
+ - fee
1645
+ - ensofee
1646
+ inputs:
1647
+ type: object
1648
+ additionalProperties:
1649
+ type: string
1650
+ required:
1651
+ - action
1652
+ - inputs
1653
+ Protocol:
1654
+ type: object
1655
+ properties:
1656
+ slug:
1657
+ type: string
1658
+ url:
1659
+ type: string
1660
+ required:
1661
+ - slug
1662
+ - url
1663
+ Network:
1664
+ type: object
1665
+ properties:
1666
+ id:
1667
+ type: number
1668
+ name:
1669
+ type: string
1670
+ required:
1671
+ - id
1672
+ - name
1673
+ StandardAction:
1674
+ type: object
1675
+ properties:
1676
+ action:
1677
+ type: string
1678
+ enum:
1679
+ - approve
1680
+ - borrow
1681
+ - bridge
1682
+ - deposit
1683
+ - singledeposit
1684
+ - multideposit
1685
+ - tokenizedsingledeposit
1686
+ - tokenizedmultideposit
1687
+ - multioutsingledeposit
1688
+ - depositclmm
1689
+ - harvest
1690
+ - permittransferfrom
1691
+ - redeem
1692
+ - singleredeem
1693
+ - multiredeem
1694
+ - tokenizedsingleredeem
1695
+ - tokenizedmultiredeem
1696
+ - redeemclmm
1697
+ - repay
1698
+ - swap
1699
+ - transfer
1700
+ - transferfrom
1701
+ - route
1702
+ - call
1703
+ - split
1704
+ - merge
1705
+ - balance
1706
+ - minamountout
1707
+ - slippage
1708
+ - fee
1709
+ - ensofee
1710
+ name:
1711
+ type: string
1712
+ functionNames:
1713
+ type: array
1714
+ items:
1715
+ type: string
1716
+ supportedChains:
1717
+ type: array
1718
+ items:
1719
+ $ref: '#/components/schemas/Network'
1720
+ inputs:
1721
+ type: array
1722
+ items:
1723
+ type: string
1724
+ required:
1725
+ - action
1726
+ - name
1727
+ - functionNames
1728
+ - supportedChains
1729
+ - inputs
1730
+ Standard:
1731
+ type: object
1732
+ properties:
1733
+ protocol:
1734
+ $ref: '#/components/schemas/Protocol'
1735
+ forks:
1736
+ type: array
1737
+ items:
1738
+ $ref: '#/components/schemas/Protocol'
1739
+ actions:
1740
+ type: array
1741
+ items:
1742
+ $ref: '#/components/schemas/StandardAction'
1743
+ required:
1744
+ - protocol
1745
+ - forks
1746
+ - actions
1747
+ ProtocolModel:
1748
+ type: object
1749
+ properties:
1750
+ project:
1751
+ type: string
1752
+ example: uniswap
1753
+ slug:
1754
+ type: string
1755
+ example: uniswap-v2
1756
+ name:
1757
+ type: string
1758
+ example: Uniswap V2
1759
+ nullable: true
1760
+ description:
1761
+ type: string
1762
+ nullable: true
1763
+ url:
1764
+ type: string
1765
+ example: https://app.uniswap.org/swap
1766
+ nullable: true
1767
+ logosUri:
1768
+ example: https://icons.llama.fi/uniswap-v2.png
1769
+ nullable: true
1770
+ type: array
1771
+ items:
1772
+ type: string
1773
+ chains:
1774
+ nullable: true
1775
+ example:
1776
+ - id: 1
1777
+ name: mainnet
1778
+ type: array
1779
+ items:
1780
+ $ref: '#/components/schemas/Network'
1781
+ required:
1782
+ - project
1783
+ - slug
1784
+ - name
1785
+ - description
1786
+ - url
1787
+ - logosUri
1788
+ - chains
1789
+ ActionToBundle:
1790
+ type: object
1791
+ properties:
1792
+ protocol:
1793
+ type: string
1794
+ description: Protocol to interact with
1795
+ example: enso
1796
+ action:
1797
+ type: string
1798
+ enum:
1799
+ - approve
1800
+ - borrow
1801
+ - bridge
1802
+ - deposit
1803
+ - singledeposit
1804
+ - multideposit
1805
+ - tokenizedsingledeposit
1806
+ - tokenizedmultideposit
1807
+ - multioutsingledeposit
1808
+ - depositclmm
1809
+ - harvest
1810
+ - permittransferfrom
1811
+ - redeem
1812
+ - singleredeem
1813
+ - multiredeem
1814
+ - tokenizedsingleredeem
1815
+ - tokenizedmultiredeem
1816
+ - redeemclmm
1817
+ - repay
1818
+ - swap
1819
+ - transfer
1820
+ - transferfrom
1821
+ - route
1822
+ - call
1823
+ - split
1824
+ - merge
1825
+ - balance
1826
+ - minamountout
1827
+ - slippage
1828
+ - fee
1829
+ - ensofee
1830
+ example: route
1831
+ args:
1832
+ type: object
1833
+ example:
1834
+ tokenIn: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
1835
+ tokenOut: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84'
1836
+ amountIn: '100000000000'
1837
+ slippage: '300'
1838
+ fee:
1839
+ - '100'
1840
+ feeReceiver: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
1841
+ required:
1842
+ - protocol
1843
+ - action
1844
+ - args
1845
+ BundleShortcutTransaction:
1846
+ type: object
1847
+ properties:
1848
+ bundle:
1849
+ type: array
1850
+ items:
1851
+ $ref: '#/components/schemas/ActionToBundle'
1852
+ gas:
1853
+ type: string
1854
+ description: Gas estimate for the transaction
1855
+ amountsOut:
1856
+ type: object
1857
+ description: Expected output amounts by token address
1858
+ route:
1859
+ description: The route the shortcut will use
1860
+ type: array
1861
+ items:
1862
+ $ref: '#/components/schemas/Hop'
1863
+ createdAt:
1864
+ type: number
1865
+ description: Block number the transaction was created on
1866
+ tx:
1867
+ description: The tx object to use in `ethers`
1868
+ allOf:
1869
+ - $ref: '#/components/schemas/Transaction'
1870
+ required:
1871
+ - bundle
1872
+ - route
1873
+ - createdAt
1874
+ - tx
1875
+ IporShortcutInput:
1876
+ type: object
1877
+ properties:
1878
+ isRouter:
1879
+ type: boolean
1880
+ description: Flag that indicates whether to use the shared router
1881
+ nullable: true
1882
+ amountIn:
1883
+ type: string
1884
+ description: Amount of tokenIn in wei
1885
+ example: '1000000000000000'
1886
+ tokenIn:
1887
+ type: string
1888
+ description: >-
1889
+ Address of the tokenIn. For ETH, use
1890
+ 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
1891
+ example: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
1892
+ tokenBToBuy:
1893
+ type: string
1894
+ description: Address of the tokenBToBuy
1895
+ example: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
1896
+ percentageForTokenB:
1897
+ type: string
1898
+ description: Percentage of tokenB to buy in basis points (1/10000)
1899
+ example: '5000'
1900
+ slippage:
1901
+ type: string
1902
+ description: Slippage in basis points (1/10000). Default is 300
1903
+ example: '300'
1904
+ default: '300'
1905
+ simulate:
1906
+ type: boolean
1907
+ description: >-
1908
+ Flag that indicates whether to simulate the transaction, verify some
1909
+ assertions, return simulationURL and events
1910
+ nullable: true
1911
+ default: false
1912
+ required:
1913
+ - amountIn
1914
+ - tokenIn
1915
+ - tokenBToBuy
1916
+ - percentageForTokenB
1917
+ IporShortcutTransaction:
1918
+ type: object
1919
+ properties:
1920
+ createdAt:
1921
+ type: number
1922
+ description: Block number the transaction was created on
1923
+ tx:
1924
+ description: The tx object to use in `ethers`
1925
+ allOf:
1926
+ - $ref: '#/components/schemas/Transaction'
1927
+ logs:
1928
+ description: Logs from the simulated transaction
1929
+ type: array
1930
+ items:
1931
+ type: string
1932
+ simulationURL:
1933
+ type: string
1934
+ description: Tenderly simulation URL
1935
+ required:
1936
+ - createdAt
1937
+ - tx
1938
+ - logs
1939
+ - simulationURL
1940
+ NonTokenizedModel:
1941
+ type: object
1942
+ properties:
1943
+ chainId:
1944
+ type: number
1945
+ description: Chain ID of the network of the nontokenized position
1946
+ protocol:
1947
+ type: string
1948
+ description: >-
1949
+ The specific standard integration or version of the nontokenized
1950
+ position
1951
+ address:
1952
+ type: string
1953
+ description: Ethereum address of the nontokenized position
1954
+ primaryAddress:
1955
+ type: string
1956
+ description: Ethereum address of the nontokenized position
1957
+ underlyingTokens:
1958
+ description: Underlying tokens of nontokenized position
1959
+ nullable: true
1960
+ type: array
1961
+ items:
1962
+ $ref: '#/components/schemas/TokenModel'
1963
+ required:
1964
+ - chainId
1965
+ - protocol
1966
+ - address
1967
+ - primaryAddress
1968
+ - underlyingTokens
1969
+ Project:
1970
+ type: object
1971
+ properties:
1972
+ id:
1973
+ type: string
1974
+ chains:
1975
+ type: array
1976
+ items:
1977
+ type: string
1978
+ required:
1979
+ - id
1980
+ - chains
1981
+ security:
1982
+ - bearer: []