@aave/graphql 0.8.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 -626
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29986 -10807
- package/dist/index.d.ts +29986 -10807
- package/dist/index.js +962 -626
- 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 -1640
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.js +1301 -1640
- 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,342 +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!
|
|
568
|
-
|
|
569
|
-
"""The user's earned annual percentage yield across all supply positions"""
|
|
570
|
-
userEarnedAPY: PercentValue!
|
|
571
|
-
|
|
572
|
-
"""The user's debt annual percentage yield across all borrow positions"""
|
|
573
|
-
userDebtAPY: PercentValue!
|
|
532
|
+
input HubRequestQuery @oneOf {
|
|
533
|
+
hubInput: HubInput
|
|
534
|
+
hubId: HubId
|
|
535
|
+
}
|
|
574
536
|
|
|
537
|
+
type HubSummary {
|
|
575
538
|
"""
|
|
576
|
-
The
|
|
539
|
+
The total spoke reserves aggregated borrowed using this hub, showed in fiat as each asset has a different value
|
|
577
540
|
"""
|
|
578
|
-
|
|
541
|
+
totalBorrowed: FiatAmount!
|
|
579
542
|
|
|
580
|
-
"""
|
|
581
|
-
|
|
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!
|
|
582
547
|
|
|
583
548
|
"""
|
|
584
|
-
The total
|
|
549
|
+
The total spoke reserves aggregated supplied using this hub, showed in fiat as each asset has a different value
|
|
585
550
|
"""
|
|
586
|
-
|
|
551
|
+
totalSupplied: FiatAmount!
|
|
587
552
|
|
|
588
|
-
"""
|
|
589
|
-
|
|
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!
|
|
590
557
|
|
|
591
558
|
"""
|
|
592
|
-
The
|
|
559
|
+
The utilization rate"
|
|
593
560
|
"""
|
|
594
|
-
|
|
561
|
+
utilizationRate: BigDecimal!
|
|
562
|
+
}
|
|
595
563
|
|
|
596
|
-
|
|
597
|
-
|
|
564
|
+
input HubTokenInput {
|
|
565
|
+
chainId: ChainId!
|
|
566
|
+
hub: EvmAddress!
|
|
567
|
+
token: EvmAddress!
|
|
568
|
+
}
|
|
598
569
|
|
|
599
|
-
|
|
600
|
-
|
|
570
|
+
input HubsRequest {
|
|
571
|
+
query: HubsRequestQuery!
|
|
572
|
+
orderBy: HubsRequestOrderBy! = {name: ASC}
|
|
573
|
+
}
|
|
601
574
|
|
|
602
|
-
|
|
603
|
-
|
|
575
|
+
input HubsRequestOrderBy @oneOf {
|
|
576
|
+
name: OrderDirection
|
|
577
|
+
totalBorrowed: OrderDirection
|
|
578
|
+
totalSupplied: OrderDirection
|
|
604
579
|
}
|
|
605
580
|
|
|
606
|
-
input
|
|
607
|
-
"""
|
|
608
|
-
|
|
581
|
+
input HubsRequestQuery @oneOf {
|
|
582
|
+
"""Get back all the hubs which have one of the underlying tokens supplied"""
|
|
583
|
+
tokens: [Erc20Input!]
|
|
609
584
|
|
|
610
|
-
"""
|
|
611
|
-
|
|
612
|
-
user features
|
|
613
|
-
"""
|
|
614
|
-
user: EvmAddress
|
|
585
|
+
"""Get back all the hubs based on the chain ids passed in"""
|
|
586
|
+
chainIds: [ChainId!]
|
|
615
587
|
}
|
|
616
588
|
|
|
617
|
-
type
|
|
618
|
-
"""The
|
|
619
|
-
|
|
589
|
+
type InsufficientBalanceError {
|
|
590
|
+
"""The amount required to do the original transaction"""
|
|
591
|
+
required: DecimalNumber!
|
|
620
592
|
|
|
621
|
-
"""The
|
|
622
|
-
|
|
593
|
+
"""The amount available in the wallet"""
|
|
594
|
+
available: DecimalNumber!
|
|
595
|
+
}
|
|
623
596
|
|
|
624
|
-
|
|
625
|
-
|
|
597
|
+
"""A scalar that can represent any JSON value."""
|
|
598
|
+
scalar JSON
|
|
626
599
|
|
|
627
|
-
|
|
628
|
-
|
|
600
|
+
input LiquidatePositionDebtAmount @oneOf {
|
|
601
|
+
"""Exact amount"""
|
|
602
|
+
exact: BigDecimal
|
|
603
|
+
|
|
604
|
+
"""The most you can liquidate"""
|
|
605
|
+
max: AlwaysTrue
|
|
629
606
|
}
|
|
630
607
|
|
|
631
|
-
|
|
632
|
-
"""Extra APR for borrowing this asset from AAVE Merit program"""
|
|
633
|
-
borrowAprDiscount: PercentValue!
|
|
608
|
+
union LiquidatePositionExecutionPlan = TransactionRequest | Erc20ApprovalRequired | InsufficientBalanceError
|
|
634
609
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
610
|
+
input LiquidatePositionRequest {
|
|
611
|
+
"""The collateral reserve id"""
|
|
612
|
+
collateral: ReserveId!
|
|
613
|
+
|
|
614
|
+
"""The debt reserve id"""
|
|
615
|
+
debt: ReserveId!
|
|
638
616
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
617
|
+
"""The amount to liquidate"""
|
|
618
|
+
amount: LiquidatePositionDebtAmount!
|
|
619
|
+
|
|
620
|
+
"""The person liquidating the position"""
|
|
621
|
+
liquidator: EvmAddress!
|
|
622
|
+
|
|
623
|
+
"""The user to liquidate"""
|
|
624
|
+
user: EvmAddress!
|
|
642
625
|
|
|
643
|
-
"""
|
|
644
|
-
|
|
626
|
+
"""If you would like to receive shares over the asset"""
|
|
627
|
+
receiveShares: Boolean! = false
|
|
645
628
|
}
|
|
646
629
|
|
|
647
|
-
type
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
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!
|
|
653
642
|
}
|
|
654
643
|
|
|
655
|
-
type
|
|
656
|
-
"""
|
|
657
|
-
|
|
644
|
+
type Mutation {
|
|
645
|
+
"""Top up a balance for a user or yourself on the fork"""
|
|
646
|
+
forkTopUp(request: ForkTopUpRequest!): ForkTopUpResponse!
|
|
647
|
+
}
|
|
658
648
|
|
|
659
|
-
|
|
660
|
-
|
|
649
|
+
type NativeAmount {
|
|
650
|
+
"""The native token"""
|
|
651
|
+
token: NativeToken!
|
|
661
652
|
|
|
662
|
-
"""The
|
|
663
|
-
|
|
653
|
+
"""The value"""
|
|
654
|
+
amount: DecimalNumber!
|
|
664
655
|
|
|
665
|
-
"""The
|
|
666
|
-
|
|
656
|
+
"""The fiat amount"""
|
|
657
|
+
fiatAmount(currency: Currency! = USD): FiatAmount!
|
|
667
658
|
|
|
668
|
-
"""The
|
|
669
|
-
|
|
659
|
+
"""The fiat rate"""
|
|
660
|
+
fiatRate(currency: Currency! = USD): DecimalNumber!
|
|
661
|
+
}
|
|
670
662
|
|
|
671
|
-
|
|
672
|
-
|
|
663
|
+
type NativeToken {
|
|
664
|
+
info: TokenInfo!
|
|
665
|
+
chain: Chain!
|
|
673
666
|
}
|
|
674
667
|
|
|
668
|
+
scalar OnChainHubAssetId
|
|
669
|
+
|
|
670
|
+
scalar OnChainReserveId
|
|
671
|
+
|
|
675
672
|
enum OperationType {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
VAULT_DEPOSIT
|
|
685
|
-
VAULT_FEE_UPDATED
|
|
686
|
-
VAULT_FEE_WITHDRAWN
|
|
687
|
-
VAULT_WITHDRAW
|
|
688
|
-
VAULT_OWNERSHIP_TRANSFERRED
|
|
689
|
-
REVENUE_SPLITTER_OWNER_DEPLOYED
|
|
690
|
-
REVENUE_SPLITTER_OWNER_TRANSFER
|
|
691
|
-
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
|
|
692
681
|
}
|
|
693
682
|
|
|
694
683
|
enum OrderDirection {
|
|
@@ -701,6 +690,11 @@ enum PageSize {
|
|
|
701
690
|
FIFTY
|
|
702
691
|
}
|
|
703
692
|
|
|
693
|
+
type PaginatedActivitiesResult {
|
|
694
|
+
items: [ActivityItem!]!
|
|
695
|
+
pageInfo: PaginatedResultInfo!
|
|
696
|
+
}
|
|
697
|
+
|
|
704
698
|
type PaginatedResultInfo {
|
|
705
699
|
"""The cursor to the previous page of results, if any."""
|
|
706
700
|
prev: Cursor
|
|
@@ -709,234 +703,188 @@ type PaginatedResultInfo {
|
|
|
709
703
|
next: Cursor
|
|
710
704
|
}
|
|
711
705
|
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
"""List of user transaction items."""
|
|
715
|
-
items: [UserTransactionItem!]!
|
|
716
|
-
|
|
717
|
-
"""Pagination information."""
|
|
706
|
+
type PaginatedSpokePositionManagerResult {
|
|
707
|
+
items: [SpokePositionManger!]!
|
|
718
708
|
pageInfo: PaginatedResultInfo!
|
|
719
709
|
}
|
|
720
710
|
|
|
721
|
-
type
|
|
722
|
-
items: [
|
|
711
|
+
type PaginatedSpokeUserPositionManagerResult {
|
|
712
|
+
items: [SpokeUserPositionManager!]!
|
|
723
713
|
pageInfo: PaginatedResultInfo!
|
|
724
714
|
}
|
|
725
715
|
|
|
726
|
-
type
|
|
727
|
-
items: [
|
|
716
|
+
type PaginatedUserSwapsResult {
|
|
717
|
+
items: [SwapStatus!]!
|
|
728
718
|
pageInfo: PaginatedResultInfo!
|
|
729
719
|
}
|
|
730
720
|
|
|
731
|
-
type
|
|
732
|
-
"""
|
|
733
|
-
|
|
721
|
+
type PercentNumber {
|
|
722
|
+
"""
|
|
723
|
+
The on-chain representation of the percentage, stored in basis points (bps).
|
|
724
|
+
"""
|
|
725
|
+
onChainValue: BigInt!
|
|
734
726
|
|
|
735
|
-
"""The decimals
|
|
727
|
+
"""The number of decimals defining the precision of \`bps\`."""
|
|
736
728
|
decimals: Int!
|
|
737
729
|
|
|
738
|
-
"""The
|
|
730
|
+
"""The percentage value where 1.0 represents 100%."""
|
|
739
731
|
value: BigDecimal!
|
|
740
732
|
|
|
741
|
-
"""
|
|
742
|
-
|
|
743
|
-
For example, this will turn \`0.01232343\` to \`1.23\`, it will always round to \`2\` decimal points.
|
|
744
|
-
"""
|
|
745
|
-
formatted: BigDecimal!
|
|
733
|
+
"""The human-friendly percentage value formatted for display."""
|
|
734
|
+
normalized: BigDecimal!
|
|
746
735
|
}
|
|
747
736
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
"""The token you want to do the permit with"""
|
|
753
|
-
currency: EvmAddress!
|
|
754
|
-
|
|
755
|
-
"""
|
|
756
|
-
The amount to permit - in human-readable form aka 0.001 eth is 0.001 eth here
|
|
757
|
-
"""
|
|
758
|
-
amount: BigDecimal!
|
|
737
|
+
type PercentNumberVariation {
|
|
738
|
+
current: PercentNumber!
|
|
739
|
+
after: PercentNumber!
|
|
740
|
+
}
|
|
759
741
|
|
|
760
|
-
|
|
761
|
-
|
|
742
|
+
type PercentNumberWithChange {
|
|
743
|
+
current: PercentNumber!
|
|
744
|
+
change(window: TimeWindow! = LAST_DAY): PercentNumber!
|
|
745
|
+
}
|
|
762
746
|
|
|
763
|
-
|
|
747
|
+
type PermitMessageData {
|
|
764
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
|
|
765
758
|
}
|
|
766
759
|
|
|
767
760
|
type PermitTypedDataResponse {
|
|
768
761
|
types: TypeDefinition!
|
|
769
762
|
primaryType: String!
|
|
770
763
|
domain: DomainData!
|
|
771
|
-
message:
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
input PreviewAction @oneOf {
|
|
775
|
-
supply: SupplyRequest
|
|
776
|
-
borrow: BorrowRequest
|
|
777
|
-
repay: RepayRequest
|
|
778
|
-
withdraw: WithdrawRequest
|
|
764
|
+
message: PermitMessageData!
|
|
779
765
|
}
|
|
780
766
|
|
|
781
|
-
type
|
|
782
|
-
"""
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
"""Chains the protocol supports"""
|
|
786
|
-
chains(filter: ChainsFilter! = ALL): [Chain!]!
|
|
787
|
-
|
|
788
|
-
"""
|
|
789
|
-
Deposits assets (underlying tokens or its related aTokens) into the vault and mints a corresponding amount of vault shares to the receiver.
|
|
790
|
-
"""
|
|
791
|
-
vaultDeposit(request: VaultDepositRequest!): ExecutionPlan!
|
|
792
|
-
|
|
793
|
-
"""
|
|
794
|
-
Redeems shares (vault shares) for the underlying assets or a tokens, which are sent to the receiver. The shares are burned from the owner.
|
|
795
|
-
"""
|
|
796
|
-
vaultRedeemShares(request: VaultRedeemSharesRequest!): TransactionRequest!
|
|
797
|
-
|
|
798
|
-
"""Get a vault"""
|
|
799
|
-
vault(request: VaultRequest!): Vault
|
|
800
|
-
|
|
801
|
-
"""Get vaults"""
|
|
802
|
-
vaults(request: VaultsRequest!): PaginatedVaultsResult!
|
|
803
|
-
|
|
804
|
-
"""User vaults they have shares in"""
|
|
805
|
-
userVaults(request: UserVaultsRequest!): PaginatedVaultsResult!
|
|
806
|
-
|
|
807
|
-
"""Deploy a vault and earn fees from the yield"""
|
|
808
|
-
vaultDeploy(request: VaultDeployRequest!): ExecutionPlan!
|
|
809
|
-
|
|
810
|
-
"""
|
|
811
|
-
Update a vault's fee. You MUST be the owner of the vault to send this tx request.
|
|
812
|
-
"""
|
|
813
|
-
vaultSetFee(request: VaultSetFeeRequest!): TransactionRequest!
|
|
814
|
-
|
|
815
|
-
"""
|
|
816
|
-
Withdraws accumulated fees from the specified vault. You MUST be the owner of the vault to send this tx request.
|
|
817
|
-
"""
|
|
818
|
-
vaultWithdrawFees(request: VaultWithdrawFeesRequest!): TransactionRequest!
|
|
819
|
-
|
|
820
|
-
"""User vault transaction history"""
|
|
821
|
-
vaultUserTransactionHistory(request: VaultUserTransactionHistoryRequest!): PaginatedVaultUserTransactionHistoryResult!
|
|
822
|
-
|
|
823
|
-
"""
|
|
824
|
-
Vault user activity for a given vault and user, within a specified time window.
|
|
825
|
-
"""
|
|
826
|
-
vaultUserActivity(request: VaultUserActivityRequest!): VaultUserActivityResult!
|
|
827
|
-
|
|
828
|
-
"""
|
|
829
|
-
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.
|
|
830
|
-
"""
|
|
831
|
-
vaultWithdraw(request: VaultWithdrawRequest!): TransactionRequest!
|
|
832
|
-
|
|
833
|
-
"""
|
|
834
|
-
Mints an exact amount of shares (vault shares) to the receiver by depositing the calculated amount of underlying or aTokens assets.
|
|
835
|
-
"""
|
|
836
|
-
vaultMintShares(request: VaultMintSharesRequest!): ExecutionPlan!
|
|
837
|
-
|
|
838
|
-
"""
|
|
839
|
-
This will return you the amount of shares that would be minted to the receiver
|
|
840
|
-
"""
|
|
841
|
-
vaultPreviewDeposit(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
842
|
-
|
|
843
|
-
"""
|
|
844
|
-
This will return you the amount of assets that would be deposited by the caller
|
|
845
|
-
"""
|
|
846
|
-
vaultPreviewMint(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
847
|
-
|
|
848
|
-
"""
|
|
849
|
-
This will return you the number of shares burnt based on the amount of assets you want to withdraw
|
|
850
|
-
"""
|
|
851
|
-
vaultPreviewWithdraw(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
852
|
-
|
|
853
|
-
"""
|
|
854
|
-
This will return you the amount of assets that would be withdrawn by the receiver.
|
|
855
|
-
"""
|
|
856
|
-
vaultPreviewRedeem(request: VaultOperationPreviewRequest!): TokenAmount!
|
|
857
|
-
|
|
858
|
-
"""
|
|
859
|
-
Update a vault owner. You MUST be the owner of the vault to send this tx request.
|
|
860
|
-
"""
|
|
861
|
-
vaultTransferOwnership(request: VaultTransferOwnershipRequest!): TransactionRequest!
|
|
862
|
-
|
|
863
|
-
"""
|
|
864
|
-
Deploy a new recipients configuration contract for fee distribution.
|
|
865
|
-
You MUST be the owner of the vault to send this tx request.
|
|
866
|
-
"""
|
|
867
|
-
vaultCreateRecipientsConfiguration(request: VaultCreateRecipientsConfigurationRequest!): TransactionRequest!
|
|
868
|
-
|
|
869
|
-
"""
|
|
870
|
-
Set the recipients configuration for the vault. You MUST be the owner of the vault to send this tx request.
|
|
871
|
-
"""
|
|
872
|
-
vaultSetRecipientsConfiguration(request: VaultSetRecipientsConfigurationRequest!): TransactionRequest!
|
|
873
|
-
|
|
874
|
-
"""Get a vault recipients configuration"""
|
|
875
|
-
vaultRecipientConfiguration(request: VaultRecipientConfigurationRequest!): VaultFeesRecipientsConfiguration
|
|
876
|
-
|
|
877
|
-
"""Lists all the markets"""
|
|
878
|
-
markets(request: MarketsRequest!): [Market!]!
|
|
879
|
-
|
|
880
|
-
"""Get a market"""
|
|
881
|
-
market(request: MarketRequest!): Market
|
|
882
|
-
|
|
883
|
-
"""Create the transaction to borrow from a market"""
|
|
884
|
-
borrow(request: BorrowRequest!): ExecutionPlan!
|
|
767
|
+
type PreContractActionRequired {
|
|
768
|
+
"""The transaction requires a pre-contract action first"""
|
|
769
|
+
transaction: TransactionRequest!
|
|
885
770
|
|
|
886
|
-
"""
|
|
887
|
-
|
|
771
|
+
"""The reason for the pre-contract action"""
|
|
772
|
+
reason: String!
|
|
888
773
|
|
|
889
|
-
"""
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
creditDelegateeAllowance(request: CreditDelegateeAmountRequest!): TokenAmount!
|
|
774
|
+
"""The transaction to send after the approval is complete"""
|
|
775
|
+
originalTransaction: TransactionRequest!
|
|
776
|
+
}
|
|
893
777
|
|
|
894
|
-
|
|
895
|
-
|
|
778
|
+
input PrepareLimitOrderSwapInput {
|
|
779
|
+
quoteId: SwapQuoteId!
|
|
780
|
+
newSellAmount: BigDecimal
|
|
781
|
+
newBuyAmount: BigDecimal
|
|
896
782
|
|
|
897
|
-
"""
|
|
898
|
-
|
|
783
|
+
"""Slippage in basis points"""
|
|
784
|
+
newSlippage: BigDecimal
|
|
785
|
+
newReceiver: EvmAddress
|
|
786
|
+
}
|
|
899
787
|
|
|
900
|
-
|
|
901
|
-
|
|
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
|
+
}
|
|
902
797
|
|
|
903
|
-
|
|
904
|
-
|
|
798
|
+
input PrepareSwapCancelRequest {
|
|
799
|
+
id: SwapId!
|
|
800
|
+
}
|
|
905
801
|
|
|
906
|
-
|
|
907
|
-
|
|
802
|
+
type PrepareSwapCancelResult {
|
|
803
|
+
data: CancelSwapTypedData!
|
|
804
|
+
}
|
|
908
805
|
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
806
|
+
input PrepareSwapRequest @oneOf {
|
|
807
|
+
market: PrepareMarketOrderSwapInput
|
|
808
|
+
limit: PrepareLimitOrderSwapInput
|
|
809
|
+
}
|
|
913
810
|
|
|
914
|
-
|
|
915
|
-
userMarketState(request: UserMarketStateRequest!): MarketUserState!
|
|
811
|
+
union PrepareSwapResult = SwapByIntent | SwapByIntentWithApprovalRequired | SwapByTransaction | InsufficientBalanceError
|
|
916
812
|
|
|
917
|
-
|
|
918
|
-
|
|
813
|
+
input PreviewAction @oneOf {
|
|
814
|
+
supply: SupplyRequest
|
|
815
|
+
borrow: BorrowRequest
|
|
816
|
+
repay: RepayRequest
|
|
817
|
+
withdraw: WithdrawRequest
|
|
818
|
+
setUserSupplyAsCollateral: SetUserSupplyAsCollateralRequest
|
|
819
|
+
}
|
|
919
820
|
|
|
920
|
-
|
|
921
|
-
|
|
821
|
+
input PreviewRequest {
|
|
822
|
+
action: PreviewAction!
|
|
823
|
+
}
|
|
922
824
|
|
|
923
|
-
|
|
924
|
-
|
|
825
|
+
type PreviewUserPosition {
|
|
826
|
+
id: UserPositionId!
|
|
827
|
+
healthFactor: HealthFactorResult!
|
|
828
|
+
riskPremium: PercentNumberVariation!
|
|
925
829
|
|
|
926
|
-
"""
|
|
927
|
-
|
|
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
|
+
}
|
|
928
835
|
|
|
929
|
-
|
|
930
|
-
|
|
836
|
+
type Query {
|
|
837
|
+
health: Boolean!
|
|
838
|
+
chain(request: ChainRequest!): Chain
|
|
839
|
+
chains(filter: ChainsFilter!): [Chain!]!
|
|
931
840
|
|
|
932
841
|
"""Generate EIP-712 typed data for EIP-2612 permit signature"""
|
|
933
842
|
permitTypedData(request: PermitRequest!): PermitTypedDataResponse!
|
|
934
843
|
|
|
935
|
-
"""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!]!
|
|
936
855
|
reserve(request: ReserveRequest!): Reserve
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
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!]!
|
|
940
888
|
|
|
941
889
|
"""
|
|
942
890
|
This lets you know the API has processed the known transaction hash, as the API uses caching to make things as fast
|
|
@@ -946,1352 +894,1065 @@ type Query {
|
|
|
946
894
|
cater for the race condition.
|
|
947
895
|
"""
|
|
948
896
|
hasProcessedKnownTransaction(request: HasProcessedKnownTransactionRequest!): Boolean!
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
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
|
+
}
|
|
953
907
|
|
|
954
|
-
|
|
955
|
-
The
|
|
956
|
-
|
|
957
|
-
userMeritRewards(request: UserMeritRewardsRequest!): UserMeritRewards
|
|
908
|
+
input RenounceSpokeUserPositionManagerRequest {
|
|
909
|
+
"""The spoke id"""
|
|
910
|
+
spoke: SpokeId!
|
|
958
911
|
|
|
959
|
-
"""
|
|
960
|
-
|
|
961
|
-
this can be claimed using \`userMeritRewards\`
|
|
962
|
-
"""
|
|
963
|
-
savingsGhoBalance(request: SavingsGhoBalanceRequest!): TokenAmount!
|
|
912
|
+
"""The address to remove as a position manager"""
|
|
913
|
+
manager: EvmAddress!
|
|
964
914
|
|
|
965
|
-
"""
|
|
966
|
-
|
|
915
|
+
"""The address to remove \`manager\` as position manager"""
|
|
916
|
+
managing: EvmAddress!
|
|
917
|
+
}
|
|
967
918
|
|
|
968
|
-
|
|
969
|
-
|
|
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!
|
|
970
928
|
}
|
|
971
929
|
|
|
972
|
-
input
|
|
930
|
+
input RepayAmountInputWithPermit @oneOf {
|
|
973
931
|
"""The native amount"""
|
|
974
|
-
native:
|
|
932
|
+
native: AmountInput
|
|
975
933
|
|
|
976
934
|
"""The erc20 amount input"""
|
|
977
|
-
erc20:
|
|
935
|
+
erc20: RepayErc20AmountInputWithPermit
|
|
978
936
|
}
|
|
979
937
|
|
|
980
|
-
input
|
|
938
|
+
input RepayErc20AmountInputWithPermit {
|
|
981
939
|
"""
|
|
982
|
-
|
|
983
|
-
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).
|
|
984
941
|
"""
|
|
985
|
-
|
|
942
|
+
value: AmountInput!
|
|
986
943
|
|
|
987
|
-
"""
|
|
988
|
-
|
|
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
|
|
989
948
|
}
|
|
990
949
|
|
|
991
|
-
input
|
|
992
|
-
"""The
|
|
993
|
-
|
|
950
|
+
input RepayPermitRequest {
|
|
951
|
+
"""The reserve id"""
|
|
952
|
+
reserve: ReserveId!
|
|
994
953
|
|
|
995
|
-
"""The amount
|
|
996
|
-
|
|
954
|
+
"""The amount repaying"""
|
|
955
|
+
amount: AmountInput!
|
|
997
956
|
|
|
998
|
-
"""
|
|
999
|
-
|
|
1000
|
-
"""
|
|
1001
|
-
permitSig: ERC712Signature
|
|
957
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
958
|
+
sender: EvmAddress!
|
|
1002
959
|
}
|
|
1003
960
|
|
|
1004
961
|
input RepayRequest {
|
|
1005
|
-
"""The
|
|
1006
|
-
|
|
962
|
+
"""The reserve id"""
|
|
963
|
+
reserve: ReserveId!
|
|
1007
964
|
|
|
1008
|
-
"""
|
|
1009
|
-
|
|
1010
|
-
"""
|
|
1011
|
-
amount: RepayAmountInput!
|
|
965
|
+
"""The amount repaying"""
|
|
966
|
+
amount: RepayAmountInputWithPermit!
|
|
1012
967
|
|
|
1013
968
|
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1014
969
|
sender: EvmAddress!
|
|
1015
|
-
|
|
1016
|
-
"""
|
|
1017
|
-
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
|
|
1018
|
-
"""
|
|
1019
|
-
onBehalfOf: EvmAddress
|
|
1020
|
-
|
|
1021
|
-
"""The chain id"""
|
|
1022
|
-
chainId: ChainId!
|
|
1023
970
|
}
|
|
1024
971
|
|
|
1025
972
|
type Reserve {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
"""
|
|
1039
|
-
If the reserve accepts native currency, for example, if you're on a reserve with asset WETH, it can
|
|
1040
|
-
also accept ETH
|
|
1041
|
-
"""
|
|
1042
|
-
acceptsNative: NativeCurrency
|
|
1043
|
-
|
|
1044
|
-
"""The reserve size"""
|
|
1045
|
-
size: TokenAmount!
|
|
1046
|
-
|
|
1047
|
-
"""The usd exchange rate for the underlying token"""
|
|
1048
|
-
usdExchangeRate: BigDecimal!
|
|
1049
|
-
|
|
1050
|
-
"""The usd oracle address it is pulling that price from"""
|
|
1051
|
-
usdOracleAddress: EvmAddress!
|
|
1052
|
-
|
|
1053
|
-
"""The supply info for the reserve"""
|
|
1054
|
-
supplyInfo: ReserveSupplyInfo!
|
|
1055
|
-
|
|
1056
|
-
"""
|
|
1057
|
-
The borrow info for the reserve - if its null the underlying token cannot be borrowed
|
|
1058
|
-
"""
|
|
1059
|
-
borrowInfo: ReserveBorrowInfo
|
|
1060
|
-
|
|
1061
|
-
"""The reserve has been frozen all actions are stopped"""
|
|
1062
|
-
isFrozen: Boolean!
|
|
1063
|
-
|
|
1064
|
-
"""The reserve is paused you can still withdraw and some other actions"""
|
|
1065
|
-
isPaused: Boolean!
|
|
1066
|
-
|
|
1067
|
-
"""
|
|
1068
|
-
If the reserve supports isolation mode this is defined and the configs are defined
|
|
1069
|
-
"""
|
|
1070
|
-
isolationModeConfig: ReserveIsolationModeConfig
|
|
1071
|
-
|
|
1072
|
-
"""If the reserve can use flash loans on it"""
|
|
1073
|
-
flashLoanEnabled: Boolean!
|
|
1074
|
-
|
|
1075
|
-
"""The interest rate strategy address"""
|
|
1076
|
-
interestRateStrategyAddress: EvmAddress!
|
|
1077
|
-
|
|
1078
|
-
"""Does the underlying reserve support permit"""
|
|
1079
|
-
permitSupported: Boolean!
|
|
1080
|
-
|
|
1081
|
-
"""
|
|
1082
|
-
This exposes the extra incentives you can earn from third parties (Merit) or from
|
|
1083
|
-
incentives set by governance through the RewardsController.
|
|
1084
|
-
Note Aave Labs does not guarantee third party program and accepts no liability to those
|
|
1085
|
-
"""
|
|
1086
|
-
incentives: [ReserveIncentive!]!
|
|
1087
|
-
|
|
1088
|
-
"""The emode information for the reserve"""
|
|
1089
|
-
eModeInfo: [EmodeReserveInfo!]!
|
|
1090
|
-
|
|
1091
|
-
"""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!
|
|
1092
984
|
userState: ReserveUserState
|
|
985
|
+
asset: HubAsset!
|
|
986
|
+
spoke: Spoke!
|
|
1093
987
|
}
|
|
1094
988
|
|
|
1095
|
-
|
|
1096
|
-
"""The
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
"""The total amount borrowed from this reserve"""
|
|
1100
|
-
total: TokenAmount!
|
|
1101
|
-
|
|
1102
|
-
"""The reserve factor percentage"""
|
|
1103
|
-
reserveFactor: PercentValue!
|
|
989
|
+
input ReserveAmountInput @oneOf {
|
|
990
|
+
"""The native amount"""
|
|
991
|
+
native: BigDecimal
|
|
1104
992
|
|
|
1105
|
-
"""The
|
|
1106
|
-
|
|
993
|
+
"""The erc20 amount input"""
|
|
994
|
+
erc20: ReserveErc20AmountInput
|
|
995
|
+
}
|
|
1107
996
|
|
|
1108
|
-
|
|
1109
|
-
|
|
997
|
+
input ReserveAmountInputWithPermit @oneOf {
|
|
998
|
+
"""The native amount"""
|
|
999
|
+
native: BigDecimal
|
|
1110
1000
|
|
|
1111
|
-
"""
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
"""
|
|
1115
|
-
variableRateSlope1: PercentValue!
|
|
1001
|
+
"""The erc20 amount input"""
|
|
1002
|
+
erc20: ReserveErc20AmountInputWithPermit
|
|
1003
|
+
}
|
|
1116
1004
|
|
|
1005
|
+
input ReserveErc20AmountInput {
|
|
1117
1006
|
"""
|
|
1118
|
-
|
|
1119
|
-
This is the slope of the interest rate curve in the second segment (optimal to 100% utilization)
|
|
1120
|
-
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).
|
|
1121
1008
|
"""
|
|
1122
|
-
|
|
1009
|
+
value: BigDecimal!
|
|
1010
|
+
}
|
|
1123
1011
|
|
|
1012
|
+
input ReserveErc20AmountInputWithPermit {
|
|
1124
1013
|
"""
|
|
1125
|
-
|
|
1126
|
-
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).
|
|
1127
1015
|
"""
|
|
1128
|
-
|
|
1016
|
+
value: BigDecimal!
|
|
1129
1017
|
|
|
1130
1018
|
"""
|
|
1131
|
-
|
|
1019
|
+
The signed ERC20 permit message to operate on the relevant token without a need for an ERC20 Approval transaction.
|
|
1132
1020
|
"""
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
"""The borrow cap of the reserve"""
|
|
1136
|
-
borrowCap: TokenAmount!
|
|
1137
|
-
|
|
1138
|
-
"""The borrow cap is now full"""
|
|
1139
|
-
borrowCapReached: Boolean!
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
enum ReserveBorrowingState {
|
|
1143
|
-
"""Borrowing is enabled"""
|
|
1144
|
-
ENABLED
|
|
1145
|
-
|
|
1146
|
-
"""Borrowing is disabled"""
|
|
1147
|
-
DISABLED
|
|
1148
|
-
|
|
1149
|
-
"""The user emode settings make this underlying not able to be borrowed"""
|
|
1150
|
-
USER_EMODE_DISABLED_BORROW
|
|
1021
|
+
permitSig: ERC20PermitSignature
|
|
1151
1022
|
}
|
|
1152
1023
|
|
|
1153
|
-
|
|
1024
|
+
scalar ReserveId
|
|
1154
1025
|
|
|
1155
1026
|
type ReserveInfo {
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
"""The reserve underlying currency"""
|
|
1160
|
-
underlyingToken: Currency!
|
|
1161
|
-
|
|
1162
|
-
"""The reserve a token"""
|
|
1163
|
-
aToken: Currency!
|
|
1164
|
-
|
|
1165
|
-
"""The reserve v token"""
|
|
1166
|
-
vToken: Currency!
|
|
1167
|
-
|
|
1168
|
-
"""The usd exchange rate for the underlying token"""
|
|
1169
|
-
usdExchangeRate: BigDecimal!
|
|
1170
|
-
|
|
1171
|
-
"""Does the underlying reserve support permit"""
|
|
1172
|
-
permitSupported: Boolean!
|
|
1173
|
-
|
|
1174
|
-
"""
|
|
1175
|
-
This exposes the extra incentives you can earn from third parties (Merit) or from
|
|
1176
|
-
incentives set by governance through the RewardsController.
|
|
1177
|
-
Note Aave Labs does not guarantee third party program and accepts no liability to those
|
|
1178
|
-
"""
|
|
1179
|
-
incentives: [ReserveIncentive!]!
|
|
1027
|
+
id: ReserveId!
|
|
1028
|
+
asset: HubAsset!
|
|
1180
1029
|
}
|
|
1181
1030
|
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
debtCeiling: TokenAmount!
|
|
1187
|
-
|
|
1188
|
-
"""The decimals used for the debt ceiling"""
|
|
1189
|
-
debtCeilingDecimals: Int!
|
|
1190
|
-
|
|
1191
|
-
"""Only the amount that is borrowed by the users in isolation"""
|
|
1192
|
-
totalBorrows: TokenAmount!
|
|
1031
|
+
input ReserveInput {
|
|
1032
|
+
chainId: ChainId!
|
|
1033
|
+
spoke: EvmAddress!
|
|
1034
|
+
onChainId: OnChainReserveId!
|
|
1193
1035
|
}
|
|
1194
1036
|
|
|
1195
1037
|
input ReserveRequest {
|
|
1196
|
-
|
|
1197
|
-
market: EvmAddress!
|
|
1198
|
-
|
|
1199
|
-
"""The underlying token for the reserve"""
|
|
1200
|
-
underlyingToken: EvmAddress!
|
|
1201
|
-
|
|
1202
|
-
"""The chain id the pool is deployed on"""
|
|
1203
|
-
chainId: ChainId!
|
|
1038
|
+
query: ReserveRequestQuery!
|
|
1204
1039
|
|
|
1205
1040
|
"""
|
|
1206
|
-
The user
|
|
1207
|
-
user features
|
|
1041
|
+
The user who is doing the query (this injects user state into some of the return objects)
|
|
1208
1042
|
"""
|
|
1209
1043
|
user: EvmAddress
|
|
1210
1044
|
}
|
|
1211
1045
|
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
"""The maximum loan-to-value ratio when used as collateral"""
|
|
1217
|
-
maxLTV: PercentValue!
|
|
1218
|
-
|
|
1219
|
-
"""The liquidation threshold for this asset"""
|
|
1220
|
-
liquidationThreshold: PercentValue!
|
|
1221
|
-
|
|
1222
|
-
"""The liquidation bonus applied when liquidated"""
|
|
1223
|
-
liquidationBonus: PercentValue!
|
|
1224
|
-
|
|
1225
|
-
"""If the asset can be used for collateral"""
|
|
1226
|
-
canBeCollateral: Boolean!
|
|
1227
|
-
|
|
1228
|
-
"""The supply cap"""
|
|
1229
|
-
supplyCap: TokenAmount!
|
|
1230
|
-
|
|
1231
|
-
"""The supply cap is now full"""
|
|
1232
|
-
supplyCapReached: Boolean!
|
|
1233
|
-
|
|
1234
|
-
"""The total amount supplied to this reserve"""
|
|
1235
|
-
total: DecimalValue!
|
|
1046
|
+
input ReserveRequestQuery @oneOf {
|
|
1047
|
+
reserveId: ReserveId
|
|
1048
|
+
reserveInput: ReserveInput
|
|
1236
1049
|
}
|
|
1237
1050
|
|
|
1238
|
-
type
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
"""The amount the user can borrow from this reserve"""
|
|
1246
|
-
borrowable: TokenAmount!
|
|
1247
|
-
|
|
1248
|
-
"""The user emode info if enabled"""
|
|
1249
|
-
emode: EmodeReserveInfo
|
|
1250
|
-
|
|
1251
|
-
"""
|
|
1252
|
-
If the user is in a state to be able to supply taking into consideration their emode
|
|
1253
|
-
"""
|
|
1254
|
-
canBeCollateral: Boolean!
|
|
1255
|
-
|
|
1256
|
-
"""If the user is in a state to be able to borrow from the reserve"""
|
|
1257
|
-
canBeBorrowed: Boolean!
|
|
1258
|
-
|
|
1259
|
-
"""Is the user in isolation mode"""
|
|
1260
|
-
isInIsolationMode: Boolean!
|
|
1051
|
+
type ReserveSettings {
|
|
1052
|
+
collateralFactor: PercentNumber!
|
|
1053
|
+
maxLiquidationBonus: PercentNumber!
|
|
1054
|
+
collateralRisk: PercentNumber!
|
|
1055
|
+
borrowable: Boolean!
|
|
1056
|
+
collateral: Boolean!
|
|
1057
|
+
suppliable: Boolean!
|
|
1261
1058
|
}
|
|
1262
1059
|
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
"""The chain id - savings GHO for now only works on Ethereum"""
|
|
1268
|
-
chainId: ChainId
|
|
1060
|
+
type ReserveStatus {
|
|
1061
|
+
frozen: Boolean!
|
|
1062
|
+
paused: Boolean!
|
|
1063
|
+
active: Boolean!
|
|
1269
1064
|
}
|
|
1270
1065
|
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
depositor: EvmAddress!
|
|
1277
|
-
|
|
1278
|
-
"""
|
|
1279
|
-
The address to which saving GHO shares will be minted to - defaults to \`depositor\`.
|
|
1280
|
-
"""
|
|
1281
|
-
recipient: EvmAddress
|
|
1282
|
-
|
|
1283
|
-
"""The chain id - savings GHO for now only works on Ethereum"""
|
|
1284
|
-
chainId: ChainId
|
|
1066
|
+
type ReserveSummary {
|
|
1067
|
+
supplied: Erc20Amount!
|
|
1068
|
+
borrowed: Erc20Amount!
|
|
1069
|
+
supplyApy: PercentNumber!
|
|
1070
|
+
borrowApy: PercentNumber!
|
|
1285
1071
|
}
|
|
1286
1072
|
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
max: AlwaysTrue
|
|
1073
|
+
type ReserveUserState {
|
|
1074
|
+
balance: Erc20Amount!
|
|
1075
|
+
suppliable: Erc20Amount!
|
|
1076
|
+
borrowable: Erc20Amount!
|
|
1077
|
+
borrowApy: PercentNumber!
|
|
1293
1078
|
}
|
|
1294
1079
|
|
|
1295
|
-
input
|
|
1296
|
-
"""The
|
|
1297
|
-
|
|
1080
|
+
input ReservesRequest {
|
|
1081
|
+
"""The reserve's request query"""
|
|
1082
|
+
query: ReservesRequestQuery!
|
|
1298
1083
|
|
|
1299
1084
|
"""
|
|
1300
|
-
The
|
|
1085
|
+
The user who is doing the query (this injects user state into some of the return objects)
|
|
1301
1086
|
"""
|
|
1302
|
-
|
|
1087
|
+
user: EvmAddress
|
|
1303
1088
|
|
|
1304
|
-
"""The
|
|
1305
|
-
|
|
1089
|
+
"""The reserve's filter"""
|
|
1090
|
+
filter: ReservesRequestFilter! = ALL
|
|
1306
1091
|
|
|
1307
|
-
"""The
|
|
1308
|
-
|
|
1092
|
+
"""The reserve's order by"""
|
|
1093
|
+
orderBy: ReservesRequestOrderBy! = {assetName: ASC}
|
|
1309
1094
|
}
|
|
1310
1095
|
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
"""
|
|
1316
|
-
The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
|
|
1317
|
-
"""
|
|
1318
|
-
permitSig: ERC712Signature
|
|
1096
|
+
enum ReservesRequestFilter {
|
|
1097
|
+
SUPPLY
|
|
1098
|
+
BORROW
|
|
1099
|
+
ALL
|
|
1319
1100
|
}
|
|
1320
1101
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
"""The time windows for the history"""
|
|
1331
|
-
window: TimeWindow!
|
|
1332
|
-
|
|
1333
|
-
"""The chain id"""
|
|
1334
|
-
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
|
|
1335
1110
|
}
|
|
1336
1111
|
|
|
1337
|
-
input
|
|
1338
|
-
"""
|
|
1339
|
-
|
|
1112
|
+
input ReservesRequestQuery @oneOf {
|
|
1113
|
+
"""Get all the reserves for a spoke"""
|
|
1114
|
+
spoke: SpokeInput
|
|
1340
1115
|
|
|
1341
|
-
"""
|
|
1342
|
-
|
|
1116
|
+
"""Get all the reserves for a spoke"""
|
|
1117
|
+
spokeId: SpokeId
|
|
1343
1118
|
|
|
1344
|
-
"""
|
|
1345
|
-
|
|
1119
|
+
"""Get all the reserves with underlying tokens"""
|
|
1120
|
+
tokens: [Erc20Input!]
|
|
1346
1121
|
|
|
1347
|
-
"""
|
|
1348
|
-
|
|
1349
|
-
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
|
|
1350
|
-
of aTokens is a different wallet
|
|
1351
|
-
"""
|
|
1352
|
-
onBehalfOf: EvmAddress
|
|
1122
|
+
"""Get all the reserves on a hub for an underlying"""
|
|
1123
|
+
hubToken: HubTokenInput
|
|
1353
1124
|
|
|
1354
|
-
"""
|
|
1355
|
-
|
|
1356
|
-
}
|
|
1125
|
+
"""Get all the reserves on a list of chains"""
|
|
1126
|
+
chainIds: [ChainId!]
|
|
1357
1127
|
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
LAST_WEEK
|
|
1361
|
-
LAST_MONTH
|
|
1362
|
-
LAST_SIX_MONTHS
|
|
1363
|
-
LAST_YEAR
|
|
1364
|
-
}
|
|
1128
|
+
"""Get all the reserves for a spoke for an underlying"""
|
|
1129
|
+
spokeToken: SpokeTokenInput
|
|
1365
1130
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1131
|
+
"""Get all tokens on a hub"""
|
|
1132
|
+
hub: HubInput
|
|
1368
1133
|
|
|
1369
|
-
"""
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
"""The usd full amount"""
|
|
1373
|
-
usd: BigDecimal!
|
|
1134
|
+
"""Get all the reserves on based on user position id"""
|
|
1135
|
+
userPositionId: UserPositionId
|
|
1374
1136
|
}
|
|
1375
1137
|
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
type TransactionRequest {
|
|
1380
|
-
"""Who the transaction is going to (normally a contract)"""
|
|
1381
|
-
to: EvmAddress!
|
|
1138
|
+
input SetSpokeUserPositionManagerRequest {
|
|
1139
|
+
"""The spoke id"""
|
|
1140
|
+
spoke: SpokeId!
|
|
1382
1141
|
|
|
1383
|
-
"""
|
|
1384
|
-
|
|
1142
|
+
"""The address to become the position manager"""
|
|
1143
|
+
manager: EvmAddress!
|
|
1385
1144
|
|
|
1386
|
-
"""
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
"""The native token value"""
|
|
1390
|
-
value: BigInt!
|
|
1145
|
+
"""Approve or remove the manager"""
|
|
1146
|
+
approve: Boolean!
|
|
1391
1147
|
|
|
1392
|
-
"""The
|
|
1393
|
-
|
|
1148
|
+
"""The user to set the position \`manager\` for"""
|
|
1149
|
+
user: EvmAddress!
|
|
1394
1150
|
|
|
1395
|
-
"""
|
|
1396
|
-
|
|
1397
|
-
If null the API does not track/require the outcome - once receipt is done, everything is ready to go
|
|
1398
|
-
"""
|
|
1399
|
-
operation: OperationType
|
|
1151
|
+
"""The signature"""
|
|
1152
|
+
signature: ERC20PermitSignature
|
|
1400
1153
|
}
|
|
1401
1154
|
|
|
1402
|
-
|
|
1155
|
+
input SetUserSupplyAsCollateralRequest {
|
|
1156
|
+
"""The reserve id"""
|
|
1157
|
+
reserve: ReserveId!
|
|
1403
1158
|
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
Permit: [TypeField!]!
|
|
1407
|
-
}
|
|
1159
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1160
|
+
sender: EvmAddress!
|
|
1408
1161
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
type: String!
|
|
1162
|
+
"""If you want to enable the collateral or disable"""
|
|
1163
|
+
enableCollateral: Boolean!
|
|
1412
1164
|
}
|
|
1413
1165
|
|
|
1414
|
-
scalar
|
|
1166
|
+
scalar Signature
|
|
1415
1167
|
|
|
1416
|
-
type
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
}
|
|
1168
|
+
type Spoke {
|
|
1169
|
+
"""The id for the spoke"""
|
|
1170
|
+
id: SpokeId!
|
|
1420
1171
|
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
market: EvmAddress!
|
|
1172
|
+
"""The spoke name (offchain)"""
|
|
1173
|
+
name: String!
|
|
1424
1174
|
|
|
1425
|
-
"""The
|
|
1426
|
-
|
|
1175
|
+
"""The spoke address"""
|
|
1176
|
+
address: EvmAddress!
|
|
1427
1177
|
|
|
1428
|
-
"""The chain
|
|
1429
|
-
|
|
1178
|
+
"""The spoke chain"""
|
|
1179
|
+
chain: Chain!
|
|
1430
1180
|
}
|
|
1431
1181
|
|
|
1432
|
-
|
|
1433
|
-
type UserBorrowTransaction {
|
|
1434
|
-
"""Amount borrowed."""
|
|
1435
|
-
amount: TokenAmount!
|
|
1182
|
+
scalar SpokeId
|
|
1436
1183
|
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
"""URL to view the transaction on a block explorer."""
|
|
1441
|
-
blockExplorerUrl: String!
|
|
1442
|
-
|
|
1443
|
-
"""Transaction hash."""
|
|
1444
|
-
txHash: TxHash!
|
|
1184
|
+
input SpokeInput {
|
|
1185
|
+
"""The address of the spoke"""
|
|
1186
|
+
address: EvmAddress!
|
|
1445
1187
|
|
|
1446
|
-
"""
|
|
1447
|
-
|
|
1188
|
+
"""The chain id the spoke is deployed to"""
|
|
1189
|
+
chainId: ChainId!
|
|
1448
1190
|
}
|
|
1449
1191
|
|
|
1450
|
-
input
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
user: EvmAddress!
|
|
1456
|
-
|
|
1457
|
-
"""How to order the results"""
|
|
1458
|
-
orderBy: UserBorrowsRequestOrderBy! = {name: ASC}
|
|
1192
|
+
input SpokePositionManagersRequest {
|
|
1193
|
+
spoke: SpokeId!
|
|
1194
|
+
includeInactive: Boolean
|
|
1195
|
+
pageSize: PageSize!
|
|
1196
|
+
cursor: Cursor
|
|
1459
1197
|
}
|
|
1460
1198
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
"""Order by the asset name"""
|
|
1466
|
-
name: OrderDirection
|
|
1467
|
-
|
|
1468
|
-
"""Order by the annual percentage yield"""
|
|
1469
|
-
apy: OrderDirection
|
|
1199
|
+
type SpokePositionManger {
|
|
1200
|
+
name: String!
|
|
1201
|
+
address: EvmAddress!
|
|
1202
|
+
active: Boolean!
|
|
1470
1203
|
}
|
|
1471
1204
|
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
collateral: LiquidationCollateral!
|
|
1476
|
-
|
|
1477
|
-
"""Debt repaid."""
|
|
1478
|
-
debtRepaid: LiquidationRepaidDebt!
|
|
1479
|
-
|
|
1480
|
-
"""URL to view the transaction on a block explorer."""
|
|
1481
|
-
blockExplorerUrl: String!
|
|
1482
|
-
|
|
1483
|
-
"""Transaction hash."""
|
|
1484
|
-
txHash: TxHash!
|
|
1485
|
-
|
|
1486
|
-
"""Timestamp of the transaction."""
|
|
1487
|
-
timestamp: DateTime!
|
|
1205
|
+
input SpokeRequest {
|
|
1206
|
+
"""The spoke request query"""
|
|
1207
|
+
query: SpokeRequestQuery!
|
|
1488
1208
|
}
|
|
1489
1209
|
|
|
1490
|
-
input
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
"""The user to toggle emode on"""
|
|
1495
|
-
user: EvmAddress!
|
|
1496
|
-
|
|
1497
|
-
"""The chain id"""
|
|
1498
|
-
chainId: ChainId!
|
|
1210
|
+
input SpokeRequestQuery @oneOf {
|
|
1211
|
+
spoke: SpokeInput
|
|
1212
|
+
spokeId: SpokeId
|
|
1499
1213
|
}
|
|
1500
1214
|
|
|
1501
|
-
|
|
1502
|
-
"""The
|
|
1503
|
-
|
|
1215
|
+
input SpokeTokenInput {
|
|
1216
|
+
"""The spoke id"""
|
|
1217
|
+
spoke: SpokeId!
|
|
1504
1218
|
|
|
1505
|
-
"""
|
|
1506
|
-
|
|
1507
|
-
"""
|
|
1508
|
-
claimable: [ClaimableMeritReward!]!
|
|
1509
|
-
|
|
1510
|
-
"""The transaction to execute to claim the rewards"""
|
|
1511
|
-
transaction: TransactionRequest!
|
|
1219
|
+
"""The token"""
|
|
1220
|
+
token: EvmAddress!
|
|
1512
1221
|
}
|
|
1513
1222
|
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1223
|
+
type SpokeUserPositionManager {
|
|
1224
|
+
name: String!
|
|
1225
|
+
address: EvmAddress!
|
|
1226
|
+
approvedOn: DateTime!
|
|
1227
|
+
active: Boolean!
|
|
1517
1228
|
}
|
|
1518
1229
|
|
|
1519
|
-
input
|
|
1520
|
-
|
|
1230
|
+
input SpokeUserPositionManagersRequest {
|
|
1231
|
+
spoke: SpokeId!
|
|
1521
1232
|
user: EvmAddress!
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
chainId: ChainId!
|
|
1525
|
-
filter: UserMeritRewardsFilter
|
|
1233
|
+
pageSize: PageSize!
|
|
1234
|
+
cursor: Cursor
|
|
1526
1235
|
}
|
|
1527
1236
|
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
"""Amount repaid."""
|
|
1531
|
-
amount: TokenAmount!
|
|
1532
|
-
|
|
1533
|
-
"""Reserve to which assets were repaid."""
|
|
1534
|
-
reserve: ReserveInfo!
|
|
1535
|
-
|
|
1536
|
-
"""URL to view the transaction on a block explorer."""
|
|
1537
|
-
blockExplorerUrl: String!
|
|
1538
|
-
|
|
1539
|
-
"""Transaction hash."""
|
|
1540
|
-
txHash: TxHash!
|
|
1541
|
-
|
|
1542
|
-
"""Timestamp of the transaction."""
|
|
1543
|
-
timestamp: DateTime!
|
|
1237
|
+
input SpokesRequest {
|
|
1238
|
+
query: SpokesRequestQuery!
|
|
1544
1239
|
}
|
|
1545
1240
|
|
|
1546
|
-
input
|
|
1547
|
-
"""The pool address for the market"""
|
|
1548
|
-
market: EvmAddress!
|
|
1549
|
-
|
|
1550
|
-
"""The user to toggle emode on"""
|
|
1551
|
-
user: EvmAddress!
|
|
1552
|
-
|
|
1241
|
+
input SpokesRequestQuery @oneOf {
|
|
1553
1242
|
"""
|
|
1554
|
-
The
|
|
1243
|
+
The hub id
|
|
1244
|
+
Get all the spokes which hubs are linked to a spoke reserve
|
|
1555
1245
|
"""
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
"""The chain id"""
|
|
1559
|
-
chainId: ChainId!
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
input UserSuppliesRequest {
|
|
1563
|
-
"""The market addresses and chains ids to query"""
|
|
1564
|
-
markets: [MarketInput!]!
|
|
1246
|
+
hubId: HubId
|
|
1565
1247
|
|
|
1566
|
-
"""
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
"""
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
"""How to order the results"""
|
|
1573
|
-
orderBy: UserSuppliesRequestOrderBy! = {name: ASC}
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
input UserSuppliesRequestOrderBy @oneOf {
|
|
1577
|
-
"""Order by the user's supply balance"""
|
|
1578
|
-
balance: OrderDirection
|
|
1579
|
-
|
|
1580
|
-
"""Order by the asset name"""
|
|
1581
|
-
name: OrderDirection
|
|
1582
|
-
|
|
1583
|
-
"""Order by the annual percentage yield"""
|
|
1584
|
-
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
|
|
1585
1253
|
|
|
1586
|
-
"""
|
|
1587
|
-
|
|
1254
|
+
"""
|
|
1255
|
+
The chain ids
|
|
1256
|
+
Get all the spokes which are on the list of chain ids
|
|
1257
|
+
"""
|
|
1258
|
+
chainIds: [ChainId!]
|
|
1588
1259
|
}
|
|
1589
1260
|
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
amount: TokenAmount!
|
|
1594
|
-
|
|
1595
|
-
"""Reserve to which assets were supplied."""
|
|
1596
|
-
reserve: ReserveInfo!
|
|
1597
|
-
|
|
1598
|
-
"""URL to view the transaction on a block explorer."""
|
|
1599
|
-
blockExplorerUrl: String!
|
|
1600
|
-
|
|
1601
|
-
"""Transaction hash."""
|
|
1602
|
-
txHash: TxHash!
|
|
1603
|
-
|
|
1604
|
-
"""Timestamp of the transaction."""
|
|
1605
|
-
timestamp: DateTime!
|
|
1261
|
+
input SupplyAPYHistoryRequest {
|
|
1262
|
+
reserve: ReserveId!
|
|
1263
|
+
window: TimeWindow! = LAST_DAY
|
|
1606
1264
|
}
|
|
1607
1265
|
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
market: EvmAddress!
|
|
1611
|
-
|
|
1612
|
-
"""The filter to optionally filter the transactions by type"""
|
|
1613
|
-
filter: [UserTransactionType!]! = [SUPPLY, WITHDRAW, BORROW, REPAY, USAGE_AS_COLLATERAL, LIQUIDATION_CALL]
|
|
1614
|
-
|
|
1615
|
-
"""The order by object to sort the transactions by"""
|
|
1616
|
-
orderBy: UserTransactionHistoryRequestOrderBy! = {date: ASC}
|
|
1617
|
-
|
|
1618
|
-
"""The user that sent the transactions"""
|
|
1266
|
+
type SupplyActivity {
|
|
1267
|
+
id: ID!
|
|
1619
1268
|
user: EvmAddress!
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
"""Pagination cursor"""
|
|
1628
|
-
cursor: Cursor
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
input UserTransactionHistoryRequestOrderBy {
|
|
1632
|
-
"""Order by the date of the transaction"""
|
|
1633
|
-
date: OrderDirection
|
|
1269
|
+
timestamp: DateTime!
|
|
1270
|
+
txHash: TxHash!
|
|
1271
|
+
spoke: Spoke!
|
|
1272
|
+
reserve: ReserveInfo!
|
|
1273
|
+
supplied: Erc20Amount!
|
|
1274
|
+
chain: Chain!
|
|
1634
1275
|
}
|
|
1635
1276
|
|
|
1636
|
-
|
|
1277
|
+
input SupplyPermitRequest {
|
|
1278
|
+
"""The reserve id"""
|
|
1279
|
+
reserve: ReserveId!
|
|
1637
1280
|
|
|
1638
|
-
"""The
|
|
1639
|
-
|
|
1640
|
-
"""User supplied assets to the protocol."""
|
|
1641
|
-
SUPPLY
|
|
1642
|
-
|
|
1643
|
-
"""User borrowed assets from the protocol."""
|
|
1644
|
-
BORROW
|
|
1645
|
-
|
|
1646
|
-
"""User enabled or disabled usage of an asset as collateral."""
|
|
1647
|
-
USAGE_AS_COLLATERAL
|
|
1648
|
-
|
|
1649
|
-
"""User was involved in a liquidation call."""
|
|
1650
|
-
LIQUIDATION_CALL
|
|
1281
|
+
"""The amount supplying"""
|
|
1282
|
+
amount: ReserveErc20AmountInput!
|
|
1651
1283
|
|
|
1652
|
-
"""
|
|
1653
|
-
|
|
1284
|
+
"""If you wish to enable collateral with it meaning you can borrow"""
|
|
1285
|
+
enableCollateral: Boolean! = true
|
|
1654
1286
|
|
|
1655
|
-
"""
|
|
1656
|
-
|
|
1287
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1288
|
+
sender: EvmAddress!
|
|
1657
1289
|
}
|
|
1658
1290
|
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
type UserUsageAsCollateralTransaction {
|
|
1663
|
-
"""Whether collateral usage was enabled."""
|
|
1664
|
-
enabled: Boolean!
|
|
1665
|
-
|
|
1666
|
-
"""Reserve for which collateral usage was changed."""
|
|
1667
|
-
reserve: ReserveInfo!
|
|
1668
|
-
|
|
1669
|
-
"""URL to view the transaction on a block explorer."""
|
|
1670
|
-
blockExplorerUrl: String!
|
|
1671
|
-
|
|
1672
|
-
"""Transaction hash."""
|
|
1673
|
-
txHash: TxHash!
|
|
1291
|
+
input SupplyRequest {
|
|
1292
|
+
"""The reserve id"""
|
|
1293
|
+
reserve: ReserveId!
|
|
1674
1294
|
|
|
1675
|
-
"""
|
|
1676
|
-
|
|
1677
|
-
}
|
|
1295
|
+
"""The amount supplying"""
|
|
1296
|
+
amount: ReserveAmountInputWithPermit!
|
|
1678
1297
|
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
shares: TokenAmount!
|
|
1298
|
+
"""If you wish to enable collateral with it meaning you can borrow"""
|
|
1299
|
+
enableCollateral: Boolean! = true
|
|
1682
1300
|
|
|
1683
|
-
"""The
|
|
1684
|
-
|
|
1301
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1302
|
+
sender: EvmAddress!
|
|
1685
1303
|
}
|
|
1686
1304
|
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
"""Filter by underlying token addresses"""
|
|
1692
|
-
underlyingTokens: [EvmAddress!]
|
|
1305
|
+
type SwapApprovalRequired {
|
|
1306
|
+
approval: TransactionRequest!
|
|
1307
|
+
originalTransaction: SwapTransactionRequest!
|
|
1693
1308
|
}
|
|
1694
1309
|
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1310
|
+
type SwapByIntent {
|
|
1311
|
+
quote: SwapQuote!
|
|
1312
|
+
data: SwapByIntentTypedData!
|
|
1313
|
+
}
|
|
1698
1314
|
|
|
1699
|
-
|
|
1700
|
-
|
|
1315
|
+
input SwapByIntentInput {
|
|
1316
|
+
quoteId: SwapQuoteId!
|
|
1317
|
+
signature: Signature!
|
|
1701
1318
|
}
|
|
1702
1319
|
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1320
|
+
type SwapByIntentTypeDefinition {
|
|
1321
|
+
EIP712Domain: [TypeField!]!
|
|
1322
|
+
Order: [TypeField!]!
|
|
1323
|
+
}
|
|
1706
1324
|
|
|
1707
|
-
|
|
1708
|
-
|
|
1325
|
+
type SwapByIntentTypedData {
|
|
1326
|
+
types: SwapByIntentTypeDefinition!
|
|
1327
|
+
primaryType: String!
|
|
1328
|
+
domain: DomainData!
|
|
1329
|
+
message: JSON!
|
|
1330
|
+
}
|
|
1709
1331
|
|
|
1710
|
-
|
|
1711
|
-
|
|
1332
|
+
type SwapByIntentWithApprovalRequired {
|
|
1333
|
+
quote: SwapQuote!
|
|
1334
|
+
approval: TransactionRequest!
|
|
1335
|
+
data: SwapByIntentTypedData!
|
|
1336
|
+
}
|
|
1712
1337
|
|
|
1713
|
-
|
|
1714
|
-
|
|
1338
|
+
type SwapByTransaction {
|
|
1339
|
+
quote: SwapQuote!
|
|
1340
|
+
}
|
|
1715
1341
|
|
|
1716
|
-
|
|
1717
|
-
|
|
1342
|
+
type SwapCancelled {
|
|
1343
|
+
createdAt: DateTime!
|
|
1344
|
+
cancelledAt: DateTime
|
|
1345
|
+
explorerLink: String!
|
|
1718
1346
|
}
|
|
1719
1347
|
|
|
1720
|
-
|
|
1721
|
-
type UserWithdrawTransaction {
|
|
1722
|
-
"""Amount withdrawn."""
|
|
1723
|
-
amount: TokenAmount!
|
|
1348
|
+
union SwapExecutionPlan = SwapTransactionRequest | SwapApprovalRequired | InsufficientBalanceError | SwapReceipt
|
|
1724
1349
|
|
|
1725
|
-
|
|
1726
|
-
|
|
1350
|
+
type SwapExpired {
|
|
1351
|
+
createdAt: DateTime!
|
|
1352
|
+
expiredAt: DateTime!
|
|
1353
|
+
explorerLink: String!
|
|
1354
|
+
}
|
|
1727
1355
|
|
|
1728
|
-
|
|
1729
|
-
|
|
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
|
+
}
|
|
1730
1367
|
|
|
1731
|
-
|
|
1732
|
-
txHash: TxHash!
|
|
1368
|
+
scalar SwapId
|
|
1733
1369
|
|
|
1734
|
-
|
|
1735
|
-
|
|
1370
|
+
enum SwapKind {
|
|
1371
|
+
BUY
|
|
1372
|
+
SELL
|
|
1736
1373
|
}
|
|
1737
1374
|
|
|
1738
|
-
type
|
|
1739
|
-
|
|
1740
|
-
|
|
1375
|
+
type SwapOpen {
|
|
1376
|
+
swapId: SwapId!
|
|
1377
|
+
createdAt: DateTime!
|
|
1378
|
+
deadline: DateTime!
|
|
1379
|
+
explorerLink: String!
|
|
1380
|
+
desiredSell: TokenAmount!
|
|
1381
|
+
desiredBuy: TokenAmount!
|
|
1382
|
+
}
|
|
1741
1383
|
|
|
1742
|
-
|
|
1743
|
-
|
|
1384
|
+
type SwapPendingSignature {
|
|
1385
|
+
createdAt: DateTime!
|
|
1386
|
+
deadline: DateTime!
|
|
1387
|
+
explorerLink: String!
|
|
1388
|
+
}
|
|
1744
1389
|
|
|
1745
|
-
|
|
1746
|
-
|
|
1390
|
+
type SwapQuote {
|
|
1391
|
+
quoteId: SwapQuoteId!
|
|
1392
|
+
suggestedSlippage: PercentNumber!
|
|
1393
|
+
desiredSell: TokenAmount!
|
|
1394
|
+
desiredBuy: TokenAmount!
|
|
1395
|
+
costs: SwapQuoteCosts!
|
|
1747
1396
|
|
|
1748
|
-
"""
|
|
1749
|
-
|
|
1397
|
+
"""Minimum received amount after all costs and slippage"""
|
|
1398
|
+
minimumReceived: TokenAmount!
|
|
1399
|
+
}
|
|
1750
1400
|
|
|
1751
|
-
|
|
1752
|
-
|
|
1401
|
+
type SwapQuoteCosts {
|
|
1402
|
+
"""Network and provider costs"""
|
|
1403
|
+
networkCosts: TokenAmount!
|
|
1753
1404
|
|
|
1754
|
-
"""
|
|
1755
|
-
|
|
1405
|
+
"""Aave partner fee amount"""
|
|
1406
|
+
partnerFee: TokenAmount!
|
|
1407
|
+
}
|
|
1756
1408
|
|
|
1757
|
-
|
|
1758
|
-
The last recorded balance of the vault's AToken. This value is updated when yield is accrued.
|
|
1759
|
-
"""
|
|
1760
|
-
balance: TokenAmount!
|
|
1409
|
+
scalar SwapQuoteId
|
|
1761
1410
|
|
|
1762
|
-
|
|
1411
|
+
input SwapQuoteRequest {
|
|
1763
1412
|
chainId: ChainId!
|
|
1413
|
+
buy: TokenInput!
|
|
1414
|
+
sell: TokenInput!
|
|
1415
|
+
amount: BigDecimal!
|
|
1416
|
+
kind: SwapKind
|
|
1417
|
+
from: EvmAddress!
|
|
1418
|
+
receiver: EvmAddress
|
|
1419
|
+
}
|
|
1764
1420
|
|
|
1765
|
-
|
|
1766
|
-
|
|
1421
|
+
type SwapReceipt {
|
|
1422
|
+
id: SwapId!
|
|
1423
|
+
createdAt: DateTime!
|
|
1424
|
+
explorerLink: String!
|
|
1425
|
+
}
|
|
1767
1426
|
|
|
1768
|
-
|
|
1769
|
-
|
|
1427
|
+
input SwapRequest @oneOf {
|
|
1428
|
+
intent: SwapByIntentInput
|
|
1429
|
+
transaction: SwapWithTransactionInput
|
|
1430
|
+
}
|
|
1770
1431
|
|
|
1771
|
-
|
|
1772
|
-
feesBalance: TokenAmount!
|
|
1432
|
+
union SwapStatus = SwapOpen | SwapPendingSignature | SwapCancelled | SwapExpired | SwapFulfilled
|
|
1773
1433
|
|
|
1774
|
-
|
|
1775
|
-
|
|
1434
|
+
enum SwapStatusFilter {
|
|
1435
|
+
CANCELLED
|
|
1436
|
+
EXPIRED
|
|
1437
|
+
FULFILLED
|
|
1438
|
+
OPEN
|
|
1439
|
+
PENDING_SIGNATURE
|
|
1440
|
+
}
|
|
1776
1441
|
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
Returns None if the vault doesn't have any recipients configured (in which case the owner is the sole fee recipient)
|
|
1780
|
-
"""
|
|
1781
|
-
recipients: VaultFeesRecipientsConfiguration
|
|
1442
|
+
input SwapStatusRequest {
|
|
1443
|
+
id: SwapId!
|
|
1782
1444
|
}
|
|
1783
1445
|
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1446
|
+
type SwapTransactionRequest {
|
|
1447
|
+
transaction: TransactionRequest!
|
|
1448
|
+
orderReceipt: SwapReceipt!
|
|
1449
|
+
}
|
|
1787
1450
|
|
|
1788
|
-
|
|
1789
|
-
|
|
1451
|
+
input SwapWithTransactionInput {
|
|
1452
|
+
quoteId: SwapQuoteId!
|
|
1453
|
+
permitSig: Signature
|
|
1790
1454
|
|
|
1791
1455
|
"""
|
|
1792
|
-
|
|
1793
|
-
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.
|
|
1794
1457
|
"""
|
|
1795
|
-
|
|
1458
|
+
isSenderSmartContractWallet: Boolean
|
|
1796
1459
|
}
|
|
1797
1460
|
|
|
1798
|
-
input
|
|
1799
|
-
|
|
1800
|
-
|
|
1461
|
+
input SwappableTokenInput @oneOf {
|
|
1462
|
+
native: ChainId
|
|
1463
|
+
erc20: Erc20Input
|
|
1464
|
+
}
|
|
1801
1465
|
|
|
1802
|
-
|
|
1803
|
-
|
|
1466
|
+
input SwappableTokensRequest {
|
|
1467
|
+
query: SwappableTokensRequestQuery
|
|
1468
|
+
}
|
|
1804
1469
|
|
|
1805
|
-
|
|
1806
|
-
|
|
1470
|
+
input SwappableTokensRequestQuery @oneOf {
|
|
1471
|
+
chainIds: [ChainId!]
|
|
1472
|
+
from: SwappableTokenInput
|
|
1473
|
+
to: SwappableTokenInput
|
|
1474
|
+
}
|
|
1807
1475
|
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1476
|
+
enum TimeWindow {
|
|
1477
|
+
LAST_DAY
|
|
1478
|
+
LAST_WEEK
|
|
1479
|
+
LAST_MONTH
|
|
1480
|
+
LAST_SIX_MONTHS
|
|
1481
|
+
LAST_YEAR
|
|
1482
|
+
ALL
|
|
1483
|
+
}
|
|
1812
1484
|
|
|
1813
|
-
|
|
1814
|
-
owner: EvmAddress
|
|
1485
|
+
union Token = NativeToken | Erc20Token
|
|
1815
1486
|
|
|
1816
|
-
|
|
1817
|
-
initialFee: BigDecimal!
|
|
1487
|
+
union TokenAmount = NativeAmount | Erc20Amount
|
|
1818
1488
|
|
|
1819
|
-
|
|
1820
|
-
|
|
1489
|
+
type TokenInfo {
|
|
1490
|
+
"""The token name"""
|
|
1491
|
+
name: String!
|
|
1821
1492
|
|
|
1822
|
-
"""The symbol
|
|
1823
|
-
|
|
1493
|
+
"""The token symbol"""
|
|
1494
|
+
symbol: String!
|
|
1824
1495
|
|
|
1825
|
-
"""
|
|
1826
|
-
|
|
1827
|
-
"""
|
|
1828
|
-
initialLockDeposit: BigDecimal!
|
|
1496
|
+
"""The token icon"""
|
|
1497
|
+
icon: String!
|
|
1829
1498
|
|
|
1830
|
-
"""
|
|
1831
|
-
|
|
1832
|
-
If not provided, the fee revenue will be sent to the owner of the vault.
|
|
1833
|
-
Vault revenue is split between the recipients and the Aave fee recipient (50/50 split).
|
|
1834
|
-
"""
|
|
1835
|
-
recipients: [VaultFeesRecipientSplitInput!]
|
|
1499
|
+
"""The token decimals"""
|
|
1500
|
+
decimals: Int!
|
|
1836
1501
|
}
|
|
1837
1502
|
|
|
1838
|
-
input
|
|
1839
|
-
"""
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
"""Whether you are depositing in as a token or normal underlying"""
|
|
1843
|
-
asAToken: Boolean! = false
|
|
1503
|
+
input TokenInput @oneOf {
|
|
1504
|
+
"""Native token"""
|
|
1505
|
+
native: AlwaysTrue
|
|
1844
1506
|
|
|
1845
|
-
"""
|
|
1846
|
-
|
|
1847
|
-
"""
|
|
1848
|
-
permitSig: ERC712Signature
|
|
1507
|
+
"""The erc20 address"""
|
|
1508
|
+
erc20: EvmAddress
|
|
1849
1509
|
}
|
|
1850
1510
|
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1511
|
+
type TransactionRequest {
|
|
1512
|
+
to: EvmAddress!
|
|
1513
|
+
from: EvmAddress!
|
|
1514
|
+
data: BlockchainData!
|
|
1515
|
+
value: BigInt!
|
|
1516
|
+
chainId: ChainId!
|
|
1517
|
+
operations: [OperationType!]
|
|
1518
|
+
}
|
|
1854
1519
|
|
|
1855
|
-
|
|
1856
|
-
amount: VaultDepositAmountInput!
|
|
1520
|
+
scalar TxHash
|
|
1857
1521
|
|
|
1858
|
-
|
|
1859
|
-
|
|
1522
|
+
input TxHashInput {
|
|
1523
|
+
txHash: TxHash!
|
|
1524
|
+
chainId: ChainId!
|
|
1525
|
+
}
|
|
1860
1526
|
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1527
|
+
type TypeDefinition {
|
|
1528
|
+
EIP712Domain: [TypeField!]!
|
|
1529
|
+
Permit: [TypeField!]!
|
|
1530
|
+
}
|
|
1865
1531
|
|
|
1866
|
-
|
|
1867
|
-
|
|
1532
|
+
type TypeField {
|
|
1533
|
+
name: String!
|
|
1534
|
+
type: String!
|
|
1868
1535
|
}
|
|
1869
1536
|
|
|
1870
|
-
|
|
1871
|
-
"""
|
|
1872
|
-
|
|
1537
|
+
input UpdateUserDynamicConfigRequest {
|
|
1538
|
+
"""The spoke id"""
|
|
1539
|
+
spoke: SpokeId!
|
|
1873
1540
|
|
|
1874
|
-
"""
|
|
1875
|
-
|
|
1541
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
1542
|
+
sender: EvmAddress!
|
|
1876
1543
|
|
|
1877
|
-
"""
|
|
1878
|
-
|
|
1544
|
+
"""If not supplied, this will use \`sender\` which is the normal route"""
|
|
1545
|
+
onBehalfOf: EvmAddress
|
|
1879
1546
|
}
|
|
1880
1547
|
|
|
1881
|
-
input
|
|
1882
|
-
"""
|
|
1883
|
-
|
|
1548
|
+
input UpdateUserRiskPremiumRequest {
|
|
1549
|
+
"""The spoke id"""
|
|
1550
|
+
spoke: SpokeId!
|
|
1884
1551
|
|
|
1885
|
-
"""
|
|
1886
|
-
|
|
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
|
|
1887
1557
|
}
|
|
1888
1558
|
|
|
1889
|
-
type
|
|
1890
|
-
"""
|
|
1891
|
-
|
|
1559
|
+
type UserBalance {
|
|
1560
|
+
"""The user balance id"""
|
|
1561
|
+
id: UserBalanceId!
|
|
1892
1562
|
|
|
1893
|
-
"""
|
|
1894
|
-
|
|
1895
|
-
}
|
|
1563
|
+
"""The token info"""
|
|
1564
|
+
info: TokenInfo!
|
|
1896
1565
|
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
address: EvmAddress!
|
|
1566
|
+
"""The balances across chains it will be 1 item per chain"""
|
|
1567
|
+
balances: [TokenAmount!]!
|
|
1900
1568
|
|
|
1901
|
-
"""The
|
|
1902
|
-
|
|
1903
|
-
}
|
|
1569
|
+
"""The total amount summed across all balances"""
|
|
1570
|
+
totalAmount: DecimalNumber!
|
|
1904
1571
|
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
amount: BigDecimal!
|
|
1572
|
+
"""The total fiat amount summed across all balances"""
|
|
1573
|
+
fiatAmount(currency: Currency! = USD): FiatAmount!
|
|
1908
1574
|
|
|
1909
|
-
"""
|
|
1910
|
-
|
|
1575
|
+
"""The supply APY dependent on what you pass in for the \`metric\`"""
|
|
1576
|
+
supplyApy(metric: ApyMetric! = HIGHEST): PercentNumber!
|
|
1911
1577
|
|
|
1912
|
-
"""
|
|
1913
|
-
|
|
1914
|
-
"""
|
|
1915
|
-
permitSig: ERC712Signature
|
|
1578
|
+
"""The borrow APY dependent on what you pass in for the \`metric\`"""
|
|
1579
|
+
borrowApy(metric: ApyMetric! = HIGHEST): PercentNumber!
|
|
1916
1580
|
}
|
|
1917
1581
|
|
|
1918
|
-
|
|
1919
|
-
"""The vault address"""
|
|
1920
|
-
vault: EvmAddress!
|
|
1582
|
+
scalar UserBalanceId
|
|
1921
1583
|
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
"""The user who is wanting to mint the shares"""
|
|
1926
|
-
minter: EvmAddress!
|
|
1584
|
+
input UserBalancesByChains {
|
|
1585
|
+
"""List of chains"""
|
|
1586
|
+
chainIds: [ChainId!]!
|
|
1927
1587
|
|
|
1928
1588
|
"""
|
|
1929
|
-
The
|
|
1589
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1930
1590
|
"""
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
"""The chain id"""
|
|
1934
|
-
chainId: ChainId!
|
|
1591
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1935
1592
|
}
|
|
1936
1593
|
|
|
1937
|
-
input
|
|
1938
|
-
"""The
|
|
1939
|
-
|
|
1594
|
+
input UserBalancesByHub {
|
|
1595
|
+
"""The hub address"""
|
|
1596
|
+
address: EvmAddress!
|
|
1940
1597
|
|
|
1941
|
-
"""The chain id
|
|
1598
|
+
"""The hub chain id"""
|
|
1942
1599
|
chainId: ChainId!
|
|
1943
1600
|
|
|
1944
1601
|
"""
|
|
1945
|
-
The
|
|
1946
|
-
preview deposit = underlying
|
|
1947
|
-
preview mint = shares
|
|
1948
|
-
preview withdraw = underlying
|
|
1949
|
-
preview redeem = shares
|
|
1602
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1950
1603
|
"""
|
|
1951
|
-
|
|
1604
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1952
1605
|
}
|
|
1953
1606
|
|
|
1954
|
-
input
|
|
1955
|
-
"""The
|
|
1956
|
-
|
|
1607
|
+
input UserBalancesBySpoke {
|
|
1608
|
+
"""The spoke address"""
|
|
1609
|
+
address: EvmAddress!
|
|
1957
1610
|
|
|
1958
|
-
"""The chain id the
|
|
1611
|
+
"""The chain id the spoke is deployed to"""
|
|
1959
1612
|
chainId: ChainId!
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
input VaultRecipientConfigurationRequestBy @oneOf {
|
|
1963
|
-
"""The vault recipient configuration address"""
|
|
1964
|
-
address: EvmAddress
|
|
1965
1613
|
|
|
1966
1614
|
"""
|
|
1967
|
-
|
|
1615
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1968
1616
|
"""
|
|
1969
|
-
|
|
1617
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1970
1618
|
}
|
|
1971
1619
|
|
|
1972
|
-
input
|
|
1973
|
-
"""The
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
"""Whether the amount should be sent as aToken."""
|
|
1977
|
-
asAToken: Boolean! = false
|
|
1620
|
+
input UserBalancesByUserPosition {
|
|
1621
|
+
"""The user position id"""
|
|
1622
|
+
userPositionId: UserPositionId!
|
|
1978
1623
|
|
|
1979
1624
|
"""
|
|
1980
|
-
The
|
|
1625
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1981
1626
|
"""
|
|
1982
|
-
|
|
1627
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1983
1628
|
}
|
|
1984
1629
|
|
|
1985
|
-
input
|
|
1986
|
-
"""The
|
|
1987
|
-
|
|
1630
|
+
input UserBalancesRequest {
|
|
1631
|
+
"""The user to get the balance for"""
|
|
1632
|
+
user: EvmAddress!
|
|
1988
1633
|
|
|
1989
|
-
"""The
|
|
1990
|
-
|
|
1634
|
+
"""The order by clause - defaults to the highest USD value"""
|
|
1635
|
+
orderBy: UserBalancesRequestOrderBy! = {balance: DESC}
|
|
1991
1636
|
|
|
1992
|
-
"""
|
|
1993
|
-
|
|
1994
|
-
"""
|
|
1995
|
-
sharesOwner: EvmAddress!
|
|
1637
|
+
"""The user balance filter"""
|
|
1638
|
+
filter: UserBalancesRequestFilter!
|
|
1996
1639
|
|
|
1997
|
-
"""
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
authorizedUser: EvmAddress
|
|
1640
|
+
"""If you want to include 0 balances in the return list"""
|
|
1641
|
+
includeZeroBalances: Boolean! = false
|
|
1642
|
+
}
|
|
2001
1643
|
|
|
2002
|
-
|
|
2003
|
-
The
|
|
2004
|
-
|
|
2005
|
-
recipient: EvmAddress
|
|
1644
|
+
input UserBalancesRequestFilter @oneOf {
|
|
1645
|
+
"""The balances for the tokens on the specified chains"""
|
|
1646
|
+
chains: UserBalancesByChains
|
|
2006
1647
|
|
|
2007
|
-
"""The
|
|
2008
|
-
|
|
2009
|
-
}
|
|
1648
|
+
"""The balances for the tokens of hub assets on a given hub"""
|
|
1649
|
+
hub: UserBalancesByHub
|
|
2010
1650
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
by: VaultRequestBy!
|
|
1651
|
+
"""The balances for the tokens of reserves attached to a spoke"""
|
|
1652
|
+
spoke: UserBalancesBySpoke
|
|
2014
1653
|
|
|
2015
|
-
"""The
|
|
2016
|
-
|
|
1654
|
+
"""The balances for the swappable tokens"""
|
|
1655
|
+
swappable: SwappableTokensRequestQuery
|
|
2017
1656
|
|
|
2018
1657
|
"""
|
|
2019
|
-
The
|
|
1658
|
+
The balances for the tokens of the spoke associated with the given user position
|
|
2020
1659
|
"""
|
|
2021
|
-
|
|
1660
|
+
userPosition: UserBalancesByUserPosition
|
|
2022
1661
|
}
|
|
2023
1662
|
|
|
2024
|
-
input
|
|
2025
|
-
"""The
|
|
2026
|
-
|
|
1663
|
+
input UserBalancesRequestOrderBy @oneOf {
|
|
1664
|
+
"""The name of the token"""
|
|
1665
|
+
name: OrderDirection
|
|
2027
1666
|
|
|
2028
|
-
"""
|
|
2029
|
-
|
|
2030
|
-
"""
|
|
2031
|
-
txHash: TxHash
|
|
1667
|
+
"""The balance of the token"""
|
|
1668
|
+
balance: OrderDirection
|
|
2032
1669
|
}
|
|
2033
1670
|
|
|
2034
|
-
|
|
2035
|
-
"""The
|
|
2036
|
-
|
|
1671
|
+
type UserBorrowItem {
|
|
1672
|
+
"""The user borrow item id"""
|
|
1673
|
+
id: UserBorrowItemId!
|
|
2037
1674
|
|
|
2038
|
-
"""The
|
|
2039
|
-
|
|
1675
|
+
"""The reserve borrowed from"""
|
|
1676
|
+
reserve: Reserve!
|
|
2040
1677
|
|
|
2041
|
-
"""The
|
|
2042
|
-
|
|
2043
|
-
}
|
|
1678
|
+
"""The amount borrowed on this reserve"""
|
|
1679
|
+
principal: Erc20Amount!
|
|
2044
1680
|
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
vault: EvmAddress!
|
|
1681
|
+
"""The overall debt including accrued interests"""
|
|
1682
|
+
debt: Erc20Amount!
|
|
2048
1683
|
|
|
2049
|
-
"""The
|
|
2050
|
-
|
|
1684
|
+
"""The interest incurred on the loan"""
|
|
1685
|
+
interest: Erc20Amount!
|
|
2051
1686
|
|
|
2052
|
-
"""
|
|
2053
|
-
|
|
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
|
|
2054
1694
|
}
|
|
2055
1695
|
|
|
2056
|
-
|
|
2057
|
-
"""The vault deployed address"""
|
|
2058
|
-
vault: EvmAddress!
|
|
1696
|
+
scalar UserBorrowItemId
|
|
2059
1697
|
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
1698
|
+
input UserBorrowsQueryRequest @oneOf {
|
|
1699
|
+
userSpoke: UserSpokeInput
|
|
1700
|
+
userToken: UserToken
|
|
1701
|
+
userPositionId: UserPositionId
|
|
1702
|
+
userChains: UserChains
|
|
2065
1703
|
}
|
|
2066
1704
|
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
withdrew: TokenAmount
|
|
2071
|
-
deposited: TokenAmount
|
|
2072
|
-
date: DateTime!
|
|
2073
|
-
}
|
|
1705
|
+
input UserBorrowsRequest {
|
|
1706
|
+
query: UserBorrowsQueryRequest!
|
|
1707
|
+
orderBy: UserBorrowsRequestOrderBy! = {amount: DESC}
|
|
2074
1708
|
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
1709
|
+
"""If you wish to include zero balances in the results"""
|
|
1710
|
+
includeZeroBalances: Boolean! = false
|
|
1711
|
+
}
|
|
2078
1712
|
|
|
2079
|
-
|
|
2080
|
-
|
|
1713
|
+
input UserBorrowsRequestOrderBy @oneOf {
|
|
1714
|
+
assetName: OrderDirection
|
|
1715
|
+
created: OrderDirection
|
|
1716
|
+
amount: OrderDirection
|
|
1717
|
+
apy: OrderDirection
|
|
1718
|
+
}
|
|
2081
1719
|
|
|
2082
|
-
|
|
1720
|
+
input UserChains {
|
|
2083
1721
|
user: EvmAddress!
|
|
2084
|
-
|
|
2085
|
-
"""The timing window for which to calculate user activity"""
|
|
2086
|
-
window: VaultUserActivityTimeWindow!
|
|
1722
|
+
chainIds: [ChainId!]!
|
|
2087
1723
|
}
|
|
2088
1724
|
|
|
2089
|
-
type
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
}
|
|
1725
|
+
type UserPosition {
|
|
1726
|
+
"""The user position ID"""
|
|
1727
|
+
id: UserPositionId!
|
|
2093
1728
|
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
1729
|
+
"""The user holding this position"""
|
|
1730
|
+
user: EvmAddress!
|
|
1731
|
+
createdAt: DateTime!
|
|
1732
|
+
totalSupplied(currency: Currency! = USD): FiatAmountWithChange!
|
|
2097
1733
|
|
|
2098
|
-
"""
|
|
2099
|
-
|
|
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!
|
|
2100
1738
|
|
|
2101
|
-
"""
|
|
2102
|
-
|
|
1739
|
+
"""Total debt which is the total amount borrowed plus the accrued premium"""
|
|
1740
|
+
totalDebt(currency: Currency! = USD): FiatAmountWithChange!
|
|
2103
1741
|
|
|
2104
|
-
"""
|
|
2105
|
-
|
|
2106
|
-
}
|
|
1742
|
+
"""The net balance which is \`total_supplied\` - \`borrows\`"""
|
|
1743
|
+
netBalance(currency: Currency! = USD): FiatAmountWithChange!
|
|
2107
1744
|
|
|
2108
|
-
"""
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
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!
|
|
2115
1756
|
}
|
|
2116
1757
|
|
|
2117
|
-
|
|
2118
|
-
DEPOSIT
|
|
2119
|
-
WITHDRAW
|
|
2120
|
-
}
|
|
1758
|
+
scalar UserPositionId
|
|
2121
1759
|
|
|
2122
|
-
input
|
|
2123
|
-
|
|
2124
|
-
|
|
1760
|
+
input UserPositionRequest @oneOf {
|
|
1761
|
+
userSpoke: UserSpokeInput
|
|
1762
|
+
id: UserPositionId
|
|
2125
1763
|
}
|
|
2126
1764
|
|
|
2127
|
-
input
|
|
2128
|
-
"""The
|
|
2129
|
-
vault: EvmAddress!
|
|
2130
|
-
|
|
2131
|
-
"""The chain id where the transactions were sent"""
|
|
2132
|
-
chainId: ChainId!
|
|
2133
|
-
|
|
2134
|
-
"""The user that sent the transactions"""
|
|
1765
|
+
input UserPositionsRequest {
|
|
1766
|
+
"""The user to get the positions for"""
|
|
2135
1767
|
user: EvmAddress!
|
|
2136
1768
|
|
|
2137
|
-
"""The filter
|
|
2138
|
-
filter:
|
|
1769
|
+
"""The filter for the user position"""
|
|
1770
|
+
filter: UserPositionsRequestFilter!
|
|
2139
1771
|
|
|
2140
|
-
"""
|
|
2141
|
-
orderBy:
|
|
2142
|
-
|
|
2143
|
-
"""The page size"""
|
|
2144
|
-
pageSize: PageSize! = FIFTY
|
|
1772
|
+
"""The ordering for the positions"""
|
|
1773
|
+
orderBy: UserPositionsRequestOrderBy! = {created: ASC}
|
|
1774
|
+
}
|
|
2145
1775
|
|
|
2146
|
-
|
|
2147
|
-
|
|
1776
|
+
input UserPositionsRequestFilter @oneOf {
|
|
1777
|
+
tokens: [Erc20Input!]
|
|
1778
|
+
chainIds: [ChainId!]
|
|
2148
1779
|
}
|
|
2149
1780
|
|
|
2150
|
-
|
|
1781
|
+
input UserPositionsRequestOrderBy @oneOf {
|
|
1782
|
+
created: OrderDirection
|
|
1783
|
+
balance: OrderDirection
|
|
1784
|
+
netApy: OrderDirection
|
|
1785
|
+
healthFactor: OrderDirection
|
|
1786
|
+
netCollateral: OrderDirection
|
|
1787
|
+
}
|
|
2151
1788
|
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
shares: TokenAmount!
|
|
2156
|
-
blockExplorerUrl: String!
|
|
2157
|
-
txHash: TxHash!
|
|
2158
|
-
timestamp: DateTime!
|
|
1789
|
+
input UserSpokeInput {
|
|
1790
|
+
spoke: SpokeId!
|
|
1791
|
+
user: EvmAddress!
|
|
2159
1792
|
}
|
|
2160
1793
|
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
value: BigDecimal!
|
|
1794
|
+
type UserSummary {
|
|
1795
|
+
totalPositions: Int!
|
|
2164
1796
|
|
|
2165
|
-
"""
|
|
2166
|
-
|
|
1797
|
+
"""Net balance = supply - debt"""
|
|
1798
|
+
netBalance(currency: Currency! = USD): FiatAmountWithChange!
|
|
2167
1799
|
|
|
2168
|
-
"""
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
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!
|
|
2173
1805
|
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
vault: EvmAddress!
|
|
1806
|
+
"""Total debt across all positions"""
|
|
1807
|
+
totalDebt(currency: Currency! = USD): FiatAmount!
|
|
2177
1808
|
|
|
2178
1809
|
"""
|
|
2179
|
-
|
|
1810
|
+
Net APY = (\u03A3 (supplied_amount_i * supply_apy_i) - \u03A3 (borrowed_amount_j * borrow_apy_j)) / (\u03A3 supplied_amount_i)
|
|
2180
1811
|
"""
|
|
2181
|
-
|
|
1812
|
+
netApy: PercentNumber!
|
|
2182
1813
|
|
|
2183
|
-
"""
|
|
2184
|
-
|
|
1814
|
+
"""Interest earned (net fee earned)"""
|
|
1815
|
+
netFeeEarned: FiatAmount!
|
|
2185
1816
|
|
|
2186
|
-
"""
|
|
2187
|
-
|
|
1817
|
+
"""Lowest health factor across all positions"""
|
|
1818
|
+
lowestHealthFactor: BigDecimal
|
|
2188
1819
|
}
|
|
2189
1820
|
|
|
2190
|
-
input
|
|
2191
|
-
|
|
2192
|
-
|
|
1821
|
+
input UserSummaryFilter @oneOf {
|
|
1822
|
+
spoke: SpokeInput
|
|
1823
|
+
spokeId: SpokeId
|
|
1824
|
+
chainIds: [ChainId!]
|
|
1825
|
+
userPositionId: UserPositionId
|
|
1826
|
+
}
|
|
2193
1827
|
|
|
2194
|
-
|
|
2195
|
-
|
|
1828
|
+
type UserSummaryHistoryItem {
|
|
1829
|
+
healthFactor: BigDecimal
|
|
1830
|
+
date: DateTime!
|
|
2196
1831
|
|
|
2197
|
-
"""
|
|
2198
|
-
|
|
2199
|
-
"""
|
|
2200
|
-
sharesOwner: EvmAddress!
|
|
1832
|
+
"""The aggregated net balance for the time period"""
|
|
1833
|
+
netBalance(currency: Currency! = USD): FiatAmount!
|
|
2201
1834
|
|
|
2202
|
-
"""
|
|
2203
|
-
|
|
2204
|
-
"""
|
|
2205
|
-
authorizedUser: EvmAddress
|
|
1835
|
+
"""The aggregated borrows for the time period"""
|
|
1836
|
+
borrows(currency: Currency! = USD): FiatAmount!
|
|
2206
1837
|
|
|
2207
|
-
"""
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
recipient: EvmAddress
|
|
1838
|
+
"""The aggregated supplies for the time period"""
|
|
1839
|
+
supplies(currency: Currency! = USD): FiatAmount!
|
|
1840
|
+
}
|
|
2211
1841
|
|
|
2212
|
-
|
|
2213
|
-
|
|
1842
|
+
input UserSummaryHistoryRequest {
|
|
1843
|
+
user: EvmAddress!
|
|
1844
|
+
filter: UserSummaryFilter
|
|
1845
|
+
window: TimeWindow! = LAST_DAY
|
|
2214
1846
|
}
|
|
2215
1847
|
|
|
2216
|
-
input
|
|
2217
|
-
|
|
2218
|
-
|
|
1848
|
+
input UserSummaryRequest {
|
|
1849
|
+
user: EvmAddress!
|
|
1850
|
+
filter: UserSummaryFilter
|
|
1851
|
+
}
|
|
2219
1852
|
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
1853
|
+
input UserSuppliesQueryRequest @oneOf {
|
|
1854
|
+
userSpoke: UserSpokeInput
|
|
1855
|
+
userToken: UserToken
|
|
1856
|
+
userPositionId: UserPositionId
|
|
1857
|
+
userChains: UserChains
|
|
1858
|
+
}
|
|
2224
1859
|
|
|
2225
|
-
|
|
2226
|
-
|
|
1860
|
+
input UserSuppliesRequest {
|
|
1861
|
+
query: UserSuppliesQueryRequest!
|
|
1862
|
+
orderBy: UserSuppliesRequestOrderBy! = {amount: DESC}
|
|
2227
1863
|
|
|
2228
|
-
"""
|
|
2229
|
-
|
|
1864
|
+
"""If you wish to include zero balances in the results"""
|
|
1865
|
+
includeZeroBalances: Boolean! = false
|
|
2230
1866
|
}
|
|
2231
1867
|
|
|
2232
|
-
input
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
ownedBy: [EvmAddress!]
|
|
1868
|
+
input UserSuppliesRequestOrderBy @oneOf {
|
|
1869
|
+
assetName: OrderDirection
|
|
1870
|
+
created: OrderDirection
|
|
1871
|
+
amount: OrderDirection
|
|
1872
|
+
apy: OrderDirection
|
|
2238
1873
|
}
|
|
2239
1874
|
|
|
2240
|
-
|
|
2241
|
-
"""
|
|
2242
|
-
|
|
1875
|
+
type UserSupplyItem {
|
|
1876
|
+
"""The user supply item id"""
|
|
1877
|
+
id: UserSupplyItemId!
|
|
2243
1878
|
|
|
2244
|
-
"""
|
|
2245
|
-
|
|
2246
|
-
}
|
|
1879
|
+
"""The reserve supplied to"""
|
|
1880
|
+
reserve: Reserve!
|
|
2247
1881
|
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
native: WithdrawNativeAmountInput
|
|
1882
|
+
"""The amount supplied to this reserve"""
|
|
1883
|
+
principal: Erc20Amount!
|
|
2251
1884
|
|
|
2252
|
-
"""The
|
|
2253
|
-
|
|
2254
|
-
}
|
|
1885
|
+
"""The overall amount you can withdraw, including accrued interests"""
|
|
1886
|
+
withdrawable: Erc20Amount!
|
|
2255
1887
|
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
1888
|
+
"""The interest amount earned on supplying"""
|
|
1889
|
+
interest: Erc20Amount!
|
|
1890
|
+
|
|
1891
|
+
"""If this supply is used as collateral"""
|
|
1892
|
+
isCollateral: Boolean!
|
|
2259
1893
|
|
|
2260
1894
|
"""
|
|
2261
|
-
|
|
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
|
|
2262
1899
|
"""
|
|
2263
|
-
|
|
1900
|
+
createdAt: DateTime
|
|
2264
1901
|
}
|
|
2265
1902
|
|
|
2266
|
-
|
|
2267
|
-
"""The native value"""
|
|
2268
|
-
value: WithdrawAmount!
|
|
1903
|
+
scalar UserSupplyItemId
|
|
2269
1904
|
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
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!
|
|
2274
1938
|
}
|
|
2275
1939
|
|
|
2276
1940
|
input WithdrawRequest {
|
|
2277
|
-
"""The
|
|
2278
|
-
|
|
1941
|
+
"""The reserve id"""
|
|
1942
|
+
reserve: ReserveId!
|
|
2279
1943
|
|
|
2280
|
-
"""The amount
|
|
2281
|
-
amount:
|
|
1944
|
+
"""The amount withdrawing"""
|
|
1945
|
+
amount: WithdrawReserveAmountInput!
|
|
2282
1946
|
|
|
2283
|
-
"""
|
|
2284
|
-
The user sending the transaction (normally the user's wallet address) this should have the \`aToken\` that will be burned by the \`Pool\`
|
|
2285
|
-
"""
|
|
1947
|
+
"""The user sending the transaction (normally the user's wallet address)"""
|
|
2286
1948
|
sender: EvmAddress!
|
|
1949
|
+
}
|
|
2287
1950
|
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
"""
|
|
2292
|
-
recipient: EvmAddress
|
|
1951
|
+
input WithdrawReserveAmountInput @oneOf {
|
|
1952
|
+
"""The native amount"""
|
|
1953
|
+
native: AmountInput
|
|
2293
1954
|
|
|
2294
|
-
"""The
|
|
2295
|
-
|
|
1955
|
+
"""The erc20 amount input"""
|
|
1956
|
+
erc20: AmountInput
|
|
2296
1957
|
}`;var i=graphql.buildSchema(e);exports.schema=i;//# sourceMappingURL=test-utils.cjs.map
|
|
2297
1958
|
//# sourceMappingURL=test-utils.cjs.map
|