@aave/graphql 1.0.0-next.6 → 1.0.0-next.8
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 +277 -150
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1200 -53
- package/dist/index.d.ts +1200 -53
- package/dist/index.js +277 -150
- package/dist/index.js.map +1 -1
- package/dist/schema.cjs +1 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +1 -1
- package/dist/schema.js.map +1 -1
- package/dist/test-utils.cjs +85 -68
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.js +85 -68
- package/dist/test-utils.js.map +1 -1
- package/package.json +2 -2
package/dist/test-utils.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {buildSchema}from'graphql';var e=`
|
|
2
|
-
date: DateTime!
|
|
3
|
-
avgRate: PercentNumber!
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
input ActivitiesRequest {
|
|
1
|
+
import {buildSchema}from'graphql';var e=`input ActivitiesRequest {
|
|
7
2
|
query: ActivitiesRequestQuery!
|
|
8
3
|
user: EvmAddress
|
|
9
4
|
types: [ActivityType!]! = [BORROW, SUPPLY, WITHDRAW, REPAY, LIQUIDATED, SET_AS_COLLATERAL, UPDATED_DYNAMIC_CONFIG, UPDATED_RISK_PREMIUM]
|
|
@@ -50,6 +45,11 @@ enum ApyMetric {
|
|
|
50
45
|
AVERAGE
|
|
51
46
|
}
|
|
52
47
|
|
|
48
|
+
type ApySample {
|
|
49
|
+
date: DateTime!
|
|
50
|
+
avgRate: PercentNumber!
|
|
51
|
+
}
|
|
52
|
+
|
|
53
53
|
type Asset {
|
|
54
54
|
id: AssetId!
|
|
55
55
|
token: Erc20Token!
|
|
@@ -75,8 +75,8 @@ input AssetBorrowHistoryRequestQuery @oneOf {
|
|
|
75
75
|
type AssetBorrowSample {
|
|
76
76
|
date: DateTime!
|
|
77
77
|
amount: DecimalNumber!
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
highestApy: PercentNumber!
|
|
79
|
+
lowestApy: PercentNumber!
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
input AssetCategoryBorrowHistoryRequest {
|
|
@@ -86,8 +86,8 @@ input AssetCategoryBorrowHistoryRequest {
|
|
|
86
86
|
|
|
87
87
|
type AssetCategoryBorrowSample {
|
|
88
88
|
date: DateTime!
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
highestApy: PercentNumber!
|
|
90
|
+
lowestApy: PercentNumber!
|
|
91
91
|
borrows(currency: Currency! = USD): ExchangeAmount!
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -98,8 +98,8 @@ input AssetCategorySupplyHistoryRequest {
|
|
|
98
98
|
|
|
99
99
|
type AssetCategorySupplySample {
|
|
100
100
|
date: DateTime!
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
highestApy: PercentNumber!
|
|
102
|
+
lowestApy: PercentNumber!
|
|
103
103
|
deposits(currency: Currency! = USD): ExchangeAmount!
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -138,7 +138,7 @@ type AssetSummary {
|
|
|
138
138
|
totalBorrowed: AssetAmountWithChange!
|
|
139
139
|
totalBorrowable: AssetAmountWithChange!
|
|
140
140
|
|
|
141
|
-
"""The supply
|
|
141
|
+
"""The supply apy dependent on what you pass in for the \`metric\`"""
|
|
142
142
|
supplyApy(metric: ApyMetric! = AVERAGE): PercentNumber!
|
|
143
143
|
|
|
144
144
|
"""The borrow APY dependent on what you pass in for the \`metric\`"""
|
|
@@ -158,8 +158,8 @@ input AssetSupplyHistoryRequestQuery @oneOf {
|
|
|
158
158
|
type AssetSupplySample {
|
|
159
159
|
date: DateTime!
|
|
160
160
|
amount: DecimalNumber!
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
highestApy: PercentNumber!
|
|
162
|
+
lowestApy: PercentNumber!
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
scalar BigDecimal
|
|
@@ -168,11 +168,6 @@ scalar BigInt
|
|
|
168
168
|
|
|
169
169
|
scalar BlockchainData
|
|
170
170
|
|
|
171
|
-
input BorrowAPYHistoryRequest {
|
|
172
|
-
reserve: ReserveId!
|
|
173
|
-
window: TimeWindow! = LAST_DAY
|
|
174
|
-
}
|
|
175
|
-
|
|
176
171
|
type BorrowActivity {
|
|
177
172
|
id: ID!
|
|
178
173
|
user: EvmAddress!
|
|
@@ -184,6 +179,11 @@ type BorrowActivity {
|
|
|
184
179
|
chain: Chain!
|
|
185
180
|
}
|
|
186
181
|
|
|
182
|
+
input BorrowApyHistoryRequest {
|
|
183
|
+
reserve: ReserveId!
|
|
184
|
+
window: TimeWindow! = LAST_DAY
|
|
185
|
+
}
|
|
186
|
+
|
|
187
187
|
input BorrowRequest {
|
|
188
188
|
"""The reserve id"""
|
|
189
189
|
reserve: ReserveId!
|
|
@@ -241,6 +241,11 @@ input ChainRequest {
|
|
|
241
241
|
chainId: ChainId!
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
+
input ChainTokenCategories {
|
|
245
|
+
chainId: ChainId!
|
|
246
|
+
categories: [TokenCategory!]!
|
|
247
|
+
}
|
|
248
|
+
|
|
244
249
|
input ChainTokenInput {
|
|
245
250
|
"""The chain id"""
|
|
246
251
|
chainId: ChainId!
|
|
@@ -264,7 +269,12 @@ input ChainsRequestQuery @oneOf {
|
|
|
264
269
|
filter: ChainsFilter
|
|
265
270
|
}
|
|
266
271
|
|
|
267
|
-
|
|
272
|
+
type CollateralFactorVariation {
|
|
273
|
+
reserveId: ReserveId!
|
|
274
|
+
token: Erc20Token!
|
|
275
|
+
current: PercentNumber!
|
|
276
|
+
after: PercentNumber!
|
|
277
|
+
}
|
|
268
278
|
|
|
269
279
|
enum CollateralMetric {
|
|
270
280
|
HIGHEST
|
|
@@ -308,27 +318,6 @@ type DomainData {
|
|
|
308
318
|
|
|
309
319
|
scalar DynamicConfigKey
|
|
310
320
|
|
|
311
|
-
type DynamicConfigUserPositionCollateralFactorVariation {
|
|
312
|
-
reserveId: ReserveId!
|
|
313
|
-
token: Erc20Token!
|
|
314
|
-
current: PercentNumber!
|
|
315
|
-
after: PercentNumber!
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
type DynamicConfigUserPositionLiquidationFeeVariation {
|
|
319
|
-
reserveId: ReserveId!
|
|
320
|
-
token: Erc20Token!
|
|
321
|
-
current: PercentNumber!
|
|
322
|
-
after: PercentNumber!
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
type DynamicConfigUserPositionMaxLiquidationBonusVariation {
|
|
326
|
-
reserveId: ReserveId!
|
|
327
|
-
token: Erc20Token!
|
|
328
|
-
current: PercentNumber!
|
|
329
|
-
after: PercentNumber!
|
|
330
|
-
}
|
|
331
|
-
|
|
332
321
|
input ERC20PermitSignature {
|
|
333
322
|
"""The signature for the erc721"""
|
|
334
323
|
value: Signature!
|
|
@@ -410,7 +399,7 @@ type ExchangeAmount {
|
|
|
410
399
|
decimals: Int!
|
|
411
400
|
}
|
|
412
401
|
|
|
413
|
-
type
|
|
402
|
+
type ExchangeAmountVariation {
|
|
414
403
|
current: ExchangeAmount!
|
|
415
404
|
after: ExchangeAmount!
|
|
416
405
|
}
|
|
@@ -568,13 +557,13 @@ type HubAssetSummary {
|
|
|
568
557
|
"""The available liquidity"""
|
|
569
558
|
availableLiquidity: Erc20Amount!
|
|
570
559
|
|
|
571
|
-
"""The supply
|
|
560
|
+
"""The supply apy"""
|
|
572
561
|
supplyApy: PercentNumber!
|
|
573
562
|
|
|
574
|
-
"""The borrow
|
|
563
|
+
"""The borrow apy"""
|
|
575
564
|
borrowApy: PercentNumber!
|
|
576
565
|
|
|
577
|
-
"""The net
|
|
566
|
+
"""The net apy"""
|
|
578
567
|
netApy: PercentNumber!
|
|
579
568
|
|
|
580
569
|
"""The utilization rate"""
|
|
@@ -752,6 +741,20 @@ type LiquidatedActivity {
|
|
|
752
741
|
chain: Chain!
|
|
753
742
|
}
|
|
754
743
|
|
|
744
|
+
type LiquidationFeeVariation {
|
|
745
|
+
reserveId: ReserveId!
|
|
746
|
+
token: Erc20Token!
|
|
747
|
+
current: PercentNumber!
|
|
748
|
+
after: PercentNumber!
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
type MaxLiquidationBonusVariation {
|
|
752
|
+
reserveId: ReserveId!
|
|
753
|
+
token: Erc20Token!
|
|
754
|
+
current: PercentNumber!
|
|
755
|
+
after: PercentNumber!
|
|
756
|
+
}
|
|
757
|
+
|
|
755
758
|
type Mutation {
|
|
756
759
|
"""Top up a balance for a user or yourself on the fork"""
|
|
757
760
|
forkTopUp(request: ForkTopUpRequest!): ForkTopUpResponse!
|
|
@@ -945,13 +948,13 @@ type PreviewUserPosition {
|
|
|
945
948
|
healthFactor: HealthFactorResult!
|
|
946
949
|
riskPremium: PercentNumberVariation!
|
|
947
950
|
|
|
948
|
-
"""The net
|
|
951
|
+
"""The net apy for one user position on a current spoke"""
|
|
949
952
|
netApy: PercentNumberVariation!
|
|
950
|
-
netCollateral(currency: Currency! = USD):
|
|
951
|
-
netBalance(currency: Currency! = USD):
|
|
952
|
-
projectedEarnings(period: EarningPeriod! = ANNUAL):
|
|
953
|
-
borrowingPower:
|
|
954
|
-
|
|
953
|
+
netCollateral(currency: Currency! = USD): ExchangeAmountVariation!
|
|
954
|
+
netBalance(currency: Currency! = USD): ExchangeAmountVariation!
|
|
955
|
+
projectedEarnings(period: EarningPeriod! = ANNUAL): ExchangeAmountVariation!
|
|
956
|
+
borrowingPower: ExchangeAmountVariation!
|
|
957
|
+
otherConditions: [UserPositionConditionVariation!]!
|
|
955
958
|
}
|
|
956
959
|
|
|
957
960
|
input ProtocolHistoryRequest {
|
|
@@ -1003,8 +1006,8 @@ type Query {
|
|
|
1003
1006
|
liquidatePosition(request: LiquidatePositionRequest!): LiquidatePositionExecutionPlan!
|
|
1004
1007
|
updateUserPositionConditions(request: UpdateUserPositionConditionsRequest!): TransactionRequest!
|
|
1005
1008
|
preview(request: PreviewRequest!): PreviewUserPosition!
|
|
1006
|
-
borrowApyHistory(request:
|
|
1007
|
-
supplyApyHistory(request:
|
|
1009
|
+
borrowApyHistory(request: BorrowApyHistoryRequest!): [ApySample!]!
|
|
1010
|
+
supplyApyHistory(request: SupplyApyHistoryRequest!): [ApySample!]!
|
|
1008
1011
|
spoke(request: SpokeRequest!): Spoke
|
|
1009
1012
|
|
|
1010
1013
|
"""Lists all spokes"""
|
|
@@ -1287,7 +1290,7 @@ input ReservesRequestQuery @oneOf {
|
|
|
1287
1290
|
userPositionId: UserPositionId
|
|
1288
1291
|
|
|
1289
1292
|
"""Get all the reserves based on the token categories"""
|
|
1290
|
-
|
|
1293
|
+
chainTokenCategories: [ChainTokenCategories!]
|
|
1291
1294
|
}
|
|
1292
1295
|
|
|
1293
1296
|
input SetSpokeUserPositionManagerRequest {
|
|
@@ -1410,11 +1413,6 @@ input SpokesRequestQuery @oneOf {
|
|
|
1410
1413
|
chainIds: [ChainId!]
|
|
1411
1414
|
}
|
|
1412
1415
|
|
|
1413
|
-
input SupplyAPYHistoryRequest {
|
|
1414
|
-
reserve: ReserveId!
|
|
1415
|
-
window: TimeWindow! = LAST_DAY
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
1416
|
type SupplyActivity {
|
|
1419
1417
|
id: ID!
|
|
1420
1418
|
user: EvmAddress!
|
|
@@ -1426,6 +1424,11 @@ type SupplyActivity {
|
|
|
1426
1424
|
chain: Chain!
|
|
1427
1425
|
}
|
|
1428
1426
|
|
|
1427
|
+
input SupplyApyHistoryRequest {
|
|
1428
|
+
reserve: ReserveId!
|
|
1429
|
+
window: TimeWindow! = LAST_DAY
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1429
1432
|
input SupplyPermitRequest {
|
|
1430
1433
|
"""The reserve id"""
|
|
1431
1434
|
reserve: ReserveId!
|
|
@@ -1744,11 +1747,13 @@ type UserBalance {
|
|
|
1744
1747
|
"""The total exchange amount summed across all balances"""
|
|
1745
1748
|
exchange(currency: Currency! = USD): ExchangeAmount!
|
|
1746
1749
|
|
|
1747
|
-
"""The supply
|
|
1750
|
+
"""The supply apy dependent on what you pass in for the \`metric\`"""
|
|
1748
1751
|
supplyApy(metric: ApyMetric! = HIGHEST): PercentNumber!
|
|
1749
1752
|
|
|
1750
1753
|
"""The borrow APY dependent on what you pass in for the \`metric\`"""
|
|
1751
1754
|
borrowApy(metric: ApyMetric! = HIGHEST): PercentNumber!
|
|
1755
|
+
|
|
1756
|
+
"""The collateral factor dependent on what you pass in for the \`metric\`"""
|
|
1752
1757
|
collateralFactor(metric: CollateralMetric! = HIGHEST): PercentNumber
|
|
1753
1758
|
}
|
|
1754
1759
|
|
|
@@ -1800,6 +1805,16 @@ input UserBalancesBySpoke {
|
|
|
1800
1805
|
byReservesType: ReservesRequestFilter! = ALL
|
|
1801
1806
|
}
|
|
1802
1807
|
|
|
1808
|
+
input UserBalancesByTokens {
|
|
1809
|
+
"""The chain token input"""
|
|
1810
|
+
chainTokens: [ChainTokenInput!]!
|
|
1811
|
+
|
|
1812
|
+
"""
|
|
1813
|
+
The type of reserve to use when determine the tokens to retrieve balances for
|
|
1814
|
+
"""
|
|
1815
|
+
byReservesType: ReservesRequestFilter! = ALL
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1803
1818
|
input UserBalancesByUserPosition {
|
|
1804
1819
|
"""The user position id"""
|
|
1805
1820
|
userPositionId: UserPositionId!
|
|
@@ -1846,7 +1861,7 @@ input UserBalancesRequestFilter @oneOf {
|
|
|
1846
1861
|
userPosition: UserBalancesByUserPosition
|
|
1847
1862
|
|
|
1848
1863
|
"""The balances for the chains tokens"""
|
|
1849
|
-
tokens:
|
|
1864
|
+
tokens: UserBalancesByTokens
|
|
1850
1865
|
}
|
|
1851
1866
|
|
|
1852
1867
|
input UserBalancesRequestOrderBy @oneOf {
|
|
@@ -1884,11 +1899,6 @@ type UserBorrowItem {
|
|
|
1884
1899
|
|
|
1885
1900
|
scalar UserBorrowItemId
|
|
1886
1901
|
|
|
1887
|
-
input UserBorrowsAPYBreakdownRequestQuery @oneOf {
|
|
1888
|
-
userSpoke: UserSpokeInput
|
|
1889
|
-
userPositionId: UserPositionId
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
1902
|
input UserBorrowsRequest {
|
|
1893
1903
|
query: UserBorrowsRequestQuery!
|
|
1894
1904
|
orderBy: UserBorrowsRequestOrderBy! = {amount: DESC}
|
|
@@ -1965,6 +1975,8 @@ type UserPosition {
|
|
|
1965
1975
|
averageCollateralFactor: PercentNumber!
|
|
1966
1976
|
}
|
|
1967
1977
|
|
|
1978
|
+
union UserPositionConditionVariation = CollateralFactorVariation | LiquidationFeeVariation | MaxLiquidationBonusVariation
|
|
1979
|
+
|
|
1968
1980
|
scalar UserPositionId
|
|
1969
1981
|
|
|
1970
1982
|
input UserPositionRequest @oneOf {
|
|
@@ -2009,10 +2021,15 @@ type UserRiskPremiumBreakdownItem {
|
|
|
2009
2021
|
}
|
|
2010
2022
|
|
|
2011
2023
|
input UserRiskPremiumBreakdownRequest {
|
|
2012
|
-
query:
|
|
2024
|
+
query: UserRiskPremiumBreakdownRequestQuery!
|
|
2013
2025
|
user: EvmAddress!
|
|
2014
2026
|
}
|
|
2015
2027
|
|
|
2028
|
+
input UserRiskPremiumBreakdownRequestQuery @oneOf {
|
|
2029
|
+
userSpoke: UserSpokeInput
|
|
2030
|
+
userPositionId: UserPositionId
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2016
2033
|
input UserSpokeInput {
|
|
2017
2034
|
spoke: SpokeId!
|
|
2018
2035
|
user: EvmAddress!
|