@aave/graphql 0.0.0-canary-20250729164448
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/LICENSE +21 -0
- package/README.md +8 -0
- package/dist/index.cjs +670 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8656 -0
- package/dist/index.d.ts +8656 -0
- package/dist/index.js +670 -0
- package/dist/index.js.map +1 -0
- package/dist/test-utils.cjs +1714 -0
- package/dist/test-utils.cjs.map +1 -0
- package/dist/test-utils.d.cts +8 -0
- package/dist/test-utils.d.ts +8 -0
- package/dist/test-utils.js +1714 -0
- package/dist/test-utils.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,1714 @@
|
|
|
1
|
+
'use strict';var graphql=require('graphql');var e=`type APYSample {
|
|
2
|
+
"""The avg rate"""
|
|
3
|
+
avgRate: PercentValue!
|
|
4
|
+
|
|
5
|
+
"""The date"""
|
|
6
|
+
date: DateTime!
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
scalar AlwaysTrue
|
|
10
|
+
|
|
11
|
+
input AmountInput @oneOf {
|
|
12
|
+
"""The native amount"""
|
|
13
|
+
native: BigDecimal
|
|
14
|
+
|
|
15
|
+
"""The erc20 amount input"""
|
|
16
|
+
erc20: Erc20AmountInput
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
"""
|
|
20
|
+
Indicates that an approval transaction must be performed before proceeding to the next step.
|
|
21
|
+
"""
|
|
22
|
+
type ApprovalRequired {
|
|
23
|
+
"""The transaction requires an approval first"""
|
|
24
|
+
approval: TransactionRequest!
|
|
25
|
+
reason: String!
|
|
26
|
+
|
|
27
|
+
"""The required amount missing to be able to do the original transaction"""
|
|
28
|
+
requiredAmount: DecimalValue!
|
|
29
|
+
|
|
30
|
+
"""The current allowance approved"""
|
|
31
|
+
currentAllowance: DecimalValue!
|
|
32
|
+
|
|
33
|
+
"""The transaction to send after the approval is complete"""
|
|
34
|
+
originalTransaction: TransactionRequest!
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
scalar BigDecimal
|
|
38
|
+
|
|
39
|
+
scalar BigInt
|
|
40
|
+
|
|
41
|
+
scalar BlockchainData
|
|
42
|
+
|
|
43
|
+
input BorrowAPYHistoryRequest {
|
|
44
|
+
"""The market pool address"""
|
|
45
|
+
market: EvmAddress!
|
|
46
|
+
|
|
47
|
+
"""The underlying token for the reserve"""
|
|
48
|
+
underlyingToken: EvmAddress!
|
|
49
|
+
|
|
50
|
+
"""The time windows for the history"""
|
|
51
|
+
window: TimeWindow!
|
|
52
|
+
|
|
53
|
+
"""The chain id"""
|
|
54
|
+
chainId: ChainId!
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
input BorrowRequest {
|
|
58
|
+
"""The market pool address"""
|
|
59
|
+
market: EvmAddress!
|
|
60
|
+
|
|
61
|
+
"""The amount borrowing"""
|
|
62
|
+
amount: AmountInput!
|
|
63
|
+
|
|
64
|
+
"""The user who is borrowing"""
|
|
65
|
+
borrower: EvmAddress!
|
|
66
|
+
|
|
67
|
+
"""
|
|
68
|
+
If not supplied, this will use \`borrower\` in most cases this is what the user wants if they want
|
|
69
|
+
to borrow against their own collateral. You can also pass in the credit delegator if the caller has
|
|
70
|
+
been given credit delegation allowance
|
|
71
|
+
"""
|
|
72
|
+
onBehalfOf: EvmAddress
|
|
73
|
+
|
|
74
|
+
"""The chain id"""
|
|
75
|
+
chainId: ChainId!
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type Chain {
|
|
79
|
+
"""The chain name"""
|
|
80
|
+
name: String!
|
|
81
|
+
|
|
82
|
+
"""The chain icon"""
|
|
83
|
+
icon: String!
|
|
84
|
+
|
|
85
|
+
"""The chain id"""
|
|
86
|
+
chainId: ChainId!
|
|
87
|
+
|
|
88
|
+
"""Explorer URL"""
|
|
89
|
+
explorerUrl: String!
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
"""A supported blockchain chain ID"""
|
|
93
|
+
scalar ChainId
|
|
94
|
+
|
|
95
|
+
input CollateralToggleRequest {
|
|
96
|
+
"""The pool address for the market"""
|
|
97
|
+
market: EvmAddress!
|
|
98
|
+
|
|
99
|
+
"""The underlying token for the reserve"""
|
|
100
|
+
underlyingToken: EvmAddress!
|
|
101
|
+
|
|
102
|
+
"""The user to toggle emode on"""
|
|
103
|
+
user: EvmAddress!
|
|
104
|
+
|
|
105
|
+
"""The chain id"""
|
|
106
|
+
chainId: ChainId!
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
type Currency {
|
|
110
|
+
"""The token address"""
|
|
111
|
+
address: EvmAddress!
|
|
112
|
+
|
|
113
|
+
"""The chain id"""
|
|
114
|
+
chainId: ChainId!
|
|
115
|
+
|
|
116
|
+
"""The token name"""
|
|
117
|
+
name: String!
|
|
118
|
+
|
|
119
|
+
"""The token image"""
|
|
120
|
+
imageUrl: String!
|
|
121
|
+
|
|
122
|
+
"""The token symbol"""
|
|
123
|
+
symbol: String!
|
|
124
|
+
|
|
125
|
+
"""The token decimals"""
|
|
126
|
+
decimals: Int!
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
scalar Cursor
|
|
130
|
+
|
|
131
|
+
scalar DateTime
|
|
132
|
+
|
|
133
|
+
input DebtToCover @oneOf {
|
|
134
|
+
"""Exact debt amount to cover"""
|
|
135
|
+
exact: BigDecimal
|
|
136
|
+
|
|
137
|
+
"""Maximum debt amount (equivalent to uint(-1))"""
|
|
138
|
+
max: AlwaysTrue
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
type DecimalValue {
|
|
142
|
+
"""The raw none formatted value"""
|
|
143
|
+
raw: BigInt!
|
|
144
|
+
|
|
145
|
+
"""The decimals the value formatted into"""
|
|
146
|
+
decimals: Int!
|
|
147
|
+
|
|
148
|
+
"""The formatted value"""
|
|
149
|
+
value: BigDecimal!
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
type DomainData {
|
|
153
|
+
name: String!
|
|
154
|
+
version: String!
|
|
155
|
+
chainId: ChainId!
|
|
156
|
+
verifyingContract: EvmAddress!
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
input ERC712Signature {
|
|
160
|
+
"""The signature for the erc721"""
|
|
161
|
+
value: Signature!
|
|
162
|
+
|
|
163
|
+
"""The deadline for the erc721"""
|
|
164
|
+
deadline: Int!
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
type EmodeMarketCategory {
|
|
168
|
+
"""The eMode id for the market"""
|
|
169
|
+
id: Int!
|
|
170
|
+
|
|
171
|
+
"""The eMode label"""
|
|
172
|
+
label: String!
|
|
173
|
+
|
|
174
|
+
"""The maximum loan-to-value ratio in efficiency mode"""
|
|
175
|
+
maxLTV: PercentValue!
|
|
176
|
+
|
|
177
|
+
"""The liquidation threshold in efficiency mode"""
|
|
178
|
+
liquidationThreshold: PercentValue!
|
|
179
|
+
|
|
180
|
+
"""The liquidation penalty applied in efficiency mode"""
|
|
181
|
+
liquidationPenalty: PercentValue!
|
|
182
|
+
|
|
183
|
+
"""The list of reserves which will tailor for this eMode"""
|
|
184
|
+
reserves: [EmodeMarketReserveInfo!]!
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
type EmodeMarketReserveInfo {
|
|
188
|
+
"""The underlying token used on the reserve"""
|
|
189
|
+
underlyingToken: Currency!
|
|
190
|
+
|
|
191
|
+
"""If the underlying token can be collateral with this eMode on"""
|
|
192
|
+
canBeCollateral: Boolean!
|
|
193
|
+
|
|
194
|
+
"""If the underlying token can be borrowed with this eMode on"""
|
|
195
|
+
canBeBorrowed: Boolean!
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
"""The emode reserve information"""
|
|
199
|
+
type EmodeReserveInfo {
|
|
200
|
+
"""The eMode category id for the market"""
|
|
201
|
+
categoryId: Int!
|
|
202
|
+
|
|
203
|
+
"""The eMode label"""
|
|
204
|
+
label: String!
|
|
205
|
+
|
|
206
|
+
"""The maximum loan-to-value ratio in efficiency mode"""
|
|
207
|
+
maxLTV: PercentValue!
|
|
208
|
+
|
|
209
|
+
"""The liquidation threshold in efficiency mode"""
|
|
210
|
+
liquidationThreshold: PercentValue!
|
|
211
|
+
|
|
212
|
+
"""The liquidation penalty applied in efficiency mode"""
|
|
213
|
+
liquidationPenalty: PercentValue!
|
|
214
|
+
|
|
215
|
+
"""If the underlying token can be collateral with this eMode on"""
|
|
216
|
+
canBeCollateral: Boolean!
|
|
217
|
+
|
|
218
|
+
"""If the underlying token can be borrowed with this eMode on"""
|
|
219
|
+
canBeBorrowed: Boolean!
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
input Erc20AmountInput {
|
|
223
|
+
"""The token address."""
|
|
224
|
+
currency: EvmAddress!
|
|
225
|
+
|
|
226
|
+
"""
|
|
227
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g.,
|
|
228
|
+
wei).
|
|
229
|
+
"""
|
|
230
|
+
value: BigDecimal!
|
|
231
|
+
|
|
232
|
+
"""The erc712 signature, which can also be used for permit functionality"""
|
|
233
|
+
erc712: ERC712Signature
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
scalar EvmAddress
|
|
237
|
+
|
|
238
|
+
"""
|
|
239
|
+
An execution plan represents what needs to happen to fulfill a requested operation.
|
|
240
|
+
It could be an immediate transaction, an approval followed by a transaction, or indicate insufficient balance.
|
|
241
|
+
"""
|
|
242
|
+
union ExecutionPlan = TransactionRequest | ApprovalRequired | InsufficientBalanceError
|
|
243
|
+
|
|
244
|
+
"""
|
|
245
|
+
Indicates the user does not have enough balance to perform the operation.
|
|
246
|
+
"""
|
|
247
|
+
type InsufficientBalanceError {
|
|
248
|
+
"""The amount required to do the original transaction"""
|
|
249
|
+
required: DecimalValue!
|
|
250
|
+
|
|
251
|
+
"""The amount available in the wallet"""
|
|
252
|
+
available: DecimalValue!
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
input LiquidateRequest {
|
|
256
|
+
"""The market pool address"""
|
|
257
|
+
market: EvmAddress!
|
|
258
|
+
|
|
259
|
+
"""
|
|
260
|
+
The address of the token used as collateral, to receive as result of the liquidation
|
|
261
|
+
"""
|
|
262
|
+
collateralToken: EvmAddress!
|
|
263
|
+
|
|
264
|
+
"""
|
|
265
|
+
The address of the underlying borrowed token to be repaid with the liquidation
|
|
266
|
+
"""
|
|
267
|
+
underlyingToken: EvmAddress!
|
|
268
|
+
|
|
269
|
+
"""The address of the borrower getting liquidated"""
|
|
270
|
+
user: EvmAddress!
|
|
271
|
+
|
|
272
|
+
"""
|
|
273
|
+
The debt amount of the underlying borrowed token the liquidator will repay
|
|
274
|
+
"""
|
|
275
|
+
debtToCover: DebtToCover! = {max: true}
|
|
276
|
+
|
|
277
|
+
"""
|
|
278
|
+
true if the liquidator wants to receive the aTokens equivalent of the purchased collateral, false if they want to receive the collateral asset directly
|
|
279
|
+
"""
|
|
280
|
+
receiveAToken: Boolean! = false
|
|
281
|
+
|
|
282
|
+
"""The chain id"""
|
|
283
|
+
chainId: ChainId!
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
"""Information about collateral liquidated in a liquidation call."""
|
|
287
|
+
type LiquidationCollateral {
|
|
288
|
+
"""Reserve of the collateral."""
|
|
289
|
+
reserve: ReserveInfo!
|
|
290
|
+
|
|
291
|
+
"""Amount of collateral liquidated"""
|
|
292
|
+
amount: TokenAmount
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
"""Information about debt repaid in a liquidation call."""
|
|
296
|
+
type LiquidationRepaidDebt {
|
|
297
|
+
"""Reserve of the repaid debt."""
|
|
298
|
+
reserve: ReserveInfo!
|
|
299
|
+
|
|
300
|
+
"""Amount of debt repaid."""
|
|
301
|
+
amount: TokenAmount!
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
type Market {
|
|
305
|
+
"""The human-friendly name for the market"""
|
|
306
|
+
name: String!
|
|
307
|
+
|
|
308
|
+
"""The chain"""
|
|
309
|
+
chain: Chain!
|
|
310
|
+
|
|
311
|
+
"""The liquidity pool address for the market"""
|
|
312
|
+
address: EvmAddress!
|
|
313
|
+
|
|
314
|
+
"""A list eModes the market can support"""
|
|
315
|
+
eModeCategories: [EmodeMarketCategory!]!
|
|
316
|
+
userState: MarketUserState
|
|
317
|
+
|
|
318
|
+
"""The market icon"""
|
|
319
|
+
icon: String!
|
|
320
|
+
|
|
321
|
+
"""The market reserves"""
|
|
322
|
+
reserves(request: MarketReservesRequest! = {reserveType: BOTH, orderBy: {tokenName: ASC}}): [Reserve!]!
|
|
323
|
+
|
|
324
|
+
"""The total market size"""
|
|
325
|
+
totalMarketSize: BigDecimal!
|
|
326
|
+
|
|
327
|
+
"""The total available liquidity in USD"""
|
|
328
|
+
totalAvailableLiquidity: BigDecimal!
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
type MarketInfo {
|
|
332
|
+
"""The human-friendly name for the market"""
|
|
333
|
+
name: String!
|
|
334
|
+
|
|
335
|
+
"""The chain"""
|
|
336
|
+
chain: Chain!
|
|
337
|
+
|
|
338
|
+
"""The liquidity pool address for the market"""
|
|
339
|
+
address: EvmAddress!
|
|
340
|
+
|
|
341
|
+
"""The market icon"""
|
|
342
|
+
icon: String!
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
input MarketInput {
|
|
346
|
+
"""The address of the market pool"""
|
|
347
|
+
address: EvmAddress!
|
|
348
|
+
|
|
349
|
+
"""The chain id the market is deployed on"""
|
|
350
|
+
chainId: ChainId!
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
input MarketRequest {
|
|
354
|
+
"""The pool address for the market"""
|
|
355
|
+
address: EvmAddress!
|
|
356
|
+
|
|
357
|
+
"""The chain id the market pool address is deployed on"""
|
|
358
|
+
chainId: ChainId!
|
|
359
|
+
|
|
360
|
+
"""
|
|
361
|
+
The user viewing it (can be connected wallet) - this caters for stuff like eMode and other user features
|
|
362
|
+
"""
|
|
363
|
+
user: EvmAddress
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
input MarketReservesRequest {
|
|
367
|
+
"""The reserve type"""
|
|
368
|
+
reserveType: MarketReservesRequestType! = BOTH
|
|
369
|
+
|
|
370
|
+
"""The way the reserve gets ordered on the return result"""
|
|
371
|
+
orderBy: MarketReservesRequestOrderBy! = {tokenName: ASC}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
input MarketReservesRequestOrderBy @oneOf {
|
|
375
|
+
"""Order by the borrow APY"""
|
|
376
|
+
borrowApy: OrderDirection
|
|
377
|
+
|
|
378
|
+
"""Order by the supply APY"""
|
|
379
|
+
supplyApy: OrderDirection
|
|
380
|
+
|
|
381
|
+
"""Order by the token name"""
|
|
382
|
+
tokenName: OrderDirection
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
enum MarketReservesRequestType {
|
|
386
|
+
SUPPLY
|
|
387
|
+
BORROW
|
|
388
|
+
BOTH
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
type MarketUserReserveBorrowPosition {
|
|
392
|
+
"""The market address where this position exists"""
|
|
393
|
+
market: MarketInfo!
|
|
394
|
+
|
|
395
|
+
"""The currency being borrowed"""
|
|
396
|
+
currency: Currency!
|
|
397
|
+
|
|
398
|
+
"""The user's debt balance in this reserve"""
|
|
399
|
+
debt: TokenAmount!
|
|
400
|
+
|
|
401
|
+
"""The annual percentage yield for this borrow position"""
|
|
402
|
+
apy: PercentValue!
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
type MarketUserReserveSupplyPosition {
|
|
406
|
+
"""The market address where this position exists"""
|
|
407
|
+
market: MarketInfo!
|
|
408
|
+
|
|
409
|
+
"""The currency being supplied"""
|
|
410
|
+
currency: Currency!
|
|
411
|
+
|
|
412
|
+
"""The user's supply balance in this reserve"""
|
|
413
|
+
balance: TokenAmount!
|
|
414
|
+
|
|
415
|
+
"""The annual percentage yield for this supply position"""
|
|
416
|
+
apy: PercentValue!
|
|
417
|
+
|
|
418
|
+
"""Whether this position is being used as collateral"""
|
|
419
|
+
isCollateral: Boolean!
|
|
420
|
+
|
|
421
|
+
"""If the asset can be used for collateral"""
|
|
422
|
+
canBeCollateral: Boolean!
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
type MarketUserState {
|
|
426
|
+
"""The user's total net worth in the market"""
|
|
427
|
+
netWorth: BigDecimal!
|
|
428
|
+
|
|
429
|
+
"""The user's net annual percentage yield across all positions"""
|
|
430
|
+
netAPY: PercentValue!
|
|
431
|
+
|
|
432
|
+
"""The user's health factor (risk metric for liquidation)"""
|
|
433
|
+
healthFactor: BigDecimal!
|
|
434
|
+
|
|
435
|
+
"""Whether efficiency mode is enabled for the user"""
|
|
436
|
+
eModeEnabled: Boolean!
|
|
437
|
+
|
|
438
|
+
"""
|
|
439
|
+
The total collateral of the user in the base currency used by the price feed
|
|
440
|
+
"""
|
|
441
|
+
totalCollateralBase: BigDecimal!
|
|
442
|
+
|
|
443
|
+
"""The total debt of the user in the base currency used by the price feed"""
|
|
444
|
+
totalDebtBase: BigDecimal!
|
|
445
|
+
|
|
446
|
+
"""
|
|
447
|
+
The borrowing power left of the user in the base currency used by the price feed
|
|
448
|
+
"""
|
|
449
|
+
availableBorrowsBase: BigDecimal!
|
|
450
|
+
|
|
451
|
+
"""The liquidation threshold of the user"""
|
|
452
|
+
currentLiquidationThreshold: PercentValue!
|
|
453
|
+
|
|
454
|
+
"""The loan to value of the user"""
|
|
455
|
+
ltv: PercentValue!
|
|
456
|
+
|
|
457
|
+
"""One of the user collateral is in isolation mode"""
|
|
458
|
+
isInIsolationMode: Boolean!
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
input MarketsRequest {
|
|
462
|
+
"""The markets you want to see based on the chain ids"""
|
|
463
|
+
chainIds: [ChainId!]!
|
|
464
|
+
|
|
465
|
+
"""
|
|
466
|
+
The user viewing it (can be connected wallet) - this caters for stuff like eMode and other
|
|
467
|
+
user features
|
|
468
|
+
"""
|
|
469
|
+
user: EvmAddress
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
type MeritBorrowAndSupplyIncentiveCondition {
|
|
473
|
+
"""The APR incentive for meeting the conditions"""
|
|
474
|
+
extraApr: PercentValue!
|
|
475
|
+
|
|
476
|
+
"""The token that must be supplied as collateral"""
|
|
477
|
+
supplyToken: Currency!
|
|
478
|
+
|
|
479
|
+
"""The token that must be borrowed"""
|
|
480
|
+
borrowToken: Currency!
|
|
481
|
+
|
|
482
|
+
"""Where you can go and claim the incentives"""
|
|
483
|
+
claimLink: URL!
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
type MeritBorrowIncentive {
|
|
487
|
+
"""Extra APR for borrowing this asset from AAVE Merit program"""
|
|
488
|
+
extraBorrowApr: PercentValue!
|
|
489
|
+
|
|
490
|
+
"""Where you can go and claim the incentives"""
|
|
491
|
+
claimLink: URL!
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
type MeritSupplyIncentive {
|
|
495
|
+
"""Extra APR for supplying this asset from AAVE Merit program"""
|
|
496
|
+
extraSupplyApr: PercentValue!
|
|
497
|
+
|
|
498
|
+
"""Where you can go and claim the incentives"""
|
|
499
|
+
claimLink: URL!
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
type MessageData {
|
|
503
|
+
owner: EvmAddress!
|
|
504
|
+
spender: EvmAddress!
|
|
505
|
+
value: BigInt!
|
|
506
|
+
nonce: String!
|
|
507
|
+
deadline: Int!
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
type NativeCurrency {
|
|
511
|
+
"""The token image"""
|
|
512
|
+
imageUrl: String!
|
|
513
|
+
|
|
514
|
+
"""The token name"""
|
|
515
|
+
name: String!
|
|
516
|
+
|
|
517
|
+
"""The token symbol"""
|
|
518
|
+
symbol: String!
|
|
519
|
+
|
|
520
|
+
"""The token decimals"""
|
|
521
|
+
decimals: Int!
|
|
522
|
+
|
|
523
|
+
"""The chain id"""
|
|
524
|
+
chainId: ChainId!
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
enum OrderDirection {
|
|
528
|
+
ASC
|
|
529
|
+
DESC
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
enum PageSize {
|
|
533
|
+
TEN
|
|
534
|
+
FIFTY
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
type PaginatedResultInfo {
|
|
538
|
+
"""The cursor to the previous page of results, if any."""
|
|
539
|
+
prev: Cursor
|
|
540
|
+
|
|
541
|
+
"""The cursor to the next page of results, if any."""
|
|
542
|
+
next: Cursor
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
"""Paginated result of user transaction history."""
|
|
546
|
+
type PaginatedUserTransactionHistoryResult {
|
|
547
|
+
"""List of user transaction items."""
|
|
548
|
+
items: [UserTransactionItem!]!
|
|
549
|
+
|
|
550
|
+
"""Pagination information."""
|
|
551
|
+
pageInfo: PaginatedResultInfo!
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
type PaginatedVaultsResult {
|
|
555
|
+
items: [Vault!]!
|
|
556
|
+
pageInfo: PaginatedResultInfo!
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
type PercentValue {
|
|
560
|
+
"""The raw none normalized percentage (the value that lives onchain)"""
|
|
561
|
+
raw: BigInt!
|
|
562
|
+
|
|
563
|
+
"""The decimals representing the precision of the onchain raw value"""
|
|
564
|
+
decimals: Int!
|
|
565
|
+
|
|
566
|
+
"""The normalized percentage (1.0 = 100%)"""
|
|
567
|
+
value: BigDecimal!
|
|
568
|
+
|
|
569
|
+
"""
|
|
570
|
+
The human-readable formatted value you can render on a UI straight away.
|
|
571
|
+
For example, this will turn \`0.01232343\` to \`1.23\`, it will always round to \`2\` decimal points.
|
|
572
|
+
"""
|
|
573
|
+
formatted: BigDecimal!
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
input PermitRequest {
|
|
577
|
+
"""The pool address for the market"""
|
|
578
|
+
market: EvmAddress!
|
|
579
|
+
|
|
580
|
+
"""The underlying token for the reserve"""
|
|
581
|
+
underlyingToken: EvmAddress!
|
|
582
|
+
|
|
583
|
+
"""
|
|
584
|
+
The amount to permit - in human-readable form aka 0.001 eth is 0.001 eth here
|
|
585
|
+
"""
|
|
586
|
+
amount: BigDecimal!
|
|
587
|
+
|
|
588
|
+
"""The chain id the pool is deployed on"""
|
|
589
|
+
chainId: ChainId!
|
|
590
|
+
|
|
591
|
+
"""The spender address"""
|
|
592
|
+
spender: EvmAddress!
|
|
593
|
+
|
|
594
|
+
"""The owner of the funds"""
|
|
595
|
+
owner: EvmAddress!
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
type PermitTypedDataResponse {
|
|
599
|
+
types: TypeDefinition!
|
|
600
|
+
primaryType: String!
|
|
601
|
+
domain: DomainData!
|
|
602
|
+
message: MessageData!
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
type Query {
|
|
606
|
+
"""Get if the API is healthy"""
|
|
607
|
+
health: Boolean!
|
|
608
|
+
|
|
609
|
+
"""All chains the protocol supports"""
|
|
610
|
+
chains: [Chain!]!
|
|
611
|
+
|
|
612
|
+
"""
|
|
613
|
+
Deposits assets (underlying tokens or its related aTokens) into the vault and mints a corresponding amount of vault shares to the receiver.
|
|
614
|
+
"""
|
|
615
|
+
vaultDeposit(request: VaultDepositRequest!): ExecutionPlan!
|
|
616
|
+
|
|
617
|
+
"""
|
|
618
|
+
Redeems shares (vault shares) for the underlying assets or a tokens, which are sent to the receiver. The shares are burned from the owner.
|
|
619
|
+
"""
|
|
620
|
+
vaultRedeemShares(request: VaultRedeemSharesRequest!): TransactionRequest!
|
|
621
|
+
|
|
622
|
+
"""Get a vault"""
|
|
623
|
+
vault(request: VaultRequest!): Vault
|
|
624
|
+
|
|
625
|
+
"""Get vaults"""
|
|
626
|
+
vaults(request: VaultsRequest!): PaginatedVaultsResult!
|
|
627
|
+
|
|
628
|
+
"""User vaults they have shares in"""
|
|
629
|
+
userVaults(request: UserVaultsRequest!): PaginatedVaultsResult!
|
|
630
|
+
|
|
631
|
+
"""Deploy a vault and earn fees from the yield"""
|
|
632
|
+
vaultDeploy(request: VaultDeployRequest!): ExecutionPlan!
|
|
633
|
+
|
|
634
|
+
"""
|
|
635
|
+
Update a vault's fee. You MUST be the owner of the vault to send this tx request.
|
|
636
|
+
"""
|
|
637
|
+
vaultSetFee(request: VaultSetFeeRequest!): TransactionRequest!
|
|
638
|
+
|
|
639
|
+
"""
|
|
640
|
+
Withdraws accumulated fees from the specified vault. You MUST be the owner of the vault to send this tx request.
|
|
641
|
+
"""
|
|
642
|
+
vaultWithdrawFees(request: VaultWithdrawFeesRequest!): TransactionRequest!
|
|
643
|
+
|
|
644
|
+
"""
|
|
645
|
+
Withdraws assets (underlying tokens or its related aTokens) from the vault and sends them to the receiver. The corresponding vault shares are burned from the owner.
|
|
646
|
+
"""
|
|
647
|
+
vaultWithdraw(request: VaultWithdrawRequest!): TransactionRequest!
|
|
648
|
+
|
|
649
|
+
"""
|
|
650
|
+
Mints an exact amount of shares (vault shares) to the receiver by depositing the calculated amount of underlying or aTokens assets.
|
|
651
|
+
"""
|
|
652
|
+
vaultMintShares(request: VaultMintSharesRequest!): ExecutionPlan!
|
|
653
|
+
|
|
654
|
+
"""
|
|
655
|
+
Allows a user to simulate a deposit at the current block, given current on-chain conditions.
|
|
656
|
+
"""
|
|
657
|
+
vaultPreviewDeposit(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
658
|
+
|
|
659
|
+
"""
|
|
660
|
+
Allows a user to simulate a mint at the current block, given current on-chain conditions.
|
|
661
|
+
"""
|
|
662
|
+
vaultPreviewMint(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
663
|
+
|
|
664
|
+
"""
|
|
665
|
+
Allows a user to simulate a withdraw at the current block, given current on-chain conditions.
|
|
666
|
+
"""
|
|
667
|
+
vaultPreviewWithdraw(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
668
|
+
|
|
669
|
+
"""
|
|
670
|
+
Allows a user to simulate a redeem at the current block, given current on-chain conditions.
|
|
671
|
+
"""
|
|
672
|
+
vaultPreviewRedeem(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
673
|
+
|
|
674
|
+
"""Lists all the markets"""
|
|
675
|
+
markets(request: MarketsRequest!): [Market!]!
|
|
676
|
+
|
|
677
|
+
"""Get a market"""
|
|
678
|
+
market(request: MarketRequest!): Market
|
|
679
|
+
|
|
680
|
+
"""Create the transaction to borrow from a market"""
|
|
681
|
+
borrow(request: BorrowRequest!): ExecutionPlan!
|
|
682
|
+
|
|
683
|
+
"""Create the transaction to supply to a market"""
|
|
684
|
+
supply(request: SupplyRequest!): ExecutionPlan!
|
|
685
|
+
|
|
686
|
+
"""Create the transaction to repay to a market"""
|
|
687
|
+
repay(request: RepayRequest!): ExecutionPlan!
|
|
688
|
+
|
|
689
|
+
"""Create the transaction to withdraw from a market"""
|
|
690
|
+
withdraw(request: WithdrawRequest!): ExecutionPlan!
|
|
691
|
+
|
|
692
|
+
"""Create the transaction to toggle eMode for a market"""
|
|
693
|
+
userSetEmode(request: UserSetEmodeRequest!): TransactionRequest!
|
|
694
|
+
|
|
695
|
+
"""Enable/disable a specific supplied asset as collateral"""
|
|
696
|
+
collateralToggle(request: CollateralToggleRequest!): TransactionRequest!
|
|
697
|
+
|
|
698
|
+
"""
|
|
699
|
+
liquidate a non-healthy position collateral-wise, with Health Factor below 1
|
|
700
|
+
"""
|
|
701
|
+
liquidate(request: LiquidateRequest!): TransactionRequest!
|
|
702
|
+
|
|
703
|
+
"""Returns the user account market data across all the reserves."""
|
|
704
|
+
userMarketState(request: UserMarketStateRequest!): MarketUserState!
|
|
705
|
+
|
|
706
|
+
"""The usd exchange rates for different tokens on a given market"""
|
|
707
|
+
usdExchangeRates(request: UsdExchangeRatesRequest!): [UsdExchangeRate!]!
|
|
708
|
+
|
|
709
|
+
"""Get all the user borrows positions"""
|
|
710
|
+
userBorrows(request: UserBorrowsRequest!): [MarketUserReserveBorrowPosition!]!
|
|
711
|
+
|
|
712
|
+
"""Get all the user supplies positions"""
|
|
713
|
+
userSupplies(request: UserSuppliesRequest!): [MarketUserReserveSupplyPosition!]!
|
|
714
|
+
|
|
715
|
+
"""Get the borrow APY history"""
|
|
716
|
+
borrowAPYHistory(request: BorrowAPYHistoryRequest!): [APYSample!]!
|
|
717
|
+
|
|
718
|
+
"""Get the supply APY history"""
|
|
719
|
+
supplyAPYHistory(request: SupplyAPYHistoryRequest!): [APYSample!]!
|
|
720
|
+
|
|
721
|
+
"""Generate EIP-712 typed data for permit signature"""
|
|
722
|
+
permitTypedData(request: PermitRequest!): PermitTypedDataResponse!
|
|
723
|
+
|
|
724
|
+
"""Get the reserve for on a market"""
|
|
725
|
+
reserve(request: ReserveRequest!): Reserve
|
|
726
|
+
|
|
727
|
+
"""The user's transaction history"""
|
|
728
|
+
userTransactionHistory(request: UserTransactionHistoryRequest!): PaginatedUserTransactionHistoryResult!
|
|
729
|
+
|
|
730
|
+
"""
|
|
731
|
+
This lets you know the API has processed the known transaction hash, as the API uses caching to make things as fast
|
|
732
|
+
as possible, it has an invalidation task, so sometimes if the receipt is complete, we may still (rarely) serve
|
|
733
|
+
old data for 100-200ms longer, it's best to query after you got the receipt to be told that it is ready to go.
|
|
734
|
+
Note the invalidation is very quick, and most of the time it's present even before your receipt is returned this is to
|
|
735
|
+
cater for the race condition.
|
|
736
|
+
"""
|
|
737
|
+
hasProcessedKnownTransaction(txHash: TxHash!): Boolean!
|
|
738
|
+
_service: _Service!
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
input RepayRequest {
|
|
742
|
+
"""The market pool address"""
|
|
743
|
+
market: EvmAddress!
|
|
744
|
+
|
|
745
|
+
"""
|
|
746
|
+
The amount to repay - you can pass in the underlying or the aToken if you pass in the aToken address it will repay with the aToken
|
|
747
|
+
"""
|
|
748
|
+
amount: AmountInput!
|
|
749
|
+
|
|
750
|
+
"""The user who is repaying"""
|
|
751
|
+
borrower: EvmAddress!
|
|
752
|
+
|
|
753
|
+
"""
|
|
754
|
+
The address of the user who will get their debt reduced/removed. This should be the address of the user calling the function if they want to
|
|
755
|
+
"""
|
|
756
|
+
onBehalfOf: EvmAddress
|
|
757
|
+
|
|
758
|
+
"""The chain id"""
|
|
759
|
+
chainId: ChainId!
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
type Reserve {
|
|
763
|
+
"""The market information the reserve is under"""
|
|
764
|
+
market: MarketInfo!
|
|
765
|
+
|
|
766
|
+
"""The reserve underlying currency"""
|
|
767
|
+
underlyingToken: Currency!
|
|
768
|
+
|
|
769
|
+
"""The reserve a token"""
|
|
770
|
+
aToken: Currency!
|
|
771
|
+
|
|
772
|
+
"""The reserve v token"""
|
|
773
|
+
vToken: Currency!
|
|
774
|
+
|
|
775
|
+
"""
|
|
776
|
+
If the reserve accepts native currency, for example, if you're on a reserve with asset WETH, it can
|
|
777
|
+
also accept ETH
|
|
778
|
+
"""
|
|
779
|
+
acceptsNative: NativeCurrency
|
|
780
|
+
|
|
781
|
+
"""The reserve size"""
|
|
782
|
+
size: TokenAmount!
|
|
783
|
+
|
|
784
|
+
"""The usd exchange rate for the underlying token"""
|
|
785
|
+
usdExchangeRate: BigDecimal!
|
|
786
|
+
|
|
787
|
+
"""The usd oracle address it is pulling that price from"""
|
|
788
|
+
usdOracleAddress: EvmAddress!
|
|
789
|
+
|
|
790
|
+
"""The supply info for the reserve"""
|
|
791
|
+
supplyInfo: ReserveSupplyInfo!
|
|
792
|
+
|
|
793
|
+
"""
|
|
794
|
+
The borrow info for the reserve - if its null the underlying token cannot be borrowed
|
|
795
|
+
"""
|
|
796
|
+
borrowInfo: ReserveBorrowInfo
|
|
797
|
+
|
|
798
|
+
"""The reserve has been frozen all actions are stopped"""
|
|
799
|
+
isFrozen: Boolean!
|
|
800
|
+
|
|
801
|
+
"""The reserve is paused you can still withdraw and some other actions"""
|
|
802
|
+
isPaused: Boolean!
|
|
803
|
+
|
|
804
|
+
"""
|
|
805
|
+
If the reserve supports isolation mode this is defined and the configs are defined
|
|
806
|
+
"""
|
|
807
|
+
isolationModeConfig: ReserveIsolationModeConfig
|
|
808
|
+
|
|
809
|
+
"""If the reserve can use flash loans on it"""
|
|
810
|
+
flashLoanEnabled: Boolean!
|
|
811
|
+
|
|
812
|
+
"""Does the underlying reserve support permit"""
|
|
813
|
+
permitSupported: Boolean!
|
|
814
|
+
|
|
815
|
+
"""
|
|
816
|
+
This exposes the extra incentives you can earn from third parties
|
|
817
|
+
Note Aave Labs does not guarantee third party program and accepts no liability to those
|
|
818
|
+
"""
|
|
819
|
+
incentives: [ReserveIncentive!]!
|
|
820
|
+
|
|
821
|
+
"""The emode information for the reserve"""
|
|
822
|
+
eModeInfo: [EmodeReserveInfo!]!
|
|
823
|
+
|
|
824
|
+
"""Get the user state on the reserve"""
|
|
825
|
+
userState: ReserveUserState
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
type ReserveBorrowInfo {
|
|
829
|
+
"""The annual percentage yield for borrowing this asset"""
|
|
830
|
+
apy: PercentValue!
|
|
831
|
+
|
|
832
|
+
"""The total amount borrowed from this reserve"""
|
|
833
|
+
total: TokenAmount!
|
|
834
|
+
|
|
835
|
+
"""The reserve factor percentage"""
|
|
836
|
+
reserveFactor: PercentValue!
|
|
837
|
+
|
|
838
|
+
"""The available liquidity"""
|
|
839
|
+
availableLiquidity: TokenAmount!
|
|
840
|
+
|
|
841
|
+
"""The reserve utilization rate"""
|
|
842
|
+
utilizationRate: PercentValue!
|
|
843
|
+
|
|
844
|
+
"""
|
|
845
|
+
Variable rate slope 1 - the rate of interest increase when utilization rate is below optimal
|
|
846
|
+
This is the slope of the interest rate curve in the first segment (0% to optimal utilization)
|
|
847
|
+
"""
|
|
848
|
+
variableRateSlope1: PercentValue!
|
|
849
|
+
|
|
850
|
+
"""
|
|
851
|
+
Variable rate slope 2 - the rate of interest increase when utilization rate is above optimal
|
|
852
|
+
This is the slope of the interest rate curve in the second segment (optimal to 100% utilization)
|
|
853
|
+
Typically much steeper than slope1 to discourage over-utilization
|
|
854
|
+
"""
|
|
855
|
+
variableRateSlope2: PercentValue!
|
|
856
|
+
|
|
857
|
+
"""
|
|
858
|
+
The optimal usage rate - the utilization rate at which the variable rate curve transitions
|
|
859
|
+
from slope1 to slope2. This represents the target utilization rate for the reserve
|
|
860
|
+
"""
|
|
861
|
+
optimalUsageRate: PercentValue!
|
|
862
|
+
|
|
863
|
+
"""
|
|
864
|
+
Borrowing can have different states based on the criteria of the user or the market
|
|
865
|
+
"""
|
|
866
|
+
borrowingState: ReserveBorrowingState!
|
|
867
|
+
|
|
868
|
+
"""The borrow cap of the reserve"""
|
|
869
|
+
borrowCap: TokenAmount!
|
|
870
|
+
|
|
871
|
+
"""The borrow cap is now full"""
|
|
872
|
+
borrowCapReached: Boolean!
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
enum ReserveBorrowingState {
|
|
876
|
+
"""Borrowing is enabled"""
|
|
877
|
+
ENABLED
|
|
878
|
+
|
|
879
|
+
"""Borrowing is disabled"""
|
|
880
|
+
DISABLED
|
|
881
|
+
|
|
882
|
+
"""The user emode settings make this underlying not able to be borrowed"""
|
|
883
|
+
USER_EMODE_DISABLED_BORROW
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
union ReserveIncentive = MeritSupplyIncentive | MeritBorrowIncentive | MeritBorrowAndSupplyIncentiveCondition
|
|
887
|
+
|
|
888
|
+
type ReserveInfo {
|
|
889
|
+
"""The market information the reserve is under"""
|
|
890
|
+
market: MarketInfo!
|
|
891
|
+
|
|
892
|
+
"""The reserve underlying currency"""
|
|
893
|
+
underlyingToken: Currency!
|
|
894
|
+
|
|
895
|
+
"""The reserve a token"""
|
|
896
|
+
aToken: Currency!
|
|
897
|
+
|
|
898
|
+
"""The reserve v token"""
|
|
899
|
+
vToken: Currency!
|
|
900
|
+
|
|
901
|
+
"""The usd exchange rate for the underlying token"""
|
|
902
|
+
usdExchangeRate: BigDecimal!
|
|
903
|
+
|
|
904
|
+
"""Does the underlying reserve support permit"""
|
|
905
|
+
permitSupported: Boolean!
|
|
906
|
+
|
|
907
|
+
"""
|
|
908
|
+
This exposes the extra incentives you can earn from third parties
|
|
909
|
+
Note Aave Labs does not guarantee third party program and accepts no liability to those
|
|
910
|
+
"""
|
|
911
|
+
incentives: [ReserveIncentive!]!
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
type ReserveIsolationModeConfig {
|
|
915
|
+
"""This means that it can be used to borrow"""
|
|
916
|
+
canBeCollateral: Boolean!
|
|
917
|
+
canBeBorrowed: Boolean!
|
|
918
|
+
debtCeiling: TokenAmount!
|
|
919
|
+
|
|
920
|
+
"""Only the amount that is borrowed by the users in isolation"""
|
|
921
|
+
totalBorrows: TokenAmount!
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
input ReserveRequest {
|
|
925
|
+
"""The pool address for the market"""
|
|
926
|
+
market: EvmAddress!
|
|
927
|
+
|
|
928
|
+
"""The underlying token for the reserve"""
|
|
929
|
+
underlyingToken: EvmAddress!
|
|
930
|
+
|
|
931
|
+
"""The chain id the pool is deployed on"""
|
|
932
|
+
chainId: ChainId!
|
|
933
|
+
|
|
934
|
+
"""
|
|
935
|
+
The user viewing it (can be connected wallet) - this caters for stuff like eMode and other
|
|
936
|
+
user features
|
|
937
|
+
"""
|
|
938
|
+
user: EvmAddress
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
type ReserveSupplyInfo {
|
|
942
|
+
"""The annual percentage yield for supplying this asset"""
|
|
943
|
+
apy: PercentValue!
|
|
944
|
+
|
|
945
|
+
"""The maximum loan-to-value ratio when used as collateral"""
|
|
946
|
+
maxLTV: PercentValue!
|
|
947
|
+
|
|
948
|
+
"""The liquidation threshold for this asset"""
|
|
949
|
+
liquidationThreshold: PercentValue!
|
|
950
|
+
|
|
951
|
+
"""The liquidation bonus applied when liquidated"""
|
|
952
|
+
liquidationBonus: PercentValue!
|
|
953
|
+
|
|
954
|
+
"""If the asset can be used for collateral"""
|
|
955
|
+
canBeCollateral: Boolean!
|
|
956
|
+
|
|
957
|
+
"""The supply cap"""
|
|
958
|
+
supplyCap: TokenAmount!
|
|
959
|
+
|
|
960
|
+
"""The supply cap is now full"""
|
|
961
|
+
supplyCapReached: Boolean!
|
|
962
|
+
|
|
963
|
+
"""The total amount supplied to this reserve"""
|
|
964
|
+
total: DecimalValue!
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
type ReserveUserState {
|
|
968
|
+
"""The user's balance of this asset"""
|
|
969
|
+
balance: TokenAmount!
|
|
970
|
+
|
|
971
|
+
"""The amount the user can supply to this reserve"""
|
|
972
|
+
suppliable: TokenAmount!
|
|
973
|
+
|
|
974
|
+
"""The amount the user can borrow from this reserve"""
|
|
975
|
+
borrowable: TokenAmount!
|
|
976
|
+
|
|
977
|
+
"""The user emode info if enabled"""
|
|
978
|
+
emode: EmodeReserveInfo
|
|
979
|
+
|
|
980
|
+
"""
|
|
981
|
+
If the user is in a state to be able to supply taking into consideration their emode
|
|
982
|
+
"""
|
|
983
|
+
canBeCollateral: Boolean!
|
|
984
|
+
|
|
985
|
+
"""If the user is in a state to be able to borrow from the reserve"""
|
|
986
|
+
canBeBorrowed: Boolean!
|
|
987
|
+
|
|
988
|
+
"""Is the user in isolation mode"""
|
|
989
|
+
isInIsolationMode: Boolean!
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
scalar Signature
|
|
993
|
+
|
|
994
|
+
input SupplyAPYHistoryRequest {
|
|
995
|
+
"""The market pool address"""
|
|
996
|
+
market: EvmAddress!
|
|
997
|
+
|
|
998
|
+
"""The underlying token for the reserve"""
|
|
999
|
+
underlyingToken: EvmAddress!
|
|
1000
|
+
|
|
1001
|
+
"""The time windows for the history"""
|
|
1002
|
+
window: TimeWindow!
|
|
1003
|
+
|
|
1004
|
+
"""The chain id"""
|
|
1005
|
+
chainId: ChainId!
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
input SupplyRequest {
|
|
1009
|
+
"""The market pool address"""
|
|
1010
|
+
market: EvmAddress!
|
|
1011
|
+
|
|
1012
|
+
"""The amount supplying"""
|
|
1013
|
+
amount: AmountInput!
|
|
1014
|
+
|
|
1015
|
+
"""The user who is supplying"""
|
|
1016
|
+
supplier: EvmAddress!
|
|
1017
|
+
|
|
1018
|
+
"""
|
|
1019
|
+
The address that will receive the corresponding aTokens. This is the only address that will be able to withdraw the asset from the pool.
|
|
1020
|
+
This will be the same as msg.sender if the user wants to receive aTokens into their own wallet, or use a different address if the beneficiary
|
|
1021
|
+
of aTokens is a different wallet
|
|
1022
|
+
"""
|
|
1023
|
+
onBehalfOf: EvmAddress
|
|
1024
|
+
|
|
1025
|
+
"""The chain id"""
|
|
1026
|
+
chainId: ChainId!
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
enum TimeWindow {
|
|
1030
|
+
LAST_DAY
|
|
1031
|
+
LAST_WEEK
|
|
1032
|
+
LAST_MONTH
|
|
1033
|
+
LAST_SIX_MONTHS
|
|
1034
|
+
LAST_YEAR
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
type TokenAmount {
|
|
1038
|
+
usdPerToken: BigDecimal!
|
|
1039
|
+
|
|
1040
|
+
"""The amount"""
|
|
1041
|
+
amount: DecimalValue!
|
|
1042
|
+
|
|
1043
|
+
"""The usd full amount"""
|
|
1044
|
+
usd: BigDecimal!
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
"""
|
|
1048
|
+
Represents a transaction that must be executed, such as a direct supply, borrow, etc.
|
|
1049
|
+
"""
|
|
1050
|
+
type TransactionRequest {
|
|
1051
|
+
to: EvmAddress!
|
|
1052
|
+
from: EvmAddress!
|
|
1053
|
+
data: BlockchainData!
|
|
1054
|
+
value: BigInt!
|
|
1055
|
+
chainId: ChainId!
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
scalar TxHash
|
|
1059
|
+
|
|
1060
|
+
type TypeDefinition {
|
|
1061
|
+
EIP712Domain: [TypeField!]!
|
|
1062
|
+
Permit: [TypeField!]!
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
type TypeField {
|
|
1066
|
+
name: String!
|
|
1067
|
+
type: String!
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
scalar URL
|
|
1071
|
+
|
|
1072
|
+
type UsdExchangeRate {
|
|
1073
|
+
currency: Currency!
|
|
1074
|
+
rate: BigDecimal!
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
input UsdExchangeRatesRequest {
|
|
1078
|
+
"""The pool address for the market"""
|
|
1079
|
+
market: EvmAddress!
|
|
1080
|
+
|
|
1081
|
+
"""The underlying tokens for the reserve"""
|
|
1082
|
+
underlyingTokens: [EvmAddress!]!
|
|
1083
|
+
|
|
1084
|
+
"""The chain id"""
|
|
1085
|
+
chainId: ChainId!
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
"""A transaction where the user borrowed assets from a reserve."""
|
|
1089
|
+
type UserBorrowTransaction {
|
|
1090
|
+
"""Amount borrowed."""
|
|
1091
|
+
amount: TokenAmount!
|
|
1092
|
+
|
|
1093
|
+
"""Reserve from which assets were borrowed."""
|
|
1094
|
+
reserve: ReserveInfo!
|
|
1095
|
+
|
|
1096
|
+
"""URL to view the transaction on a block explorer."""
|
|
1097
|
+
blockExplorerUrl: String!
|
|
1098
|
+
|
|
1099
|
+
"""Transaction hash."""
|
|
1100
|
+
txHash: TxHash!
|
|
1101
|
+
|
|
1102
|
+
"""Timestamp of the transaction."""
|
|
1103
|
+
timestamp: DateTime!
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
input UserBorrowsRequest {
|
|
1107
|
+
"""The market addresses and chains ids to query"""
|
|
1108
|
+
markets: [MarketInput!]!
|
|
1109
|
+
|
|
1110
|
+
"""The user address to get borrow positions for"""
|
|
1111
|
+
user: EvmAddress!
|
|
1112
|
+
|
|
1113
|
+
"""How to order the results"""
|
|
1114
|
+
orderBy: UserBorrowsRequestOrderBy! = {name: ASC}
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
input UserBorrowsRequestOrderBy @oneOf {
|
|
1118
|
+
"""Order by the user's debt amount"""
|
|
1119
|
+
debt: OrderDirection
|
|
1120
|
+
|
|
1121
|
+
"""Order by the asset name"""
|
|
1122
|
+
name: OrderDirection
|
|
1123
|
+
|
|
1124
|
+
"""Order by the annual percentage yield"""
|
|
1125
|
+
apy: OrderDirection
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
"""A transaction where the user was involved in a liquidation call."""
|
|
1129
|
+
type UserLiquidationCallTransaction {
|
|
1130
|
+
"""Collateral liquidated."""
|
|
1131
|
+
collateral: LiquidationCollateral!
|
|
1132
|
+
|
|
1133
|
+
"""Debt repaid."""
|
|
1134
|
+
debtRepaid: LiquidationRepaidDebt!
|
|
1135
|
+
|
|
1136
|
+
"""URL to view the transaction on a block explorer."""
|
|
1137
|
+
blockExplorerUrl: String!
|
|
1138
|
+
|
|
1139
|
+
"""Transaction hash."""
|
|
1140
|
+
txHash: TxHash!
|
|
1141
|
+
|
|
1142
|
+
"""Timestamp of the transaction."""
|
|
1143
|
+
timestamp: DateTime!
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
input UserMarketStateRequest {
|
|
1147
|
+
"""The pool address for the market"""
|
|
1148
|
+
market: EvmAddress!
|
|
1149
|
+
|
|
1150
|
+
"""The user to toggle emode on"""
|
|
1151
|
+
user: EvmAddress!
|
|
1152
|
+
|
|
1153
|
+
"""The chain id"""
|
|
1154
|
+
chainId: ChainId!
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
"""A transaction where the user repaid borrowed assets."""
|
|
1158
|
+
type UserRepayTransaction {
|
|
1159
|
+
"""Amount repaid."""
|
|
1160
|
+
amount: TokenAmount!
|
|
1161
|
+
|
|
1162
|
+
"""Reserve to which assets were repaid."""
|
|
1163
|
+
reserve: ReserveInfo!
|
|
1164
|
+
|
|
1165
|
+
"""URL to view the transaction on a block explorer."""
|
|
1166
|
+
blockExplorerUrl: String!
|
|
1167
|
+
|
|
1168
|
+
"""Transaction hash."""
|
|
1169
|
+
txHash: TxHash!
|
|
1170
|
+
|
|
1171
|
+
"""Timestamp of the transaction."""
|
|
1172
|
+
timestamp: DateTime!
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
input UserSetEmodeRequest {
|
|
1176
|
+
"""The pool address for the market"""
|
|
1177
|
+
market: EvmAddress!
|
|
1178
|
+
|
|
1179
|
+
"""The user to toggle emode on"""
|
|
1180
|
+
user: EvmAddress!
|
|
1181
|
+
|
|
1182
|
+
"""
|
|
1183
|
+
The eMode category id for the market if you want to disable eMode, then pass in null
|
|
1184
|
+
"""
|
|
1185
|
+
categoryId: Int
|
|
1186
|
+
|
|
1187
|
+
"""The chain id"""
|
|
1188
|
+
chainId: ChainId!
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
input UserSuppliesRequest {
|
|
1192
|
+
"""The market addresses and chains ids to query"""
|
|
1193
|
+
markets: [MarketInput!]!
|
|
1194
|
+
|
|
1195
|
+
"""The user address to get supply positions for"""
|
|
1196
|
+
user: EvmAddress!
|
|
1197
|
+
|
|
1198
|
+
"""Only get back the supplies which can be used as collateral"""
|
|
1199
|
+
collateralsOnly: Boolean! = false
|
|
1200
|
+
|
|
1201
|
+
"""How to order the results"""
|
|
1202
|
+
orderBy: UserSuppliesRequestOrderBy! = {name: ASC}
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
input UserSuppliesRequestOrderBy @oneOf {
|
|
1206
|
+
"""Order by the user's supply balance"""
|
|
1207
|
+
balance: OrderDirection
|
|
1208
|
+
|
|
1209
|
+
"""Order by the asset name"""
|
|
1210
|
+
name: OrderDirection
|
|
1211
|
+
|
|
1212
|
+
"""Order by the annual percentage yield"""
|
|
1213
|
+
apy: OrderDirection
|
|
1214
|
+
|
|
1215
|
+
"""Order by whether the position is used as collateral"""
|
|
1216
|
+
isCollateralized: OrderDirection
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
"""A transaction where the user supplied assets to a reserve."""
|
|
1220
|
+
type UserSupplyTransaction {
|
|
1221
|
+
"""Amount supplied."""
|
|
1222
|
+
amount: TokenAmount!
|
|
1223
|
+
|
|
1224
|
+
"""Reserve to which assets were supplied."""
|
|
1225
|
+
reserve: ReserveInfo!
|
|
1226
|
+
|
|
1227
|
+
"""URL to view the transaction on a block explorer."""
|
|
1228
|
+
blockExplorerUrl: String!
|
|
1229
|
+
|
|
1230
|
+
"""Transaction hash."""
|
|
1231
|
+
txHash: TxHash!
|
|
1232
|
+
|
|
1233
|
+
"""Timestamp of the transaction."""
|
|
1234
|
+
timestamp: DateTime!
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
input UserTransactionHistoryRequest {
|
|
1238
|
+
"""The market address"""
|
|
1239
|
+
market: EvmAddress!
|
|
1240
|
+
|
|
1241
|
+
"""The filter to optionally filter the transactions by type"""
|
|
1242
|
+
filter: [UserTransactionType!]! = [SUPPLY, WITHDRAW, BORROW, REPAY, USAGE_AS_COLLATERAL, LIQUIDATION_CALL]
|
|
1243
|
+
|
|
1244
|
+
"""The order by object to sort the transactions by"""
|
|
1245
|
+
orderBy: UserTransactionHistoryRequestOrderBy! = {date: ASC}
|
|
1246
|
+
|
|
1247
|
+
"""The user that sent the transactions"""
|
|
1248
|
+
user: EvmAddress!
|
|
1249
|
+
|
|
1250
|
+
"""The chain id where the transactions were sent"""
|
|
1251
|
+
chainId: ChainId!
|
|
1252
|
+
|
|
1253
|
+
"""The page size"""
|
|
1254
|
+
pageSize: PageSize! = FIFTY
|
|
1255
|
+
|
|
1256
|
+
"""Pagination cursor"""
|
|
1257
|
+
cursor: Cursor
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
input UserTransactionHistoryRequestOrderBy {
|
|
1261
|
+
"""Order by the date of the transaction"""
|
|
1262
|
+
date: OrderDirection
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
union UserTransactionItem = UserSupplyTransaction | UserWithdrawTransaction | UserBorrowTransaction | UserRepayTransaction | UserUsageAsCollateralTransaction | UserLiquidationCallTransaction
|
|
1266
|
+
|
|
1267
|
+
"""The type of user transaction in the protocol."""
|
|
1268
|
+
enum UserTransactionType {
|
|
1269
|
+
"""User supplied assets to the protocol."""
|
|
1270
|
+
SUPPLY
|
|
1271
|
+
|
|
1272
|
+
"""User borrowed assets from the protocol."""
|
|
1273
|
+
BORROW
|
|
1274
|
+
|
|
1275
|
+
"""User enabled or disabled usage of an asset as collateral."""
|
|
1276
|
+
USAGE_AS_COLLATERAL
|
|
1277
|
+
|
|
1278
|
+
"""User was involved in a liquidation call."""
|
|
1279
|
+
LIQUIDATION_CALL
|
|
1280
|
+
|
|
1281
|
+
"""User repaid a borrowed amount."""
|
|
1282
|
+
REPAY
|
|
1283
|
+
|
|
1284
|
+
"""User withdrew supplied assets."""
|
|
1285
|
+
WITHDRAW
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
"""
|
|
1289
|
+
A transaction where the user enabled or disabled usage of an asset as collateral.
|
|
1290
|
+
"""
|
|
1291
|
+
type UserUsageAsCollateralTransaction {
|
|
1292
|
+
"""Whether collateral usage was enabled."""
|
|
1293
|
+
enabled: Boolean!
|
|
1294
|
+
|
|
1295
|
+
"""Reserve for which collateral usage was changed."""
|
|
1296
|
+
reserve: ReserveInfo!
|
|
1297
|
+
|
|
1298
|
+
"""URL to view the transaction on a block explorer."""
|
|
1299
|
+
blockExplorerUrl: String!
|
|
1300
|
+
|
|
1301
|
+
"""Transaction hash."""
|
|
1302
|
+
txHash: TxHash!
|
|
1303
|
+
|
|
1304
|
+
"""Timestamp of the transaction."""
|
|
1305
|
+
timestamp: DateTime!
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
type UserVaultShares {
|
|
1309
|
+
"""The user's shares on the vault"""
|
|
1310
|
+
shares: TokenAmount!
|
|
1311
|
+
|
|
1312
|
+
"""The balance you can withdraw"""
|
|
1313
|
+
balance: TokenAmount!
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
input UserVaultsFilter {
|
|
1317
|
+
"""Filter by markets"""
|
|
1318
|
+
vaults: [VaultInput!]
|
|
1319
|
+
|
|
1320
|
+
"""Filter by underlying token addresses"""
|
|
1321
|
+
underlyingTokens: [EvmAddress!]
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
input UserVaultsOrderBy @oneOf {
|
|
1325
|
+
"""Order by shares"""
|
|
1326
|
+
shares: OrderDirection
|
|
1327
|
+
|
|
1328
|
+
"""Order by fee"""
|
|
1329
|
+
fee: OrderDirection
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
input UserVaultsRequest {
|
|
1333
|
+
"""The user address"""
|
|
1334
|
+
user: EvmAddress!
|
|
1335
|
+
|
|
1336
|
+
"""Filter criteria"""
|
|
1337
|
+
filters: UserVaultsFilter
|
|
1338
|
+
|
|
1339
|
+
"""Ordering criteria"""
|
|
1340
|
+
orderBy: UserVaultsOrderBy! = {shares: ASC}
|
|
1341
|
+
|
|
1342
|
+
"""The page size"""
|
|
1343
|
+
pageSize: PageSize! = FIFTY
|
|
1344
|
+
|
|
1345
|
+
"""Pagination cursor"""
|
|
1346
|
+
cursor: Cursor
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
"""A transaction where the user withdrew assets from a reserve."""
|
|
1350
|
+
type UserWithdrawTransaction {
|
|
1351
|
+
"""Amount withdrawn."""
|
|
1352
|
+
amount: TokenAmount!
|
|
1353
|
+
|
|
1354
|
+
"""Reserve from which assets were withdrawn."""
|
|
1355
|
+
reserve: ReserveInfo!
|
|
1356
|
+
|
|
1357
|
+
"""URL to view the transaction on a block explorer."""
|
|
1358
|
+
blockExplorerUrl: String!
|
|
1359
|
+
|
|
1360
|
+
"""Transaction hash."""
|
|
1361
|
+
txHash: TxHash!
|
|
1362
|
+
|
|
1363
|
+
"""Timestamp of the transaction."""
|
|
1364
|
+
timestamp: DateTime!
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
type Vault {
|
|
1368
|
+
"""The vault address"""
|
|
1369
|
+
address: EvmAddress!
|
|
1370
|
+
|
|
1371
|
+
"""The owner of the vault"""
|
|
1372
|
+
owner: EvmAddress!
|
|
1373
|
+
|
|
1374
|
+
"""The name of the share"""
|
|
1375
|
+
shareName: String!
|
|
1376
|
+
|
|
1377
|
+
"""The symbol of the share"""
|
|
1378
|
+
shareSymbol: String!
|
|
1379
|
+
|
|
1380
|
+
"""The reserve the vault is using"""
|
|
1381
|
+
usedReserve: Reserve!
|
|
1382
|
+
|
|
1383
|
+
"""The current fee percentage set for the vault."""
|
|
1384
|
+
fee: PercentValue!
|
|
1385
|
+
|
|
1386
|
+
"""How much this vault has made in revenue"""
|
|
1387
|
+
totalFeeRevenue: TokenAmount!
|
|
1388
|
+
|
|
1389
|
+
"""
|
|
1390
|
+
The last recorded balance of the vault's AToken. This value is updated when yield is accrued.
|
|
1391
|
+
"""
|
|
1392
|
+
balance: TokenAmount!
|
|
1393
|
+
|
|
1394
|
+
"""The chain id the vault lives on"""
|
|
1395
|
+
chainId: ChainId!
|
|
1396
|
+
|
|
1397
|
+
"""The user's shares info on the vault"""
|
|
1398
|
+
userShares: UserVaultShares
|
|
1399
|
+
|
|
1400
|
+
"""The total fees the owner can claim currently for the vault"""
|
|
1401
|
+
feesBalance: TokenAmount!
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
input VaultDeployRequest {
|
|
1405
|
+
"""Underlying token address."""
|
|
1406
|
+
underlyingToken: EvmAddress!
|
|
1407
|
+
|
|
1408
|
+
"""The market address."""
|
|
1409
|
+
market: EvmAddress!
|
|
1410
|
+
|
|
1411
|
+
"""The chain id"""
|
|
1412
|
+
chainId: ChainId!
|
|
1413
|
+
|
|
1414
|
+
"""
|
|
1415
|
+
The address to set as which deploys the vault and will become an owner of the vault.
|
|
1416
|
+
"""
|
|
1417
|
+
deployer: EvmAddress!
|
|
1418
|
+
|
|
1419
|
+
"""The owner of the vault - if not defined, it will be the deployer"""
|
|
1420
|
+
owner: EvmAddress
|
|
1421
|
+
|
|
1422
|
+
"""The initial fee to set, expressed in %."""
|
|
1423
|
+
initialFee: BigDecimal!
|
|
1424
|
+
|
|
1425
|
+
"""The name to set for the vault's shares."""
|
|
1426
|
+
shareName: String!
|
|
1427
|
+
|
|
1428
|
+
"""The symbol to set for the vault's shares."""
|
|
1429
|
+
shareSymbol: String!
|
|
1430
|
+
|
|
1431
|
+
"""
|
|
1432
|
+
The initial amount of underlying assets to deposit. This must be a non-zero, non-trivial amount, depending on the underlying asset's decimals.
|
|
1433
|
+
"""
|
|
1434
|
+
initialLockDeposit: BigDecimal!
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
input VaultDepositRequest {
|
|
1438
|
+
"""The vault address"""
|
|
1439
|
+
vault: EvmAddress!
|
|
1440
|
+
|
|
1441
|
+
"""
|
|
1442
|
+
The amount of assets to deposit - you can pass in the underlying or the aToken if you pass in the aToken address it will deposit with the aToken
|
|
1443
|
+
"""
|
|
1444
|
+
amount: Erc20AmountInput!
|
|
1445
|
+
|
|
1446
|
+
"""The user who is depositing"""
|
|
1447
|
+
depositor: EvmAddress!
|
|
1448
|
+
|
|
1449
|
+
"""
|
|
1450
|
+
The address to which vault shares will be minted to - defaults to depositor.
|
|
1451
|
+
"""
|
|
1452
|
+
sharesRecipient: EvmAddress
|
|
1453
|
+
|
|
1454
|
+
"""The chain id"""
|
|
1455
|
+
chainId: ChainId!
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
input VaultInput {
|
|
1459
|
+
"""The address of the fault"""
|
|
1460
|
+
address: EvmAddress!
|
|
1461
|
+
|
|
1462
|
+
"""The chain id the vault is on"""
|
|
1463
|
+
chainId: ChainId!
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
input VaultMintShareInput {
|
|
1467
|
+
"""The amount of vault shares"""
|
|
1468
|
+
amount: BigDecimal!
|
|
1469
|
+
|
|
1470
|
+
"""Whether the amount should be received as aToken."""
|
|
1471
|
+
asAToken: Boolean! = false
|
|
1472
|
+
|
|
1473
|
+
"""The authorization to redeem the shares."""
|
|
1474
|
+
signature: ERC712Signature
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
input VaultMintSharesRequest {
|
|
1478
|
+
"""The vault address"""
|
|
1479
|
+
vault: EvmAddress!
|
|
1480
|
+
|
|
1481
|
+
"""The amount of shares to mint"""
|
|
1482
|
+
shares: VaultMintShareInput!
|
|
1483
|
+
|
|
1484
|
+
"""The user who is wanting to mint the shares"""
|
|
1485
|
+
minter: EvmAddress!
|
|
1486
|
+
|
|
1487
|
+
"""
|
|
1488
|
+
The address to which vault shares will be minted to - defaults to minter.
|
|
1489
|
+
"""
|
|
1490
|
+
sharesRecipient: EvmAddress
|
|
1491
|
+
|
|
1492
|
+
"""The chain id"""
|
|
1493
|
+
chainId: ChainId!
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
input VaultOperationPreviewRequest {
|
|
1497
|
+
"""The vault"""
|
|
1498
|
+
vault: EvmAddress!
|
|
1499
|
+
|
|
1500
|
+
"""The chain id the vault is deployed on"""
|
|
1501
|
+
chainId: ChainId!
|
|
1502
|
+
|
|
1503
|
+
"""The amount in human-readable form"""
|
|
1504
|
+
amount: BigDecimal!
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
input VaultRedeemShareInput {
|
|
1508
|
+
"""The amount of vault shares"""
|
|
1509
|
+
amount: BigDecimal!
|
|
1510
|
+
|
|
1511
|
+
"""Whether the amount should be sent as aToken."""
|
|
1512
|
+
asAToken: Boolean! = false
|
|
1513
|
+
|
|
1514
|
+
"""The authorization to redeem the shares."""
|
|
1515
|
+
signature: ERC712Signature
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
input VaultRedeemSharesRequest {
|
|
1519
|
+
"""The vault address"""
|
|
1520
|
+
vault: EvmAddress!
|
|
1521
|
+
|
|
1522
|
+
"""The shares to redeem."""
|
|
1523
|
+
shares: VaultRedeemShareInput!
|
|
1524
|
+
|
|
1525
|
+
"""
|
|
1526
|
+
The address from which vault shares will be burned (normally your own wallet).
|
|
1527
|
+
"""
|
|
1528
|
+
sharesOwner: EvmAddress!
|
|
1529
|
+
|
|
1530
|
+
"""
|
|
1531
|
+
If you are doing the redeem from a trusted wallet which can move funds on behalf of the shares owner (advanced usage)
|
|
1532
|
+
"""
|
|
1533
|
+
authorizedUser: EvmAddress
|
|
1534
|
+
|
|
1535
|
+
"""
|
|
1536
|
+
The address to which the underlying assets will be sent; if not set it will go to the sharesOwner
|
|
1537
|
+
"""
|
|
1538
|
+
recipient: EvmAddress
|
|
1539
|
+
|
|
1540
|
+
"""The chain id"""
|
|
1541
|
+
chainId: ChainId!
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
input VaultRequest {
|
|
1545
|
+
"""The retrieve criteria"""
|
|
1546
|
+
by: VaultRequestBy!
|
|
1547
|
+
|
|
1548
|
+
"""The chain id the vault is deployed on"""
|
|
1549
|
+
chainId: ChainId!
|
|
1550
|
+
|
|
1551
|
+
"""
|
|
1552
|
+
The user viewing it (can be connected wallet) - this caters for stuff like userShares and other user features
|
|
1553
|
+
"""
|
|
1554
|
+
user: EvmAddress
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
input VaultRequestBy @oneOf {
|
|
1558
|
+
"""The vault address"""
|
|
1559
|
+
address: EvmAddress
|
|
1560
|
+
|
|
1561
|
+
"""
|
|
1562
|
+
You can use this if you deployed a vault and want to get the vault information using the tx hash after the receipt is given
|
|
1563
|
+
"""
|
|
1564
|
+
txHash: TxHash
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
input VaultSetFeeRequest {
|
|
1568
|
+
"""The vault deployed address"""
|
|
1569
|
+
vault: EvmAddress!
|
|
1570
|
+
|
|
1571
|
+
"""The new fee to set, expressed in %."""
|
|
1572
|
+
newFee: BigDecimal!
|
|
1573
|
+
|
|
1574
|
+
"""The chain id"""
|
|
1575
|
+
chainId: ChainId!
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
input VaultWithdrawFeesRequest {
|
|
1579
|
+
"""The vault deployed address"""
|
|
1580
|
+
vault: EvmAddress!
|
|
1581
|
+
|
|
1582
|
+
"""
|
|
1583
|
+
Who the withdrawal fees will go to - if not supplied, it goes to the owner
|
|
1584
|
+
"""
|
|
1585
|
+
sendTo: EvmAddress
|
|
1586
|
+
|
|
1587
|
+
"""Human-formatted amount"""
|
|
1588
|
+
amount: WithdrawAmount!
|
|
1589
|
+
|
|
1590
|
+
"""The chain id"""
|
|
1591
|
+
chainId: ChainId!
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
input VaultWithdrawInput {
|
|
1595
|
+
"""The amount of assets to withdraw."""
|
|
1596
|
+
amount: BigDecimal!
|
|
1597
|
+
|
|
1598
|
+
"""Whether the amount should be sent/received as aToken."""
|
|
1599
|
+
asAToken: Boolean! = false
|
|
1600
|
+
|
|
1601
|
+
"""The authorization to redeem the shares."""
|
|
1602
|
+
signature: ERC712Signature
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
input VaultWithdrawRequest {
|
|
1606
|
+
"""The vault address"""
|
|
1607
|
+
vault: EvmAddress!
|
|
1608
|
+
|
|
1609
|
+
"""The details of the underlying token to withdraw."""
|
|
1610
|
+
underlyingToken: VaultWithdrawInput!
|
|
1611
|
+
|
|
1612
|
+
"""
|
|
1613
|
+
The address from which vault shares will be burned (normally your own wallet).
|
|
1614
|
+
"""
|
|
1615
|
+
sharesOwner: EvmAddress!
|
|
1616
|
+
|
|
1617
|
+
"""
|
|
1618
|
+
If you are doing the withdrawal from a trusted wallet which can move funds on behalf of the shares owner (advanced usage)
|
|
1619
|
+
"""
|
|
1620
|
+
authorizedUser: EvmAddress
|
|
1621
|
+
|
|
1622
|
+
"""
|
|
1623
|
+
The address to which the underlying assets will be sent - defaults to sharesOwner.
|
|
1624
|
+
"""
|
|
1625
|
+
recipient: EvmAddress
|
|
1626
|
+
|
|
1627
|
+
"""The chain id"""
|
|
1628
|
+
chainId: ChainId!
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
input VaultsRequest {
|
|
1632
|
+
"""Filter criteria for vaults"""
|
|
1633
|
+
criteria: VaultsRequestFilterCriteria!
|
|
1634
|
+
|
|
1635
|
+
"""
|
|
1636
|
+
The user viewing it (can be connected wallet) - this caters for stuff like userShares and other user features
|
|
1637
|
+
"""
|
|
1638
|
+
user: EvmAddress
|
|
1639
|
+
|
|
1640
|
+
"""The page size"""
|
|
1641
|
+
pageSize: PageSize! = FIFTY
|
|
1642
|
+
|
|
1643
|
+
"""Pagination cursor"""
|
|
1644
|
+
cursor: Cursor
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
input VaultsRequestFilterCriteria @oneOf {
|
|
1648
|
+
"""Filter by specific vault addresses"""
|
|
1649
|
+
vaults: [VaultInput!]
|
|
1650
|
+
|
|
1651
|
+
"""Filter by owner addresses"""
|
|
1652
|
+
ownedBy: [EvmAddress!]
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
input WithdrawAmount @oneOf {
|
|
1656
|
+
"""Exact amount to withdraw, remember interest is generated on each block"""
|
|
1657
|
+
exact: BigDecimal
|
|
1658
|
+
|
|
1659
|
+
"""Withdraw all the position completely"""
|
|
1660
|
+
max: AlwaysTrue
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
input WithdrawAmountInput @oneOf {
|
|
1664
|
+
"""The native amount"""
|
|
1665
|
+
native: WithdrawNativeAmountInput
|
|
1666
|
+
|
|
1667
|
+
"""The erc20 amount input"""
|
|
1668
|
+
erc20: WithdrawErc20AmountInput
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
input WithdrawErc20AmountInput {
|
|
1672
|
+
"""The token address."""
|
|
1673
|
+
currency: EvmAddress!
|
|
1674
|
+
|
|
1675
|
+
"""
|
|
1676
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g., wei).
|
|
1677
|
+
"""
|
|
1678
|
+
value: WithdrawAmount!
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
input WithdrawNativeAmountInput {
|
|
1682
|
+
"""The native value"""
|
|
1683
|
+
value: WithdrawAmount!
|
|
1684
|
+
|
|
1685
|
+
"""The permit for the transaction if required"""
|
|
1686
|
+
permit: ERC712Signature
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
input WithdrawRequest {
|
|
1690
|
+
"""The market pool address"""
|
|
1691
|
+
market: EvmAddress!
|
|
1692
|
+
|
|
1693
|
+
"""The amount to withdraw"""
|
|
1694
|
+
amount: WithdrawAmountInput!
|
|
1695
|
+
|
|
1696
|
+
"""
|
|
1697
|
+
The user who is withdrawing, this should have the \`aToken\` that will be burned by the \`Pool\`
|
|
1698
|
+
"""
|
|
1699
|
+
supplier: EvmAddress!
|
|
1700
|
+
|
|
1701
|
+
"""
|
|
1702
|
+
The address that will receive the underlying asset. This will go to the supplier if the user wants to receive the tokens into
|
|
1703
|
+
their own wallet, or use a different address if the beneficiary is a different wallet
|
|
1704
|
+
"""
|
|
1705
|
+
recipient: EvmAddress
|
|
1706
|
+
|
|
1707
|
+
"""The chain id"""
|
|
1708
|
+
chainId: ChainId!
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
type _Service {
|
|
1712
|
+
sdl: String
|
|
1713
|
+
}`;var o=graphql.buildSchema(e);exports.schema=o;//# sourceMappingURL=test-utils.cjs.map
|
|
1714
|
+
//# sourceMappingURL=test-utils.cjs.map
|