@aave/graphql 0.7.0 → 1.0.0-next.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 +962 -621
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29733 -10484
- package/dist/index.d.ts +29733 -10484
- package/dist/index.js +962 -621
- package/dist/index.js.map +1 -1
- package/dist/schema.cjs +2 -0
- package/dist/schema.cjs.map +1 -0
- package/dist/schema.d.cts +216 -0
- package/dist/schema.d.ts +216 -0
- package/dist/schema.js +2 -0
- package/dist/schema.js.map +1 -0
- package/dist/test-utils.cjs +1301 -1634
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.js +1301 -1634
- package/dist/test-utils.js.map +1 -1
- package/package.json +20 -7
package/dist/test-utils.cjs
CHANGED
|
@@ -1,133 +1,188 @@
|
|
|
1
1
|
'use strict';var graphql=require('graphql');var e=`type APYSample {
|
|
2
|
-
"""The avg rate"""
|
|
3
|
-
avgRate: PercentValue!
|
|
4
|
-
|
|
5
|
-
"""The date"""
|
|
6
2
|
date: DateTime!
|
|
3
|
+
avgRate: PercentNumber!
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
input ActivitiesRequest {
|
|
7
|
+
query: ActivitiesRequestQuery!
|
|
8
|
+
user: EvmAddress
|
|
9
|
+
types: [ActivityFeedType!]! = [BORROW, SUPPLY, WITHDRAW, REPAY, LIQUIDATED, SET_AS_COLLATERAL]
|
|
10
|
+
pageSize: PageSize! = FIFTY
|
|
11
|
+
cursor: Cursor
|
|
7
12
|
}
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
input ActivitiesRequestQuery @oneOf {
|
|
15
|
+
hub: HubInput
|
|
16
|
+
hubId: HubId
|
|
17
|
+
spoke: SpokeInput
|
|
18
|
+
spokeId: SpokeId
|
|
19
|
+
chainIds: [ChainId!]
|
|
20
|
+
txHash: TxHashInput
|
|
13
21
|
}
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
enum ActivityFeedType {
|
|
24
|
+
SUPPLY
|
|
25
|
+
BORROW
|
|
26
|
+
REPAY
|
|
27
|
+
WITHDRAW
|
|
28
|
+
LIQUIDATED
|
|
29
|
+
SET_AS_COLLATERAL
|
|
19
30
|
}
|
|
20
31
|
|
|
32
|
+
union ActivityItem = BorrowActivity | SupplyActivity | WithdrawActivity | RepayActivity | LiquidatedActivity | UsingAsCollateralActivity
|
|
33
|
+
|
|
21
34
|
scalar AlwaysTrue
|
|
22
35
|
|
|
23
36
|
input AmountInput @oneOf {
|
|
24
|
-
"""
|
|
25
|
-
|
|
37
|
+
"""Exact amount"""
|
|
38
|
+
exact: BigDecimal
|
|
26
39
|
|
|
27
|
-
"""
|
|
28
|
-
|
|
40
|
+
"""Max amount"""
|
|
41
|
+
max: AlwaysTrue
|
|
29
42
|
}
|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
approval: TransactionRequest!
|
|
37
|
-
|
|
38
|
-
"""The reason for the approval"""
|
|
39
|
-
reason: String!
|
|
44
|
+
enum ApyMetric {
|
|
45
|
+
HIGHEST
|
|
46
|
+
LOWEST
|
|
47
|
+
AVERAGE
|
|
48
|
+
}
|
|
40
49
|
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
type Asset {
|
|
51
|
+
id: AssetId!
|
|
52
|
+
token: Erc20Token!
|
|
53
|
+
summary: AssetSummary!
|
|
54
|
+
price(currency: Currency! = USD): FiatAmountWithChange!
|
|
55
|
+
}
|
|
43
56
|
|
|
44
|
-
|
|
45
|
-
|
|
57
|
+
input AssetBorrowHistoryRequest {
|
|
58
|
+
query: AssetBorrowHistoryRequestQuery!
|
|
59
|
+
window: TimeWindow! = LAST_DAY
|
|
60
|
+
}
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
|
|
62
|
+
input AssetBorrowHistoryRequestQuery @oneOf {
|
|
63
|
+
token: Erc20Input
|
|
64
|
+
assetId: AssetId
|
|
49
65
|
}
|
|
50
66
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
67
|
+
type AssetBorrowSample {
|
|
68
|
+
date: DateTime!
|
|
69
|
+
amount: DecimalNumber!
|
|
70
|
+
}
|
|
54
71
|
|
|
55
|
-
|
|
56
|
-
underlyingToken: EvmAddress!
|
|
72
|
+
scalar AssetId
|
|
57
73
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
74
|
+
input AssetPriceHistoryRequest {
|
|
75
|
+
query: AssetPriceHistoryRequestQuery!
|
|
76
|
+
currency: Currency! = USD
|
|
77
|
+
window: TimeWindow! = LAST_DAY
|
|
78
|
+
}
|
|
62
79
|
|
|
63
|
-
|
|
64
|
-
|
|
80
|
+
input AssetPriceHistoryRequestQuery @oneOf {
|
|
81
|
+
token: Erc20Input
|
|
82
|
+
assetId: AssetId
|
|
83
|
+
}
|
|
65
84
|
|
|
66
|
-
|
|
67
|
-
|
|
85
|
+
type AssetPriceSample {
|
|
86
|
+
date: DateTime!
|
|
87
|
+
price: BigDecimal!
|
|
88
|
+
}
|
|
68
89
|
|
|
69
|
-
|
|
70
|
-
|
|
90
|
+
input AssetRequest {
|
|
91
|
+
query: AssetRequestQuery!
|
|
71
92
|
}
|
|
72
93
|
|
|
73
|
-
|
|
94
|
+
input AssetRequestQuery @oneOf {
|
|
95
|
+
token: Erc20Input
|
|
96
|
+
assetId: AssetId
|
|
97
|
+
}
|
|
74
98
|
|
|
75
|
-
|
|
99
|
+
type AssetSummary {
|
|
100
|
+
totalSupplyCap: DecimalNumberWithChange!
|
|
101
|
+
totalSupplied: DecimalNumberWithChange!
|
|
102
|
+
totalSuppliable: DecimalNumberWithChange!
|
|
103
|
+
totalBorrowCap: DecimalNumberWithChange!
|
|
104
|
+
totalBorrowed: DecimalNumberWithChange!
|
|
105
|
+
totalBorrowable: DecimalNumberWithChange!
|
|
106
|
+
totalSuppliedFiat(currency: Currency! = USD): FiatAmountWithChange!
|
|
107
|
+
totalBorrowedFiat(currency: Currency! = USD): FiatAmountWithChange!
|
|
76
108
|
|
|
77
|
-
|
|
109
|
+
"""The supply APY dependent on what you pass in for the \`metric\`"""
|
|
110
|
+
supplyApy(metric: ApyMetric! = AVERAGE): PercentNumber!
|
|
78
111
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
112
|
+
"""The borrow APY dependent on what you pass in for the \`metric\`"""
|
|
113
|
+
borrowApy(metric: ApyMetric! = AVERAGE): PercentNumber!
|
|
114
|
+
}
|
|
82
115
|
|
|
83
|
-
|
|
84
|
-
|
|
116
|
+
input AssetSupplyHistoryRequest {
|
|
117
|
+
query: AssetSupplyHistoryRequestQuery!
|
|
118
|
+
window: TimeWindow! = LAST_DAY
|
|
119
|
+
}
|
|
85
120
|
|
|
86
|
-
|
|
87
|
-
|
|
121
|
+
input AssetSupplyHistoryRequestQuery @oneOf {
|
|
122
|
+
token: Erc20Input
|
|
123
|
+
assetId: AssetId
|
|
124
|
+
}
|
|
88
125
|
|
|
89
|
-
|
|
90
|
-
|
|
126
|
+
type AssetSupplySample {
|
|
127
|
+
date: DateTime!
|
|
128
|
+
amount: DecimalNumber!
|
|
91
129
|
}
|
|
92
130
|
|
|
93
|
-
|
|
94
|
-
"""The native amount"""
|
|
95
|
-
native: BigDecimal
|
|
131
|
+
scalar BigDecimal
|
|
96
132
|
|
|
97
|
-
|
|
98
|
-
erc20: BorrowErc20AmountInput
|
|
99
|
-
}
|
|
133
|
+
scalar BigInt
|
|
100
134
|
|
|
101
|
-
|
|
102
|
-
"""The token address."""
|
|
103
|
-
currency: EvmAddress!
|
|
135
|
+
scalar BlockchainData
|
|
104
136
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
137
|
+
input BorrowAPYHistoryRequest {
|
|
138
|
+
reserve: ReserveId!
|
|
139
|
+
window: TimeWindow! = LAST_DAY
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
type BorrowActivity {
|
|
143
|
+
id: ID!
|
|
144
|
+
user: EvmAddress!
|
|
145
|
+
timestamp: DateTime!
|
|
146
|
+
txHash: TxHash!
|
|
147
|
+
spoke: Spoke!
|
|
148
|
+
reserve: ReserveInfo!
|
|
149
|
+
borrowed: Erc20Amount!
|
|
150
|
+
chain: Chain!
|
|
110
151
|
}
|
|
111
152
|
|
|
112
153
|
input BorrowRequest {
|
|
113
|
-
"""The
|
|
114
|
-
|
|
154
|
+
"""The reserve id"""
|
|
155
|
+
reserve: ReserveId!
|
|
115
156
|
|
|
116
|
-
"""The amount
|
|
117
|
-
amount:
|
|
157
|
+
"""The amount supplying"""
|
|
158
|
+
amount: ReserveAmountInput!
|
|
118
159
|
|
|
119
160
|
"""The user sending the transaction (normally the user's wallet address)"""
|
|
120
161
|
sender: EvmAddress!
|
|
162
|
+
}
|
|
121
163
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"""
|
|
127
|
-
onBehalfOf: EvmAddress
|
|
164
|
+
input CancelIntentSwapInput {
|
|
165
|
+
id: SwapId!
|
|
166
|
+
signature: Signature!
|
|
167
|
+
}
|
|
128
168
|
|
|
129
|
-
|
|
130
|
-
|
|
169
|
+
union CancelSwapExecutionPlan = TransactionRequest | SwapCancelled
|
|
170
|
+
|
|
171
|
+
input CancelSwapRequest @oneOf {
|
|
172
|
+
intent: CancelIntentSwapInput
|
|
173
|
+
transaction: SwapId
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
type CancelSwapTypeDefinition {
|
|
177
|
+
EIP712Domain: [TypeField!]!
|
|
178
|
+
OrderCancellations: [TypeField!]!
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
type CancelSwapTypedData {
|
|
182
|
+
types: CancelSwapTypeDefinition!
|
|
183
|
+
primaryType: String!
|
|
184
|
+
domain: DomainData!
|
|
185
|
+
message: JSON!
|
|
131
186
|
}
|
|
132
187
|
|
|
133
188
|
type Chain {
|
|
@@ -137,96 +192,53 @@ type Chain {
|
|
|
137
192
|
explorerUrl: String!
|
|
138
193
|
isTestnet: Boolean!
|
|
139
194
|
nativeWrappedToken: EvmAddress!
|
|
195
|
+
nativeInfo: TokenInfo!
|
|
196
|
+
nativeGateway: EvmAddress!
|
|
197
|
+
signatureGateway: EvmAddress!
|
|
140
198
|
}
|
|
141
199
|
|
|
142
200
|
"""A supported blockchain chain ID"""
|
|
143
201
|
scalar ChainId
|
|
144
202
|
|
|
145
|
-
|
|
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
|
-
|
|
203
|
+
input ChainRequest {
|
|
166
204
|
"""The chain id"""
|
|
167
205
|
chainId: ChainId!
|
|
168
206
|
}
|
|
169
207
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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!
|
|
208
|
+
enum ChainsFilter {
|
|
209
|
+
TESTNET_ONLY
|
|
210
|
+
MAINNET_ONLY
|
|
211
|
+
ALL
|
|
185
212
|
}
|
|
186
213
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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!
|
|
214
|
+
enum Currency {
|
|
215
|
+
USD
|
|
216
|
+
GBP
|
|
217
|
+
EUR
|
|
205
218
|
}
|
|
206
219
|
|
|
207
220
|
scalar Cursor
|
|
208
221
|
|
|
209
222
|
scalar DateTime
|
|
210
223
|
|
|
211
|
-
|
|
212
|
-
"""
|
|
213
|
-
|
|
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!
|
|
224
|
+
type DecimalNumber {
|
|
225
|
+
"""The on-chain representation of \`value\`, stored as an integer."""
|
|
226
|
+
onChainValue: BigInt!
|
|
222
227
|
|
|
223
|
-
"""
|
|
228
|
+
"""
|
|
229
|
+
The number of decimals defining how many fractional digits the number supports.
|
|
230
|
+
"""
|
|
224
231
|
decimals: Int!
|
|
225
232
|
|
|
226
|
-
"""The
|
|
233
|
+
"""The normalized value computed as \`onChainValue / 10^decimals\`."""
|
|
227
234
|
value: BigDecimal!
|
|
228
235
|
}
|
|
229
236
|
|
|
237
|
+
type DecimalNumberWithChange {
|
|
238
|
+
current: DecimalNumber!
|
|
239
|
+
change(window: TimeWindow! = LAST_DAY): DecimalNumber!
|
|
240
|
+
}
|
|
241
|
+
|
|
230
242
|
type DomainData {
|
|
231
243
|
name: String!
|
|
232
244
|
version: String!
|
|
@@ -234,7 +246,7 @@ type DomainData {
|
|
|
234
246
|
verifyingContract: EvmAddress!
|
|
235
247
|
}
|
|
236
248
|
|
|
237
|
-
input
|
|
249
|
+
input ERC20PermitSignature {
|
|
238
250
|
"""The signature for the erc721"""
|
|
239
251
|
value: Signature!
|
|
240
252
|
|
|
@@ -242,84 +254,108 @@ input ERC712Signature {
|
|
|
242
254
|
deadline: Int!
|
|
243
255
|
}
|
|
244
256
|
|
|
245
|
-
type
|
|
246
|
-
"""The
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
"""The eMode label"""
|
|
250
|
-
label: String!
|
|
257
|
+
type Erc20Amount {
|
|
258
|
+
"""The value"""
|
|
259
|
+
amount: DecimalNumber!
|
|
251
260
|
|
|
252
|
-
"""The
|
|
253
|
-
|
|
261
|
+
"""The fiat amount"""
|
|
262
|
+
fiatAmount(currency: Currency! = USD): FiatAmount!
|
|
254
263
|
|
|
255
|
-
"""The
|
|
256
|
-
|
|
264
|
+
"""The fiat rate"""
|
|
265
|
+
fiatRate(currency: Currency! = USD): DecimalNumber!
|
|
266
|
+
isWrappedNative: Boolean!
|
|
267
|
+
token: Erc20Token!
|
|
268
|
+
}
|
|
257
269
|
|
|
258
|
-
|
|
259
|
-
|
|
270
|
+
type Erc20ApprovalRequired {
|
|
271
|
+
"""The transaction requires an approval first"""
|
|
272
|
+
transaction: TransactionRequest!
|
|
260
273
|
|
|
261
|
-
"""The
|
|
262
|
-
|
|
263
|
-
}
|
|
274
|
+
"""The reason for the approval"""
|
|
275
|
+
reason: String!
|
|
264
276
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
underlyingToken: Currency!
|
|
277
|
+
"""The required amount missing to be able to do the original transaction"""
|
|
278
|
+
requiredAmount: DecimalNumber!
|
|
268
279
|
|
|
269
|
-
"""
|
|
270
|
-
|
|
280
|
+
"""The current allowance approved"""
|
|
281
|
+
currentAllowance: DecimalNumber!
|
|
271
282
|
|
|
272
|
-
"""
|
|
273
|
-
|
|
283
|
+
"""The transaction to send after the approval is complete"""
|
|
284
|
+
originalTransaction: TransactionRequest!
|
|
274
285
|
}
|
|
275
286
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
categoryId: Int!
|
|
287
|
+
input Erc20Input {
|
|
288
|
+
"""The token address"""
|
|
289
|
+
address: EvmAddress!
|
|
280
290
|
|
|
281
|
-
"""The
|
|
282
|
-
|
|
291
|
+
"""The token chain id"""
|
|
292
|
+
chainId: ChainId!
|
|
293
|
+
}
|
|
283
294
|
|
|
284
|
-
|
|
285
|
-
|
|
295
|
+
type Erc20Token {
|
|
296
|
+
"""The token address"""
|
|
297
|
+
address: EvmAddress!
|
|
286
298
|
|
|
287
|
-
"""The
|
|
288
|
-
|
|
299
|
+
"""The chain its deployed to"""
|
|
300
|
+
chain: Chain!
|
|
289
301
|
|
|
290
|
-
"""The
|
|
291
|
-
|
|
302
|
+
"""The ERC20 token info"""
|
|
303
|
+
info: TokenInfo!
|
|
292
304
|
|
|
293
|
-
"""
|
|
294
|
-
|
|
305
|
+
"""
|
|
306
|
+
The protocol only deals with ERC20 this allows you to understand if
|
|
307
|
+
the token is a wrapped native token to allow you to maybe change \`WETH\` > \`ETH\`
|
|
308
|
+
on the display screen, or whatever you decide makes sense
|
|
309
|
+
"""
|
|
310
|
+
isWrappedNativeToken: Boolean!
|
|
295
311
|
|
|
296
|
-
"""If
|
|
297
|
-
|
|
312
|
+
"""If permit is supported for the ERC20 token"""
|
|
313
|
+
permitSupported: Boolean!
|
|
298
314
|
}
|
|
299
315
|
|
|
300
|
-
|
|
301
|
-
"""The token address."""
|
|
302
|
-
currency: EvmAddress!
|
|
316
|
+
scalar EvmAddress
|
|
303
317
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
318
|
+
input ExchangeRateRequest {
|
|
319
|
+
"""The from criteria"""
|
|
320
|
+
from: ExchangeRateRequestFrom!
|
|
321
|
+
|
|
322
|
+
"""The currency to get the result in"""
|
|
323
|
+
to: Currency!
|
|
309
324
|
|
|
310
325
|
"""
|
|
311
|
-
The
|
|
326
|
+
The date time to get the exchange rate at, if not provided the latest rate is returned
|
|
312
327
|
"""
|
|
313
|
-
|
|
328
|
+
at: DateTime
|
|
314
329
|
}
|
|
315
330
|
|
|
316
|
-
|
|
331
|
+
input ExchangeRateRequestFrom @oneOf {
|
|
332
|
+
"""The currency"""
|
|
333
|
+
fiat: Currency
|
|
334
|
+
|
|
335
|
+
"""The erc20 token"""
|
|
336
|
+
erc20: Erc20Input
|
|
337
|
+
|
|
338
|
+
"""The native token"""
|
|
339
|
+
native: ChainId
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
union ExecutionPlan = TransactionRequest | Erc20ApprovalRequired | PreContractActionRequired | InsufficientBalanceError
|
|
343
|
+
|
|
344
|
+
type FiatAmount {
|
|
345
|
+
value: BigDecimal!
|
|
346
|
+
name: String!
|
|
347
|
+
symbol: String!
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
type FiatAmountValueVariation {
|
|
351
|
+
current: FiatAmount!
|
|
352
|
+
after: FiatAmount!
|
|
353
|
+
}
|
|
317
354
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
union ExecutionPlan = TransactionRequest | ApprovalRequired | InsufficientBalanceError
|
|
355
|
+
type FiatAmountWithChange {
|
|
356
|
+
current: FiatAmount!
|
|
357
|
+
change(window: TimeWindow! = LAST_DAY): PercentNumber!
|
|
358
|
+
}
|
|
323
359
|
|
|
324
360
|
input ForkTopUpErc20 {
|
|
325
361
|
"""The token address"""
|
|
@@ -353,336 +389,295 @@ type ForkTopUpResponse {
|
|
|
353
389
|
|
|
354
390
|
input HasProcessedKnownTransactionRequest {
|
|
355
391
|
"""
|
|
356
|
-
The operation
|
|
392
|
+
The operation types this is given to you on the TransactionRequest::operations
|
|
357
393
|
"""
|
|
358
|
-
|
|
394
|
+
operations: [OperationType!]!
|
|
359
395
|
|
|
360
396
|
"""The tx hash"""
|
|
361
397
|
txHash: TxHash!
|
|
362
398
|
}
|
|
363
399
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
400
|
+
type HealthFactorError {
|
|
401
|
+
reason: String!
|
|
402
|
+
current: BigDecimal
|
|
403
|
+
after: BigDecimal
|
|
367
404
|
}
|
|
368
405
|
|
|
369
|
-
|
|
370
|
-
"""
|
|
371
|
-
The user health factor before - if null, they don't have one because they are not borrowing
|
|
372
|
-
"""
|
|
373
|
-
before: BigDecimal
|
|
406
|
+
union HealthFactorResult = HealthFactorVariation | HealthFactorError
|
|
374
407
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
"""
|
|
408
|
+
type HealthFactorVariation {
|
|
409
|
+
current: BigDecimal
|
|
378
410
|
after: BigDecimal
|
|
379
411
|
}
|
|
380
412
|
|
|
381
|
-
|
|
382
|
-
|
|
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!
|
|
413
|
+
type HealthFactorWithChange {
|
|
414
|
+
current: BigDecimal
|
|
415
|
+
change(window: TimeWindow! = LAST_DAY): PercentNumber!
|
|
390
416
|
}
|
|
391
417
|
|
|
392
|
-
|
|
393
|
-
"""The
|
|
394
|
-
|
|
418
|
+
type Hub {
|
|
419
|
+
"""The id for the hub"""
|
|
420
|
+
id: HubId!
|
|
395
421
|
|
|
396
|
-
"""
|
|
397
|
-
|
|
398
|
-
"""
|
|
399
|
-
collateralToken: EvmAddress!
|
|
422
|
+
"""The hub name"""
|
|
423
|
+
name: String!
|
|
400
424
|
|
|
401
|
-
"""
|
|
402
|
-
|
|
403
|
-
"""
|
|
404
|
-
underlyingToken: EvmAddress!
|
|
425
|
+
"""The hub address"""
|
|
426
|
+
address: EvmAddress!
|
|
405
427
|
|
|
406
|
-
"""The
|
|
407
|
-
|
|
428
|
+
"""The chain the hub is deployed on"""
|
|
429
|
+
chain: Chain!
|
|
408
430
|
|
|
409
|
-
"""
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
debtToCover: DebtToCover! = {max: true}
|
|
431
|
+
"""The hub summary"""
|
|
432
|
+
summary(currency: Currency! = USD): HubSummary!
|
|
433
|
+
}
|
|
413
434
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
receiveAToken: Boolean! = false
|
|
435
|
+
type HubAsset {
|
|
436
|
+
"""The id for the hub asset"""
|
|
437
|
+
id: HubAssetId!
|
|
418
438
|
|
|
419
|
-
"""The
|
|
420
|
-
|
|
421
|
-
}
|
|
439
|
+
"""The onchain asset id"""
|
|
440
|
+
onchainAssetId: OnChainHubAssetId!
|
|
422
441
|
|
|
423
|
-
"""
|
|
424
|
-
|
|
425
|
-
"""Reserve of the collateral."""
|
|
426
|
-
reserve: ReserveInfo!
|
|
442
|
+
"""The hub"""
|
|
443
|
+
hub: Hub!
|
|
427
444
|
|
|
428
|
-
"""
|
|
429
|
-
|
|
430
|
-
}
|
|
445
|
+
"""The underlying token"""
|
|
446
|
+
underlying: Erc20Token!
|
|
431
447
|
|
|
432
|
-
"""
|
|
433
|
-
|
|
434
|
-
"""Reserve of the repaid debt."""
|
|
435
|
-
reserve: ReserveInfo!
|
|
448
|
+
"""The hub asset summary"""
|
|
449
|
+
summary: HubAssetSummary!
|
|
436
450
|
|
|
437
|
-
"""
|
|
438
|
-
|
|
451
|
+
"""The hub asset settings"""
|
|
452
|
+
settings: HubAssetSettings!
|
|
453
|
+
userState: HubAssetUserState
|
|
439
454
|
}
|
|
440
455
|
|
|
441
|
-
|
|
442
|
-
"""The human-friendly name for the market"""
|
|
443
|
-
name: String!
|
|
456
|
+
scalar HubAssetId
|
|
444
457
|
|
|
445
|
-
|
|
446
|
-
|
|
458
|
+
type HubAssetSettings {
|
|
459
|
+
"""The fee receiver"""
|
|
460
|
+
feeReceiver: EvmAddress!
|
|
447
461
|
|
|
448
|
-
"""The liquidity
|
|
449
|
-
|
|
462
|
+
"""The liquidity fee"""
|
|
463
|
+
liquidityFee: PercentNumber!
|
|
450
464
|
|
|
451
|
-
"""
|
|
452
|
-
|
|
453
|
-
userState: MarketUserState
|
|
465
|
+
"""The ir strategy"""
|
|
466
|
+
irStrategy: EvmAddress!
|
|
454
467
|
|
|
455
|
-
"""The
|
|
456
|
-
|
|
468
|
+
"""The reinvestment strategy"""
|
|
469
|
+
reinvestmentController: EvmAddress
|
|
470
|
+
}
|
|
457
471
|
|
|
458
|
-
|
|
459
|
-
|
|
472
|
+
type HubAssetSummary {
|
|
473
|
+
"""The supplied amount"""
|
|
474
|
+
supplied: Erc20Amount!
|
|
460
475
|
|
|
461
|
-
"""The
|
|
462
|
-
|
|
476
|
+
"""The borrowed amount"""
|
|
477
|
+
borrowed: Erc20Amount!
|
|
463
478
|
|
|
464
|
-
"""The
|
|
465
|
-
|
|
466
|
-
}
|
|
479
|
+
"""The available liquidity"""
|
|
480
|
+
availableLiquidity: Erc20Amount!
|
|
467
481
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
name: String!
|
|
482
|
+
"""The supply APY"""
|
|
483
|
+
supplyApy: PercentNumber!
|
|
471
484
|
|
|
472
|
-
"""The
|
|
473
|
-
|
|
485
|
+
"""The borrow APY"""
|
|
486
|
+
borrowApy: PercentNumber!
|
|
474
487
|
|
|
475
|
-
"""The
|
|
476
|
-
|
|
488
|
+
"""The net APY"""
|
|
489
|
+
netApy: PercentNumber!
|
|
477
490
|
|
|
478
|
-
"""The
|
|
479
|
-
|
|
491
|
+
"""The utilization rate"""
|
|
492
|
+
utilizationRate: PercentNumber!
|
|
480
493
|
}
|
|
481
494
|
|
|
482
|
-
|
|
483
|
-
"""The
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
"""The chain id the market is deployed on"""
|
|
487
|
-
chainId: ChainId!
|
|
495
|
+
type HubAssetUserState {
|
|
496
|
+
"""The hub asset balance"""
|
|
497
|
+
balance: Erc20Amount!
|
|
488
498
|
}
|
|
489
499
|
|
|
490
|
-
input
|
|
491
|
-
|
|
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
|
+
input HubAssetsRequest {
|
|
501
|
+
query: HubAssetsRequestQuery!
|
|
500
502
|
user: EvmAddress
|
|
503
|
+
orderBy: HubAssetsRequestOrderBy! = {assetName: ASC}
|
|
501
504
|
}
|
|
502
505
|
|
|
503
|
-
input
|
|
504
|
-
|
|
505
|
-
|
|
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"""
|
|
506
|
+
input HubAssetsRequestOrderBy @oneOf {
|
|
507
|
+
assetName: OrderDirection
|
|
508
|
+
availableLiquidity: OrderDirection
|
|
516
509
|
supplyApy: OrderDirection
|
|
517
|
-
|
|
518
|
-
"""Order by the token name"""
|
|
519
|
-
tokenName: OrderDirection
|
|
510
|
+
borrowApy: OrderDirection
|
|
520
511
|
}
|
|
521
512
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
BOTH
|
|
513
|
+
input HubAssetsRequestQuery @oneOf {
|
|
514
|
+
hubInput: HubInput
|
|
515
|
+
hubId: HubId
|
|
526
516
|
}
|
|
527
517
|
|
|
528
|
-
|
|
529
|
-
"""The market address where this position exists"""
|
|
530
|
-
market: MarketInfo!
|
|
518
|
+
scalar HubId
|
|
531
519
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
"""The user's debt balance in this reserve"""
|
|
536
|
-
debt: TokenAmount!
|
|
520
|
+
input HubInput {
|
|
521
|
+
"""The hub address"""
|
|
522
|
+
address: EvmAddress!
|
|
537
523
|
|
|
538
|
-
"""The
|
|
539
|
-
|
|
524
|
+
"""The hub chain id"""
|
|
525
|
+
chainId: ChainId!
|
|
540
526
|
}
|
|
541
527
|
|
|
542
|
-
|
|
543
|
-
|
|
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!
|
|
528
|
+
input HubRequest {
|
|
529
|
+
query: HubRequestQuery!
|
|
560
530
|
}
|
|
561
531
|
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
"""The user's net annual percentage yield across all positions"""
|
|
567
|
-
netAPY: PercentValue!
|
|
532
|
+
input HubRequestQuery @oneOf {
|
|
533
|
+
hubInput: HubInput
|
|
534
|
+
hubId: HubId
|
|
535
|
+
}
|
|
568
536
|
|
|
537
|
+
type HubSummary {
|
|
569
538
|
"""
|
|
570
|
-
The
|
|
539
|
+
The total spoke reserves aggregated borrowed using this hub, showed in fiat as each asset has a different value
|
|
571
540
|
"""
|
|
572
|
-
|
|
541
|
+
totalBorrowed: FiatAmount!
|
|
573
542
|
|
|
574
|
-
"""
|
|
575
|
-
|
|
543
|
+
"""
|
|
544
|
+
The total spoke reserves aggregated borrow caps using this hub, showed in fiat as each asset has a different value
|
|
545
|
+
"""
|
|
546
|
+
totalBorrowCap: FiatAmount!
|
|
576
547
|
|
|
577
548
|
"""
|
|
578
|
-
The total
|
|
549
|
+
The total spoke reserves aggregated supplied using this hub, showed in fiat as each asset has a different value
|
|
579
550
|
"""
|
|
580
|
-
|
|
551
|
+
totalSupplied: FiatAmount!
|
|
581
552
|
|
|
582
|
-
"""
|
|
583
|
-
|
|
553
|
+
"""
|
|
554
|
+
The total spoke reserves aggregated supply caps using this hub, showed in fiat as each asset has a different value
|
|
555
|
+
"""
|
|
556
|
+
totalSupplyCap: FiatAmount!
|
|
584
557
|
|
|
585
558
|
"""
|
|
586
|
-
The
|
|
559
|
+
The utilization rate"
|
|
587
560
|
"""
|
|
588
|
-
|
|
561
|
+
utilizationRate: BigDecimal!
|
|
562
|
+
}
|
|
589
563
|
|
|
590
|
-
|
|
591
|
-
|
|
564
|
+
input HubTokenInput {
|
|
565
|
+
chainId: ChainId!
|
|
566
|
+
hub: EvmAddress!
|
|
567
|
+
token: EvmAddress!
|
|
568
|
+
}
|
|
592
569
|
|
|
593
|
-
|
|
594
|
-
|
|
570
|
+
input HubsRequest {
|
|
571
|
+
query: HubsRequestQuery!
|
|
572
|
+
orderBy: HubsRequestOrderBy! = {name: ASC}
|
|
573
|
+
}
|
|
595
574
|
|
|
596
|
-
|
|
597
|
-
|
|
575
|
+
input HubsRequestOrderBy @oneOf {
|
|
576
|
+
name: OrderDirection
|
|
577
|
+
totalBorrowed: OrderDirection
|
|
578
|
+
totalSupplied: OrderDirection
|
|
598
579
|
}
|
|
599
580
|
|
|
600
|
-
input
|
|
601
|
-
"""
|
|
602
|
-
|
|
581
|
+
input HubsRequestQuery @oneOf {
|
|
582
|
+
"""Get back all the hubs which have one of the underlying tokens supplied"""
|
|
583
|
+
tokens: [Erc20Input!]
|
|
603
584
|
|
|
604
|
-
"""
|
|
605
|
-
|
|
606
|
-
user features
|
|
607
|
-
"""
|
|
608
|
-
user: EvmAddress
|
|
585
|
+
"""Get back all the hubs based on the chain ids passed in"""
|
|
586
|
+
chainIds: [ChainId!]
|
|
609
587
|
}
|
|
610
588
|
|
|
611
|
-
type
|
|
612
|
-
"""The
|
|
613
|
-
|
|
589
|
+
type InsufficientBalanceError {
|
|
590
|
+
"""The amount required to do the original transaction"""
|
|
591
|
+
required: DecimalNumber!
|
|
592
|
+
|
|
593
|
+
"""The amount available in the wallet"""
|
|
594
|
+
available: DecimalNumber!
|
|
595
|
+
}
|
|
614
596
|
|
|
615
|
-
|
|
616
|
-
|
|
597
|
+
"""A scalar that can represent any JSON value."""
|
|
598
|
+
scalar JSON
|
|
617
599
|
|
|
618
|
-
|
|
619
|
-
|
|
600
|
+
input LiquidatePositionDebtAmount @oneOf {
|
|
601
|
+
"""Exact amount"""
|
|
602
|
+
exact: BigDecimal
|
|
620
603
|
|
|
621
|
-
"""
|
|
622
|
-
|
|
604
|
+
"""The most you can liquidate"""
|
|
605
|
+
max: AlwaysTrue
|
|
623
606
|
}
|
|
624
607
|
|
|
625
|
-
|
|
626
|
-
"""Extra APR for borrowing this asset from AAVE Merit program"""
|
|
627
|
-
borrowAprDiscount: PercentValue!
|
|
608
|
+
union LiquidatePositionExecutionPlan = TransactionRequest | Erc20ApprovalRequired | InsufficientBalanceError
|
|
628
609
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
610
|
+
input LiquidatePositionRequest {
|
|
611
|
+
"""The collateral reserve id"""
|
|
612
|
+
collateral: ReserveId!
|
|
613
|
+
|
|
614
|
+
"""The debt reserve id"""
|
|
615
|
+
debt: ReserveId!
|
|
632
616
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
extraSupplyApr: PercentValue!
|
|
617
|
+
"""The amount to liquidate"""
|
|
618
|
+
amount: LiquidatePositionDebtAmount!
|
|
636
619
|
|
|
637
|
-
"""
|
|
638
|
-
|
|
620
|
+
"""The person liquidating the position"""
|
|
621
|
+
liquidator: EvmAddress!
|
|
622
|
+
|
|
623
|
+
"""The user to liquidate"""
|
|
624
|
+
user: EvmAddress!
|
|
625
|
+
|
|
626
|
+
"""If you would like to receive shares over the asset"""
|
|
627
|
+
receiveShares: Boolean! = false
|
|
639
628
|
}
|
|
640
629
|
|
|
641
|
-
type
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
630
|
+
type LiquidatedActivity {
|
|
631
|
+
id: ID!
|
|
632
|
+
user: EvmAddress!
|
|
633
|
+
timestamp: DateTime!
|
|
634
|
+
txHash: TxHash!
|
|
635
|
+
spoke: Spoke!
|
|
636
|
+
collateralReserve: ReserveInfo!
|
|
637
|
+
debtReserve: ReserveInfo!
|
|
638
|
+
collateral: Erc20Amount!
|
|
639
|
+
debt: Erc20Amount!
|
|
640
|
+
liquidator: EvmAddress!
|
|
641
|
+
chain: Chain!
|
|
647
642
|
}
|
|
648
643
|
|
|
649
|
-
type
|
|
650
|
-
"""
|
|
651
|
-
|
|
644
|
+
type Mutation {
|
|
645
|
+
"""Top up a balance for a user or yourself on the fork"""
|
|
646
|
+
forkTopUp(request: ForkTopUpRequest!): ForkTopUpResponse!
|
|
647
|
+
}
|
|
652
648
|
|
|
653
|
-
|
|
654
|
-
|
|
649
|
+
type NativeAmount {
|
|
650
|
+
"""The native token"""
|
|
651
|
+
token: NativeToken!
|
|
655
652
|
|
|
656
|
-
"""The
|
|
657
|
-
|
|
653
|
+
"""The value"""
|
|
654
|
+
amount: DecimalNumber!
|
|
658
655
|
|
|
659
|
-
"""The
|
|
660
|
-
|
|
656
|
+
"""The fiat amount"""
|
|
657
|
+
fiatAmount(currency: Currency! = USD): FiatAmount!
|
|
661
658
|
|
|
662
|
-
"""The
|
|
663
|
-
|
|
659
|
+
"""The fiat rate"""
|
|
660
|
+
fiatRate(currency: Currency! = USD): DecimalNumber!
|
|
661
|
+
}
|
|
664
662
|
|
|
665
|
-
|
|
666
|
-
|
|
663
|
+
type NativeToken {
|
|
664
|
+
info: TokenInfo!
|
|
665
|
+
chain: Chain!
|
|
667
666
|
}
|
|
668
667
|
|
|
668
|
+
scalar OnChainHubAssetId
|
|
669
|
+
|
|
670
|
+
scalar OnChainReserveId
|
|
671
|
+
|
|
669
672
|
enum OperationType {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
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
|
|
673
|
+
SPOKE_BORROW
|
|
674
|
+
SPOKE_REPAY
|
|
675
|
+
SPOKE_SUPPLY
|
|
676
|
+
SPOKE_WITHDRAW
|
|
677
|
+
SPOKE_UPDATE_USER_RISK_PREMIUM
|
|
678
|
+
SPOKE_SET_USER_USING_AS_COLLATERAL
|
|
679
|
+
SPOKE_SET_USER_POSITION_MANAGER
|
|
680
|
+
RENOUNCE_SPOKE_USER_POSITION_MANAGER
|
|
686
681
|
}
|
|
687
682
|
|
|
688
683
|
enum OrderDirection {
|
|
@@ -695,6 +690,11 @@ enum PageSize {
|
|
|
695
690
|
FIFTY
|
|
696
691
|
}
|
|
697
692
|
|
|
693
|
+
type PaginatedActivitiesResult {
|
|
694
|
+
items: [ActivityItem!]!
|
|
695
|
+
pageInfo: PaginatedResultInfo!
|
|
696
|
+
}
|
|
697
|
+
|
|
698
698
|
type PaginatedResultInfo {
|
|
699
699
|
"""The cursor to the previous page of results, if any."""
|
|
700
700
|
prev: Cursor
|
|
@@ -703,234 +703,188 @@ type PaginatedResultInfo {
|
|
|
703
703
|
next: Cursor
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
"""List of user transaction items."""
|
|
709
|
-
items: [UserTransactionItem!]!
|
|
710
|
-
|
|
711
|
-
"""Pagination information."""
|
|
706
|
+
type PaginatedSpokePositionManagerResult {
|
|
707
|
+
items: [SpokePositionManger!]!
|
|
712
708
|
pageInfo: PaginatedResultInfo!
|
|
713
709
|
}
|
|
714
710
|
|
|
715
|
-
type
|
|
716
|
-
items: [
|
|
711
|
+
type PaginatedSpokeUserPositionManagerResult {
|
|
712
|
+
items: [SpokeUserPositionManager!]!
|
|
717
713
|
pageInfo: PaginatedResultInfo!
|
|
718
714
|
}
|
|
719
715
|
|
|
720
|
-
type
|
|
721
|
-
items: [
|
|
716
|
+
type PaginatedUserSwapsResult {
|
|
717
|
+
items: [SwapStatus!]!
|
|
722
718
|
pageInfo: PaginatedResultInfo!
|
|
723
719
|
}
|
|
724
720
|
|
|
725
|
-
type
|
|
726
|
-
"""
|
|
727
|
-
|
|
721
|
+
type PercentNumber {
|
|
722
|
+
"""
|
|
723
|
+
The on-chain representation of the percentage, stored in basis points (bps).
|
|
724
|
+
"""
|
|
725
|
+
onChainValue: BigInt!
|
|
728
726
|
|
|
729
|
-
"""The decimals
|
|
727
|
+
"""The number of decimals defining the precision of \`bps\`."""
|
|
730
728
|
decimals: Int!
|
|
731
729
|
|
|
732
|
-
"""The
|
|
730
|
+
"""The percentage value where 1.0 represents 100%."""
|
|
733
731
|
value: BigDecimal!
|
|
734
732
|
|
|
735
|
-
"""
|
|
736
|
-
|
|
737
|
-
For example, this will turn \`0.01232343\` to \`1.23\`, it will always round to \`2\` decimal points.
|
|
738
|
-
"""
|
|
739
|
-
formatted: BigDecimal!
|
|
733
|
+
"""The human-friendly percentage value formatted for display."""
|
|
734
|
+
normalized: BigDecimal!
|
|
740
735
|
}
|
|
741
736
|
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
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!
|
|
737
|
+
type PercentNumberVariation {
|
|
738
|
+
current: PercentNumber!
|
|
739
|
+
after: PercentNumber!
|
|
740
|
+
}
|
|
753
741
|
|
|
754
|
-
|
|
755
|
-
|
|
742
|
+
type PercentNumberWithChange {
|
|
743
|
+
current: PercentNumber!
|
|
744
|
+
change(window: TimeWindow! = LAST_DAY): PercentNumber!
|
|
745
|
+
}
|
|
756
746
|
|
|
757
|
-
|
|
747
|
+
type PermitMessageData {
|
|
758
748
|
owner: EvmAddress!
|
|
749
|
+
spender: EvmAddress!
|
|
750
|
+
value: BigInt!
|
|
751
|
+
nonce: BigInt!
|
|
752
|
+
deadline: Int!
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
input PermitRequest @oneOf {
|
|
756
|
+
supply: SupplyPermitRequest
|
|
757
|
+
repay: RepayPermitRequest
|
|
759
758
|
}
|
|
760
759
|
|
|
761
760
|
type PermitTypedDataResponse {
|
|
762
761
|
types: TypeDefinition!
|
|
763
762
|
primaryType: String!
|
|
764
763
|
domain: DomainData!
|
|
765
|
-
message:
|
|
764
|
+
message: PermitMessageData!
|
|
766
765
|
}
|
|
767
766
|
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
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!
|
|
767
|
+
type PreContractActionRequired {
|
|
768
|
+
"""The transaction requires a pre-contract action first"""
|
|
769
|
+
transaction: TransactionRequest!
|
|
879
770
|
|
|
880
|
-
"""
|
|
881
|
-
|
|
771
|
+
"""The reason for the pre-contract action"""
|
|
772
|
+
reason: String!
|
|
882
773
|
|
|
883
|
-
"""
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
creditDelegateeAllowance(request: CreditDelegateeAmountRequest!): TokenAmount!
|
|
774
|
+
"""The transaction to send after the approval is complete"""
|
|
775
|
+
originalTransaction: TransactionRequest!
|
|
776
|
+
}
|
|
887
777
|
|
|
888
|
-
|
|
889
|
-
|
|
778
|
+
input PrepareLimitOrderSwapInput {
|
|
779
|
+
quoteId: SwapQuoteId!
|
|
780
|
+
newSellAmount: BigDecimal
|
|
781
|
+
newBuyAmount: BigDecimal
|
|
890
782
|
|
|
891
|
-
"""
|
|
892
|
-
|
|
783
|
+
"""Slippage in basis points"""
|
|
784
|
+
newSlippage: BigDecimal
|
|
785
|
+
newReceiver: EvmAddress
|
|
786
|
+
}
|
|
893
787
|
|
|
894
|
-
|
|
895
|
-
|
|
788
|
+
input PrepareMarketOrderSwapInput {
|
|
789
|
+
chainId: ChainId!
|
|
790
|
+
buy: TokenInput!
|
|
791
|
+
sell: TokenInput!
|
|
792
|
+
amount: BigDecimal!
|
|
793
|
+
kind: SwapKind!
|
|
794
|
+
user: EvmAddress!
|
|
795
|
+
receiver: EvmAddress
|
|
796
|
+
}
|
|
896
797
|
|
|
897
|
-
|
|
898
|
-
|
|
798
|
+
input PrepareSwapCancelRequest {
|
|
799
|
+
id: SwapId!
|
|
800
|
+
}
|
|
899
801
|
|
|
900
|
-
|
|
901
|
-
|
|
802
|
+
type PrepareSwapCancelResult {
|
|
803
|
+
data: CancelSwapTypedData!
|
|
804
|
+
}
|
|
902
805
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
806
|
+
input PrepareSwapRequest @oneOf {
|
|
807
|
+
market: PrepareMarketOrderSwapInput
|
|
808
|
+
limit: PrepareLimitOrderSwapInput
|
|
809
|
+
}
|
|
907
810
|
|
|
908
|
-
|
|
909
|
-
userMarketState(request: UserMarketStateRequest!): MarketUserState!
|
|
811
|
+
union PrepareSwapResult = SwapByIntent | SwapByIntentWithApprovalRequired | SwapByTransaction | InsufficientBalanceError
|
|
910
812
|
|
|
911
|
-
|
|
912
|
-
|
|
813
|
+
input PreviewAction @oneOf {
|
|
814
|
+
supply: SupplyRequest
|
|
815
|
+
borrow: BorrowRequest
|
|
816
|
+
repay: RepayRequest
|
|
817
|
+
withdraw: WithdrawRequest
|
|
818
|
+
setUserSupplyAsCollateral: SetUserSupplyAsCollateralRequest
|
|
819
|
+
}
|
|
913
820
|
|
|
914
|
-
|
|
915
|
-
|
|
821
|
+
input PreviewRequest {
|
|
822
|
+
action: PreviewAction!
|
|
823
|
+
}
|
|
916
824
|
|
|
917
|
-
|
|
918
|
-
|
|
825
|
+
type PreviewUserPosition {
|
|
826
|
+
id: UserPositionId!
|
|
827
|
+
healthFactor: HealthFactorResult!
|
|
828
|
+
riskPremium: PercentNumberVariation!
|
|
919
829
|
|
|
920
|
-
"""
|
|
921
|
-
|
|
830
|
+
"""The net APY for one user position on a current spoke"""
|
|
831
|
+
netApy: PercentNumberVariation!
|
|
832
|
+
netCollateral(currency: Currency! = USD): FiatAmountValueVariation!
|
|
833
|
+
netBalance(currency: Currency! = USD): FiatAmountValueVariation!
|
|
834
|
+
}
|
|
922
835
|
|
|
923
|
-
|
|
924
|
-
|
|
836
|
+
type Query {
|
|
837
|
+
health: Boolean!
|
|
838
|
+
chain(request: ChainRequest!): Chain
|
|
839
|
+
chains(filter: ChainsFilter!): [Chain!]!
|
|
925
840
|
|
|
926
841
|
"""Generate EIP-712 typed data for EIP-2612 permit signature"""
|
|
927
842
|
permitTypedData(request: PermitRequest!): PermitTypedDataResponse!
|
|
928
843
|
|
|
929
|
-
"""Get the
|
|
844
|
+
"""Get the exchange rate of tokens > currency or currency > currency"""
|
|
845
|
+
exchangeRate(request: ExchangeRateRequest!): FiatAmount!
|
|
846
|
+
asset(request: AssetRequest!): Asset
|
|
847
|
+
assetSupplyHistory(request: AssetSupplyHistoryRequest!): [AssetSupplySample!]!
|
|
848
|
+
assetBorrowHistory(request: AssetBorrowHistoryRequest!): [AssetBorrowSample!]!
|
|
849
|
+
assetPriceHistory(request: AssetPriceHistoryRequest!): [AssetPriceSample!]!
|
|
850
|
+
|
|
851
|
+
"""Fetch a list of hubs depending on your search criteria"""
|
|
852
|
+
hubs(request: HubsRequest!): [Hub!]!
|
|
853
|
+
hub(request: HubRequest!): Hub
|
|
854
|
+
hubAssets(request: HubAssetsRequest!): [HubAsset!]!
|
|
930
855
|
reserve(request: ReserveRequest!): Reserve
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
856
|
+
reserves(request: ReservesRequest!): [Reserve!]!
|
|
857
|
+
supply(request: SupplyRequest!): ExecutionPlan!
|
|
858
|
+
borrow(request: BorrowRequest!): ExecutionPlan!
|
|
859
|
+
withdraw(request: WithdrawRequest!): ExecutionPlan!
|
|
860
|
+
repay(request: RepayRequest!): ExecutionPlan!
|
|
861
|
+
spokePositionManagers(request: SpokePositionManagersRequest!): PaginatedSpokePositionManagerResult!
|
|
862
|
+
spokeUserPositionManagers(request: SpokeUserPositionManagersRequest!): PaginatedSpokeUserPositionManagerResult!
|
|
863
|
+
setSpokeUserPositionManager(request: SetSpokeUserPositionManagerRequest!): TransactionRequest!
|
|
864
|
+
renounceSpokeUserPositionManager(request: RenounceSpokeUserPositionManagerRequest!): TransactionRequest!
|
|
865
|
+
setUserSupplyAsCollateral(request: SetUserSupplyAsCollateralRequest!): TransactionRequest!
|
|
866
|
+
liquidatePosition(request: LiquidatePositionRequest!): LiquidatePositionExecutionPlan!
|
|
867
|
+
updateUserRiskPremium(request: UpdateUserRiskPremiumRequest!): TransactionRequest!
|
|
868
|
+
updateUserDynamicConfig(request: UpdateUserDynamicConfigRequest!): TransactionRequest!
|
|
869
|
+
preview(request: PreviewRequest!): PreviewUserPosition!
|
|
870
|
+
borrowApyHistory(request: BorrowAPYHistoryRequest!): [APYSample!]!
|
|
871
|
+
supplyApyHistory(request: SupplyAPYHistoryRequest!): [APYSample!]!
|
|
872
|
+
spoke(request: SpokeRequest!): Spoke
|
|
873
|
+
|
|
874
|
+
"""Lists all spokes"""
|
|
875
|
+
spokes(request: SpokesRequest!): [Spoke!]!
|
|
876
|
+
|
|
877
|
+
"""
|
|
878
|
+
Get the user balances for the protocol
|
|
879
|
+
This will only return assets that can be used on the protocol
|
|
880
|
+
"""
|
|
881
|
+
userBalances(request: UserBalancesRequest!): [UserBalance!]!
|
|
882
|
+
userBorrows(request: UserBorrowsRequest!): [UserBorrowItem!]!
|
|
883
|
+
userSummary(request: UserSummaryRequest!): UserSummary!
|
|
884
|
+
userSummaryHistory(request: UserSummaryHistoryRequest!): [UserSummaryHistoryItem!]!
|
|
885
|
+
userPositions(request: UserPositionsRequest!): [UserPosition!]!
|
|
886
|
+
userPosition(request: UserPositionRequest!): UserPosition
|
|
887
|
+
userSupplies(request: UserSuppliesRequest!): [UserSupplyItem!]!
|
|
934
888
|
|
|
935
889
|
"""
|
|
936
890
|
This lets you know the API has processed the known transaction hash, as the API uses caching to make things as fast
|
|
@@ -940,1352 +894,1065 @@ type Query {
|
|
|
940
894
|
cater for the race condition.
|
|
941
895
|
"""
|
|
942
896
|
hasProcessedKnownTransaction(request: HasProcessedKnownTransactionRequest!): Boolean!
|
|
943
|
-
|
|
897
|
+
activities(request: ActivitiesRequest!): PaginatedActivitiesResult!
|
|
898
|
+
swapQuote(request: SwapQuoteRequest!): SwapQuote!
|
|
899
|
+
prepareSwap(request: PrepareSwapRequest!): PrepareSwapResult!
|
|
900
|
+
swap(request: SwapRequest!): SwapExecutionPlan!
|
|
901
|
+
swapStatus(request: SwapStatusRequest!): SwapStatus!
|
|
902
|
+
userSwaps(request: UserSwapsRequest!): PaginatedUserSwapsResult!
|
|
903
|
+
prepareSwapCancel(request: PrepareSwapCancelRequest!): PrepareSwapCancelResult!
|
|
904
|
+
cancelSwap(request: CancelSwapRequest!): CancelSwapExecutionPlan!
|
|
905
|
+
swappableTokens(request: SwappableTokensRequest!): [Token!]!
|
|
906
|
+
}
|
|
944
907
|
|
|
945
|
-
|
|
946
|
-
|
|
908
|
+
input RenounceSpokeUserPositionManagerRequest {
|
|
909
|
+
"""The spoke id"""
|
|
910
|
+
spoke: SpokeId!
|
|
947
911
|
|
|
948
|
-
"""
|
|
949
|
-
|
|
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!
|
|
912
|
+
"""The address to remove as a position manager"""
|
|
913
|
+
manager: EvmAddress!
|
|
958
914
|
|
|
959
|
-
"""
|
|
960
|
-
|
|
915
|
+
"""The address to remove \`manager\` as position manager"""
|
|
916
|
+
managing: EvmAddress!
|
|
917
|
+
}
|
|
961
918
|
|
|
962
|
-
|
|
963
|
-
|
|
919
|
+
type RepayActivity {
|
|
920
|
+
id: ID!
|
|
921
|
+
user: EvmAddress!
|
|
922
|
+
timestamp: DateTime!
|
|
923
|
+
txHash: TxHash!
|
|
924
|
+
spoke: Spoke!
|
|
925
|
+
reserve: ReserveInfo!
|
|
926
|
+
repaid: Erc20Amount!
|
|
927
|
+
chain: Chain!
|
|
964
928
|
}
|
|
965
929
|
|
|
966
|
-
input
|
|
930
|
+
input RepayAmountInputWithPermit @oneOf {
|
|
967
931
|
"""The native amount"""
|
|
968
|
-
native:
|
|
932
|
+
native: AmountInput
|
|
969
933
|
|
|
970
934
|
"""The erc20 amount input"""
|
|
971
|
-
erc20:
|
|
935
|
+
erc20: RepayErc20AmountInputWithPermit
|
|
972
936
|
}
|
|
973
937
|
|
|
974
|
-
input
|
|
938
|
+
input RepayErc20AmountInputWithPermit {
|
|
975
939
|
"""
|
|
976
|
-
|
|
977
|
-
Token value in its main unit (e.g., 1.5 GHO), not in the smallest fraction (e.g., wei).
|
|
940
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g., wei).
|
|
978
941
|
"""
|
|
979
|
-
|
|
942
|
+
value: AmountInput!
|
|
980
943
|
|
|
981
|
-
"""
|
|
982
|
-
|
|
944
|
+
"""
|
|
945
|
+
The signed ERC20 permit message to operate on the relevant token without a need for an ERC20 Approval transaction.
|
|
946
|
+
"""
|
|
947
|
+
permitSig: ERC20PermitSignature
|
|
983
948
|
}
|
|
984
949
|
|
|
985
|
-
input
|
|
986
|
-
"""The
|
|
987
|
-
|
|
950
|
+
input RepayPermitRequest {
|
|
951
|
+
"""The reserve id"""
|
|
952
|
+
reserve: ReserveId!
|
|
988
953
|
|
|
989
|
-
"""The amount
|
|
990
|
-
|
|
954
|
+
"""The amount repaying"""
|
|
955
|
+
amount: AmountInput!
|
|
991
956
|
|
|
992
|
-
"""
|
|
993
|
-
|
|
994
|
-
"""
|
|
995
|
-
permitSig: ERC712Signature
|
|
957
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
958
|
+
sender: EvmAddress!
|
|
996
959
|
}
|
|
997
960
|
|
|
998
961
|
input RepayRequest {
|
|
999
|
-
"""The
|
|
1000
|
-
|
|
962
|
+
"""The reserve id"""
|
|
963
|
+
reserve: ReserveId!
|
|
1001
964
|
|
|
1002
|
-
"""
|
|
1003
|
-
|
|
1004
|
-
"""
|
|
1005
|
-
amount: RepayAmountInput!
|
|
965
|
+
"""The amount repaying"""
|
|
966
|
+
amount: RepayAmountInputWithPermit!
|
|
1006
967
|
|
|
1007
968
|
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1008
969
|
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
970
|
}
|
|
1018
971
|
|
|
1019
972
|
type Reserve {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
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"""
|
|
973
|
+
id: ReserveId!
|
|
974
|
+
onChainId: OnChainReserveId!
|
|
975
|
+
borrowCap: BigDecimal!
|
|
976
|
+
supplyCap: BigDecimal!
|
|
977
|
+
chain: Chain!
|
|
978
|
+
summary: ReserveSummary!
|
|
979
|
+
settings: ReserveSettings!
|
|
980
|
+
status: ReserveStatus!
|
|
981
|
+
canBorrow: Boolean!
|
|
982
|
+
canSupply: Boolean!
|
|
983
|
+
canUseAsCollateral: Boolean!
|
|
1086
984
|
userState: ReserveUserState
|
|
985
|
+
asset: HubAsset!
|
|
986
|
+
spoke: Spoke!
|
|
1087
987
|
}
|
|
1088
988
|
|
|
1089
|
-
|
|
1090
|
-
"""The
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
"""The total amount borrowed from this reserve"""
|
|
1094
|
-
total: TokenAmount!
|
|
1095
|
-
|
|
1096
|
-
"""The reserve factor percentage"""
|
|
1097
|
-
reserveFactor: PercentValue!
|
|
989
|
+
input ReserveAmountInput @oneOf {
|
|
990
|
+
"""The native amount"""
|
|
991
|
+
native: BigDecimal
|
|
1098
992
|
|
|
1099
|
-
"""The
|
|
1100
|
-
|
|
993
|
+
"""The erc20 amount input"""
|
|
994
|
+
erc20: ReserveErc20AmountInput
|
|
995
|
+
}
|
|
1101
996
|
|
|
1102
|
-
|
|
1103
|
-
|
|
997
|
+
input ReserveAmountInputWithPermit @oneOf {
|
|
998
|
+
"""The native amount"""
|
|
999
|
+
native: BigDecimal
|
|
1104
1000
|
|
|
1105
|
-
"""
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
"""
|
|
1109
|
-
variableRateSlope1: PercentValue!
|
|
1001
|
+
"""The erc20 amount input"""
|
|
1002
|
+
erc20: ReserveErc20AmountInputWithPermit
|
|
1003
|
+
}
|
|
1110
1004
|
|
|
1005
|
+
input ReserveErc20AmountInput {
|
|
1111
1006
|
"""
|
|
1112
|
-
|
|
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
|
|
1007
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g., wei).
|
|
1115
1008
|
"""
|
|
1116
|
-
|
|
1009
|
+
value: BigDecimal!
|
|
1010
|
+
}
|
|
1117
1011
|
|
|
1012
|
+
input ReserveErc20AmountInputWithPermit {
|
|
1118
1013
|
"""
|
|
1119
|
-
|
|
1120
|
-
from slope1 to slope2. This represents the target utilization rate for the reserve
|
|
1014
|
+
Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g., wei).
|
|
1121
1015
|
"""
|
|
1122
|
-
|
|
1016
|
+
value: BigDecimal!
|
|
1123
1017
|
|
|
1124
1018
|
"""
|
|
1125
|
-
|
|
1019
|
+
The signed ERC20 permit message to operate on the relevant token without a need for an ERC20 Approval transaction.
|
|
1126
1020
|
"""
|
|
1127
|
-
|
|
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
|
|
1021
|
+
permitSig: ERC20PermitSignature
|
|
1145
1022
|
}
|
|
1146
1023
|
|
|
1147
|
-
|
|
1024
|
+
scalar ReserveId
|
|
1148
1025
|
|
|
1149
1026
|
type ReserveInfo {
|
|
1150
|
-
|
|
1151
|
-
|
|
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!]!
|
|
1027
|
+
id: ReserveId!
|
|
1028
|
+
asset: HubAsset!
|
|
1174
1029
|
}
|
|
1175
1030
|
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
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!
|
|
1031
|
+
input ReserveInput {
|
|
1032
|
+
chainId: ChainId!
|
|
1033
|
+
spoke: EvmAddress!
|
|
1034
|
+
onChainId: OnChainReserveId!
|
|
1187
1035
|
}
|
|
1188
1036
|
|
|
1189
1037
|
input ReserveRequest {
|
|
1190
|
-
|
|
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!
|
|
1038
|
+
query: ReserveRequestQuery!
|
|
1198
1039
|
|
|
1199
1040
|
"""
|
|
1200
|
-
The user
|
|
1201
|
-
user features
|
|
1041
|
+
The user who is doing the query (this injects user state into some of the return objects)
|
|
1202
1042
|
"""
|
|
1203
1043
|
user: EvmAddress
|
|
1204
1044
|
}
|
|
1205
1045
|
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
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!
|
|
1046
|
+
input ReserveRequestQuery @oneOf {
|
|
1047
|
+
reserveId: ReserveId
|
|
1048
|
+
reserveInput: ReserveInput
|
|
1230
1049
|
}
|
|
1231
1050
|
|
|
1232
|
-
type
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
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!
|
|
1051
|
+
type ReserveSettings {
|
|
1052
|
+
collateralFactor: PercentNumber!
|
|
1053
|
+
maxLiquidationBonus: PercentNumber!
|
|
1054
|
+
collateralRisk: PercentNumber!
|
|
1055
|
+
borrowable: Boolean!
|
|
1056
|
+
collateral: Boolean!
|
|
1057
|
+
suppliable: Boolean!
|
|
1255
1058
|
}
|
|
1256
1059
|
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
"""The chain id - savings GHO for now only works on Ethereum"""
|
|
1262
|
-
chainId: ChainId
|
|
1060
|
+
type ReserveStatus {
|
|
1061
|
+
frozen: Boolean!
|
|
1062
|
+
paused: Boolean!
|
|
1063
|
+
active: Boolean!
|
|
1263
1064
|
}
|
|
1264
1065
|
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
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
|
|
1066
|
+
type ReserveSummary {
|
|
1067
|
+
supplied: Erc20Amount!
|
|
1068
|
+
borrowed: Erc20Amount!
|
|
1069
|
+
supplyApy: PercentNumber!
|
|
1070
|
+
borrowApy: PercentNumber!
|
|
1279
1071
|
}
|
|
1280
1072
|
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
max: AlwaysTrue
|
|
1073
|
+
type ReserveUserState {
|
|
1074
|
+
balance: Erc20Amount!
|
|
1075
|
+
suppliable: Erc20Amount!
|
|
1076
|
+
borrowable: Erc20Amount!
|
|
1077
|
+
borrowApy: PercentNumber!
|
|
1287
1078
|
}
|
|
1288
1079
|
|
|
1289
|
-
input
|
|
1290
|
-
"""The
|
|
1291
|
-
|
|
1080
|
+
input ReservesRequest {
|
|
1081
|
+
"""The reserve's request query"""
|
|
1082
|
+
query: ReservesRequestQuery!
|
|
1292
1083
|
|
|
1293
1084
|
"""
|
|
1294
|
-
The
|
|
1085
|
+
The user who is doing the query (this injects user state into some of the return objects)
|
|
1295
1086
|
"""
|
|
1296
|
-
|
|
1087
|
+
user: EvmAddress
|
|
1297
1088
|
|
|
1298
|
-
"""The
|
|
1299
|
-
|
|
1089
|
+
"""The reserve's filter"""
|
|
1090
|
+
filter: ReservesRequestFilter! = ALL
|
|
1300
1091
|
|
|
1301
|
-
"""The
|
|
1302
|
-
|
|
1092
|
+
"""The reserve's order by"""
|
|
1093
|
+
orderBy: ReservesRequestOrderBy! = {assetName: ASC}
|
|
1303
1094
|
}
|
|
1304
1095
|
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
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
|
|
1096
|
+
enum ReservesRequestFilter {
|
|
1097
|
+
SUPPLY
|
|
1098
|
+
BORROW
|
|
1099
|
+
ALL
|
|
1313
1100
|
}
|
|
1314
1101
|
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
"""The time windows for the history"""
|
|
1325
|
-
window: TimeWindow!
|
|
1326
|
-
|
|
1327
|
-
"""The chain id"""
|
|
1328
|
-
chainId: ChainId!
|
|
1102
|
+
input ReservesRequestOrderBy @oneOf {
|
|
1103
|
+
assetName: OrderDirection
|
|
1104
|
+
userBalance: OrderDirection
|
|
1105
|
+
supplyApy: OrderDirection
|
|
1106
|
+
supplyAvailable: OrderDirection
|
|
1107
|
+
borrowApy: OrderDirection
|
|
1108
|
+
borrowAvailable: OrderDirection
|
|
1109
|
+
collateralFactor: OrderDirection
|
|
1329
1110
|
}
|
|
1330
1111
|
|
|
1331
|
-
input
|
|
1332
|
-
"""
|
|
1333
|
-
|
|
1112
|
+
input ReservesRequestQuery @oneOf {
|
|
1113
|
+
"""Get all the reserves for a spoke"""
|
|
1114
|
+
spoke: SpokeInput
|
|
1334
1115
|
|
|
1335
|
-
"""
|
|
1336
|
-
|
|
1116
|
+
"""Get all the reserves for a spoke"""
|
|
1117
|
+
spokeId: SpokeId
|
|
1337
1118
|
|
|
1338
|
-
"""
|
|
1339
|
-
|
|
1119
|
+
"""Get all the reserves with underlying tokens"""
|
|
1120
|
+
tokens: [Erc20Input!]
|
|
1340
1121
|
|
|
1341
|
-
"""
|
|
1342
|
-
|
|
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
|
|
1122
|
+
"""Get all the reserves on a hub for an underlying"""
|
|
1123
|
+
hubToken: HubTokenInput
|
|
1347
1124
|
|
|
1348
|
-
"""
|
|
1349
|
-
|
|
1350
|
-
}
|
|
1125
|
+
"""Get all the reserves on a list of chains"""
|
|
1126
|
+
chainIds: [ChainId!]
|
|
1351
1127
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
LAST_WEEK
|
|
1355
|
-
LAST_MONTH
|
|
1356
|
-
LAST_SIX_MONTHS
|
|
1357
|
-
LAST_YEAR
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
type TokenAmount {
|
|
1361
|
-
usdPerToken: BigDecimal!
|
|
1128
|
+
"""Get all the reserves for a spoke for an underlying"""
|
|
1129
|
+
spokeToken: SpokeTokenInput
|
|
1362
1130
|
|
|
1363
|
-
"""
|
|
1364
|
-
|
|
1131
|
+
"""Get all tokens on a hub"""
|
|
1132
|
+
hub: HubInput
|
|
1365
1133
|
|
|
1366
|
-
"""
|
|
1367
|
-
|
|
1134
|
+
"""Get all the reserves on based on user position id"""
|
|
1135
|
+
userPositionId: UserPositionId
|
|
1368
1136
|
}
|
|
1369
1137
|
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
type TransactionRequest {
|
|
1374
|
-
"""Who the transaction is going to (normally a contract)"""
|
|
1375
|
-
to: EvmAddress!
|
|
1138
|
+
input SetSpokeUserPositionManagerRequest {
|
|
1139
|
+
"""The spoke id"""
|
|
1140
|
+
spoke: SpokeId!
|
|
1376
1141
|
|
|
1377
|
-
"""
|
|
1378
|
-
|
|
1142
|
+
"""The address to become the position manager"""
|
|
1143
|
+
manager: EvmAddress!
|
|
1379
1144
|
|
|
1380
|
-
"""
|
|
1381
|
-
|
|
1145
|
+
"""Approve or remove the manager"""
|
|
1146
|
+
approve: Boolean!
|
|
1382
1147
|
|
|
1383
|
-
"""The
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
"""The chain id"""
|
|
1387
|
-
chainId: ChainId!
|
|
1148
|
+
"""The user to set the position \`manager\` for"""
|
|
1149
|
+
user: EvmAddress!
|
|
1388
1150
|
|
|
1389
|
-
"""
|
|
1390
|
-
|
|
1391
|
-
If null the API does not track/require the outcome - once receipt is done, everything is ready to go
|
|
1392
|
-
"""
|
|
1393
|
-
operation: OperationType
|
|
1151
|
+
"""The signature"""
|
|
1152
|
+
signature: ERC20PermitSignature
|
|
1394
1153
|
}
|
|
1395
1154
|
|
|
1396
|
-
|
|
1155
|
+
input SetUserSupplyAsCollateralRequest {
|
|
1156
|
+
"""The reserve id"""
|
|
1157
|
+
reserve: ReserveId!
|
|
1397
1158
|
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
Permit: [TypeField!]!
|
|
1401
|
-
}
|
|
1159
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1160
|
+
sender: EvmAddress!
|
|
1402
1161
|
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
type: String!
|
|
1162
|
+
"""If you want to enable the collateral or disable"""
|
|
1163
|
+
enableCollateral: Boolean!
|
|
1406
1164
|
}
|
|
1407
1165
|
|
|
1408
|
-
scalar
|
|
1166
|
+
scalar Signature
|
|
1409
1167
|
|
|
1410
|
-
type
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
}
|
|
1168
|
+
type Spoke {
|
|
1169
|
+
"""The id for the spoke"""
|
|
1170
|
+
id: SpokeId!
|
|
1414
1171
|
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
market: EvmAddress!
|
|
1172
|
+
"""The spoke name (offchain)"""
|
|
1173
|
+
name: String!
|
|
1418
1174
|
|
|
1419
|
-
"""The
|
|
1420
|
-
|
|
1175
|
+
"""The spoke address"""
|
|
1176
|
+
address: EvmAddress!
|
|
1421
1177
|
|
|
1422
|
-
"""The chain
|
|
1423
|
-
|
|
1178
|
+
"""The spoke chain"""
|
|
1179
|
+
chain: Chain!
|
|
1424
1180
|
}
|
|
1425
1181
|
|
|
1426
|
-
|
|
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!
|
|
1182
|
+
scalar SpokeId
|
|
1436
1183
|
|
|
1437
|
-
|
|
1438
|
-
|
|
1184
|
+
input SpokeInput {
|
|
1185
|
+
"""The address of the spoke"""
|
|
1186
|
+
address: EvmAddress!
|
|
1439
1187
|
|
|
1440
|
-
"""
|
|
1441
|
-
|
|
1188
|
+
"""The chain id the spoke is deployed to"""
|
|
1189
|
+
chainId: ChainId!
|
|
1442
1190
|
}
|
|
1443
1191
|
|
|
1444
|
-
input
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
user: EvmAddress!
|
|
1450
|
-
|
|
1451
|
-
"""How to order the results"""
|
|
1452
|
-
orderBy: UserBorrowsRequestOrderBy! = {name: ASC}
|
|
1192
|
+
input SpokePositionManagersRequest {
|
|
1193
|
+
spoke: SpokeId!
|
|
1194
|
+
includeInactive: Boolean
|
|
1195
|
+
pageSize: PageSize!
|
|
1196
|
+
cursor: Cursor
|
|
1453
1197
|
}
|
|
1454
1198
|
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
"""Order by the asset name"""
|
|
1460
|
-
name: OrderDirection
|
|
1461
|
-
|
|
1462
|
-
"""Order by the annual percentage yield"""
|
|
1463
|
-
apy: OrderDirection
|
|
1199
|
+
type SpokePositionManger {
|
|
1200
|
+
name: String!
|
|
1201
|
+
address: EvmAddress!
|
|
1202
|
+
active: Boolean!
|
|
1464
1203
|
}
|
|
1465
1204
|
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
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!
|
|
1205
|
+
input SpokeRequest {
|
|
1206
|
+
"""The spoke request query"""
|
|
1207
|
+
query: SpokeRequestQuery!
|
|
1482
1208
|
}
|
|
1483
1209
|
|
|
1484
|
-
input
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
"""The user to toggle emode on"""
|
|
1489
|
-
user: EvmAddress!
|
|
1490
|
-
|
|
1491
|
-
"""The chain id"""
|
|
1492
|
-
chainId: ChainId!
|
|
1210
|
+
input SpokeRequestQuery @oneOf {
|
|
1211
|
+
spoke: SpokeInput
|
|
1212
|
+
spokeId: SpokeId
|
|
1493
1213
|
}
|
|
1494
1214
|
|
|
1495
|
-
|
|
1496
|
-
"""The
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
"""
|
|
1500
|
-
The reward tokens being claimed in the transaction - this is aggregated
|
|
1501
|
-
"""
|
|
1502
|
-
claimable: [ClaimableMeritReward!]!
|
|
1215
|
+
input SpokeTokenInput {
|
|
1216
|
+
"""The spoke id"""
|
|
1217
|
+
spoke: SpokeId!
|
|
1503
1218
|
|
|
1504
|
-
"""The
|
|
1505
|
-
|
|
1219
|
+
"""The token"""
|
|
1220
|
+
token: EvmAddress!
|
|
1506
1221
|
}
|
|
1507
1222
|
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1223
|
+
type SpokeUserPositionManager {
|
|
1224
|
+
name: String!
|
|
1225
|
+
address: EvmAddress!
|
|
1226
|
+
approvedOn: DateTime!
|
|
1227
|
+
active: Boolean!
|
|
1511
1228
|
}
|
|
1512
1229
|
|
|
1513
|
-
input
|
|
1514
|
-
|
|
1230
|
+
input SpokeUserPositionManagersRequest {
|
|
1231
|
+
spoke: SpokeId!
|
|
1515
1232
|
user: EvmAddress!
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
chainId: ChainId!
|
|
1519
|
-
filter: UserMeritRewardsFilter
|
|
1233
|
+
pageSize: PageSize!
|
|
1234
|
+
cursor: Cursor
|
|
1520
1235
|
}
|
|
1521
1236
|
|
|
1522
|
-
|
|
1523
|
-
|
|
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!
|
|
1237
|
+
input SpokesRequest {
|
|
1238
|
+
query: SpokesRequestQuery!
|
|
1538
1239
|
}
|
|
1539
1240
|
|
|
1540
|
-
input
|
|
1541
|
-
"""The pool address for the market"""
|
|
1542
|
-
market: EvmAddress!
|
|
1543
|
-
|
|
1544
|
-
"""The user to toggle emode on"""
|
|
1545
|
-
user: EvmAddress!
|
|
1546
|
-
|
|
1241
|
+
input SpokesRequestQuery @oneOf {
|
|
1547
1242
|
"""
|
|
1548
|
-
The
|
|
1243
|
+
The hub id
|
|
1244
|
+
Get all the spokes which hubs are linked to a spoke reserve
|
|
1549
1245
|
"""
|
|
1550
|
-
|
|
1246
|
+
hubId: HubId
|
|
1551
1247
|
|
|
1552
|
-
"""
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
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
|
|
1248
|
+
"""
|
|
1249
|
+
The hub address and chain id
|
|
1250
|
+
Get all the spokes which hubs are linked to a spoke reserve
|
|
1251
|
+
"""
|
|
1252
|
+
hub: HubInput
|
|
1579
1253
|
|
|
1580
|
-
"""
|
|
1581
|
-
|
|
1254
|
+
"""
|
|
1255
|
+
The chain ids
|
|
1256
|
+
Get all the spokes which are on the list of chain ids
|
|
1257
|
+
"""
|
|
1258
|
+
chainIds: [ChainId!]
|
|
1582
1259
|
}
|
|
1583
1260
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
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!
|
|
1261
|
+
input SupplyAPYHistoryRequest {
|
|
1262
|
+
reserve: ReserveId!
|
|
1263
|
+
window: TimeWindow! = LAST_DAY
|
|
1600
1264
|
}
|
|
1601
1265
|
|
|
1602
|
-
|
|
1603
|
-
|
|
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"""
|
|
1266
|
+
type SupplyActivity {
|
|
1267
|
+
id: ID!
|
|
1613
1268
|
user: EvmAddress!
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
"""Pagination cursor"""
|
|
1622
|
-
cursor: Cursor
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
input UserTransactionHistoryRequestOrderBy {
|
|
1626
|
-
"""Order by the date of the transaction"""
|
|
1627
|
-
date: OrderDirection
|
|
1269
|
+
timestamp: DateTime!
|
|
1270
|
+
txHash: TxHash!
|
|
1271
|
+
spoke: Spoke!
|
|
1272
|
+
reserve: ReserveInfo!
|
|
1273
|
+
supplied: Erc20Amount!
|
|
1274
|
+
chain: Chain!
|
|
1628
1275
|
}
|
|
1629
1276
|
|
|
1630
|
-
|
|
1277
|
+
input SupplyPermitRequest {
|
|
1278
|
+
"""The reserve id"""
|
|
1279
|
+
reserve: ReserveId!
|
|
1631
1280
|
|
|
1632
|
-
"""The
|
|
1633
|
-
|
|
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
|
|
1281
|
+
"""The amount supplying"""
|
|
1282
|
+
amount: ReserveErc20AmountInput!
|
|
1645
1283
|
|
|
1646
|
-
"""
|
|
1647
|
-
|
|
1284
|
+
"""If you wish to enable collateral with it meaning you can borrow"""
|
|
1285
|
+
enableCollateral: Boolean! = true
|
|
1648
1286
|
|
|
1649
|
-
"""
|
|
1650
|
-
|
|
1287
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1288
|
+
sender: EvmAddress!
|
|
1651
1289
|
}
|
|
1652
1290
|
|
|
1653
|
-
|
|
1654
|
-
|
|
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!
|
|
1291
|
+
input SupplyRequest {
|
|
1292
|
+
"""The reserve id"""
|
|
1293
|
+
reserve: ReserveId!
|
|
1668
1294
|
|
|
1669
|
-
"""
|
|
1670
|
-
|
|
1671
|
-
}
|
|
1295
|
+
"""The amount supplying"""
|
|
1296
|
+
amount: ReserveAmountInputWithPermit!
|
|
1672
1297
|
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
shares: TokenAmount!
|
|
1298
|
+
"""If you wish to enable collateral with it meaning you can borrow"""
|
|
1299
|
+
enableCollateral: Boolean! = true
|
|
1676
1300
|
|
|
1677
|
-
"""The
|
|
1678
|
-
|
|
1301
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1302
|
+
sender: EvmAddress!
|
|
1679
1303
|
}
|
|
1680
1304
|
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
"""Filter by underlying token addresses"""
|
|
1686
|
-
underlyingTokens: [EvmAddress!]
|
|
1305
|
+
type SwapApprovalRequired {
|
|
1306
|
+
approval: TransactionRequest!
|
|
1307
|
+
originalTransaction: SwapTransactionRequest!
|
|
1687
1308
|
}
|
|
1688
1309
|
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1310
|
+
type SwapByIntent {
|
|
1311
|
+
quote: SwapQuote!
|
|
1312
|
+
data: SwapByIntentTypedData!
|
|
1313
|
+
}
|
|
1692
1314
|
|
|
1693
|
-
|
|
1694
|
-
|
|
1315
|
+
input SwapByIntentInput {
|
|
1316
|
+
quoteId: SwapQuoteId!
|
|
1317
|
+
signature: Signature!
|
|
1695
1318
|
}
|
|
1696
1319
|
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1320
|
+
type SwapByIntentTypeDefinition {
|
|
1321
|
+
EIP712Domain: [TypeField!]!
|
|
1322
|
+
Order: [TypeField!]!
|
|
1323
|
+
}
|
|
1700
1324
|
|
|
1701
|
-
|
|
1702
|
-
|
|
1325
|
+
type SwapByIntentTypedData {
|
|
1326
|
+
types: SwapByIntentTypeDefinition!
|
|
1327
|
+
primaryType: String!
|
|
1328
|
+
domain: DomainData!
|
|
1329
|
+
message: JSON!
|
|
1330
|
+
}
|
|
1703
1331
|
|
|
1704
|
-
|
|
1705
|
-
|
|
1332
|
+
type SwapByIntentWithApprovalRequired {
|
|
1333
|
+
quote: SwapQuote!
|
|
1334
|
+
approval: TransactionRequest!
|
|
1335
|
+
data: SwapByIntentTypedData!
|
|
1336
|
+
}
|
|
1706
1337
|
|
|
1707
|
-
|
|
1708
|
-
|
|
1338
|
+
type SwapByTransaction {
|
|
1339
|
+
quote: SwapQuote!
|
|
1340
|
+
}
|
|
1709
1341
|
|
|
1710
|
-
|
|
1711
|
-
|
|
1342
|
+
type SwapCancelled {
|
|
1343
|
+
createdAt: DateTime!
|
|
1344
|
+
cancelledAt: DateTime
|
|
1345
|
+
explorerLink: String!
|
|
1712
1346
|
}
|
|
1713
1347
|
|
|
1714
|
-
|
|
1715
|
-
type UserWithdrawTransaction {
|
|
1716
|
-
"""Amount withdrawn."""
|
|
1717
|
-
amount: TokenAmount!
|
|
1348
|
+
union SwapExecutionPlan = SwapTransactionRequest | SwapApprovalRequired | InsufficientBalanceError | SwapReceipt
|
|
1718
1349
|
|
|
1719
|
-
|
|
1720
|
-
|
|
1350
|
+
type SwapExpired {
|
|
1351
|
+
createdAt: DateTime!
|
|
1352
|
+
expiredAt: DateTime!
|
|
1353
|
+
explorerLink: String!
|
|
1354
|
+
}
|
|
1721
1355
|
|
|
1722
|
-
|
|
1723
|
-
|
|
1356
|
+
type SwapFulfilled {
|
|
1357
|
+
txHash: String!
|
|
1358
|
+
desiredSell: TokenAmount!
|
|
1359
|
+
desiredBuy: TokenAmount!
|
|
1360
|
+
sold: TokenAmount!
|
|
1361
|
+
bought: TokenAmount!
|
|
1362
|
+
createdAt: DateTime!
|
|
1363
|
+
fulfilledAt: DateTime!
|
|
1364
|
+
explorerLink: String!
|
|
1365
|
+
refundTxHash: TxHash
|
|
1366
|
+
}
|
|
1724
1367
|
|
|
1725
|
-
|
|
1726
|
-
txHash: TxHash!
|
|
1368
|
+
scalar SwapId
|
|
1727
1369
|
|
|
1728
|
-
|
|
1729
|
-
|
|
1370
|
+
enum SwapKind {
|
|
1371
|
+
BUY
|
|
1372
|
+
SELL
|
|
1730
1373
|
}
|
|
1731
1374
|
|
|
1732
|
-
type
|
|
1733
|
-
|
|
1734
|
-
|
|
1375
|
+
type SwapOpen {
|
|
1376
|
+
swapId: SwapId!
|
|
1377
|
+
createdAt: DateTime!
|
|
1378
|
+
deadline: DateTime!
|
|
1379
|
+
explorerLink: String!
|
|
1380
|
+
desiredSell: TokenAmount!
|
|
1381
|
+
desiredBuy: TokenAmount!
|
|
1382
|
+
}
|
|
1735
1383
|
|
|
1736
|
-
|
|
1737
|
-
|
|
1384
|
+
type SwapPendingSignature {
|
|
1385
|
+
createdAt: DateTime!
|
|
1386
|
+
deadline: DateTime!
|
|
1387
|
+
explorerLink: String!
|
|
1388
|
+
}
|
|
1738
1389
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1390
|
+
type SwapQuote {
|
|
1391
|
+
quoteId: SwapQuoteId!
|
|
1392
|
+
suggestedSlippage: PercentNumber!
|
|
1393
|
+
desiredSell: TokenAmount!
|
|
1394
|
+
desiredBuy: TokenAmount!
|
|
1395
|
+
costs: SwapQuoteCosts!
|
|
1741
1396
|
|
|
1742
|
-
"""
|
|
1743
|
-
|
|
1397
|
+
"""Minimum received amount after all costs and slippage"""
|
|
1398
|
+
minimumReceived: TokenAmount!
|
|
1399
|
+
}
|
|
1744
1400
|
|
|
1745
|
-
|
|
1746
|
-
|
|
1401
|
+
type SwapQuoteCosts {
|
|
1402
|
+
"""Network and provider costs"""
|
|
1403
|
+
networkCosts: TokenAmount!
|
|
1747
1404
|
|
|
1748
|
-
"""
|
|
1749
|
-
|
|
1405
|
+
"""Aave partner fee amount"""
|
|
1406
|
+
partnerFee: TokenAmount!
|
|
1407
|
+
}
|
|
1750
1408
|
|
|
1751
|
-
|
|
1752
|
-
The last recorded balance of the vault's AToken. This value is updated when yield is accrued.
|
|
1753
|
-
"""
|
|
1754
|
-
balance: TokenAmount!
|
|
1409
|
+
scalar SwapQuoteId
|
|
1755
1410
|
|
|
1756
|
-
|
|
1411
|
+
input SwapQuoteRequest {
|
|
1757
1412
|
chainId: ChainId!
|
|
1413
|
+
buy: TokenInput!
|
|
1414
|
+
sell: TokenInput!
|
|
1415
|
+
amount: BigDecimal!
|
|
1416
|
+
kind: SwapKind
|
|
1417
|
+
from: EvmAddress!
|
|
1418
|
+
receiver: EvmAddress
|
|
1419
|
+
}
|
|
1758
1420
|
|
|
1759
|
-
|
|
1760
|
-
|
|
1421
|
+
type SwapReceipt {
|
|
1422
|
+
id: SwapId!
|
|
1423
|
+
createdAt: DateTime!
|
|
1424
|
+
explorerLink: String!
|
|
1425
|
+
}
|
|
1761
1426
|
|
|
1762
|
-
|
|
1763
|
-
|
|
1427
|
+
input SwapRequest @oneOf {
|
|
1428
|
+
intent: SwapByIntentInput
|
|
1429
|
+
transaction: SwapWithTransactionInput
|
|
1430
|
+
}
|
|
1764
1431
|
|
|
1765
|
-
|
|
1766
|
-
feesBalance: TokenAmount!
|
|
1432
|
+
union SwapStatus = SwapOpen | SwapPendingSignature | SwapCancelled | SwapExpired | SwapFulfilled
|
|
1767
1433
|
|
|
1768
|
-
|
|
1769
|
-
|
|
1434
|
+
enum SwapStatusFilter {
|
|
1435
|
+
CANCELLED
|
|
1436
|
+
EXPIRED
|
|
1437
|
+
FULFILLED
|
|
1438
|
+
OPEN
|
|
1439
|
+
PENDING_SIGNATURE
|
|
1440
|
+
}
|
|
1770
1441
|
|
|
1771
|
-
|
|
1772
|
-
|
|
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
|
|
1442
|
+
input SwapStatusRequest {
|
|
1443
|
+
id: SwapId!
|
|
1776
1444
|
}
|
|
1777
1445
|
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1446
|
+
type SwapTransactionRequest {
|
|
1447
|
+
transaction: TransactionRequest!
|
|
1448
|
+
orderReceipt: SwapReceipt!
|
|
1449
|
+
}
|
|
1781
1450
|
|
|
1782
|
-
|
|
1783
|
-
|
|
1451
|
+
input SwapWithTransactionInput {
|
|
1452
|
+
quoteId: SwapQuoteId!
|
|
1453
|
+
permitSig: Signature
|
|
1784
1454
|
|
|
1785
1455
|
"""
|
|
1786
|
-
|
|
1787
|
-
Vault revenue is split between the recipients and the Aave fee recipient (50/50 split).
|
|
1456
|
+
Whether the swap order creator is a smart contract wallet. If not provided, it will be inferred following the ERC-1271 standard.
|
|
1788
1457
|
"""
|
|
1789
|
-
|
|
1458
|
+
isSenderSmartContractWallet: Boolean
|
|
1790
1459
|
}
|
|
1791
1460
|
|
|
1792
|
-
input
|
|
1793
|
-
|
|
1794
|
-
|
|
1461
|
+
input SwappableTokenInput @oneOf {
|
|
1462
|
+
native: ChainId
|
|
1463
|
+
erc20: Erc20Input
|
|
1464
|
+
}
|
|
1795
1465
|
|
|
1796
|
-
|
|
1797
|
-
|
|
1466
|
+
input SwappableTokensRequest {
|
|
1467
|
+
query: SwappableTokensRequestQuery
|
|
1468
|
+
}
|
|
1798
1469
|
|
|
1799
|
-
|
|
1800
|
-
|
|
1470
|
+
input SwappableTokensRequestQuery @oneOf {
|
|
1471
|
+
chainIds: [ChainId!]
|
|
1472
|
+
from: SwappableTokenInput
|
|
1473
|
+
to: SwappableTokenInput
|
|
1474
|
+
}
|
|
1801
1475
|
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1476
|
+
enum TimeWindow {
|
|
1477
|
+
LAST_DAY
|
|
1478
|
+
LAST_WEEK
|
|
1479
|
+
LAST_MONTH
|
|
1480
|
+
LAST_SIX_MONTHS
|
|
1481
|
+
LAST_YEAR
|
|
1482
|
+
ALL
|
|
1483
|
+
}
|
|
1806
1484
|
|
|
1807
|
-
|
|
1808
|
-
owner: EvmAddress
|
|
1485
|
+
union Token = NativeToken | Erc20Token
|
|
1809
1486
|
|
|
1810
|
-
|
|
1811
|
-
initialFee: BigDecimal!
|
|
1487
|
+
union TokenAmount = NativeAmount | Erc20Amount
|
|
1812
1488
|
|
|
1813
|
-
|
|
1814
|
-
|
|
1489
|
+
type TokenInfo {
|
|
1490
|
+
"""The token name"""
|
|
1491
|
+
name: String!
|
|
1815
1492
|
|
|
1816
|
-
"""The symbol
|
|
1817
|
-
|
|
1493
|
+
"""The token symbol"""
|
|
1494
|
+
symbol: String!
|
|
1818
1495
|
|
|
1819
|
-
"""
|
|
1820
|
-
|
|
1821
|
-
"""
|
|
1822
|
-
initialLockDeposit: BigDecimal!
|
|
1496
|
+
"""The token icon"""
|
|
1497
|
+
icon: String!
|
|
1823
1498
|
|
|
1824
|
-
"""
|
|
1825
|
-
|
|
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!]
|
|
1499
|
+
"""The token decimals"""
|
|
1500
|
+
decimals: Int!
|
|
1830
1501
|
}
|
|
1831
1502
|
|
|
1832
|
-
input
|
|
1833
|
-
"""
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
"""Whether you are depositing in as a token or normal underlying"""
|
|
1837
|
-
asAToken: Boolean! = false
|
|
1503
|
+
input TokenInput @oneOf {
|
|
1504
|
+
"""Native token"""
|
|
1505
|
+
native: AlwaysTrue
|
|
1838
1506
|
|
|
1839
|
-
"""
|
|
1840
|
-
|
|
1841
|
-
"""
|
|
1842
|
-
permitSig: ERC712Signature
|
|
1507
|
+
"""The erc20 address"""
|
|
1508
|
+
erc20: EvmAddress
|
|
1843
1509
|
}
|
|
1844
1510
|
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1511
|
+
type TransactionRequest {
|
|
1512
|
+
to: EvmAddress!
|
|
1513
|
+
from: EvmAddress!
|
|
1514
|
+
data: BlockchainData!
|
|
1515
|
+
value: BigInt!
|
|
1516
|
+
chainId: ChainId!
|
|
1517
|
+
operations: [OperationType!]
|
|
1518
|
+
}
|
|
1848
1519
|
|
|
1849
|
-
|
|
1850
|
-
amount: VaultDepositAmountInput!
|
|
1520
|
+
scalar TxHash
|
|
1851
1521
|
|
|
1852
|
-
|
|
1853
|
-
|
|
1522
|
+
input TxHashInput {
|
|
1523
|
+
txHash: TxHash!
|
|
1524
|
+
chainId: ChainId!
|
|
1525
|
+
}
|
|
1854
1526
|
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1527
|
+
type TypeDefinition {
|
|
1528
|
+
EIP712Domain: [TypeField!]!
|
|
1529
|
+
Permit: [TypeField!]!
|
|
1530
|
+
}
|
|
1859
1531
|
|
|
1860
|
-
|
|
1861
|
-
|
|
1532
|
+
type TypeField {
|
|
1533
|
+
name: String!
|
|
1534
|
+
type: String!
|
|
1862
1535
|
}
|
|
1863
1536
|
|
|
1864
|
-
|
|
1865
|
-
"""
|
|
1866
|
-
|
|
1537
|
+
input UpdateUserDynamicConfigRequest {
|
|
1538
|
+
"""The spoke id"""
|
|
1539
|
+
spoke: SpokeId!
|
|
1867
1540
|
|
|
1868
|
-
"""
|
|
1869
|
-
|
|
1541
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1542
|
+
sender: EvmAddress!
|
|
1870
1543
|
|
|
1871
|
-
"""
|
|
1872
|
-
|
|
1544
|
+
"""If not supplied, this will use \`sender\` which is the normal route"""
|
|
1545
|
+
onBehalfOf: EvmAddress
|
|
1873
1546
|
}
|
|
1874
1547
|
|
|
1875
|
-
input
|
|
1876
|
-
"""
|
|
1877
|
-
|
|
1548
|
+
input UpdateUserRiskPremiumRequest {
|
|
1549
|
+
"""The spoke id"""
|
|
1550
|
+
spoke: SpokeId!
|
|
1878
1551
|
|
|
1879
|
-
"""
|
|
1880
|
-
|
|
1552
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1553
|
+
sender: EvmAddress!
|
|
1554
|
+
|
|
1555
|
+
"""If not supplied, this will use \`sender\` which is the normal route"""
|
|
1556
|
+
onBehalfOf: EvmAddress
|
|
1881
1557
|
}
|
|
1882
1558
|
|
|
1883
|
-
type
|
|
1884
|
-
"""
|
|
1885
|
-
|
|
1559
|
+
type UserBalance {
|
|
1560
|
+
"""The user balance id"""
|
|
1561
|
+
id: UserBalanceId!
|
|
1886
1562
|
|
|
1887
|
-
"""
|
|
1888
|
-
|
|
1889
|
-
}
|
|
1563
|
+
"""The token info"""
|
|
1564
|
+
info: TokenInfo!
|
|
1890
1565
|
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
address: EvmAddress!
|
|
1566
|
+
"""The balances across chains it will be 1 item per chain"""
|
|
1567
|
+
balances: [TokenAmount!]!
|
|
1894
1568
|
|
|
1895
|
-
"""The
|
|
1896
|
-
|
|
1897
|
-
}
|
|
1569
|
+
"""The total amount summed across all balances"""
|
|
1570
|
+
totalAmount: DecimalNumber!
|
|
1898
1571
|
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
amount: BigDecimal!
|
|
1572
|
+
"""The total fiat amount summed across all balances"""
|
|
1573
|
+
fiatAmount(currency: Currency! = USD): FiatAmount!
|
|
1902
1574
|
|
|
1903
|
-
"""
|
|
1904
|
-
|
|
1575
|
+
"""The supply APY dependent on what you pass in for the \`metric\`"""
|
|
1576
|
+
supplyApy(metric: ApyMetric! = HIGHEST): PercentNumber!
|
|
1905
1577
|
|
|
1906
|
-
"""
|
|
1907
|
-
|
|
1908
|
-
"""
|
|
1909
|
-
permitSig: ERC712Signature
|
|
1578
|
+
"""The borrow APY dependent on what you pass in for the \`metric\`"""
|
|
1579
|
+
borrowApy(metric: ApyMetric! = HIGHEST): PercentNumber!
|
|
1910
1580
|
}
|
|
1911
1581
|
|
|
1912
|
-
|
|
1913
|
-
"""The vault address"""
|
|
1914
|
-
vault: EvmAddress!
|
|
1582
|
+
scalar UserBalanceId
|
|
1915
1583
|
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
"""The user who is wanting to mint the shares"""
|
|
1920
|
-
minter: EvmAddress!
|
|
1584
|
+
input UserBalancesByChains {
|
|
1585
|
+
"""List of chains"""
|
|
1586
|
+
chainIds: [ChainId!]!
|
|
1921
1587
|
|
|
1922
1588
|
"""
|
|
1923
|
-
The
|
|
1589
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1924
1590
|
"""
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
"""The chain id"""
|
|
1928
|
-
chainId: ChainId!
|
|
1591
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1929
1592
|
}
|
|
1930
1593
|
|
|
1931
|
-
input
|
|
1932
|
-
"""The
|
|
1933
|
-
|
|
1594
|
+
input UserBalancesByHub {
|
|
1595
|
+
"""The hub address"""
|
|
1596
|
+
address: EvmAddress!
|
|
1934
1597
|
|
|
1935
|
-
"""The chain id
|
|
1598
|
+
"""The hub chain id"""
|
|
1936
1599
|
chainId: ChainId!
|
|
1937
1600
|
|
|
1938
1601
|
"""
|
|
1939
|
-
The
|
|
1940
|
-
preview deposit = underlying
|
|
1941
|
-
preview mint = shares
|
|
1942
|
-
preview withdraw = underlying
|
|
1943
|
-
preview redeem = shares
|
|
1602
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1944
1603
|
"""
|
|
1945
|
-
|
|
1604
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1946
1605
|
}
|
|
1947
1606
|
|
|
1948
|
-
input
|
|
1949
|
-
"""The
|
|
1950
|
-
|
|
1607
|
+
input UserBalancesBySpoke {
|
|
1608
|
+
"""The spoke address"""
|
|
1609
|
+
address: EvmAddress!
|
|
1951
1610
|
|
|
1952
|
-
"""The chain id the
|
|
1611
|
+
"""The chain id the spoke is deployed to"""
|
|
1953
1612
|
chainId: ChainId!
|
|
1954
|
-
}
|
|
1955
|
-
|
|
1956
|
-
input VaultRecipientConfigurationRequestBy @oneOf {
|
|
1957
|
-
"""The vault recipient configuration address"""
|
|
1958
|
-
address: EvmAddress
|
|
1959
1613
|
|
|
1960
1614
|
"""
|
|
1961
|
-
|
|
1615
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1962
1616
|
"""
|
|
1963
|
-
|
|
1617
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1964
1618
|
}
|
|
1965
1619
|
|
|
1966
|
-
input
|
|
1967
|
-
"""The
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
"""Whether the amount should be sent as aToken."""
|
|
1971
|
-
asAToken: Boolean! = false
|
|
1620
|
+
input UserBalancesByUserPosition {
|
|
1621
|
+
"""The user position id"""
|
|
1622
|
+
userPositionId: UserPositionId!
|
|
1972
1623
|
|
|
1973
1624
|
"""
|
|
1974
|
-
The
|
|
1625
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1975
1626
|
"""
|
|
1976
|
-
|
|
1627
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1977
1628
|
}
|
|
1978
1629
|
|
|
1979
|
-
input
|
|
1980
|
-
"""The
|
|
1981
|
-
|
|
1630
|
+
input UserBalancesRequest {
|
|
1631
|
+
"""The user to get the balance for"""
|
|
1632
|
+
user: EvmAddress!
|
|
1982
1633
|
|
|
1983
|
-
"""The
|
|
1984
|
-
|
|
1634
|
+
"""The order by clause - defaults to the highest USD value"""
|
|
1635
|
+
orderBy: UserBalancesRequestOrderBy! = {balance: DESC}
|
|
1985
1636
|
|
|
1986
|
-
"""
|
|
1987
|
-
|
|
1988
|
-
"""
|
|
1989
|
-
sharesOwner: EvmAddress!
|
|
1637
|
+
"""The user balance filter"""
|
|
1638
|
+
filter: UserBalancesRequestFilter!
|
|
1990
1639
|
|
|
1991
|
-
"""
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
authorizedUser: EvmAddress
|
|
1640
|
+
"""If you want to include 0 balances in the return list"""
|
|
1641
|
+
includeZeroBalances: Boolean! = false
|
|
1642
|
+
}
|
|
1995
1643
|
|
|
1996
|
-
|
|
1997
|
-
The
|
|
1998
|
-
|
|
1999
|
-
recipient: EvmAddress
|
|
1644
|
+
input UserBalancesRequestFilter @oneOf {
|
|
1645
|
+
"""The balances for the tokens on the specified chains"""
|
|
1646
|
+
chains: UserBalancesByChains
|
|
2000
1647
|
|
|
2001
|
-
"""The
|
|
2002
|
-
|
|
2003
|
-
}
|
|
1648
|
+
"""The balances for the tokens of hub assets on a given hub"""
|
|
1649
|
+
hub: UserBalancesByHub
|
|
2004
1650
|
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
by: VaultRequestBy!
|
|
1651
|
+
"""The balances for the tokens of reserves attached to a spoke"""
|
|
1652
|
+
spoke: UserBalancesBySpoke
|
|
2008
1653
|
|
|
2009
|
-
"""The
|
|
2010
|
-
|
|
1654
|
+
"""The balances for the swappable tokens"""
|
|
1655
|
+
swappable: SwappableTokensRequestQuery
|
|
2011
1656
|
|
|
2012
1657
|
"""
|
|
2013
|
-
The
|
|
1658
|
+
The balances for the tokens of the spoke associated with the given user position
|
|
2014
1659
|
"""
|
|
2015
|
-
|
|
1660
|
+
userPosition: UserBalancesByUserPosition
|
|
2016
1661
|
}
|
|
2017
1662
|
|
|
2018
|
-
input
|
|
2019
|
-
"""The
|
|
2020
|
-
|
|
1663
|
+
input UserBalancesRequestOrderBy @oneOf {
|
|
1664
|
+
"""The name of the token"""
|
|
1665
|
+
name: OrderDirection
|
|
2021
1666
|
|
|
2022
|
-
"""
|
|
2023
|
-
|
|
2024
|
-
"""
|
|
2025
|
-
txHash: TxHash
|
|
1667
|
+
"""The balance of the token"""
|
|
1668
|
+
balance: OrderDirection
|
|
2026
1669
|
}
|
|
2027
1670
|
|
|
2028
|
-
|
|
2029
|
-
"""The
|
|
2030
|
-
|
|
1671
|
+
type UserBorrowItem {
|
|
1672
|
+
"""The user borrow item id"""
|
|
1673
|
+
id: UserBorrowItemId!
|
|
2031
1674
|
|
|
2032
|
-
"""The
|
|
2033
|
-
|
|
1675
|
+
"""The reserve borrowed from"""
|
|
1676
|
+
reserve: Reserve!
|
|
2034
1677
|
|
|
2035
|
-
"""The
|
|
2036
|
-
|
|
2037
|
-
}
|
|
1678
|
+
"""The amount borrowed on this reserve"""
|
|
1679
|
+
principal: Erc20Amount!
|
|
2038
1680
|
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
vault: EvmAddress!
|
|
1681
|
+
"""The overall debt including accrued interests"""
|
|
1682
|
+
debt: Erc20Amount!
|
|
2042
1683
|
|
|
2043
|
-
"""The
|
|
2044
|
-
|
|
1684
|
+
"""The interest incurred on the loan"""
|
|
1685
|
+
interest: Erc20Amount!
|
|
2045
1686
|
|
|
2046
|
-
"""
|
|
2047
|
-
|
|
1687
|
+
"""
|
|
1688
|
+
When the borrow was created.
|
|
1689
|
+
This is null if they have no supply item, for
|
|
1690
|
+
example, when using include_zero_balances this comes
|
|
1691
|
+
back as principal and debt as 0
|
|
1692
|
+
"""
|
|
1693
|
+
createdAt: DateTime
|
|
2048
1694
|
}
|
|
2049
1695
|
|
|
2050
|
-
|
|
2051
|
-
"""The vault deployed address"""
|
|
2052
|
-
vault: EvmAddress!
|
|
1696
|
+
scalar UserBorrowItemId
|
|
2053
1697
|
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
1698
|
+
input UserBorrowsQueryRequest @oneOf {
|
|
1699
|
+
userSpoke: UserSpokeInput
|
|
1700
|
+
userToken: UserToken
|
|
1701
|
+
userPositionId: UserPositionId
|
|
1702
|
+
userChains: UserChains
|
|
2059
1703
|
}
|
|
2060
1704
|
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
withdrew: TokenAmount
|
|
2065
|
-
deposited: TokenAmount
|
|
2066
|
-
date: DateTime!
|
|
2067
|
-
}
|
|
1705
|
+
input UserBorrowsRequest {
|
|
1706
|
+
query: UserBorrowsQueryRequest!
|
|
1707
|
+
orderBy: UserBorrowsRequestOrderBy! = {amount: DESC}
|
|
2068
1708
|
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
1709
|
+
"""If you wish to include zero balances in the results"""
|
|
1710
|
+
includeZeroBalances: Boolean! = false
|
|
1711
|
+
}
|
|
2072
1712
|
|
|
2073
|
-
|
|
2074
|
-
|
|
1713
|
+
input UserBorrowsRequestOrderBy @oneOf {
|
|
1714
|
+
assetName: OrderDirection
|
|
1715
|
+
created: OrderDirection
|
|
1716
|
+
amount: OrderDirection
|
|
1717
|
+
apy: OrderDirection
|
|
1718
|
+
}
|
|
2075
1719
|
|
|
2076
|
-
|
|
1720
|
+
input UserChains {
|
|
2077
1721
|
user: EvmAddress!
|
|
2078
|
-
|
|
2079
|
-
"""The timing window for which to calculate user activity"""
|
|
2080
|
-
window: VaultUserActivityTimeWindow!
|
|
1722
|
+
chainIds: [ChainId!]!
|
|
2081
1723
|
}
|
|
2082
1724
|
|
|
2083
|
-
type
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
}
|
|
1725
|
+
type UserPosition {
|
|
1726
|
+
"""The user position ID"""
|
|
1727
|
+
id: UserPositionId!
|
|
2087
1728
|
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
1729
|
+
"""The user holding this position"""
|
|
1730
|
+
user: EvmAddress!
|
|
1731
|
+
createdAt: DateTime!
|
|
1732
|
+
totalSupplied(currency: Currency! = USD): FiatAmountWithChange!
|
|
2091
1733
|
|
|
2092
|
-
"""
|
|
2093
|
-
|
|
1734
|
+
"""
|
|
1735
|
+
Total collateral which is the full some of the assets supplied which are enabled as collateral
|
|
1736
|
+
"""
|
|
1737
|
+
totalCollateral(currency: Currency! = USD): FiatAmountWithChange!
|
|
2094
1738
|
|
|
2095
|
-
"""
|
|
2096
|
-
|
|
1739
|
+
"""Total debt which is the total amount borrowed plus the accrued premium"""
|
|
1740
|
+
totalDebt(currency: Currency! = USD): FiatAmountWithChange!
|
|
2097
1741
|
|
|
2098
|
-
"""
|
|
2099
|
-
|
|
2100
|
-
}
|
|
1742
|
+
"""The net balance which is \`total_supplied\` - \`borrows\`"""
|
|
1743
|
+
netBalance(currency: Currency! = USD): FiatAmountWithChange!
|
|
2101
1744
|
|
|
2102
|
-
"""
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
1745
|
+
"""The net collateral which is \`totalCollateral\` - \`totalDebt\`"""
|
|
1746
|
+
netCollateral(currency: Currency! = USD): FiatAmountWithChange!
|
|
1747
|
+
netApy: PercentNumber!
|
|
1748
|
+
netSupplyApy: PercentNumberWithChange!
|
|
1749
|
+
netBorrowApy: PercentNumberWithChange!
|
|
1750
|
+
healthFactor: HealthFactorWithChange!
|
|
1751
|
+
betterRiskPremium: PercentNumber
|
|
1752
|
+
riskPremium: PercentNumber!
|
|
1753
|
+
netBalancePercentChange(window: TimeWindow! = LAST_DAY): PercentNumber!
|
|
1754
|
+
spoke: Spoke!
|
|
1755
|
+
averageCollateralFactor: PercentNumber!
|
|
2109
1756
|
}
|
|
2110
1757
|
|
|
2111
|
-
|
|
2112
|
-
DEPOSIT
|
|
2113
|
-
WITHDRAW
|
|
2114
|
-
}
|
|
1758
|
+
scalar UserPositionId
|
|
2115
1759
|
|
|
2116
|
-
input
|
|
2117
|
-
|
|
2118
|
-
|
|
1760
|
+
input UserPositionRequest @oneOf {
|
|
1761
|
+
userSpoke: UserSpokeInput
|
|
1762
|
+
id: UserPositionId
|
|
2119
1763
|
}
|
|
2120
1764
|
|
|
2121
|
-
input
|
|
2122
|
-
"""The
|
|
2123
|
-
vault: EvmAddress!
|
|
2124
|
-
|
|
2125
|
-
"""The chain id where the transactions were sent"""
|
|
2126
|
-
chainId: ChainId!
|
|
2127
|
-
|
|
2128
|
-
"""The user that sent the transactions"""
|
|
1765
|
+
input UserPositionsRequest {
|
|
1766
|
+
"""The user to get the positions for"""
|
|
2129
1767
|
user: EvmAddress!
|
|
2130
1768
|
|
|
2131
|
-
"""The filter
|
|
2132
|
-
filter:
|
|
1769
|
+
"""The filter for the user position"""
|
|
1770
|
+
filter: UserPositionsRequestFilter!
|
|
2133
1771
|
|
|
2134
|
-
"""
|
|
2135
|
-
orderBy:
|
|
2136
|
-
|
|
2137
|
-
"""The page size"""
|
|
2138
|
-
pageSize: PageSize! = FIFTY
|
|
1772
|
+
"""The ordering for the positions"""
|
|
1773
|
+
orderBy: UserPositionsRequestOrderBy! = {created: ASC}
|
|
1774
|
+
}
|
|
2139
1775
|
|
|
2140
|
-
|
|
2141
|
-
|
|
1776
|
+
input UserPositionsRequestFilter @oneOf {
|
|
1777
|
+
tokens: [Erc20Input!]
|
|
1778
|
+
chainIds: [ChainId!]
|
|
2142
1779
|
}
|
|
2143
1780
|
|
|
2144
|
-
|
|
1781
|
+
input UserPositionsRequestOrderBy @oneOf {
|
|
1782
|
+
created: OrderDirection
|
|
1783
|
+
balance: OrderDirection
|
|
1784
|
+
netApy: OrderDirection
|
|
1785
|
+
healthFactor: OrderDirection
|
|
1786
|
+
netCollateral: OrderDirection
|
|
1787
|
+
}
|
|
2145
1788
|
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
shares: TokenAmount!
|
|
2150
|
-
blockExplorerUrl: String!
|
|
2151
|
-
txHash: TxHash!
|
|
2152
|
-
timestamp: DateTime!
|
|
1789
|
+
input UserSpokeInput {
|
|
1790
|
+
spoke: SpokeId!
|
|
1791
|
+
user: EvmAddress!
|
|
2153
1792
|
}
|
|
2154
1793
|
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
value: BigDecimal!
|
|
1794
|
+
type UserSummary {
|
|
1795
|
+
totalPositions: Int!
|
|
2158
1796
|
|
|
2159
|
-
"""
|
|
2160
|
-
|
|
1797
|
+
"""Net balance = supply - debt"""
|
|
1798
|
+
netBalance(currency: Currency! = USD): FiatAmountWithChange!
|
|
2161
1799
|
|
|
2162
|
-
"""
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
1800
|
+
"""Total supply where is_collateral is true"""
|
|
1801
|
+
totalCollateral(currency: Currency! = USD): FiatAmount!
|
|
1802
|
+
|
|
1803
|
+
"""Total supplied across all positions"""
|
|
1804
|
+
totalSupplied(currency: Currency! = USD): FiatAmount!
|
|
2167
1805
|
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
vault: EvmAddress!
|
|
1806
|
+
"""Total debt across all positions"""
|
|
1807
|
+
totalDebt(currency: Currency! = USD): FiatAmount!
|
|
2171
1808
|
|
|
2172
1809
|
"""
|
|
2173
|
-
|
|
1810
|
+
Net APY = (\u03A3 (supplied_amount_i * supply_apy_i) - \u03A3 (borrowed_amount_j * borrow_apy_j)) / (\u03A3 supplied_amount_i)
|
|
2174
1811
|
"""
|
|
2175
|
-
|
|
1812
|
+
netApy: PercentNumber!
|
|
2176
1813
|
|
|
2177
|
-
"""
|
|
2178
|
-
|
|
1814
|
+
"""Interest earned (net fee earned)"""
|
|
1815
|
+
netFeeEarned: FiatAmount!
|
|
2179
1816
|
|
|
2180
|
-
"""
|
|
2181
|
-
|
|
1817
|
+
"""Lowest health factor across all positions"""
|
|
1818
|
+
lowestHealthFactor: BigDecimal
|
|
2182
1819
|
}
|
|
2183
1820
|
|
|
2184
|
-
input
|
|
2185
|
-
|
|
2186
|
-
|
|
1821
|
+
input UserSummaryFilter @oneOf {
|
|
1822
|
+
spoke: SpokeInput
|
|
1823
|
+
spokeId: SpokeId
|
|
1824
|
+
chainIds: [ChainId!]
|
|
1825
|
+
userPositionId: UserPositionId
|
|
1826
|
+
}
|
|
2187
1827
|
|
|
2188
|
-
|
|
2189
|
-
|
|
1828
|
+
type UserSummaryHistoryItem {
|
|
1829
|
+
healthFactor: BigDecimal
|
|
1830
|
+
date: DateTime!
|
|
2190
1831
|
|
|
2191
|
-
"""
|
|
2192
|
-
|
|
2193
|
-
"""
|
|
2194
|
-
sharesOwner: EvmAddress!
|
|
1832
|
+
"""The aggregated net balance for the time period"""
|
|
1833
|
+
netBalance(currency: Currency! = USD): FiatAmount!
|
|
2195
1834
|
|
|
2196
|
-
"""
|
|
2197
|
-
|
|
2198
|
-
"""
|
|
2199
|
-
authorizedUser: EvmAddress
|
|
1835
|
+
"""The aggregated borrows for the time period"""
|
|
1836
|
+
borrows(currency: Currency! = USD): FiatAmount!
|
|
2200
1837
|
|
|
2201
|
-
"""
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
recipient: EvmAddress
|
|
1838
|
+
"""The aggregated supplies for the time period"""
|
|
1839
|
+
supplies(currency: Currency! = USD): FiatAmount!
|
|
1840
|
+
}
|
|
2205
1841
|
|
|
2206
|
-
|
|
2207
|
-
|
|
1842
|
+
input UserSummaryHistoryRequest {
|
|
1843
|
+
user: EvmAddress!
|
|
1844
|
+
filter: UserSummaryFilter
|
|
1845
|
+
window: TimeWindow! = LAST_DAY
|
|
2208
1846
|
}
|
|
2209
1847
|
|
|
2210
|
-
input
|
|
2211
|
-
|
|
2212
|
-
|
|
1848
|
+
input UserSummaryRequest {
|
|
1849
|
+
user: EvmAddress!
|
|
1850
|
+
filter: UserSummaryFilter
|
|
1851
|
+
}
|
|
2213
1852
|
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
1853
|
+
input UserSuppliesQueryRequest @oneOf {
|
|
1854
|
+
userSpoke: UserSpokeInput
|
|
1855
|
+
userToken: UserToken
|
|
1856
|
+
userPositionId: UserPositionId
|
|
1857
|
+
userChains: UserChains
|
|
1858
|
+
}
|
|
2218
1859
|
|
|
2219
|
-
|
|
2220
|
-
|
|
1860
|
+
input UserSuppliesRequest {
|
|
1861
|
+
query: UserSuppliesQueryRequest!
|
|
1862
|
+
orderBy: UserSuppliesRequestOrderBy! = {amount: DESC}
|
|
2221
1863
|
|
|
2222
|
-
"""
|
|
2223
|
-
|
|
1864
|
+
"""If you wish to include zero balances in the results"""
|
|
1865
|
+
includeZeroBalances: Boolean! = false
|
|
2224
1866
|
}
|
|
2225
1867
|
|
|
2226
|
-
input
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
ownedBy: [EvmAddress!]
|
|
1868
|
+
input UserSuppliesRequestOrderBy @oneOf {
|
|
1869
|
+
assetName: OrderDirection
|
|
1870
|
+
created: OrderDirection
|
|
1871
|
+
amount: OrderDirection
|
|
1872
|
+
apy: OrderDirection
|
|
2232
1873
|
}
|
|
2233
1874
|
|
|
2234
|
-
|
|
2235
|
-
"""
|
|
2236
|
-
|
|
1875
|
+
type UserSupplyItem {
|
|
1876
|
+
"""The user supply item id"""
|
|
1877
|
+
id: UserSupplyItemId!
|
|
2237
1878
|
|
|
2238
|
-
"""
|
|
2239
|
-
|
|
2240
|
-
}
|
|
1879
|
+
"""The reserve supplied to"""
|
|
1880
|
+
reserve: Reserve!
|
|
2241
1881
|
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
native: WithdrawNativeAmountInput
|
|
1882
|
+
"""The amount supplied to this reserve"""
|
|
1883
|
+
principal: Erc20Amount!
|
|
2245
1884
|
|
|
2246
|
-
"""The
|
|
2247
|
-
|
|
2248
|
-
}
|
|
1885
|
+
"""The overall amount you can withdraw, including accrued interests"""
|
|
1886
|
+
withdrawable: Erc20Amount!
|
|
2249
1887
|
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
1888
|
+
"""The interest amount earned on supplying"""
|
|
1889
|
+
interest: Erc20Amount!
|
|
1890
|
+
|
|
1891
|
+
"""If this supply is used as collateral"""
|
|
1892
|
+
isCollateral: Boolean!
|
|
2253
1893
|
|
|
2254
1894
|
"""
|
|
2255
|
-
|
|
1895
|
+
When the supply was created.
|
|
1896
|
+
This is null if they have no supply item, for
|
|
1897
|
+
example, when using include_zero_balances this comes
|
|
1898
|
+
back as principal and withdrawable as 0
|
|
2256
1899
|
"""
|
|
2257
|
-
|
|
1900
|
+
createdAt: DateTime
|
|
2258
1901
|
}
|
|
2259
1902
|
|
|
2260
|
-
|
|
2261
|
-
"""The native value"""
|
|
2262
|
-
value: WithdrawAmount!
|
|
1903
|
+
scalar UserSupplyItemId
|
|
2263
1904
|
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
1905
|
+
input UserSwapsRequest {
|
|
1906
|
+
chainId: ChainId!
|
|
1907
|
+
user: EvmAddress!
|
|
1908
|
+
filterBy: [SwapStatusFilter!]
|
|
1909
|
+
pageSize: PageSize! = FIFTY
|
|
1910
|
+
cursor: Cursor
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
input UserToken {
|
|
1914
|
+
user: EvmAddress!
|
|
1915
|
+
token: Erc20Input!
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
type UsingAsCollateralActivity {
|
|
1919
|
+
id: ID!
|
|
1920
|
+
user: EvmAddress!
|
|
1921
|
+
timestamp: DateTime!
|
|
1922
|
+
txHash: TxHash!
|
|
1923
|
+
spoke: Spoke!
|
|
1924
|
+
reserve: ReserveInfo!
|
|
1925
|
+
enabledAsCollateral: Boolean!
|
|
1926
|
+
chain: Chain!
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
type WithdrawActivity {
|
|
1930
|
+
id: ID!
|
|
1931
|
+
user: EvmAddress!
|
|
1932
|
+
timestamp: DateTime!
|
|
1933
|
+
txHash: TxHash!
|
|
1934
|
+
spoke: Spoke!
|
|
1935
|
+
reserve: ReserveInfo!
|
|
1936
|
+
withdrawn: Erc20Amount!
|
|
1937
|
+
chain: Chain!
|
|
2268
1938
|
}
|
|
2269
1939
|
|
|
2270
1940
|
input WithdrawRequest {
|
|
2271
|
-
"""The
|
|
2272
|
-
|
|
1941
|
+
"""The reserve id"""
|
|
1942
|
+
reserve: ReserveId!
|
|
2273
1943
|
|
|
2274
|
-
"""The amount
|
|
2275
|
-
amount:
|
|
1944
|
+
"""The amount withdrawing"""
|
|
1945
|
+
amount: WithdrawReserveAmountInput!
|
|
2276
1946
|
|
|
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
|
-
"""
|
|
1947
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
2280
1948
|
sender: EvmAddress!
|
|
1949
|
+
}
|
|
2281
1950
|
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
"""
|
|
2286
|
-
recipient: EvmAddress
|
|
1951
|
+
input WithdrawReserveAmountInput @oneOf {
|
|
1952
|
+
"""The native amount"""
|
|
1953
|
+
native: AmountInput
|
|
2287
1954
|
|
|
2288
|
-
"""The
|
|
2289
|
-
|
|
1955
|
+
"""The erc20 amount input"""
|
|
1956
|
+
erc20: AmountInput
|
|
2290
1957
|
}`;var i=graphql.buildSchema(e);exports.schema=i;//# sourceMappingURL=test-utils.cjs.map
|
|
2291
1958
|
//# sourceMappingURL=test-utils.cjs.map
|