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