@aave/graphql 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109,6 +109,23 @@ input BorrowErc20AmountInput {
109
109
  value: BigDecimal!
110
110
  }
111
111
 
112
+ type BorrowPointsIncentive {
113
+ id: RewardId!
114
+ program: PointsProgram!
115
+ name: String!
116
+ startDate: DateTime!
117
+ endDate: DateTime
118
+ multiplier: Float!
119
+ criteria: [IncentiveCriteria!]
120
+ userEligible: Boolean!
121
+ kind: PointsProgramKind!
122
+ dailyPoints: Float
123
+ pointsPerThousandUsd: Float
124
+ description: String
125
+ customMessage: String
126
+ customForumLink: String
127
+ }
128
+
112
129
  input BorrowRequest {
113
130
  """The market pool address"""
114
131
  market: EvmAddress!
@@ -153,6 +170,11 @@ type ClaimableMeritReward {
153
170
  amount: TokenAmount!
154
171
  }
155
172
 
173
+ type ClaimableReward {
174
+ currency: Currency!
175
+ amount: TokenAmount!
176
+ }
177
+
156
178
  input CollateralToggleRequest {
157
179
  """The pool address for the market"""
158
180
  market: EvmAddress!
@@ -387,6 +409,16 @@ type HealthFactorPreviewResponse {
387
409
  after: BigDecimal
388
410
  }
389
411
 
412
+ """
413
+ Display metadata for a single eligibility rule on an owned Merkl incentive.
414
+ \`userPassed\` is false when no user context was supplied.
415
+ """
416
+ type IncentiveCriteria {
417
+ id: ID!
418
+ text: String!
419
+ userPassed: Boolean!
420
+ }
421
+
390
422
  """
391
423
  Indicates the user does not have enough balance to perform the operation.
392
424
  """
@@ -637,6 +669,12 @@ type MeritBorrowAndSupplyIncentiveCondition {
637
669
 
638
670
  """Where you can go and claim the incentives"""
639
671
  claimLink: URL!
672
+ actionKey: String
673
+ rewardTokenAddress: String
674
+ rewardTokenSymbol: String
675
+ customMessage: String
676
+ customForumLink: String
677
+ selfApr: PercentValue
640
678
  }
641
679
 
642
680
  type MeritBorrowIncentive {
@@ -645,6 +683,27 @@ type MeritBorrowIncentive {
645
683
 
646
684
  """Where you can go and claim the incentives"""
647
685
  claimLink: URL!
686
+ actionKey: String
687
+ rewardTokenAddress: String
688
+ rewardTokenSymbol: String
689
+ customMessage: String
690
+ customForumLink: String
691
+ selfApr: PercentValue
692
+ }
693
+
694
+ type MeritSavingsGhoIncentive {
695
+ """
696
+ APR earned for depositing GHO into Savings GHO via the AAVE Merit program
697
+ """
698
+ apr: PercentValue!
699
+
700
+ """Where you can go and claim the incentives"""
701
+ claimLink: URL!
702
+ actionKey: String
703
+ rewardTokenAddress: String
704
+ rewardTokenSymbol: String
705
+ customMessage: String
706
+ customForumLink: String
648
707
  }
649
708
 
650
709
  type MeritSupplyIncentive {
@@ -653,6 +712,101 @@ type MeritSupplyIncentive {
653
712
 
654
713
  """Where you can go and claim the incentives"""
655
714
  claimLink: URL!
715
+
716
+ """
717
+ aavechan/Merit action slug (e.g. "ethereum-sgho"). Admin-set through
718
+ the Slack bot; used as join key between the DB row and the live
719
+ aavechan APR cache.
720
+ """
721
+ actionKey: String
722
+
723
+ """
724
+ Reward token paid out by the campaign (often an aToken like
725
+ aEthUSDC). Distinct from \`claim_link\`, which is just the landing page.
726
+ """
727
+ rewardTokenAddress: String
728
+ rewardTokenSymbol: String
729
+
730
+ """Anti-loop eligibility warning or other tooltip copy."""
731
+ customMessage: String
732
+
733
+ """Governance forum link with full campaign details."""
734
+ customForumLink: String
735
+
736
+ """
737
+ Extra APR when a parallel "self" campaign is running for this action
738
+ (sGHO / Safety Module lock). Populated from the \`self-{action_key}\`
739
+ row in the aavechan response. Null when disabled.
740
+ """
741
+ selfApr: PercentValue
742
+ }
743
+
744
+ """Borrow-side incentive funded by an Aave-owned Merkl campaign."""
745
+ type MerklBorrowIncentive {
746
+ id: RewardId!
747
+ startDate: DateTime!
748
+ endDate: DateTime!
749
+
750
+ """
751
+ Borrow APR discount sourced live from Merkl. The user effectively
752
+ pays \`borrow_apr - borrow_apr_discount\`. Naming aligned with
753
+ \`AaveBorrowIncentive.borrow_apr_discount\` and
754
+ \`MeritBorrowIncentive.borrow_apr_discount\`.
755
+ """
756
+ borrowAprDiscount: PercentValue!
757
+ payoutToken: Currency!
758
+ criteria: [IncentiveCriteria!]!
759
+ userEligible: Boolean!
760
+ description: String
761
+ customMessage: String
762
+ customForumLink: String
763
+ customClaimMessage: String
764
+ }
765
+
766
+ """Supply-side incentive funded by an Aave-owned Merkl campaign."""
767
+ type MerklSupplyIncentive {
768
+ id: RewardId!
769
+ startDate: DateTime!
770
+ endDate: DateTime!
771
+
772
+ """
773
+ Extra APR for suppliers in this reserve, sourced live from Merkl.
774
+ The interface converts APR \u2192 APY for display, matching how it
775
+ renders \`AaveSupplyIncentive.extra_supply_apr\` and
776
+ \`MeritSupplyIncentive.extra_supply_apr\`.
777
+ """
778
+ extraSupplyApr: PercentValue!
779
+
780
+ """The token the campaign pays out in."""
781
+ payoutToken: Currency!
782
+ criteria: [IncentiveCriteria!]!
783
+
784
+ """
785
+ Whether the user (if passed to \`incentives(user:)\`) meets the required
786
+ criteria. False when no user is provided and rules exist.
787
+ """
788
+ userEligible: Boolean!
789
+
790
+ """
791
+ Short tooltip copy for the campaign. Seeded from admin input or the
792
+ aavechan override table for legacy third-party campaigns.
793
+ """
794
+ description: String
795
+
796
+ """
797
+ Eligibility conditions tooltip copy (anti-loop warnings, whitelist
798
+ requirements, etc.).
799
+ """
800
+ customMessage: String
801
+
802
+ """Governance forum link with full campaign details."""
803
+ customForumLink: String
804
+
805
+ """
806
+ Merkl-specific call-to-action copy shown next to the claim button
807
+ (e.g. "Rewards will be claimable starting in early August.").
808
+ """
809
+ customClaimMessage: String
656
810
  }
657
811
 
658
812
  type MessageData {
@@ -782,6 +936,33 @@ type PermitTypedDataResponse {
782
936
  message: MessageData!
783
937
  }
784
938
 
939
+ type PointsProgram {
940
+ id: RewardId!
941
+ name: String!
942
+ externalUrl: String
943
+ iconUrl: String
944
+ }
945
+
946
+ """
947
+ Kind of POINTS program. Discriminates between Merkl-backed campaigns (which
948
+ expose live \`daily_points\` / \`points_per_thousand_usd\`) and loyalty
949
+ multiplier programs (which only carry a fixed multiplier). Lets clients
950
+ branch on shape without inspecting whether \`daily_points\` is null.
951
+ """
952
+ enum PointsProgramKind {
953
+ """
954
+ Merkl-backed campaign. \`daily_points\` and \`points_per_thousand_usd\`
955
+ are populated when the live feed has data.
956
+ """
957
+ CAMPAIGN
958
+
959
+ """
960
+ Loyalty multiplier program (Ethena, Ether.fi, etc.). Fixed multiplier,
961
+ no daily points.
962
+ """
963
+ LOYALTY
964
+ }
965
+
785
966
  input PreviewAction @oneOf {
786
967
  supply: SupplyRequest
787
968
  borrow: BorrowRequest
@@ -963,9 +1144,19 @@ type Query {
963
1144
  forkTopUp(request: ForkTopUpRequest!): ForkTopUpResponse!
964
1145
 
965
1146
  """
966
- The user merits reward information and transaction if you wish to claim
1147
+ Legacy alias \u2014 returns the same data as \`userRewards\` but without the
1148
+ \`rewardIds\` filter. Kept for backwards compatibility with existing
1149
+ clients; new clients should use \`userRewards\`.
967
1150
  """
968
- userMeritRewards(request: UserMeritRewardsRequest!): UserMeritRewards
1151
+ userMeritRewards(request: UserMeritRewardsRequest!): UserMeritRewards @deprecated(reason: "Use \`userRewards\` instead. This alias will be removed in a future release.")
1152
+
1153
+ """
1154
+ The user's Merkl-claimable rewards on a chain, plus the claim
1155
+ transaction. Canonical replacement for \`userMeritRewards\` \u2014 same
1156
+ underlying data source, with an added \`rewardIds\` filter for
1157
+ program-specific claims.
1158
+ """
1159
+ userRewards(request: UserRewardsRequest!): UserRewards
969
1160
 
970
1161
  """
971
1162
  Users saving GHO balance - note rewards are not paid out live onchain they paid out with the merit schema,
@@ -979,6 +1170,12 @@ type Query {
979
1170
  """Withdraw sGHO (savings GHO) back to GHO"""
980
1171
  savingsGhoWithdraw(request: SavingsGhoWithdrawRequest!): ExecutionPlan!
981
1172
 
1173
+ """
1174
+ Merit APR incentive for depositing GHO into Savings GHO.
1175
+ Returns null when no active savings GHO incentive campaign is running.
1176
+ """
1177
+ savingsGhoIncentive(chainId: ChainId): MeritSavingsGhoIncentive
1178
+
982
1179
  """Build a transaction to deposit GHO into the sGHO ERC-4626 vault."""
983
1180
  sghoVaultDeposit(request: SghoVaultDepositRequest!): ExecutionPlan!
984
1181
 
@@ -1002,6 +1199,11 @@ type Query {
1002
1199
  Returns the amount of GHO that would be received for redeeming a given number of sGHO shares.
1003
1200
  """
1004
1201
  sghoVaultPreviewRedeem(request: SghoVaultPreviewRequest!): DecimalValue!
1202
+
1203
+ """
1204
+ Build a transaction to migrate the user's full stkGHO position into the sGHO ERC-4626 vault.
1205
+ """
1206
+ stkGhoMigrate(request: StkGhoMigrateRequest!): ExecutionPlan!
1005
1207
  }
1006
1208
 
1007
1209
  input RepayAmountInput @oneOf {
@@ -1117,9 +1319,15 @@ type Reserve {
1117
1319
  permitSupported: Boolean!
1118
1320
 
1119
1321
  """
1120
- This exposes the extra incentives you can earn from third parties (Merit) or from
1121
- incentives set by governance through the RewardsController.
1122
- Note Aave Labs does not guarantee third party program and accepts no liability to those
1322
+ Extra incentives for this reserve \u2014 covers three sources:
1323
+
1324
+ - Legacy Merit program (ACI-owned, on-chain RewardsController).
1325
+ - Aave native incentives (governance-owned, on-chain RewardsController).
1326
+ - Aave-owned Merkl reward campaigns (managed via the \`/rewards/*\` Slack
1327
+ bot; linked to Merkl off-chain).
1328
+
1329
+ When the surrounding \`Reserve\` query carries a user, eligibility for
1330
+ the owned Merkl variants is evaluated against that user's V3 positions.
1123
1331
  """
1124
1332
  incentives: [ReserveIncentive!]!
1125
1333
 
@@ -1193,7 +1401,7 @@ enum ReserveBorrowingState {
1193
1401
  USER_EMODE_DISABLED_BORROW
1194
1402
  }
1195
1403
 
1196
- union ReserveIncentive = MeritSupplyIncentive | MeritBorrowIncentive | MeritBorrowAndSupplyIncentiveCondition | AaveSupplyIncentive | AaveBorrowIncentive
1404
+ union ReserveIncentive = MeritSupplyIncentive | MeritBorrowIncentive | MeritBorrowAndSupplyIncentiveCondition | AaveSupplyIncentive | AaveBorrowIncentive | MerklSupplyIncentive | MerklBorrowIncentive | SupplyPointsIncentive | BorrowPointsIncentive
1197
1405
 
1198
1406
  type ReserveInfo {
1199
1407
  """The market information the reserve is under"""
@@ -1305,6 +1513,8 @@ type ReserveUserState {
1305
1513
  isInIsolationMode: Boolean! @deprecated(reason: "Deprecated in v3.7+: use the selected eMode category's \`isolated\` flag instead")
1306
1514
  }
1307
1515
 
1516
+ scalar RewardId
1517
+
1308
1518
  input SavingsGhoBalanceRequest {
1309
1519
  """The user to query the savings GHO balance"""
1310
1520
  user: EvmAddress!
@@ -1472,6 +1682,14 @@ input SghoVaultRequest {
1472
1682
 
1473
1683
  scalar Signature
1474
1684
 
1685
+ input StkGhoMigrateRequest {
1686
+ """The user migrating their full stkGHO position to sGHO."""
1687
+ user: EvmAddress!
1688
+
1689
+ """The chain id."""
1690
+ chainId: ChainId!
1691
+ }
1692
+
1475
1693
  input SupplyAPYHistoryRequest {
1476
1694
  """The market pool address"""
1477
1695
  market: EvmAddress!
@@ -1486,6 +1704,42 @@ input SupplyAPYHistoryRequest {
1486
1704
  chainId: ChainId!
1487
1705
  }
1488
1706
 
1707
+ type SupplyPointsIncentive {
1708
+ id: RewardId!
1709
+ program: PointsProgram!
1710
+ name: String!
1711
+ startDate: DateTime!
1712
+ endDate: DateTime
1713
+ multiplier: Float!
1714
+ criteria: [IncentiveCriteria!]
1715
+ userEligible: Boolean!
1716
+
1717
+ """
1718
+ \`Campaign\` for Merkl-backed programs; \`Loyalty\` for fixed-multiplier
1719
+ partner programs (Ethena, Ether.fi). Clients gate UI on this rather
1720
+ than checking whether \`daily_points\` is null.
1721
+ """
1722
+ kind: PointsProgramKind!
1723
+
1724
+ """
1725
+ Daily points emitted across the entire reserve, surfaced from the
1726
+ Merkl campaign's \`rewardsRecord.breakdowns[].value\`. Used by the V3
1727
+ interface to render "X points / $1K / day" next to the reserve.
1728
+ Always null for \`kind = Loyalty\`.
1729
+ """
1730
+ dailyPoints: Float
1731
+
1732
+ """
1733
+ Daily points normalized per $1K of TVL: \`daily_points / tvl * 1000\`.
1734
+ Computed server-side so the interface does not have to fetch TVL.
1735
+ Always null for \`kind = Loyalty\`.
1736
+ """
1737
+ pointsPerThousandUsd: Float
1738
+ description: String
1739
+ customMessage: String
1740
+ customForumLink: String
1741
+ }
1742
+
1489
1743
  input SupplyRequest {
1490
1744
  """The market pool address"""
1491
1745
  market: EvmAddress!
@@ -1695,6 +1949,36 @@ type UserRepayTransaction {
1695
1949
  timestamp: DateTime!
1696
1950
  }
1697
1951
 
1952
+ """
1953
+ Canonical shape for a user's Merkl-claimable rewards on a single chain,
1954
+ together with the transaction to send to the Merkl distributor. Same shape
1955
+ as \`UserMeritRewards\` \u2014 that type stays around for the deprecated alias.
1956
+ """
1957
+ type UserRewards {
1958
+ chain: ChainId!
1959
+ claimable: [ClaimableReward!]!
1960
+ transaction: TransactionRequest!
1961
+ }
1962
+
1963
+ input UserRewardsFilter {
1964
+ """If set, only these tokens' rewards are included in the claim."""
1965
+ tokens: [EvmAddress!]
1966
+
1967
+ """
1968
+ If set, the claim is scoped to tokens where at least one of these
1969
+ Aave-owned reward program IDs has contributed on Merkl. When absent,
1970
+ the claim covers all Merkl-claimable rewards for the user on this chain
1971
+ regardless of source (legacy Merit, Aave-owned, third-party).
1972
+ """
1973
+ rewardIds: [RewardId!]
1974
+ }
1975
+
1976
+ input UserRewardsRequest {
1977
+ user: EvmAddress!
1978
+ chainId: ChainId!
1979
+ filter: UserRewardsFilter
1980
+ }
1981
+
1698
1982
  input UserSetEmodeRequest {
1699
1983
  """The pool address for the market"""
1700
1984
  market: EvmAddress!
@@ -2445,5 +2729,5 @@ input WithdrawRequest {
2445
2729
 
2446
2730
  """The chain id"""
2447
2731
  chainId: ChainId!
2448
- }`;var o=buildSchema(e);export{o as schema};//# sourceMappingURL=test-utils.js.map
2732
+ }`;var i=buildSchema(e);export{i as schema};//# sourceMappingURL=test-utils.js.map
2449
2733
  //# sourceMappingURL=test-utils.js.map