@aave/graphql 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +890 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +12725 -0
- package/dist/index.d.ts +12725 -0
- package/dist/index.js +890 -0
- package/dist/index.js.map +1 -0
- package/dist/test-utils.cjs +2291 -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 +2291 -0
- package/dist/test-utils.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,2291 @@
|
|
|
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
|
+
type AaveBorrowIncentive {
|
|
10
|
+
borrowAprDiscount: PercentValue!
|
|
11
|
+
rewardTokenAddress: EvmAddress!
|
|
12
|
+
rewardTokenSymbol: String!
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type AaveSupplyIncentive {
|
|
16
|
+
extraSupplyApr: PercentValue!
|
|
17
|
+
rewardTokenAddress: EvmAddress!
|
|
18
|
+
rewardTokenSymbol: String!
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
scalar AlwaysTrue
|
|
22
|
+
|
|
23
|
+
input AmountInput @oneOf {
|
|
24
|
+
"""The native amount"""
|
|
25
|
+
native: BigDecimal
|
|
26
|
+
|
|
27
|
+
"""The erc20 amount input"""
|
|
28
|
+
erc20: Erc20AmountInput
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
"""
|
|
32
|
+
Indicates that an approval transaction must be performed before proceeding to the next step.
|
|
33
|
+
"""
|
|
34
|
+
type ApprovalRequired {
|
|
35
|
+
"""The transaction requires an approval first"""
|
|
36
|
+
approval: TransactionRequest!
|
|
37
|
+
|
|
38
|
+
"""The reason for the approval"""
|
|
39
|
+
reason: String!
|
|
40
|
+
|
|
41
|
+
"""The required amount missing to be able to do the original transaction"""
|
|
42
|
+
requiredAmount: DecimalValue!
|
|
43
|
+
|
|
44
|
+
"""The current allowance approved"""
|
|
45
|
+
currentAllowance: DecimalValue!
|
|
46
|
+
|
|
47
|
+
"""The transaction to send after the approval is complete"""
|
|
48
|
+
originalTransaction: TransactionRequest!
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input ApproveBorrowCreditDelegatorRequest {
|
|
52
|
+
"""The market pool address"""
|
|
53
|
+
market: EvmAddress!
|
|
54
|
+
|
|
55
|
+
"""The underlying token address."""
|
|
56
|
+
underlyingToken: EvmAddress!
|
|
57
|
+
|
|
58
|
+
"""
|
|
59
|
+
Token value in its main unit to approve (e.g., 1.5 DAI), not in the smallest fraction (e.g. wei).
|
|
60
|
+
"""
|
|
61
|
+
amount: BigDecimal!
|
|
62
|
+
|
|
63
|
+
"""The user allowing the delegation from"""
|
|
64
|
+
user: EvmAddress!
|
|
65
|
+
|
|
66
|
+
"""The delegatee to approve the ability to borrow on the \`user\` behalf"""
|
|
67
|
+
delegatee: EvmAddress!
|
|
68
|
+
|
|
69
|
+
"""The chain id"""
|
|
70
|
+
chainId: ChainId!
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
scalar BigDecimal
|
|
74
|
+
|
|
75
|
+
scalar BigInt
|
|
76
|
+
|
|
77
|
+
scalar BlockchainData
|
|
78
|
+
|
|
79
|
+
input BorrowAPYHistoryRequest {
|
|
80
|
+
"""The market pool address"""
|
|
81
|
+
market: EvmAddress!
|
|
82
|
+
|
|
83
|
+
"""The underlying token for the reserve"""
|
|
84
|
+
underlyingToken: EvmAddress!
|
|
85
|
+
|
|
86
|
+
"""The time windows for the history"""
|
|
87
|
+
window: TimeWindow!
|
|
88
|
+
|
|
89
|
+
"""The chain id"""
|
|
90
|
+
chainId: ChainId!
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
input BorrowAmountInput @oneOf {
|
|
94
|
+
"""The native amount"""
|
|
95
|
+
native: BigDecimal
|
|
96
|
+
|
|
97
|
+
"""The erc20 amount input"""
|
|
98
|
+
erc20: BorrowErc20AmountInput
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
input BorrowErc20AmountInput {
|
|
102
|
+
"""The token address."""
|
|
103
|
+
currency: EvmAddress!
|
|
104
|
+
|
|
105
|
+
"""
|
|
106
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g.,
|
|
107
|
+
wei).
|
|
108
|
+
"""
|
|
109
|
+
value: BigDecimal!
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
input BorrowRequest {
|
|
113
|
+
"""The market pool address"""
|
|
114
|
+
market: EvmAddress!
|
|
115
|
+
|
|
116
|
+
"""The amount borrowing"""
|
|
117
|
+
amount: BorrowAmountInput!
|
|
118
|
+
|
|
119
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
120
|
+
sender: EvmAddress!
|
|
121
|
+
|
|
122
|
+
"""
|
|
123
|
+
If not supplied, this will use \`sender\` in most cases this is what the user wants if they want
|
|
124
|
+
to borrow themselves. You can also pass in the credit delegator if the caller has
|
|
125
|
+
been given credit delegation allowance. You can approve those with \`approveBorrowCreditDelegation\`.
|
|
126
|
+
"""
|
|
127
|
+
onBehalfOf: EvmAddress
|
|
128
|
+
|
|
129
|
+
"""The chain id"""
|
|
130
|
+
chainId: ChainId!
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
type Chain {
|
|
134
|
+
name: String!
|
|
135
|
+
icon: String!
|
|
136
|
+
chainId: ChainId!
|
|
137
|
+
explorerUrl: String!
|
|
138
|
+
isTestnet: Boolean!
|
|
139
|
+
nativeWrappedToken: EvmAddress!
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
"""A supported blockchain chain ID"""
|
|
143
|
+
scalar ChainId
|
|
144
|
+
|
|
145
|
+
enum ChainsFilter {
|
|
146
|
+
TESTNET_ONLY
|
|
147
|
+
MAINNET_ONLY
|
|
148
|
+
ALL
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
type ClaimableMeritReward {
|
|
152
|
+
currency: Currency!
|
|
153
|
+
amount: TokenAmount!
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
input CollateralToggleRequest {
|
|
157
|
+
"""The pool address for the market"""
|
|
158
|
+
market: EvmAddress!
|
|
159
|
+
|
|
160
|
+
"""The underlying token for the reserve"""
|
|
161
|
+
underlyingToken: EvmAddress!
|
|
162
|
+
|
|
163
|
+
"""The user to toggle emode on"""
|
|
164
|
+
user: EvmAddress!
|
|
165
|
+
|
|
166
|
+
"""The chain id"""
|
|
167
|
+
chainId: ChainId!
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
input CreditDelegateeAmountRequest {
|
|
171
|
+
"""The market pool address"""
|
|
172
|
+
market: EvmAddress!
|
|
173
|
+
|
|
174
|
+
"""The underlying token address."""
|
|
175
|
+
underlyingToken: EvmAddress!
|
|
176
|
+
|
|
177
|
+
"""The user allowing the delegation from"""
|
|
178
|
+
user: EvmAddress!
|
|
179
|
+
|
|
180
|
+
"""The delegatee to approve the ability to borrow on the \`user\` behalf"""
|
|
181
|
+
delegatee: EvmAddress!
|
|
182
|
+
|
|
183
|
+
"""The chain id"""
|
|
184
|
+
chainId: ChainId!
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
type Currency {
|
|
188
|
+
"""The token address"""
|
|
189
|
+
address: EvmAddress!
|
|
190
|
+
|
|
191
|
+
"""The chain id"""
|
|
192
|
+
chainId: ChainId!
|
|
193
|
+
|
|
194
|
+
"""The token name"""
|
|
195
|
+
name: String!
|
|
196
|
+
|
|
197
|
+
"""The token image"""
|
|
198
|
+
imageUrl: String!
|
|
199
|
+
|
|
200
|
+
"""The token symbol"""
|
|
201
|
+
symbol: String!
|
|
202
|
+
|
|
203
|
+
"""The token decimals"""
|
|
204
|
+
decimals: Int!
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
scalar Cursor
|
|
208
|
+
|
|
209
|
+
scalar DateTime
|
|
210
|
+
|
|
211
|
+
input DebtToCover @oneOf {
|
|
212
|
+
"""Exact debt amount to cover"""
|
|
213
|
+
exact: BigDecimal
|
|
214
|
+
|
|
215
|
+
"""Maximum debt amount (equivalent to uint(-1))"""
|
|
216
|
+
max: AlwaysTrue
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
type DecimalValue {
|
|
220
|
+
"""The raw none formatted value"""
|
|
221
|
+
raw: BigInt!
|
|
222
|
+
|
|
223
|
+
"""The decimals the value formatted into"""
|
|
224
|
+
decimals: Int!
|
|
225
|
+
|
|
226
|
+
"""The formatted value"""
|
|
227
|
+
value: BigDecimal!
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
type DomainData {
|
|
231
|
+
name: String!
|
|
232
|
+
version: String!
|
|
233
|
+
chainId: ChainId!
|
|
234
|
+
verifyingContract: EvmAddress!
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
input ERC712Signature {
|
|
238
|
+
"""The signature for the erc721"""
|
|
239
|
+
value: Signature!
|
|
240
|
+
|
|
241
|
+
"""The deadline for the erc721"""
|
|
242
|
+
deadline: Int!
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
type EmodeMarketCategory {
|
|
246
|
+
"""The eMode id for the market"""
|
|
247
|
+
id: Int!
|
|
248
|
+
|
|
249
|
+
"""The eMode label"""
|
|
250
|
+
label: String!
|
|
251
|
+
|
|
252
|
+
"""The maximum loan-to-value ratio in efficiency mode"""
|
|
253
|
+
maxLTV: PercentValue!
|
|
254
|
+
|
|
255
|
+
"""The liquidation threshold in efficiency mode"""
|
|
256
|
+
liquidationThreshold: PercentValue!
|
|
257
|
+
|
|
258
|
+
"""The liquidation penalty applied in efficiency mode"""
|
|
259
|
+
liquidationPenalty: PercentValue!
|
|
260
|
+
|
|
261
|
+
"""The list of reserves which will tailor for this eMode"""
|
|
262
|
+
reserves: [EmodeMarketReserveInfo!]!
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
type EmodeMarketReserveInfo {
|
|
266
|
+
"""The underlying token used on the reserve"""
|
|
267
|
+
underlyingToken: Currency!
|
|
268
|
+
|
|
269
|
+
"""If the underlying token can be collateral with this eMode on"""
|
|
270
|
+
canBeCollateral: Boolean!
|
|
271
|
+
|
|
272
|
+
"""If the underlying token can be borrowed with this eMode on"""
|
|
273
|
+
canBeBorrowed: Boolean!
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
"""The emode reserve information"""
|
|
277
|
+
type EmodeReserveInfo {
|
|
278
|
+
"""The eMode category id for the market"""
|
|
279
|
+
categoryId: Int!
|
|
280
|
+
|
|
281
|
+
"""The eMode label"""
|
|
282
|
+
label: String!
|
|
283
|
+
|
|
284
|
+
"""The maximum loan-to-value ratio in efficiency mode"""
|
|
285
|
+
maxLTV: PercentValue!
|
|
286
|
+
|
|
287
|
+
"""The liquidation threshold in efficiency mode"""
|
|
288
|
+
liquidationThreshold: PercentValue!
|
|
289
|
+
|
|
290
|
+
"""The liquidation penalty applied in efficiency mode"""
|
|
291
|
+
liquidationPenalty: PercentValue!
|
|
292
|
+
|
|
293
|
+
"""If the underlying token can be collateral with this eMode on"""
|
|
294
|
+
canBeCollateral: Boolean!
|
|
295
|
+
|
|
296
|
+
"""If the underlying token can be borrowed with this eMode on"""
|
|
297
|
+
canBeBorrowed: Boolean!
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
input Erc20AmountInput {
|
|
301
|
+
"""The token address."""
|
|
302
|
+
currency: EvmAddress!
|
|
303
|
+
|
|
304
|
+
"""
|
|
305
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g.,
|
|
306
|
+
wei).
|
|
307
|
+
"""
|
|
308
|
+
value: BigDecimal!
|
|
309
|
+
|
|
310
|
+
"""
|
|
311
|
+
The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
|
|
312
|
+
"""
|
|
313
|
+
permitSig: ERC712Signature
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
scalar EvmAddress
|
|
317
|
+
|
|
318
|
+
"""
|
|
319
|
+
An execution plan represents what needs to happen to fulfill a requested operation.
|
|
320
|
+
It could be an immediate transaction, an approval followed by a transaction, or indicate insufficient balance.
|
|
321
|
+
"""
|
|
322
|
+
union ExecutionPlan = TransactionRequest | ApprovalRequired | InsufficientBalanceError
|
|
323
|
+
|
|
324
|
+
input ForkTopUpErc20 {
|
|
325
|
+
"""The token address"""
|
|
326
|
+
currency: EvmAddress!
|
|
327
|
+
|
|
328
|
+
"""
|
|
329
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction
|
|
330
|
+
"""
|
|
331
|
+
value: BigDecimal!
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
input ForkTopUpRequest {
|
|
335
|
+
"""The address you want the funds to be topped up against"""
|
|
336
|
+
user: EvmAddress!
|
|
337
|
+
|
|
338
|
+
"""The erc20 information"""
|
|
339
|
+
erc20: ForkTopUpErc20
|
|
340
|
+
|
|
341
|
+
"""
|
|
342
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction
|
|
343
|
+
"""
|
|
344
|
+
native: BigDecimal
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
type ForkTopUpResponse {
|
|
348
|
+
message: String!
|
|
349
|
+
|
|
350
|
+
"""The tx hash of the newly created transaction"""
|
|
351
|
+
txHash: String
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
input HasProcessedKnownTransactionRequest {
|
|
355
|
+
"""
|
|
356
|
+
The operation type this is given to you on the TransactionRequest::operation
|
|
357
|
+
"""
|
|
358
|
+
operation: OperationType!
|
|
359
|
+
|
|
360
|
+
"""The tx hash"""
|
|
361
|
+
txHash: TxHash!
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
input HealthFactorPreviewRequest {
|
|
365
|
+
"""The action to simulate"""
|
|
366
|
+
action: PreviewAction!
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
type HealthFactorPreviewResponse {
|
|
370
|
+
"""
|
|
371
|
+
The user health factor before - if null, they don't have one because they are not borrowing
|
|
372
|
+
"""
|
|
373
|
+
before: BigDecimal
|
|
374
|
+
|
|
375
|
+
"""
|
|
376
|
+
The user health factor after - if null, they don't have one because they are not borrowing
|
|
377
|
+
"""
|
|
378
|
+
after: BigDecimal
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
"""
|
|
382
|
+
Indicates the user does not have enough balance to perform the operation.
|
|
383
|
+
"""
|
|
384
|
+
type InsufficientBalanceError {
|
|
385
|
+
"""The amount required to do the original transaction"""
|
|
386
|
+
required: DecimalValue!
|
|
387
|
+
|
|
388
|
+
"""The amount available in the wallet"""
|
|
389
|
+
available: DecimalValue!
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
input LiquidateRequest {
|
|
393
|
+
"""The market pool address"""
|
|
394
|
+
market: EvmAddress!
|
|
395
|
+
|
|
396
|
+
"""
|
|
397
|
+
The address of the token used as collateral, to receive as result of the liquidation
|
|
398
|
+
"""
|
|
399
|
+
collateralToken: EvmAddress!
|
|
400
|
+
|
|
401
|
+
"""
|
|
402
|
+
The address of the underlying borrowed token to be repaid with the liquidation
|
|
403
|
+
"""
|
|
404
|
+
underlyingToken: EvmAddress!
|
|
405
|
+
|
|
406
|
+
"""The address of the borrower getting liquidated"""
|
|
407
|
+
user: EvmAddress!
|
|
408
|
+
|
|
409
|
+
"""
|
|
410
|
+
The debt amount of the underlying borrowed token the liquidator will repay
|
|
411
|
+
"""
|
|
412
|
+
debtToCover: DebtToCover! = {max: true}
|
|
413
|
+
|
|
414
|
+
"""
|
|
415
|
+
true if the liquidator wants to receive the aTokens equivalent of the purchased collateral, false if they want to receive the collateral asset directly
|
|
416
|
+
"""
|
|
417
|
+
receiveAToken: Boolean! = false
|
|
418
|
+
|
|
419
|
+
"""The chain id"""
|
|
420
|
+
chainId: ChainId!
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
"""Information about collateral liquidated in a liquidation call."""
|
|
424
|
+
type LiquidationCollateral {
|
|
425
|
+
"""Reserve of the collateral."""
|
|
426
|
+
reserve: ReserveInfo!
|
|
427
|
+
|
|
428
|
+
"""Amount of collateral liquidated"""
|
|
429
|
+
amount: TokenAmount
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
"""Information about debt repaid in a liquidation call."""
|
|
433
|
+
type LiquidationRepaidDebt {
|
|
434
|
+
"""Reserve of the repaid debt."""
|
|
435
|
+
reserve: ReserveInfo!
|
|
436
|
+
|
|
437
|
+
"""Amount of debt repaid."""
|
|
438
|
+
amount: TokenAmount!
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
type Market {
|
|
442
|
+
"""The human-friendly name for the market"""
|
|
443
|
+
name: String!
|
|
444
|
+
|
|
445
|
+
"""The chain"""
|
|
446
|
+
chain: Chain!
|
|
447
|
+
|
|
448
|
+
"""The liquidity pool address for the market"""
|
|
449
|
+
address: EvmAddress!
|
|
450
|
+
|
|
451
|
+
"""A list eModes the market can support"""
|
|
452
|
+
eModeCategories: [EmodeMarketCategory!]!
|
|
453
|
+
userState: MarketUserState
|
|
454
|
+
|
|
455
|
+
"""The market icon"""
|
|
456
|
+
icon: String!
|
|
457
|
+
|
|
458
|
+
"""The market reserves"""
|
|
459
|
+
reserves(request: MarketReservesRequest! = {reserveType: BOTH, orderBy: {tokenName: ASC}}): [Reserve!]!
|
|
460
|
+
|
|
461
|
+
"""The total market size"""
|
|
462
|
+
totalMarketSize: BigDecimal!
|
|
463
|
+
|
|
464
|
+
"""The total available liquidity in USD"""
|
|
465
|
+
totalAvailableLiquidity: BigDecimal!
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
type MarketInfo {
|
|
469
|
+
"""The human-friendly name for the market"""
|
|
470
|
+
name: String!
|
|
471
|
+
|
|
472
|
+
"""The chain"""
|
|
473
|
+
chain: Chain!
|
|
474
|
+
|
|
475
|
+
"""The liquidity pool address for the market"""
|
|
476
|
+
address: EvmAddress!
|
|
477
|
+
|
|
478
|
+
"""The market icon"""
|
|
479
|
+
icon: String!
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
input MarketInput {
|
|
483
|
+
"""The address of the market pool"""
|
|
484
|
+
address: EvmAddress!
|
|
485
|
+
|
|
486
|
+
"""The chain id the market is deployed on"""
|
|
487
|
+
chainId: ChainId!
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
input MarketRequest {
|
|
491
|
+
"""The pool address for the market"""
|
|
492
|
+
address: EvmAddress!
|
|
493
|
+
|
|
494
|
+
"""The chain id the market pool address is deployed on"""
|
|
495
|
+
chainId: ChainId!
|
|
496
|
+
|
|
497
|
+
"""
|
|
498
|
+
The user viewing it (can be connected wallet) - this caters for stuff like eMode and other user features
|
|
499
|
+
"""
|
|
500
|
+
user: EvmAddress
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
input MarketReservesRequest {
|
|
504
|
+
"""The reserve type"""
|
|
505
|
+
reserveType: MarketReservesRequestType! = BOTH
|
|
506
|
+
|
|
507
|
+
"""The way the reserve gets ordered on the return result"""
|
|
508
|
+
orderBy: MarketReservesRequestOrderBy! = {tokenName: ASC}
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
input MarketReservesRequestOrderBy @oneOf {
|
|
512
|
+
"""Order by the borrow APY"""
|
|
513
|
+
borrowApy: OrderDirection
|
|
514
|
+
|
|
515
|
+
"""Order by the supply APY"""
|
|
516
|
+
supplyApy: OrderDirection
|
|
517
|
+
|
|
518
|
+
"""Order by the token name"""
|
|
519
|
+
tokenName: OrderDirection
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
enum MarketReservesRequestType {
|
|
523
|
+
SUPPLY
|
|
524
|
+
BORROW
|
|
525
|
+
BOTH
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
type MarketUserReserveBorrowPosition {
|
|
529
|
+
"""The market address where this position exists"""
|
|
530
|
+
market: MarketInfo!
|
|
531
|
+
|
|
532
|
+
"""The currency being borrowed"""
|
|
533
|
+
currency: Currency!
|
|
534
|
+
|
|
535
|
+
"""The user's debt balance in this reserve"""
|
|
536
|
+
debt: TokenAmount!
|
|
537
|
+
|
|
538
|
+
"""The annual percentage yield for this borrow position"""
|
|
539
|
+
apy: PercentValue!
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
type MarketUserReserveSupplyPosition {
|
|
543
|
+
"""The market address where this position exists"""
|
|
544
|
+
market: MarketInfo!
|
|
545
|
+
|
|
546
|
+
"""The currency being supplied"""
|
|
547
|
+
currency: Currency!
|
|
548
|
+
|
|
549
|
+
"""The user's supply balance in this reserve"""
|
|
550
|
+
balance: TokenAmount!
|
|
551
|
+
|
|
552
|
+
"""The annual percentage yield for this supply position"""
|
|
553
|
+
apy: PercentValue!
|
|
554
|
+
|
|
555
|
+
"""Whether this position is being used as collateral"""
|
|
556
|
+
isCollateral: Boolean!
|
|
557
|
+
|
|
558
|
+
"""If the asset can be used for collateral"""
|
|
559
|
+
canBeCollateral: Boolean!
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
type MarketUserState {
|
|
563
|
+
"""The user's total net worth in the market"""
|
|
564
|
+
netWorth: BigDecimal!
|
|
565
|
+
|
|
566
|
+
"""The user's net annual percentage yield across all positions"""
|
|
567
|
+
netAPY: PercentValue!
|
|
568
|
+
|
|
569
|
+
"""
|
|
570
|
+
The user's health factor (risk metric for liquidation) - if null, the user does not have a borrow
|
|
571
|
+
"""
|
|
572
|
+
healthFactor: BigDecimal
|
|
573
|
+
|
|
574
|
+
"""Whether efficiency mode is enabled for the user"""
|
|
575
|
+
eModeEnabled: Boolean!
|
|
576
|
+
|
|
577
|
+
"""
|
|
578
|
+
The total collateral of the user in the base currency used by the price feed
|
|
579
|
+
"""
|
|
580
|
+
totalCollateralBase: BigDecimal!
|
|
581
|
+
|
|
582
|
+
"""The total debt of the user in the base currency used by the price feed"""
|
|
583
|
+
totalDebtBase: BigDecimal!
|
|
584
|
+
|
|
585
|
+
"""
|
|
586
|
+
The borrowing power left of the user in the base currency used by the price feed
|
|
587
|
+
"""
|
|
588
|
+
availableBorrowsBase: BigDecimal!
|
|
589
|
+
|
|
590
|
+
"""The liquidation threshold of the user"""
|
|
591
|
+
currentLiquidationThreshold: PercentValue!
|
|
592
|
+
|
|
593
|
+
"""The loan to value of the user"""
|
|
594
|
+
ltv: PercentValue!
|
|
595
|
+
|
|
596
|
+
"""One of the user collateral is in isolation mode"""
|
|
597
|
+
isInIsolationMode: Boolean!
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
input MarketsRequest {
|
|
601
|
+
"""The markets you want to see based on the chain ids"""
|
|
602
|
+
chainIds: [ChainId!]!
|
|
603
|
+
|
|
604
|
+
"""
|
|
605
|
+
The user viewing it (can be connected wallet) - this caters for stuff like eMode and other
|
|
606
|
+
user features
|
|
607
|
+
"""
|
|
608
|
+
user: EvmAddress
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
type MeritBorrowAndSupplyIncentiveCondition {
|
|
612
|
+
"""The APR incentive for meeting the conditions"""
|
|
613
|
+
extraApr: PercentValue!
|
|
614
|
+
|
|
615
|
+
"""The token that must be supplied as collateral"""
|
|
616
|
+
supplyToken: Currency!
|
|
617
|
+
|
|
618
|
+
"""The token that must be borrowed"""
|
|
619
|
+
borrowToken: Currency!
|
|
620
|
+
|
|
621
|
+
"""Where you can go and claim the incentives"""
|
|
622
|
+
claimLink: URL!
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
type MeritBorrowIncentive {
|
|
626
|
+
"""Extra APR for borrowing this asset from AAVE Merit program"""
|
|
627
|
+
borrowAprDiscount: PercentValue!
|
|
628
|
+
|
|
629
|
+
"""Where you can go and claim the incentives"""
|
|
630
|
+
claimLink: URL!
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
type MeritSupplyIncentive {
|
|
634
|
+
"""Extra APR for supplying this asset from AAVE Merit program"""
|
|
635
|
+
extraSupplyApr: PercentValue!
|
|
636
|
+
|
|
637
|
+
"""Where you can go and claim the incentives"""
|
|
638
|
+
claimLink: URL!
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
type MessageData {
|
|
642
|
+
owner: EvmAddress!
|
|
643
|
+
spender: EvmAddress!
|
|
644
|
+
value: BigInt!
|
|
645
|
+
nonce: BigInt!
|
|
646
|
+
deadline: Int!
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
type NativeCurrency {
|
|
650
|
+
"""The token image"""
|
|
651
|
+
imageUrl: String!
|
|
652
|
+
|
|
653
|
+
"""The token name"""
|
|
654
|
+
name: String!
|
|
655
|
+
|
|
656
|
+
"""The token symbol"""
|
|
657
|
+
symbol: String!
|
|
658
|
+
|
|
659
|
+
"""The token decimals"""
|
|
660
|
+
decimals: Int!
|
|
661
|
+
|
|
662
|
+
"""The chain id"""
|
|
663
|
+
chainId: ChainId!
|
|
664
|
+
|
|
665
|
+
"""The wrapped version of this token"""
|
|
666
|
+
wrappedToken: EvmAddress!
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
enum OperationType {
|
|
670
|
+
BORROW
|
|
671
|
+
REPAY
|
|
672
|
+
RESERVE_USED_AS_COLLATERAL_ENABLED
|
|
673
|
+
RESERVE_USED_AS_COLLATERAL_DISABLED
|
|
674
|
+
SUPPLY
|
|
675
|
+
USER_EMODE_SET
|
|
676
|
+
WITHDRAW
|
|
677
|
+
VAULT_DEPLOYED
|
|
678
|
+
VAULT_DEPOSIT
|
|
679
|
+
VAULT_FEE_UPDATED
|
|
680
|
+
VAULT_FEE_WITHDRAWN
|
|
681
|
+
VAULT_WITHDRAW
|
|
682
|
+
VAULT_TRANSFER
|
|
683
|
+
REVENUE_SPLITTER_OWNER_DEPLOYED
|
|
684
|
+
REVENUE_SPLITTER_OWNER_TRANSFER
|
|
685
|
+
LIQUIDATION
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
enum OrderDirection {
|
|
689
|
+
ASC
|
|
690
|
+
DESC
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
enum PageSize {
|
|
694
|
+
TEN
|
|
695
|
+
FIFTY
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
type PaginatedResultInfo {
|
|
699
|
+
"""The cursor to the previous page of results, if any."""
|
|
700
|
+
prev: Cursor
|
|
701
|
+
|
|
702
|
+
"""The cursor to the next page of results, if any."""
|
|
703
|
+
next: Cursor
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
"""Paginated result of user transaction history."""
|
|
707
|
+
type PaginatedUserTransactionHistoryResult {
|
|
708
|
+
"""List of user transaction items."""
|
|
709
|
+
items: [UserTransactionItem!]!
|
|
710
|
+
|
|
711
|
+
"""Pagination information."""
|
|
712
|
+
pageInfo: PaginatedResultInfo!
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
type PaginatedVaultUserTransactionHistoryResult {
|
|
716
|
+
items: [VaultUserTransactionItem!]!
|
|
717
|
+
pageInfo: PaginatedResultInfo!
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
type PaginatedVaultsResult {
|
|
721
|
+
items: [Vault!]!
|
|
722
|
+
pageInfo: PaginatedResultInfo!
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
type PercentValue {
|
|
726
|
+
"""The raw none normalized percentage (the value that lives onchain)"""
|
|
727
|
+
raw: BigInt!
|
|
728
|
+
|
|
729
|
+
"""The decimals representing the precision of the onchain raw value"""
|
|
730
|
+
decimals: Int!
|
|
731
|
+
|
|
732
|
+
"""The normalized percentage (1.0 = 100%)"""
|
|
733
|
+
value: BigDecimal!
|
|
734
|
+
|
|
735
|
+
"""
|
|
736
|
+
The human-readable formatted value you can render on a UI straight away.
|
|
737
|
+
For example, this will turn \`0.01232343\` to \`1.23\`, it will always round to \`2\` decimal points.
|
|
738
|
+
"""
|
|
739
|
+
formatted: BigDecimal!
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
input PermitRequest {
|
|
743
|
+
"""The spender (when doing this with aave this is the market address)"""
|
|
744
|
+
spender: EvmAddress!
|
|
745
|
+
|
|
746
|
+
"""The token you want to do the permit with"""
|
|
747
|
+
currency: EvmAddress!
|
|
748
|
+
|
|
749
|
+
"""
|
|
750
|
+
The amount to permit - in human-readable form aka 0.001 eth is 0.001 eth here
|
|
751
|
+
"""
|
|
752
|
+
amount: BigDecimal!
|
|
753
|
+
|
|
754
|
+
"""The chain id the pool is deployed on"""
|
|
755
|
+
chainId: ChainId!
|
|
756
|
+
|
|
757
|
+
"""The owner of the funds"""
|
|
758
|
+
owner: EvmAddress!
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
type PermitTypedDataResponse {
|
|
762
|
+
types: TypeDefinition!
|
|
763
|
+
primaryType: String!
|
|
764
|
+
domain: DomainData!
|
|
765
|
+
message: MessageData!
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
input PreviewAction @oneOf {
|
|
769
|
+
supply: SupplyRequest
|
|
770
|
+
borrow: BorrowRequest
|
|
771
|
+
repay: RepayRequest
|
|
772
|
+
withdraw: WithdrawRequest
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
type Query {
|
|
776
|
+
"""Get if the API is healthy"""
|
|
777
|
+
health: Boolean!
|
|
778
|
+
|
|
779
|
+
"""Chains the protocol supports"""
|
|
780
|
+
chains(filter: ChainsFilter! = ALL): [Chain!]!
|
|
781
|
+
|
|
782
|
+
"""
|
|
783
|
+
Deposits assets (underlying tokens or its related aTokens) into the vault and mints a corresponding amount of vault shares to the receiver.
|
|
784
|
+
"""
|
|
785
|
+
vaultDeposit(request: VaultDepositRequest!): ExecutionPlan!
|
|
786
|
+
|
|
787
|
+
"""
|
|
788
|
+
Redeems shares (vault shares) for the underlying assets or a tokens, which are sent to the receiver. The shares are burned from the owner.
|
|
789
|
+
"""
|
|
790
|
+
vaultRedeemShares(request: VaultRedeemSharesRequest!): TransactionRequest!
|
|
791
|
+
|
|
792
|
+
"""Get a vault"""
|
|
793
|
+
vault(request: VaultRequest!): Vault
|
|
794
|
+
|
|
795
|
+
"""Get vaults"""
|
|
796
|
+
vaults(request: VaultsRequest!): PaginatedVaultsResult!
|
|
797
|
+
|
|
798
|
+
"""User vaults they have shares in"""
|
|
799
|
+
userVaults(request: UserVaultsRequest!): PaginatedVaultsResult!
|
|
800
|
+
|
|
801
|
+
"""Deploy a vault and earn fees from the yield"""
|
|
802
|
+
vaultDeploy(request: VaultDeployRequest!): ExecutionPlan!
|
|
803
|
+
|
|
804
|
+
"""
|
|
805
|
+
Update a vault's fee. You MUST be the owner of the vault to send this tx request.
|
|
806
|
+
"""
|
|
807
|
+
vaultSetFee(request: VaultSetFeeRequest!): TransactionRequest!
|
|
808
|
+
|
|
809
|
+
"""
|
|
810
|
+
Withdraws accumulated fees from the specified vault. You MUST be the owner of the vault to send this tx request.
|
|
811
|
+
"""
|
|
812
|
+
vaultWithdrawFees(request: VaultWithdrawFeesRequest!): TransactionRequest!
|
|
813
|
+
|
|
814
|
+
"""User vault transaction history"""
|
|
815
|
+
vaultUserTransactionHistory(request: VaultUserTransactionHistoryRequest!): PaginatedVaultUserTransactionHistoryResult!
|
|
816
|
+
|
|
817
|
+
"""
|
|
818
|
+
Vault user activity for a given vault and user, within a specified time window.
|
|
819
|
+
"""
|
|
820
|
+
vaultUserActivity(request: VaultUserActivityRequest!): VaultUserActivityResult!
|
|
821
|
+
|
|
822
|
+
"""
|
|
823
|
+
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.
|
|
824
|
+
"""
|
|
825
|
+
vaultWithdraw(request: VaultWithdrawRequest!): TransactionRequest!
|
|
826
|
+
|
|
827
|
+
"""
|
|
828
|
+
Mints an exact amount of shares (vault shares) to the receiver by depositing the calculated amount of underlying or aTokens assets.
|
|
829
|
+
"""
|
|
830
|
+
vaultMintShares(request: VaultMintSharesRequest!): ExecutionPlan!
|
|
831
|
+
|
|
832
|
+
"""
|
|
833
|
+
This will return you the amount of shares that would be minted to the receiver
|
|
834
|
+
"""
|
|
835
|
+
vaultPreviewDeposit(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
836
|
+
|
|
837
|
+
"""
|
|
838
|
+
This will return you the amount of assets that would be deposited by the caller
|
|
839
|
+
"""
|
|
840
|
+
vaultPreviewMint(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
841
|
+
|
|
842
|
+
"""
|
|
843
|
+
This will return you the number of shares burnt based on the amount of assets you want to withdraw
|
|
844
|
+
"""
|
|
845
|
+
vaultPreviewWithdraw(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
846
|
+
|
|
847
|
+
"""
|
|
848
|
+
This will return you the amount of assets that would be withdrawn by the receiver.
|
|
849
|
+
"""
|
|
850
|
+
vaultPreviewRedeem(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
851
|
+
|
|
852
|
+
"""
|
|
853
|
+
Update a vault owner. You MUST be the owner of the vault to send this tx request.
|
|
854
|
+
"""
|
|
855
|
+
vaultTransferOwnership(request: VaultTransferOwnershipRequest!): TransactionRequest!
|
|
856
|
+
|
|
857
|
+
"""
|
|
858
|
+
Deploy a new recipients configuration contract for fee distribution.
|
|
859
|
+
You MUST be the owner of the vault to send this tx request.
|
|
860
|
+
"""
|
|
861
|
+
vaultCreateRecipientsConfiguration(request: VaultCreateRecipientsConfigurationRequest!): TransactionRequest!
|
|
862
|
+
|
|
863
|
+
"""
|
|
864
|
+
Set the recipients configuration for the vault. You MUST be the owner of the vault to send this tx request.
|
|
865
|
+
"""
|
|
866
|
+
vaultSetRecipientsConfiguration(request: VaultSetRecipientsConfigurationRequest!): TransactionRequest!
|
|
867
|
+
|
|
868
|
+
"""Get a vault recipients configuration"""
|
|
869
|
+
vaultRecipientConfiguration(request: VaultRecipientConfigurationRequest!): VaultFeesRecipientsConfiguration
|
|
870
|
+
|
|
871
|
+
"""Lists all the markets"""
|
|
872
|
+
markets(request: MarketsRequest!): [Market!]!
|
|
873
|
+
|
|
874
|
+
"""Get a market"""
|
|
875
|
+
market(request: MarketRequest!): Market
|
|
876
|
+
|
|
877
|
+
"""Create the transaction to borrow from a market"""
|
|
878
|
+
borrow(request: BorrowRequest!): ExecutionPlan!
|
|
879
|
+
|
|
880
|
+
"""Approve a credit borrow delegator to be able to borrow on your behalf"""
|
|
881
|
+
approveBorrowCreditDelegation(request: ApproveBorrowCreditDelegatorRequest!): TransactionRequest!
|
|
882
|
+
|
|
883
|
+
"""
|
|
884
|
+
Gets the amount delegated to the credit delegatee that can borrow on your behalf
|
|
885
|
+
"""
|
|
886
|
+
creditDelegateeAllowance(request: CreditDelegateeAmountRequest!): TokenAmount!
|
|
887
|
+
|
|
888
|
+
"""Create the transaction to supply to a market"""
|
|
889
|
+
supply(request: SupplyRequest!): ExecutionPlan!
|
|
890
|
+
|
|
891
|
+
"""Create the transaction to repay to a market"""
|
|
892
|
+
repay(request: RepayRequest!): ExecutionPlan!
|
|
893
|
+
|
|
894
|
+
"""Create the transaction to withdraw from a market"""
|
|
895
|
+
withdraw(request: WithdrawRequest!): ExecutionPlan!
|
|
896
|
+
|
|
897
|
+
"""Create the transaction to toggle eMode for a market"""
|
|
898
|
+
userSetEmode(request: UserSetEmodeRequest!): TransactionRequest!
|
|
899
|
+
|
|
900
|
+
"""Enable/disable a specific supplied asset as collateral"""
|
|
901
|
+
collateralToggle(request: CollateralToggleRequest!): TransactionRequest!
|
|
902
|
+
|
|
903
|
+
"""
|
|
904
|
+
liquidate a non-healthy position collateral-wise, with Health Factor below 1
|
|
905
|
+
"""
|
|
906
|
+
liquidate(request: LiquidateRequest!): TransactionRequest!
|
|
907
|
+
|
|
908
|
+
"""Returns the user account market data across all the reserves."""
|
|
909
|
+
userMarketState(request: UserMarketStateRequest!): MarketUserState!
|
|
910
|
+
|
|
911
|
+
"""The usd exchange rates for different tokens on a given market"""
|
|
912
|
+
usdExchangeRates(request: UsdExchangeRatesRequest!): [UsdExchangeRate!]!
|
|
913
|
+
|
|
914
|
+
"""Get all the user borrows positions"""
|
|
915
|
+
userBorrows(request: UserBorrowsRequest!): [MarketUserReserveBorrowPosition!]!
|
|
916
|
+
|
|
917
|
+
"""Get all the user supplies positions"""
|
|
918
|
+
userSupplies(request: UserSuppliesRequest!): [MarketUserReserveSupplyPosition!]!
|
|
919
|
+
|
|
920
|
+
"""Get the borrow APY history"""
|
|
921
|
+
borrowAPYHistory(request: BorrowAPYHistoryRequest!): [APYSample!]!
|
|
922
|
+
|
|
923
|
+
"""Get the supply APY history"""
|
|
924
|
+
supplyAPYHistory(request: SupplyAPYHistoryRequest!): [APYSample!]!
|
|
925
|
+
|
|
926
|
+
"""Generate EIP-712 typed data for EIP-2612 permit signature"""
|
|
927
|
+
permitTypedData(request: PermitRequest!): PermitTypedDataResponse!
|
|
928
|
+
|
|
929
|
+
"""Get the reserve for on a market"""
|
|
930
|
+
reserve(request: ReserveRequest!): Reserve
|
|
931
|
+
|
|
932
|
+
"""The user's market transaction history"""
|
|
933
|
+
userTransactionHistory(request: UserTransactionHistoryRequest!): PaginatedUserTransactionHistoryResult!
|
|
934
|
+
|
|
935
|
+
"""
|
|
936
|
+
This lets you know the API has processed the known transaction hash, as the API uses caching to make things as fast
|
|
937
|
+
as possible, it has an invalidation task, so sometimes if the receipt is complete, we may still (rarely) serve
|
|
938
|
+
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.
|
|
939
|
+
Note the invalidation is very quick, and most of the time it's present even before your receipt is returned this is to
|
|
940
|
+
cater for the race condition.
|
|
941
|
+
"""
|
|
942
|
+
hasProcessedKnownTransaction(request: HasProcessedKnownTransactionRequest!): Boolean!
|
|
943
|
+
healthFactorPreview(request: HealthFactorPreviewRequest!): HealthFactorPreviewResponse!
|
|
944
|
+
|
|
945
|
+
"""Top up a balance for a user or yourself on the fork"""
|
|
946
|
+
forkTopUp(request: ForkTopUpRequest!): ForkTopUpResponse!
|
|
947
|
+
|
|
948
|
+
"""
|
|
949
|
+
The user merits reward information and transaction if you wish to claim
|
|
950
|
+
"""
|
|
951
|
+
userMeritRewards(request: UserMeritRewardsRequest!): UserMeritRewards
|
|
952
|
+
|
|
953
|
+
"""
|
|
954
|
+
Users saving GHO balance - note rewards are not paid out live onchain they paid out with the merit schema,
|
|
955
|
+
this can be claimed using \`userMeritRewards\`
|
|
956
|
+
"""
|
|
957
|
+
savingsGhoBalance(request: SavingsGhoBalanceRequest!): TokenAmount!
|
|
958
|
+
|
|
959
|
+
"""Deposit into savings GHO"""
|
|
960
|
+
savingsGhoDeposit(request: SavingsGhoDepositRequest!): ExecutionPlan!
|
|
961
|
+
|
|
962
|
+
"""Withdraw sGHO (savings GHO) back to GHO"""
|
|
963
|
+
savingsGhoWithdraw(request: SavingsGhoWithdrawRequest!): ExecutionPlan!
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
input RepayAmountInput @oneOf {
|
|
967
|
+
"""The native amount"""
|
|
968
|
+
native: BigDecimal
|
|
969
|
+
|
|
970
|
+
"""The erc20 amount input"""
|
|
971
|
+
erc20: RepayErc20AmountInput
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
input RepayErc20Amount @oneOf {
|
|
975
|
+
"""
|
|
976
|
+
Exact amount to repay
|
|
977
|
+
Token value in its main unit (e.g., 1.5 GHO), not in the smallest fraction (e.g., wei).
|
|
978
|
+
"""
|
|
979
|
+
exact: BigDecimal
|
|
980
|
+
|
|
981
|
+
"""Repay all the amount completely"""
|
|
982
|
+
max: AlwaysTrue
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
input RepayErc20AmountInput {
|
|
986
|
+
"""The token address."""
|
|
987
|
+
currency: EvmAddress!
|
|
988
|
+
|
|
989
|
+
"""The amount to repay"""
|
|
990
|
+
value: RepayErc20Amount!
|
|
991
|
+
|
|
992
|
+
"""
|
|
993
|
+
The signed ERC20 permit message to operate on the relevant token without the need for an ERC20 Approval transaction.
|
|
994
|
+
"""
|
|
995
|
+
permitSig: ERC712Signature
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
input RepayRequest {
|
|
999
|
+
"""The market pool address"""
|
|
1000
|
+
market: EvmAddress!
|
|
1001
|
+
|
|
1002
|
+
"""
|
|
1003
|
+
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
|
|
1004
|
+
"""
|
|
1005
|
+
amount: RepayAmountInput!
|
|
1006
|
+
|
|
1007
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1008
|
+
sender: EvmAddress!
|
|
1009
|
+
|
|
1010
|
+
"""
|
|
1011
|
+
If not supplied, this will use \`sender\`. 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
|
|
1012
|
+
"""
|
|
1013
|
+
onBehalfOf: EvmAddress
|
|
1014
|
+
|
|
1015
|
+
"""The chain id"""
|
|
1016
|
+
chainId: ChainId!
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
type Reserve {
|
|
1020
|
+
"""The market information the reserve is under"""
|
|
1021
|
+
market: MarketInfo!
|
|
1022
|
+
|
|
1023
|
+
"""The reserve underlying currency"""
|
|
1024
|
+
underlyingToken: Currency!
|
|
1025
|
+
|
|
1026
|
+
"""The reserve a token"""
|
|
1027
|
+
aToken: Currency!
|
|
1028
|
+
|
|
1029
|
+
"""The reserve v token"""
|
|
1030
|
+
vToken: Currency!
|
|
1031
|
+
|
|
1032
|
+
"""
|
|
1033
|
+
If the reserve accepts native currency, for example, if you're on a reserve with asset WETH, it can
|
|
1034
|
+
also accept ETH
|
|
1035
|
+
"""
|
|
1036
|
+
acceptsNative: NativeCurrency
|
|
1037
|
+
|
|
1038
|
+
"""The reserve size"""
|
|
1039
|
+
size: TokenAmount!
|
|
1040
|
+
|
|
1041
|
+
"""The usd exchange rate for the underlying token"""
|
|
1042
|
+
usdExchangeRate: BigDecimal!
|
|
1043
|
+
|
|
1044
|
+
"""The usd oracle address it is pulling that price from"""
|
|
1045
|
+
usdOracleAddress: EvmAddress!
|
|
1046
|
+
|
|
1047
|
+
"""The supply info for the reserve"""
|
|
1048
|
+
supplyInfo: ReserveSupplyInfo!
|
|
1049
|
+
|
|
1050
|
+
"""
|
|
1051
|
+
The borrow info for the reserve - if its null the underlying token cannot be borrowed
|
|
1052
|
+
"""
|
|
1053
|
+
borrowInfo: ReserveBorrowInfo
|
|
1054
|
+
|
|
1055
|
+
"""The reserve has been frozen all actions are stopped"""
|
|
1056
|
+
isFrozen: Boolean!
|
|
1057
|
+
|
|
1058
|
+
"""The reserve is paused you can still withdraw and some other actions"""
|
|
1059
|
+
isPaused: Boolean!
|
|
1060
|
+
|
|
1061
|
+
"""
|
|
1062
|
+
If the reserve supports isolation mode this is defined and the configs are defined
|
|
1063
|
+
"""
|
|
1064
|
+
isolationModeConfig: ReserveIsolationModeConfig
|
|
1065
|
+
|
|
1066
|
+
"""If the reserve can use flash loans on it"""
|
|
1067
|
+
flashLoanEnabled: Boolean!
|
|
1068
|
+
|
|
1069
|
+
"""The interest rate strategy address"""
|
|
1070
|
+
interestRateStrategyAddress: EvmAddress!
|
|
1071
|
+
|
|
1072
|
+
"""Does the underlying reserve support permit"""
|
|
1073
|
+
permitSupported: Boolean!
|
|
1074
|
+
|
|
1075
|
+
"""
|
|
1076
|
+
This exposes the extra incentives you can earn from third parties (Merit) or from
|
|
1077
|
+
incentives set by governance through the RewardsController.
|
|
1078
|
+
Note Aave Labs does not guarantee third party program and accepts no liability to those
|
|
1079
|
+
"""
|
|
1080
|
+
incentives: [ReserveIncentive!]!
|
|
1081
|
+
|
|
1082
|
+
"""The emode information for the reserve"""
|
|
1083
|
+
eModeInfo: [EmodeReserveInfo!]!
|
|
1084
|
+
|
|
1085
|
+
"""Get the user state on the reserve"""
|
|
1086
|
+
userState: ReserveUserState
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
type ReserveBorrowInfo {
|
|
1090
|
+
"""The annual percentage yield for borrowing this asset"""
|
|
1091
|
+
apy: PercentValue!
|
|
1092
|
+
|
|
1093
|
+
"""The total amount borrowed from this reserve"""
|
|
1094
|
+
total: TokenAmount!
|
|
1095
|
+
|
|
1096
|
+
"""The reserve factor percentage"""
|
|
1097
|
+
reserveFactor: PercentValue!
|
|
1098
|
+
|
|
1099
|
+
"""The available liquidity"""
|
|
1100
|
+
availableLiquidity: TokenAmount!
|
|
1101
|
+
|
|
1102
|
+
"""The reserve utilization rate"""
|
|
1103
|
+
utilizationRate: PercentValue!
|
|
1104
|
+
|
|
1105
|
+
"""
|
|
1106
|
+
Variable rate slope 1 - the rate of interest increase when utilization rate is below optimal
|
|
1107
|
+
This is the slope of the interest rate curve in the first segment (0% to optimal utilization)
|
|
1108
|
+
"""
|
|
1109
|
+
variableRateSlope1: PercentValue!
|
|
1110
|
+
|
|
1111
|
+
"""
|
|
1112
|
+
Variable rate slope 2 - the rate of interest increase when utilization rate is above optimal
|
|
1113
|
+
This is the slope of the interest rate curve in the second segment (optimal to 100% utilization)
|
|
1114
|
+
Typically much steeper than slope1 to discourage over-utilization
|
|
1115
|
+
"""
|
|
1116
|
+
variableRateSlope2: PercentValue!
|
|
1117
|
+
|
|
1118
|
+
"""
|
|
1119
|
+
The optimal usage rate - the utilization rate at which the variable rate curve transitions
|
|
1120
|
+
from slope1 to slope2. This represents the target utilization rate for the reserve
|
|
1121
|
+
"""
|
|
1122
|
+
optimalUsageRate: PercentValue!
|
|
1123
|
+
|
|
1124
|
+
"""
|
|
1125
|
+
Borrowing can have different states based on the criteria of the user or the market
|
|
1126
|
+
"""
|
|
1127
|
+
borrowingState: ReserveBorrowingState!
|
|
1128
|
+
|
|
1129
|
+
"""The borrow cap of the reserve"""
|
|
1130
|
+
borrowCap: TokenAmount!
|
|
1131
|
+
|
|
1132
|
+
"""The borrow cap is now full"""
|
|
1133
|
+
borrowCapReached: Boolean!
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
enum ReserveBorrowingState {
|
|
1137
|
+
"""Borrowing is enabled"""
|
|
1138
|
+
ENABLED
|
|
1139
|
+
|
|
1140
|
+
"""Borrowing is disabled"""
|
|
1141
|
+
DISABLED
|
|
1142
|
+
|
|
1143
|
+
"""The user emode settings make this underlying not able to be borrowed"""
|
|
1144
|
+
USER_EMODE_DISABLED_BORROW
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
union ReserveIncentive = MeritSupplyIncentive | MeritBorrowIncentive | MeritBorrowAndSupplyIncentiveCondition | AaveSupplyIncentive | AaveBorrowIncentive
|
|
1148
|
+
|
|
1149
|
+
type ReserveInfo {
|
|
1150
|
+
"""The market information the reserve is under"""
|
|
1151
|
+
market: MarketInfo!
|
|
1152
|
+
|
|
1153
|
+
"""The reserve underlying currency"""
|
|
1154
|
+
underlyingToken: Currency!
|
|
1155
|
+
|
|
1156
|
+
"""The reserve a token"""
|
|
1157
|
+
aToken: Currency!
|
|
1158
|
+
|
|
1159
|
+
"""The reserve v token"""
|
|
1160
|
+
vToken: Currency!
|
|
1161
|
+
|
|
1162
|
+
"""The usd exchange rate for the underlying token"""
|
|
1163
|
+
usdExchangeRate: BigDecimal!
|
|
1164
|
+
|
|
1165
|
+
"""Does the underlying reserve support permit"""
|
|
1166
|
+
permitSupported: Boolean!
|
|
1167
|
+
|
|
1168
|
+
"""
|
|
1169
|
+
This exposes the extra incentives you can earn from third parties (Merit) or from
|
|
1170
|
+
incentives set by governance through the RewardsController.
|
|
1171
|
+
Note Aave Labs does not guarantee third party program and accepts no liability to those
|
|
1172
|
+
"""
|
|
1173
|
+
incentives: [ReserveIncentive!]!
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
type ReserveIsolationModeConfig {
|
|
1177
|
+
"""This means that it can be used to borrow"""
|
|
1178
|
+
canBeCollateral: Boolean!
|
|
1179
|
+
canBeBorrowed: Boolean!
|
|
1180
|
+
debtCeiling: TokenAmount!
|
|
1181
|
+
|
|
1182
|
+
"""The decimals used for the debt ceiling"""
|
|
1183
|
+
debtCeilingDecimals: Int!
|
|
1184
|
+
|
|
1185
|
+
"""Only the amount that is borrowed by the users in isolation"""
|
|
1186
|
+
totalBorrows: TokenAmount!
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
input ReserveRequest {
|
|
1190
|
+
"""The pool address for the market"""
|
|
1191
|
+
market: EvmAddress!
|
|
1192
|
+
|
|
1193
|
+
"""The underlying token for the reserve"""
|
|
1194
|
+
underlyingToken: EvmAddress!
|
|
1195
|
+
|
|
1196
|
+
"""The chain id the pool is deployed on"""
|
|
1197
|
+
chainId: ChainId!
|
|
1198
|
+
|
|
1199
|
+
"""
|
|
1200
|
+
The user viewing it (can be connected wallet) - this caters for stuff like eMode and other
|
|
1201
|
+
user features
|
|
1202
|
+
"""
|
|
1203
|
+
user: EvmAddress
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
type ReserveSupplyInfo {
|
|
1207
|
+
"""The annual percentage yield for supplying this asset"""
|
|
1208
|
+
apy: PercentValue!
|
|
1209
|
+
|
|
1210
|
+
"""The maximum loan-to-value ratio when used as collateral"""
|
|
1211
|
+
maxLTV: PercentValue!
|
|
1212
|
+
|
|
1213
|
+
"""The liquidation threshold for this asset"""
|
|
1214
|
+
liquidationThreshold: PercentValue!
|
|
1215
|
+
|
|
1216
|
+
"""The liquidation bonus applied when liquidated"""
|
|
1217
|
+
liquidationBonus: PercentValue!
|
|
1218
|
+
|
|
1219
|
+
"""If the asset can be used for collateral"""
|
|
1220
|
+
canBeCollateral: Boolean!
|
|
1221
|
+
|
|
1222
|
+
"""The supply cap"""
|
|
1223
|
+
supplyCap: TokenAmount!
|
|
1224
|
+
|
|
1225
|
+
"""The supply cap is now full"""
|
|
1226
|
+
supplyCapReached: Boolean!
|
|
1227
|
+
|
|
1228
|
+
"""The total amount supplied to this reserve"""
|
|
1229
|
+
total: DecimalValue!
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
type ReserveUserState {
|
|
1233
|
+
"""The user's balance of this asset"""
|
|
1234
|
+
balance: TokenAmount!
|
|
1235
|
+
|
|
1236
|
+
"""The amount the user can supply to this reserve"""
|
|
1237
|
+
suppliable: TokenAmount!
|
|
1238
|
+
|
|
1239
|
+
"""The amount the user can borrow from this reserve"""
|
|
1240
|
+
borrowable: TokenAmount!
|
|
1241
|
+
|
|
1242
|
+
"""The user emode info if enabled"""
|
|
1243
|
+
emode: EmodeReserveInfo
|
|
1244
|
+
|
|
1245
|
+
"""
|
|
1246
|
+
If the user is in a state to be able to supply taking into consideration their emode
|
|
1247
|
+
"""
|
|
1248
|
+
canBeCollateral: Boolean!
|
|
1249
|
+
|
|
1250
|
+
"""If the user is in a state to be able to borrow from the reserve"""
|
|
1251
|
+
canBeBorrowed: Boolean!
|
|
1252
|
+
|
|
1253
|
+
"""Is the user in isolation mode"""
|
|
1254
|
+
isInIsolationMode: Boolean!
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
input SavingsGhoBalanceRequest {
|
|
1258
|
+
"""The user to query the savings GHO balance"""
|
|
1259
|
+
user: EvmAddress!
|
|
1260
|
+
|
|
1261
|
+
"""The chain id - savings GHO for now only works on Ethereum"""
|
|
1262
|
+
chainId: ChainId
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
input SavingsGhoDepositRequest {
|
|
1266
|
+
"""The details of the amounts to deposit."""
|
|
1267
|
+
amount: SayingsGhoDepositAmountInput!
|
|
1268
|
+
|
|
1269
|
+
"""The user who is depositing"""
|
|
1270
|
+
depositor: EvmAddress!
|
|
1271
|
+
|
|
1272
|
+
"""
|
|
1273
|
+
The address to which saving GHO shares will be minted to - defaults to \`depositor\`.
|
|
1274
|
+
"""
|
|
1275
|
+
recipient: EvmAddress
|
|
1276
|
+
|
|
1277
|
+
"""The chain id - savings GHO for now only works on Ethereum"""
|
|
1278
|
+
chainId: ChainId
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
input SavingsGhoWithdrawAmount @oneOf {
|
|
1282
|
+
"""Exact amount to withdraw"""
|
|
1283
|
+
exact: BigDecimal
|
|
1284
|
+
|
|
1285
|
+
"""Withdraw all"""
|
|
1286
|
+
max: AlwaysTrue
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
input SavingsGhoWithdrawRequest {
|
|
1290
|
+
"""The amount of GHO to withdraw."""
|
|
1291
|
+
amount: SavingsGhoWithdrawAmount!
|
|
1292
|
+
|
|
1293
|
+
"""
|
|
1294
|
+
The address from which saving GHO shares will be burned in return for GHO (normally your own wallet).
|
|
1295
|
+
"""
|
|
1296
|
+
sharesOwner: EvmAddress!
|
|
1297
|
+
|
|
1298
|
+
"""The address to which GHO will be minted to - defaults to \`depositor\`."""
|
|
1299
|
+
recipient: EvmAddress
|
|
1300
|
+
|
|
1301
|
+
"""The chain id - savings GHO for now only works on Ethereum"""
|
|
1302
|
+
chainId: ChainId
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
input SayingsGhoDepositAmountInput {
|
|
1306
|
+
"""The amount of GHO to deposit"""
|
|
1307
|
+
value: BigDecimal!
|
|
1308
|
+
|
|
1309
|
+
"""
|
|
1310
|
+
The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
|
|
1311
|
+
"""
|
|
1312
|
+
permitSig: ERC712Signature
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
scalar Signature
|
|
1316
|
+
|
|
1317
|
+
input SupplyAPYHistoryRequest {
|
|
1318
|
+
"""The market pool address"""
|
|
1319
|
+
market: EvmAddress!
|
|
1320
|
+
|
|
1321
|
+
"""The underlying token for the reserve"""
|
|
1322
|
+
underlyingToken: EvmAddress!
|
|
1323
|
+
|
|
1324
|
+
"""The time windows for the history"""
|
|
1325
|
+
window: TimeWindow!
|
|
1326
|
+
|
|
1327
|
+
"""The chain id"""
|
|
1328
|
+
chainId: ChainId!
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
input SupplyRequest {
|
|
1332
|
+
"""The market pool address"""
|
|
1333
|
+
market: EvmAddress!
|
|
1334
|
+
|
|
1335
|
+
"""The amount supplying"""
|
|
1336
|
+
amount: AmountInput!
|
|
1337
|
+
|
|
1338
|
+
"""The user sending the transaction (normally the users wallet address)"""
|
|
1339
|
+
sender: EvmAddress!
|
|
1340
|
+
|
|
1341
|
+
"""
|
|
1342
|
+
If not supplied, this will use \`sender\`. The address that will receive the corresponding aTokens. This is the only address that will be able to withdraw the asset from the pool.
|
|
1343
|
+
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
|
|
1344
|
+
of aTokens is a different wallet
|
|
1345
|
+
"""
|
|
1346
|
+
onBehalfOf: EvmAddress
|
|
1347
|
+
|
|
1348
|
+
"""The chain id"""
|
|
1349
|
+
chainId: ChainId!
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
enum TimeWindow {
|
|
1353
|
+
LAST_DAY
|
|
1354
|
+
LAST_WEEK
|
|
1355
|
+
LAST_MONTH
|
|
1356
|
+
LAST_SIX_MONTHS
|
|
1357
|
+
LAST_YEAR
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
type TokenAmount {
|
|
1361
|
+
usdPerToken: BigDecimal!
|
|
1362
|
+
|
|
1363
|
+
"""The amount"""
|
|
1364
|
+
amount: DecimalValue!
|
|
1365
|
+
|
|
1366
|
+
"""The usd full amount"""
|
|
1367
|
+
usd: BigDecimal!
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
"""
|
|
1371
|
+
Represents a transaction that must be executed, such as a direct supply, borrow, etc.
|
|
1372
|
+
"""
|
|
1373
|
+
type TransactionRequest {
|
|
1374
|
+
"""Who the transaction is going to (normally a contract)"""
|
|
1375
|
+
to: EvmAddress!
|
|
1376
|
+
|
|
1377
|
+
"""Who is sending the transaction"""
|
|
1378
|
+
from: EvmAddress!
|
|
1379
|
+
|
|
1380
|
+
"""The blockchain transaction encoded data"""
|
|
1381
|
+
data: BlockchainData!
|
|
1382
|
+
|
|
1383
|
+
"""The native token value"""
|
|
1384
|
+
value: BigInt!
|
|
1385
|
+
|
|
1386
|
+
"""The chain id"""
|
|
1387
|
+
chainId: ChainId!
|
|
1388
|
+
|
|
1389
|
+
"""
|
|
1390
|
+
The primary well-known operation the transaction is - you use this to track hasProcessedKnownTransaction
|
|
1391
|
+
If null the API does not track/require the outcome - once receipt is done, everything is ready to go
|
|
1392
|
+
"""
|
|
1393
|
+
operation: OperationType
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
scalar TxHash
|
|
1397
|
+
|
|
1398
|
+
type TypeDefinition {
|
|
1399
|
+
EIP712Domain: [TypeField!]!
|
|
1400
|
+
Permit: [TypeField!]!
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
type TypeField {
|
|
1404
|
+
name: String!
|
|
1405
|
+
type: String!
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
scalar URL
|
|
1409
|
+
|
|
1410
|
+
type UsdExchangeRate {
|
|
1411
|
+
currency: Currency!
|
|
1412
|
+
rate: BigDecimal!
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
input UsdExchangeRatesRequest {
|
|
1416
|
+
"""The pool address for the market"""
|
|
1417
|
+
market: EvmAddress!
|
|
1418
|
+
|
|
1419
|
+
"""The underlying tokens for the reserve"""
|
|
1420
|
+
underlyingTokens: [EvmAddress!]!
|
|
1421
|
+
|
|
1422
|
+
"""The chain id"""
|
|
1423
|
+
chainId: ChainId!
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
"""A transaction where the user borrowed assets from a reserve."""
|
|
1427
|
+
type UserBorrowTransaction {
|
|
1428
|
+
"""Amount borrowed."""
|
|
1429
|
+
amount: TokenAmount!
|
|
1430
|
+
|
|
1431
|
+
"""Reserve from which assets were borrowed."""
|
|
1432
|
+
reserve: ReserveInfo!
|
|
1433
|
+
|
|
1434
|
+
"""URL to view the transaction on a block explorer."""
|
|
1435
|
+
blockExplorerUrl: String!
|
|
1436
|
+
|
|
1437
|
+
"""Transaction hash."""
|
|
1438
|
+
txHash: TxHash!
|
|
1439
|
+
|
|
1440
|
+
"""Timestamp of the transaction."""
|
|
1441
|
+
timestamp: DateTime!
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
input UserBorrowsRequest {
|
|
1445
|
+
"""The market addresses and chains ids to query"""
|
|
1446
|
+
markets: [MarketInput!]!
|
|
1447
|
+
|
|
1448
|
+
"""The user address to get borrow positions for"""
|
|
1449
|
+
user: EvmAddress!
|
|
1450
|
+
|
|
1451
|
+
"""How to order the results"""
|
|
1452
|
+
orderBy: UserBorrowsRequestOrderBy! = {name: ASC}
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
input UserBorrowsRequestOrderBy @oneOf {
|
|
1456
|
+
"""Order by the user's debt amount"""
|
|
1457
|
+
debt: OrderDirection
|
|
1458
|
+
|
|
1459
|
+
"""Order by the asset name"""
|
|
1460
|
+
name: OrderDirection
|
|
1461
|
+
|
|
1462
|
+
"""Order by the annual percentage yield"""
|
|
1463
|
+
apy: OrderDirection
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
"""A transaction where the user was involved in a liquidation call."""
|
|
1467
|
+
type UserLiquidationCallTransaction {
|
|
1468
|
+
"""Collateral liquidated."""
|
|
1469
|
+
collateral: LiquidationCollateral!
|
|
1470
|
+
|
|
1471
|
+
"""Debt repaid."""
|
|
1472
|
+
debtRepaid: LiquidationRepaidDebt!
|
|
1473
|
+
|
|
1474
|
+
"""URL to view the transaction on a block explorer."""
|
|
1475
|
+
blockExplorerUrl: String!
|
|
1476
|
+
|
|
1477
|
+
"""Transaction hash."""
|
|
1478
|
+
txHash: TxHash!
|
|
1479
|
+
|
|
1480
|
+
"""Timestamp of the transaction."""
|
|
1481
|
+
timestamp: DateTime!
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
input UserMarketStateRequest {
|
|
1485
|
+
"""The pool address for the market"""
|
|
1486
|
+
market: EvmAddress!
|
|
1487
|
+
|
|
1488
|
+
"""The user to toggle emode on"""
|
|
1489
|
+
user: EvmAddress!
|
|
1490
|
+
|
|
1491
|
+
"""The chain id"""
|
|
1492
|
+
chainId: ChainId!
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
type UserMeritRewards {
|
|
1496
|
+
"""The chain the transaction is on"""
|
|
1497
|
+
chain: ChainId!
|
|
1498
|
+
|
|
1499
|
+
"""
|
|
1500
|
+
The reward tokens being claimed in the transaction - this is aggregated
|
|
1501
|
+
"""
|
|
1502
|
+
claimable: [ClaimableMeritReward!]!
|
|
1503
|
+
|
|
1504
|
+
"""The transaction to execute to claim the rewards"""
|
|
1505
|
+
transaction: TransactionRequest!
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
input UserMeritRewardsFilter {
|
|
1509
|
+
"""If you only care about certain tokens to claim and see details of"""
|
|
1510
|
+
tokens: [EvmAddress!]
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
input UserMeritRewardsRequest {
|
|
1514
|
+
"""The user to claim with"""
|
|
1515
|
+
user: EvmAddress!
|
|
1516
|
+
|
|
1517
|
+
"""The chain id to claim on"""
|
|
1518
|
+
chainId: ChainId!
|
|
1519
|
+
filter: UserMeritRewardsFilter
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
"""A transaction where the user repaid borrowed assets."""
|
|
1523
|
+
type UserRepayTransaction {
|
|
1524
|
+
"""Amount repaid."""
|
|
1525
|
+
amount: TokenAmount!
|
|
1526
|
+
|
|
1527
|
+
"""Reserve to which assets were repaid."""
|
|
1528
|
+
reserve: ReserveInfo!
|
|
1529
|
+
|
|
1530
|
+
"""URL to view the transaction on a block explorer."""
|
|
1531
|
+
blockExplorerUrl: String!
|
|
1532
|
+
|
|
1533
|
+
"""Transaction hash."""
|
|
1534
|
+
txHash: TxHash!
|
|
1535
|
+
|
|
1536
|
+
"""Timestamp of the transaction."""
|
|
1537
|
+
timestamp: DateTime!
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
input UserSetEmodeRequest {
|
|
1541
|
+
"""The pool address for the market"""
|
|
1542
|
+
market: EvmAddress!
|
|
1543
|
+
|
|
1544
|
+
"""The user to toggle emode on"""
|
|
1545
|
+
user: EvmAddress!
|
|
1546
|
+
|
|
1547
|
+
"""
|
|
1548
|
+
The eMode category id for the market if you want to disable eMode, then pass in null
|
|
1549
|
+
"""
|
|
1550
|
+
categoryId: Int
|
|
1551
|
+
|
|
1552
|
+
"""The chain id"""
|
|
1553
|
+
chainId: ChainId!
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
input UserSuppliesRequest {
|
|
1557
|
+
"""The market addresses and chains ids to query"""
|
|
1558
|
+
markets: [MarketInput!]!
|
|
1559
|
+
|
|
1560
|
+
"""The user address to get supply positions for"""
|
|
1561
|
+
user: EvmAddress!
|
|
1562
|
+
|
|
1563
|
+
"""Only get back the supplies which can be used as collateral"""
|
|
1564
|
+
collateralsOnly: Boolean! = false
|
|
1565
|
+
|
|
1566
|
+
"""How to order the results"""
|
|
1567
|
+
orderBy: UserSuppliesRequestOrderBy! = {name: ASC}
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
input UserSuppliesRequestOrderBy @oneOf {
|
|
1571
|
+
"""Order by the user's supply balance"""
|
|
1572
|
+
balance: OrderDirection
|
|
1573
|
+
|
|
1574
|
+
"""Order by the asset name"""
|
|
1575
|
+
name: OrderDirection
|
|
1576
|
+
|
|
1577
|
+
"""Order by the annual percentage yield"""
|
|
1578
|
+
apy: OrderDirection
|
|
1579
|
+
|
|
1580
|
+
"""Order by whether the position is used as collateral"""
|
|
1581
|
+
isCollateralized: OrderDirection
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
"""A transaction where the user supplied assets to a reserve."""
|
|
1585
|
+
type UserSupplyTransaction {
|
|
1586
|
+
"""Amount supplied."""
|
|
1587
|
+
amount: TokenAmount!
|
|
1588
|
+
|
|
1589
|
+
"""Reserve to which assets were supplied."""
|
|
1590
|
+
reserve: ReserveInfo!
|
|
1591
|
+
|
|
1592
|
+
"""URL to view the transaction on a block explorer."""
|
|
1593
|
+
blockExplorerUrl: String!
|
|
1594
|
+
|
|
1595
|
+
"""Transaction hash."""
|
|
1596
|
+
txHash: TxHash!
|
|
1597
|
+
|
|
1598
|
+
"""Timestamp of the transaction."""
|
|
1599
|
+
timestamp: DateTime!
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
input UserTransactionHistoryRequest {
|
|
1603
|
+
"""The market address"""
|
|
1604
|
+
market: EvmAddress!
|
|
1605
|
+
|
|
1606
|
+
"""The filter to optionally filter the transactions by type"""
|
|
1607
|
+
filter: [UserTransactionType!]! = [SUPPLY, WITHDRAW, BORROW, REPAY, USAGE_AS_COLLATERAL, LIQUIDATION_CALL]
|
|
1608
|
+
|
|
1609
|
+
"""The order by object to sort the transactions by"""
|
|
1610
|
+
orderBy: UserTransactionHistoryRequestOrderBy! = {date: ASC}
|
|
1611
|
+
|
|
1612
|
+
"""The user that sent the transactions"""
|
|
1613
|
+
user: EvmAddress!
|
|
1614
|
+
|
|
1615
|
+
"""The chain id where the transactions were sent"""
|
|
1616
|
+
chainId: ChainId!
|
|
1617
|
+
|
|
1618
|
+
"""The page size"""
|
|
1619
|
+
pageSize: PageSize! = FIFTY
|
|
1620
|
+
|
|
1621
|
+
"""Pagination cursor"""
|
|
1622
|
+
cursor: Cursor
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
input UserTransactionHistoryRequestOrderBy {
|
|
1626
|
+
"""Order by the date of the transaction"""
|
|
1627
|
+
date: OrderDirection
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
union UserTransactionItem = UserSupplyTransaction | UserWithdrawTransaction | UserBorrowTransaction | UserRepayTransaction | UserUsageAsCollateralTransaction | UserLiquidationCallTransaction
|
|
1631
|
+
|
|
1632
|
+
"""The type of user transaction in the protocol."""
|
|
1633
|
+
enum UserTransactionType {
|
|
1634
|
+
"""User supplied assets to the protocol."""
|
|
1635
|
+
SUPPLY
|
|
1636
|
+
|
|
1637
|
+
"""User borrowed assets from the protocol."""
|
|
1638
|
+
BORROW
|
|
1639
|
+
|
|
1640
|
+
"""User enabled or disabled usage of an asset as collateral."""
|
|
1641
|
+
USAGE_AS_COLLATERAL
|
|
1642
|
+
|
|
1643
|
+
"""User was involved in a liquidation call."""
|
|
1644
|
+
LIQUIDATION_CALL
|
|
1645
|
+
|
|
1646
|
+
"""User repaid a borrowed amount."""
|
|
1647
|
+
REPAY
|
|
1648
|
+
|
|
1649
|
+
"""User withdrew supplied assets."""
|
|
1650
|
+
WITHDRAW
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
"""
|
|
1654
|
+
A transaction where the user enabled or disabled usage of an asset as collateral.
|
|
1655
|
+
"""
|
|
1656
|
+
type UserUsageAsCollateralTransaction {
|
|
1657
|
+
"""Whether collateral usage was enabled."""
|
|
1658
|
+
enabled: Boolean!
|
|
1659
|
+
|
|
1660
|
+
"""Reserve for which collateral usage was changed."""
|
|
1661
|
+
reserve: ReserveInfo!
|
|
1662
|
+
|
|
1663
|
+
"""URL to view the transaction on a block explorer."""
|
|
1664
|
+
blockExplorerUrl: String!
|
|
1665
|
+
|
|
1666
|
+
"""Transaction hash."""
|
|
1667
|
+
txHash: TxHash!
|
|
1668
|
+
|
|
1669
|
+
"""Timestamp of the transaction."""
|
|
1670
|
+
timestamp: DateTime!
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
type UserVaultShares {
|
|
1674
|
+
"""The user's shares on the vault"""
|
|
1675
|
+
shares: TokenAmount!
|
|
1676
|
+
|
|
1677
|
+
"""The balance you can withdraw"""
|
|
1678
|
+
balance: TokenAmount!
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
input UserVaultsFilter {
|
|
1682
|
+
"""Filter by markets"""
|
|
1683
|
+
vaults: [VaultInput!]
|
|
1684
|
+
|
|
1685
|
+
"""Filter by underlying token addresses"""
|
|
1686
|
+
underlyingTokens: [EvmAddress!]
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
input UserVaultsOrderBy @oneOf {
|
|
1690
|
+
"""Order by shares"""
|
|
1691
|
+
shares: OrderDirection
|
|
1692
|
+
|
|
1693
|
+
"""Order by fee"""
|
|
1694
|
+
fee: OrderDirection
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
input UserVaultsRequest {
|
|
1698
|
+
"""The user address"""
|
|
1699
|
+
user: EvmAddress!
|
|
1700
|
+
|
|
1701
|
+
"""Filter criteria"""
|
|
1702
|
+
filters: UserVaultsFilter
|
|
1703
|
+
|
|
1704
|
+
"""Ordering criteria"""
|
|
1705
|
+
orderBy: UserVaultsOrderBy! = {shares: ASC}
|
|
1706
|
+
|
|
1707
|
+
"""The page size"""
|
|
1708
|
+
pageSize: PageSize! = FIFTY
|
|
1709
|
+
|
|
1710
|
+
"""Pagination cursor"""
|
|
1711
|
+
cursor: Cursor
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
"""A transaction where the user withdrew assets from a reserve."""
|
|
1715
|
+
type UserWithdrawTransaction {
|
|
1716
|
+
"""Amount withdrawn."""
|
|
1717
|
+
amount: TokenAmount!
|
|
1718
|
+
|
|
1719
|
+
"""Reserve from which assets were withdrawn."""
|
|
1720
|
+
reserve: ReserveInfo!
|
|
1721
|
+
|
|
1722
|
+
"""URL to view the transaction on a block explorer."""
|
|
1723
|
+
blockExplorerUrl: String!
|
|
1724
|
+
|
|
1725
|
+
"""Transaction hash."""
|
|
1726
|
+
txHash: TxHash!
|
|
1727
|
+
|
|
1728
|
+
"""Timestamp of the transaction."""
|
|
1729
|
+
timestamp: DateTime!
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
type Vault {
|
|
1733
|
+
"""The vault address"""
|
|
1734
|
+
address: EvmAddress!
|
|
1735
|
+
|
|
1736
|
+
"""The name of the share"""
|
|
1737
|
+
shareName: String!
|
|
1738
|
+
|
|
1739
|
+
"""The symbol of the share"""
|
|
1740
|
+
shareSymbol: String!
|
|
1741
|
+
|
|
1742
|
+
"""The reserve the vault is using"""
|
|
1743
|
+
usedReserve: Reserve!
|
|
1744
|
+
|
|
1745
|
+
"""The current fee percentage set for the vault."""
|
|
1746
|
+
fee: PercentValue!
|
|
1747
|
+
|
|
1748
|
+
"""How much this vault has made in revenue"""
|
|
1749
|
+
totalFeeRevenue: TokenAmount!
|
|
1750
|
+
|
|
1751
|
+
"""
|
|
1752
|
+
The last recorded balance of the vault's AToken. This value is updated when yield is accrued.
|
|
1753
|
+
"""
|
|
1754
|
+
balance: TokenAmount!
|
|
1755
|
+
|
|
1756
|
+
"""The chain id the vault lives on"""
|
|
1757
|
+
chainId: ChainId!
|
|
1758
|
+
|
|
1759
|
+
"""The user's shares info on the vault"""
|
|
1760
|
+
userShares: UserVaultShares
|
|
1761
|
+
|
|
1762
|
+
"""The owner of the vault"""
|
|
1763
|
+
owner: EvmAddress!
|
|
1764
|
+
|
|
1765
|
+
"""The total fees the owner can claim currently for the vault"""
|
|
1766
|
+
feesBalance: TokenAmount!
|
|
1767
|
+
|
|
1768
|
+
"""The total vault APR after their fee is taken off"""
|
|
1769
|
+
vaultApr: PercentValue!
|
|
1770
|
+
|
|
1771
|
+
"""
|
|
1772
|
+
The recipient configuration for distributing the vault fees.
|
|
1773
|
+
Returns None if the vault doesn't have any recipients configured (in which case the owner is the sole fee recipient)
|
|
1774
|
+
"""
|
|
1775
|
+
recipients: VaultFeesRecipientsConfiguration
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
input VaultCreateRecipientsConfigurationRequest {
|
|
1779
|
+
"""The vault deployed address"""
|
|
1780
|
+
vault: EvmAddress!
|
|
1781
|
+
|
|
1782
|
+
"""The chain id"""
|
|
1783
|
+
chainId: ChainId!
|
|
1784
|
+
|
|
1785
|
+
"""
|
|
1786
|
+
The recipients of the fee revenue, expressed as a percentage of the total fee revenue.
|
|
1787
|
+
Vault revenue is split between the recipients and the Aave fee recipient (50/50 split).
|
|
1788
|
+
"""
|
|
1789
|
+
recipients: [VaultFeesRecipientSplitInput!]!
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
input VaultDeployRequest {
|
|
1793
|
+
"""Underlying token address."""
|
|
1794
|
+
underlyingToken: EvmAddress!
|
|
1795
|
+
|
|
1796
|
+
"""The market address."""
|
|
1797
|
+
market: EvmAddress!
|
|
1798
|
+
|
|
1799
|
+
"""The chain id"""
|
|
1800
|
+
chainId: ChainId!
|
|
1801
|
+
|
|
1802
|
+
"""
|
|
1803
|
+
The address to set as which deploys the vault and will become an owner of the vault.
|
|
1804
|
+
"""
|
|
1805
|
+
deployer: EvmAddress!
|
|
1806
|
+
|
|
1807
|
+
"""The owner of the vault - if not defined, it will be the deployer"""
|
|
1808
|
+
owner: EvmAddress
|
|
1809
|
+
|
|
1810
|
+
"""The initial fee to set, expressed in %."""
|
|
1811
|
+
initialFee: BigDecimal!
|
|
1812
|
+
|
|
1813
|
+
"""The name to set for the vault's shares."""
|
|
1814
|
+
shareName: String!
|
|
1815
|
+
|
|
1816
|
+
"""The symbol to set for the vault's shares."""
|
|
1817
|
+
shareSymbol: String!
|
|
1818
|
+
|
|
1819
|
+
"""
|
|
1820
|
+
The initial amount of underlying assets to deposit. This must be a non-zero, non-trivial amount, depending on the underlying asset's decimals.
|
|
1821
|
+
"""
|
|
1822
|
+
initialLockDeposit: BigDecimal!
|
|
1823
|
+
|
|
1824
|
+
"""
|
|
1825
|
+
The recipients of the fee revenue, expressed as a percentage of the total fee revenue.
|
|
1826
|
+
If not provided, the fee revenue will be sent to the owner of the vault.
|
|
1827
|
+
Vault revenue is split between the recipients and the Aave fee recipient (50/50 split).
|
|
1828
|
+
"""
|
|
1829
|
+
recipients: [VaultFeesRecipientSplitInput!]
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
input VaultDepositAmountInput {
|
|
1833
|
+
"""The amount of assets to deposit."""
|
|
1834
|
+
value: BigDecimal!
|
|
1835
|
+
|
|
1836
|
+
"""Whether you are depositing in as a token or normal underlying"""
|
|
1837
|
+
asAToken: Boolean! = false
|
|
1838
|
+
|
|
1839
|
+
"""
|
|
1840
|
+
The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
|
|
1841
|
+
"""
|
|
1842
|
+
permitSig: ERC712Signature
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
input VaultDepositRequest {
|
|
1846
|
+
"""The vault address"""
|
|
1847
|
+
vault: EvmAddress!
|
|
1848
|
+
|
|
1849
|
+
"""The details of the amounts to deposit."""
|
|
1850
|
+
amount: VaultDepositAmountInput!
|
|
1851
|
+
|
|
1852
|
+
"""The user who is depositing"""
|
|
1853
|
+
depositor: EvmAddress!
|
|
1854
|
+
|
|
1855
|
+
"""
|
|
1856
|
+
The address to which vault shares will be minted to - defaults to depositor.
|
|
1857
|
+
"""
|
|
1858
|
+
sharesRecipient: EvmAddress
|
|
1859
|
+
|
|
1860
|
+
"""The chain id"""
|
|
1861
|
+
chainId: ChainId!
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
type VaultFeesRecipientSplit {
|
|
1865
|
+
"""Address receiving the fee share"""
|
|
1866
|
+
address: EvmAddress!
|
|
1867
|
+
|
|
1868
|
+
"""Portion of the owner share allocated to this recipient"""
|
|
1869
|
+
split: PercentValue!
|
|
1870
|
+
|
|
1871
|
+
"""True, if it's an Aave Labs recipient address"""
|
|
1872
|
+
isAaveLabs: Boolean!
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
input VaultFeesRecipientSplitInput {
|
|
1876
|
+
"""Address of the recipient."""
|
|
1877
|
+
address: EvmAddress!
|
|
1878
|
+
|
|
1879
|
+
"""Percentage of the fee that will be sent to the recipient."""
|
|
1880
|
+
percent: BigDecimal!
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
type VaultFeesRecipientsConfiguration {
|
|
1884
|
+
"""Revenue splitter contract address responsible for distributing fees"""
|
|
1885
|
+
address: EvmAddress!
|
|
1886
|
+
|
|
1887
|
+
"""Recipients receiving the vault owner's share"""
|
|
1888
|
+
entries: [VaultFeesRecipientSplit!]!
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
input VaultInput {
|
|
1892
|
+
"""The address of the fault"""
|
|
1893
|
+
address: EvmAddress!
|
|
1894
|
+
|
|
1895
|
+
"""The chain id the vault is on"""
|
|
1896
|
+
chainId: ChainId!
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
input VaultMintShareInput {
|
|
1900
|
+
"""The amount of vault shares"""
|
|
1901
|
+
amount: BigDecimal!
|
|
1902
|
+
|
|
1903
|
+
"""Whether the amount should be received as aToken."""
|
|
1904
|
+
asAToken: Boolean! = false
|
|
1905
|
+
|
|
1906
|
+
"""
|
|
1907
|
+
The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
|
|
1908
|
+
"""
|
|
1909
|
+
permitSig: ERC712Signature
|
|
1910
|
+
}
|
|
1911
|
+
|
|
1912
|
+
input VaultMintSharesRequest {
|
|
1913
|
+
"""The vault address"""
|
|
1914
|
+
vault: EvmAddress!
|
|
1915
|
+
|
|
1916
|
+
"""The amount of shares to mint"""
|
|
1917
|
+
shares: VaultMintShareInput!
|
|
1918
|
+
|
|
1919
|
+
"""The user who is wanting to mint the shares"""
|
|
1920
|
+
minter: EvmAddress!
|
|
1921
|
+
|
|
1922
|
+
"""
|
|
1923
|
+
The address to which vault shares will be minted to - defaults to minter.
|
|
1924
|
+
"""
|
|
1925
|
+
sharesRecipient: EvmAddress
|
|
1926
|
+
|
|
1927
|
+
"""The chain id"""
|
|
1928
|
+
chainId: ChainId!
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
input VaultOperationPreviewRequest {
|
|
1932
|
+
"""The vault"""
|
|
1933
|
+
vault: EvmAddress!
|
|
1934
|
+
|
|
1935
|
+
"""The chain id the vault is deployed on"""
|
|
1936
|
+
chainId: ChainId!
|
|
1937
|
+
|
|
1938
|
+
"""
|
|
1939
|
+
The amount in human-readable form
|
|
1940
|
+
preview deposit = underlying
|
|
1941
|
+
preview mint = shares
|
|
1942
|
+
preview withdraw = underlying
|
|
1943
|
+
preview redeem = shares
|
|
1944
|
+
"""
|
|
1945
|
+
amount: BigDecimal!
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
input VaultRecipientConfigurationRequest {
|
|
1949
|
+
"""The retrieve criteria"""
|
|
1950
|
+
by: VaultRecipientConfigurationRequestBy!
|
|
1951
|
+
|
|
1952
|
+
"""The chain id the recipient configuration is deployed on"""
|
|
1953
|
+
chainId: ChainId!
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
input VaultRecipientConfigurationRequestBy @oneOf {
|
|
1957
|
+
"""The vault recipient configuration address"""
|
|
1958
|
+
address: EvmAddress
|
|
1959
|
+
|
|
1960
|
+
"""
|
|
1961
|
+
You can use this if you deployed a recipient configuration and want to get information
|
|
1962
|
+
"""
|
|
1963
|
+
txHash: TxHash
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
input VaultRedeemShareInput {
|
|
1967
|
+
"""The amount of vault shares"""
|
|
1968
|
+
amount: BigDecimal!
|
|
1969
|
+
|
|
1970
|
+
"""Whether the amount should be sent as aToken."""
|
|
1971
|
+
asAToken: Boolean! = false
|
|
1972
|
+
|
|
1973
|
+
"""
|
|
1974
|
+
The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
|
|
1975
|
+
"""
|
|
1976
|
+
permitSig: ERC712Signature
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
input VaultRedeemSharesRequest {
|
|
1980
|
+
"""The vault address"""
|
|
1981
|
+
vault: EvmAddress!
|
|
1982
|
+
|
|
1983
|
+
"""The shares to redeem."""
|
|
1984
|
+
shares: VaultRedeemShareInput!
|
|
1985
|
+
|
|
1986
|
+
"""
|
|
1987
|
+
The address from which vault shares will be burned (normally your own wallet).
|
|
1988
|
+
"""
|
|
1989
|
+
sharesOwner: EvmAddress!
|
|
1990
|
+
|
|
1991
|
+
"""
|
|
1992
|
+
If you are doing the redeem from a trusted wallet which can move funds on behalf of the shares owner (advanced usage)
|
|
1993
|
+
"""
|
|
1994
|
+
authorizedUser: EvmAddress
|
|
1995
|
+
|
|
1996
|
+
"""
|
|
1997
|
+
The address to which the underlying assets will be sent; if not set it will go to the sharesOwner
|
|
1998
|
+
"""
|
|
1999
|
+
recipient: EvmAddress
|
|
2000
|
+
|
|
2001
|
+
"""The chain id"""
|
|
2002
|
+
chainId: ChainId!
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
input VaultRequest {
|
|
2006
|
+
"""The retrieve criteria"""
|
|
2007
|
+
by: VaultRequestBy!
|
|
2008
|
+
|
|
2009
|
+
"""The chain id the vault is deployed on"""
|
|
2010
|
+
chainId: ChainId!
|
|
2011
|
+
|
|
2012
|
+
"""
|
|
2013
|
+
The user viewing it (can be connected wallet) - this caters for stuff like userShares and other user features
|
|
2014
|
+
"""
|
|
2015
|
+
user: EvmAddress
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
input VaultRequestBy @oneOf {
|
|
2019
|
+
"""The vault address"""
|
|
2020
|
+
address: EvmAddress
|
|
2021
|
+
|
|
2022
|
+
"""
|
|
2023
|
+
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
|
|
2024
|
+
"""
|
|
2025
|
+
txHash: TxHash
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
input VaultSetFeeRequest {
|
|
2029
|
+
"""The vault deployed address"""
|
|
2030
|
+
vault: EvmAddress!
|
|
2031
|
+
|
|
2032
|
+
"""The new fee to set, expressed in %."""
|
|
2033
|
+
newFee: BigDecimal!
|
|
2034
|
+
|
|
2035
|
+
"""The chain id"""
|
|
2036
|
+
chainId: ChainId!
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
input VaultSetRecipientsConfigurationRequest {
|
|
2040
|
+
"""The vault deployed address"""
|
|
2041
|
+
vault: EvmAddress!
|
|
2042
|
+
|
|
2043
|
+
"""The chain id"""
|
|
2044
|
+
chainId: ChainId!
|
|
2045
|
+
|
|
2046
|
+
"""The recipients configuration contract address to set for the vault."""
|
|
2047
|
+
configuration: EvmAddress!
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
input VaultTransferOwnershipRequest {
|
|
2051
|
+
"""The vault deployed address"""
|
|
2052
|
+
vault: EvmAddress!
|
|
2053
|
+
|
|
2054
|
+
"""The chain id"""
|
|
2055
|
+
chainId: ChainId!
|
|
2056
|
+
|
|
2057
|
+
"""The new vault owner address"""
|
|
2058
|
+
newOwner: EvmAddress!
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
type VaultUserActivityItem {
|
|
2062
|
+
balance: TokenAmount!
|
|
2063
|
+
earned: TokenAmount!
|
|
2064
|
+
withdrew: TokenAmount
|
|
2065
|
+
deposited: TokenAmount
|
|
2066
|
+
date: DateTime!
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
input VaultUserActivityRequest {
|
|
2070
|
+
"""The vault"""
|
|
2071
|
+
vault: EvmAddress!
|
|
2072
|
+
|
|
2073
|
+
"""The chain id the vault is deployed on"""
|
|
2074
|
+
chainId: ChainId!
|
|
2075
|
+
|
|
2076
|
+
"""The user address"""
|
|
2077
|
+
user: EvmAddress!
|
|
2078
|
+
|
|
2079
|
+
"""The timing window for which to calculate user activity"""
|
|
2080
|
+
window: VaultUserActivityTimeWindow!
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
type VaultUserActivityResult {
|
|
2084
|
+
earned: TokenAmount!
|
|
2085
|
+
breakdown: [VaultUserActivityItem!]!
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
enum VaultUserActivityTimeWindow {
|
|
2089
|
+
"""Samples data in days over the last week"""
|
|
2090
|
+
LAST_WEEK
|
|
2091
|
+
|
|
2092
|
+
"""Samples data in days over the last month"""
|
|
2093
|
+
LAST_MONTH
|
|
2094
|
+
|
|
2095
|
+
"""Samples data in months over the last year"""
|
|
2096
|
+
LAST_YEAR
|
|
2097
|
+
|
|
2098
|
+
"""Samples data in years for the maximum available period"""
|
|
2099
|
+
MAX
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
"""A transaction where the user supplied assets to a reserve."""
|
|
2103
|
+
type VaultUserDepositItem {
|
|
2104
|
+
asset: TokenAmount!
|
|
2105
|
+
shares: TokenAmount!
|
|
2106
|
+
blockExplorerUrl: String!
|
|
2107
|
+
txHash: TxHash!
|
|
2108
|
+
timestamp: DateTime!
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
enum VaultUserHistoryAction {
|
|
2112
|
+
DEPOSIT
|
|
2113
|
+
WITHDRAW
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
input VaultUserTransactionHistoryOrderBy @oneOf {
|
|
2117
|
+
"""Order by shares"""
|
|
2118
|
+
date: OrderDirection
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
input VaultUserTransactionHistoryRequest {
|
|
2122
|
+
"""The vault address"""
|
|
2123
|
+
vault: EvmAddress!
|
|
2124
|
+
|
|
2125
|
+
"""The chain id where the transactions were sent"""
|
|
2126
|
+
chainId: ChainId!
|
|
2127
|
+
|
|
2128
|
+
"""The user that sent the transactions"""
|
|
2129
|
+
user: EvmAddress!
|
|
2130
|
+
|
|
2131
|
+
"""The filter to optionally filter the transactions by action type"""
|
|
2132
|
+
filter: [VaultUserHistoryAction!]! = [DEPOSIT, WITHDRAW]
|
|
2133
|
+
|
|
2134
|
+
"""Ordering criteria"""
|
|
2135
|
+
orderBy: VaultUserTransactionHistoryOrderBy! = {date: ASC}
|
|
2136
|
+
|
|
2137
|
+
"""The page size"""
|
|
2138
|
+
pageSize: PageSize! = FIFTY
|
|
2139
|
+
|
|
2140
|
+
"""Pagination cursor"""
|
|
2141
|
+
cursor: Cursor
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
union VaultUserTransactionItem = VaultUserDepositItem | VaultUserWithdrawItem
|
|
2145
|
+
|
|
2146
|
+
"""A transaction where the user withdrew assets from a reserve."""
|
|
2147
|
+
type VaultUserWithdrawItem {
|
|
2148
|
+
asset: TokenAmount!
|
|
2149
|
+
shares: TokenAmount!
|
|
2150
|
+
blockExplorerUrl: String!
|
|
2151
|
+
txHash: TxHash!
|
|
2152
|
+
timestamp: DateTime!
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
input VaultWithdrawAmountInput {
|
|
2156
|
+
"""The amount of assets to withdraw."""
|
|
2157
|
+
value: BigDecimal!
|
|
2158
|
+
|
|
2159
|
+
"""Whether the amount should be sent/received as aToken."""
|
|
2160
|
+
asAToken: Boolean! = false
|
|
2161
|
+
|
|
2162
|
+
"""
|
|
2163
|
+
The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
|
|
2164
|
+
"""
|
|
2165
|
+
permitSig: ERC712Signature
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
input VaultWithdrawFeesRequest {
|
|
2169
|
+
"""The vault deployed address"""
|
|
2170
|
+
vault: EvmAddress!
|
|
2171
|
+
|
|
2172
|
+
"""
|
|
2173
|
+
Who the withdrawal fees will go to - if not supplied, it goes to the owner
|
|
2174
|
+
"""
|
|
2175
|
+
sendTo: EvmAddress
|
|
2176
|
+
|
|
2177
|
+
"""Human-formatted amount"""
|
|
2178
|
+
amount: WithdrawAmount!
|
|
2179
|
+
|
|
2180
|
+
"""The chain id"""
|
|
2181
|
+
chainId: ChainId!
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
input VaultWithdrawRequest {
|
|
2185
|
+
"""The vault address"""
|
|
2186
|
+
vault: EvmAddress!
|
|
2187
|
+
|
|
2188
|
+
"""The details of the amounts to withdraw."""
|
|
2189
|
+
amount: VaultWithdrawAmountInput!
|
|
2190
|
+
|
|
2191
|
+
"""
|
|
2192
|
+
The address from which vault shares will be burned (normally your own wallet).
|
|
2193
|
+
"""
|
|
2194
|
+
sharesOwner: EvmAddress!
|
|
2195
|
+
|
|
2196
|
+
"""
|
|
2197
|
+
If you are doing the withdrawal from a trusted wallet which can move funds on behalf of the shares owner (advanced usage)
|
|
2198
|
+
"""
|
|
2199
|
+
authorizedUser: EvmAddress
|
|
2200
|
+
|
|
2201
|
+
"""
|
|
2202
|
+
The address to which the underlying assets will be sent - defaults to sharesOwner.
|
|
2203
|
+
"""
|
|
2204
|
+
recipient: EvmAddress
|
|
2205
|
+
|
|
2206
|
+
"""The chain id"""
|
|
2207
|
+
chainId: ChainId!
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
input VaultsRequest {
|
|
2211
|
+
"""Filter criteria for vaults"""
|
|
2212
|
+
criteria: VaultsRequestFilterCriteria!
|
|
2213
|
+
|
|
2214
|
+
"""
|
|
2215
|
+
The user viewing it (can be connected wallet) - this caters for stuff like userShares and other user features
|
|
2216
|
+
"""
|
|
2217
|
+
user: EvmAddress
|
|
2218
|
+
|
|
2219
|
+
"""The page size"""
|
|
2220
|
+
pageSize: PageSize! = FIFTY
|
|
2221
|
+
|
|
2222
|
+
"""Pagination cursor"""
|
|
2223
|
+
cursor: Cursor
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
input VaultsRequestFilterCriteria @oneOf {
|
|
2227
|
+
"""Filter by specific vault addresses"""
|
|
2228
|
+
vaults: [VaultInput!]
|
|
2229
|
+
|
|
2230
|
+
"""Filter by owner addresses"""
|
|
2231
|
+
ownedBy: [EvmAddress!]
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
input WithdrawAmount @oneOf {
|
|
2235
|
+
"""Exact amount to withdraw, remember interest is generated on each block"""
|
|
2236
|
+
exact: BigDecimal
|
|
2237
|
+
|
|
2238
|
+
"""Withdraw all the position completely"""
|
|
2239
|
+
max: AlwaysTrue
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
input WithdrawAmountInput @oneOf {
|
|
2243
|
+
"""The native amount"""
|
|
2244
|
+
native: WithdrawNativeAmountInput
|
|
2245
|
+
|
|
2246
|
+
"""The erc20 amount input"""
|
|
2247
|
+
erc20: WithdrawErc20AmountInput
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
input WithdrawErc20AmountInput {
|
|
2251
|
+
"""The token address."""
|
|
2252
|
+
currency: EvmAddress!
|
|
2253
|
+
|
|
2254
|
+
"""
|
|
2255
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g., wei).
|
|
2256
|
+
"""
|
|
2257
|
+
value: WithdrawAmount!
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
input WithdrawNativeAmountInput {
|
|
2261
|
+
"""The native value"""
|
|
2262
|
+
value: WithdrawAmount!
|
|
2263
|
+
|
|
2264
|
+
"""
|
|
2265
|
+
The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
|
|
2266
|
+
"""
|
|
2267
|
+
permitSig: ERC712Signature
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
input WithdrawRequest {
|
|
2271
|
+
"""The market pool address"""
|
|
2272
|
+
market: EvmAddress!
|
|
2273
|
+
|
|
2274
|
+
"""The amount to withdraw"""
|
|
2275
|
+
amount: WithdrawAmountInput!
|
|
2276
|
+
|
|
2277
|
+
"""
|
|
2278
|
+
The user sending the transaction (normally the user's wallet address) this should have the \`aToken\` that will be burned by the \`Pool\`
|
|
2279
|
+
"""
|
|
2280
|
+
sender: EvmAddress!
|
|
2281
|
+
|
|
2282
|
+
"""
|
|
2283
|
+
If not supplied, this will use \`sender\`. The address that will receive the underlying asset. This will go to the supplier if the user wants to receive the tokens into
|
|
2284
|
+
their own wallet or use a different address if the beneficiary is a different wallet
|
|
2285
|
+
"""
|
|
2286
|
+
recipient: EvmAddress
|
|
2287
|
+
|
|
2288
|
+
"""The chain id"""
|
|
2289
|
+
chainId: ChainId!
|
|
2290
|
+
}`;var i=graphql.buildSchema(e);exports.schema=i;//# sourceMappingURL=test-utils.cjs.map
|
|
2291
|
+
//# sourceMappingURL=test-utils.cjs.map
|