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