@uniswap/client-liquidity 1.4.28 → 1.4.29

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.
@@ -789,18 +789,14 @@ export declare class PoolSummary extends Message<PoolSummary> {
789
789
  */
790
790
  isDynamicFee?: boolean;
791
791
  /**
792
- * Live Merkl LP-incentive campaigns for this pool (V3/V4). Composed at read
793
- * time from Merkl (not Aurora); empty when the pool has no live allowlisted
794
- * campaign or the lookup degrades. One entry per campaign not aggregated,
795
- * so two concurrent UNI campaigns are two entries.
792
+ * DEPRECATED superseded by token_rewards below, which groups campaigns under
793
+ * the token they pay and carries that token's summed boost. This field has never
794
+ * been populated and stays permanently empty; it exists only so consumers that
795
+ * already read it keep compiling. Removal is tracked in LP-1585 (reserve tag 25
796
+ * when it goes — a reused tag with a different type is wire-incompatible).
796
797
  *
797
- * A per-token aggregate (one entry per reward token, APRs summed) is planned
798
- * alongside this as an additive field, fed by the same source Position.rewards
799
- * uses — data-api's RewardsBL.getPoolAprsByToken, which is pool-keyed and needs
800
- * no wallet. Reuse Position.rewards' per-token semantics for it rather than
801
- * inventing a third granularity.
802
- *
803
- * @generated from field: repeated uniswap.liquidity.v2.RewardsCampaign rewards_campaigns = 25;
798
+ * @generated from field: repeated uniswap.liquidity.v2.RewardsCampaign rewards_campaigns = 25 [deprecated = true];
799
+ * @deprecated
804
800
  */
805
801
  rewardsCampaigns: RewardsCampaign[];
806
802
  /**
@@ -817,6 +813,17 @@ export declare class PoolSummary extends Message<PoolSummary> {
817
813
  * @generated from field: optional double volume_usd_1d_change = 27;
818
814
  */
819
815
  volumeUsd1dChange?: number;
816
+ /**
817
+ * Live LP-incentive rewards, grouped by the token they pay (see
818
+ * PoolTokenRewards). Sourced from data-api, which owns campaign scoping, so this
819
+ * agrees with the boost Position.rewards reports for the same pool.
820
+ *
821
+ * Empty for V2 (no campaigns), when the pool has no live campaign, and when the
822
+ * lookup degrades — rewards never fail a pool read.
823
+ *
824
+ * @generated from field: repeated uniswap.liquidity.v2.PoolTokenRewards token_rewards = 28;
825
+ */
826
+ tokenRewards: PoolTokenRewards[];
820
827
  constructor(data?: PartialMessage<PoolSummary>);
821
828
  static readonly runtime: typeof proto3;
822
829
  static readonly typeName = "uniswap.liquidity.v2.PoolSummary";
@@ -924,6 +931,97 @@ export declare class RewardsCampaign extends Message<RewardsCampaign> {
924
931
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RewardsCampaign;
925
932
  static equals(a: RewardsCampaign | PlainMessage<RewardsCampaign> | undefined, b: RewardsCampaign | PlainMessage<RewardsCampaign> | undefined): boolean;
926
933
  }
934
+ /**
935
+ * One live campaign behind a pool's per-token boost. It carries no reward token —
936
+ * campaigns are always grouped under one (see PoolTokenRewards).
937
+ *
938
+ * @generated from message uniswap.liquidity.v2.PoolCampaign
939
+ */
940
+ export declare class PoolCampaign extends Message<PoolCampaign> {
941
+ /**
942
+ * Merkl campaign id.
943
+ *
944
+ * @generated from field: string id = 1;
945
+ */
946
+ id: string;
947
+ /**
948
+ * This campaign's APR alone, in percent. Already included in the parent's
949
+ * boosted_apr — don't sum these and add them to it.
950
+ *
951
+ * @generated from field: double apr = 2;
952
+ */
953
+ apr: number;
954
+ /**
955
+ * Campaign window, unix seconds.
956
+ *
957
+ * @generated from field: int64 start_timestamp = 3;
958
+ */
959
+ startTimestamp: bigint;
960
+ /**
961
+ * @generated from field: int64 end_timestamp = 4;
962
+ */
963
+ endTimestamp: bigint;
964
+ /**
965
+ * Total allocation, uint256 decimal string in the reward token's smallest unit.
966
+ *
967
+ * @generated from field: string total_reward_allocation = 5;
968
+ */
969
+ totalRewardAllocation: string;
970
+ /**
971
+ * Emission rate in USD. Derived upstream from the reward token's price at fetch
972
+ * time, so it drifts with price; daily_rewards below is price-independent.
973
+ *
974
+ * @generated from field: optional double daily_rewards_usd = 6;
975
+ */
976
+ dailyRewardsUsd?: number;
977
+ /**
978
+ * Emission rate in the reward token's smallest unit (uint256 decimal string).
979
+ *
980
+ * @generated from field: optional string daily_rewards = 7;
981
+ */
982
+ dailyRewards?: string;
983
+ constructor(data?: PartialMessage<PoolCampaign>);
984
+ static readonly runtime: typeof proto3;
985
+ static readonly typeName = "uniswap.liquidity.v2.PoolCampaign";
986
+ static readonly fields: FieldList;
987
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolCampaign;
988
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolCampaign;
989
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolCampaign;
990
+ static equals(a: PoolCampaign | PlainMessage<PoolCampaign> | undefined, b: PoolCampaign | PlainMessage<PoolCampaign> | undefined): boolean;
991
+ }
992
+ /**
993
+ * A pool's live rewards in one reward token: the summed boost plus the campaigns
994
+ * it came from. A pool running concurrent campaigns in different tokens yields one
995
+ * entry per token.
996
+ *
997
+ * @generated from message uniswap.liquidity.v2.PoolTokenRewards
998
+ */
999
+ export declare class PoolTokenRewards extends Message<PoolTokenRewards> {
1000
+ /**
1001
+ * @generated from field: uniswap.liquidity.v2.RewardToken token = 1;
1002
+ */
1003
+ token?: RewardToken;
1004
+ /**
1005
+ * Sum of this token's live campaign APRs on the pool, in percent, on top of the
1006
+ * pool's fee APR (PoolSummary.apr). Same number Position.rewards reports as
1007
+ * boosted_pool_apr for this pool and token.
1008
+ *
1009
+ * @generated from field: double boosted_apr = 2;
1010
+ */
1011
+ boostedApr: number;
1012
+ /**
1013
+ * @generated from field: repeated uniswap.liquidity.v2.PoolCampaign campaigns = 3;
1014
+ */
1015
+ campaigns: PoolCampaign[];
1016
+ constructor(data?: PartialMessage<PoolTokenRewards>);
1017
+ static readonly runtime: typeof proto3;
1018
+ static readonly typeName = "uniswap.liquidity.v2.PoolTokenRewards";
1019
+ static readonly fields: FieldList;
1020
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PoolTokenRewards;
1021
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PoolTokenRewards;
1022
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PoolTokenRewards;
1023
+ static equals(a: PoolTokenRewards | PlainMessage<PoolTokenRewards> | undefined, b: PoolTokenRewards | PlainMessage<PoolTokenRewards> | undefined): boolean;
1024
+ }
927
1025
  /**
928
1026
  * What a position earns in one LP-incentive reward token: the pool's boosted APR
929
1027
  * and the position's unclaimed balance. One entry per token, since a pool can run
@@ -948,10 +1046,9 @@ export declare class PositionReward extends Message<PositionReward> {
948
1046
  * token's live campaign APRs, in percent, on top of the pool's fee APR. Shared
949
1047
  * by every position in the pool, not specific to this one. 0 = no live campaign.
950
1048
  *
951
- * The same number a pool-level per-token APR on PoolSummary will report for
952
- * this (pool, token) see the note on PoolSummary.rewards_campaigns. Distinct
953
- * from RewardsCampaign.boosted_apr, which is ONE campaign's APR; this sums
954
- * every live campaign paying this token, so don't add the two together.
1049
+ * The same number PoolSummary.token_rewards reports as boosted_apr for this
1050
+ * (pool, token). Distinct from PoolCampaign.apr, which is ONE campaign's APR;
1051
+ * this sums every live campaign paying the token, so don't add the two.
955
1052
  *
956
1053
  * @generated from field: double boosted_pool_apr = 2;
957
1054
  */
@@ -968,20 +968,27 @@ export class PoolSummary extends Message {
968
968
  */
969
969
  this.volumeUsd1d = 0;
970
970
  /**
971
- * Live Merkl LP-incentive campaigns for this pool (V3/V4). Composed at read
972
- * time from Merkl (not Aurora); empty when the pool has no live allowlisted
973
- * campaign or the lookup degrades. One entry per campaign not aggregated,
974
- * so two concurrent UNI campaigns are two entries.
971
+ * DEPRECATED superseded by token_rewards below, which groups campaigns under
972
+ * the token they pay and carries that token's summed boost. This field has never
973
+ * been populated and stays permanently empty; it exists only so consumers that
974
+ * already read it keep compiling. Removal is tracked in LP-1585 (reserve tag 25
975
+ * when it goes — a reused tag with a different type is wire-incompatible).
975
976
  *
976
- * A per-token aggregate (one entry per reward token, APRs summed) is planned
977
- * alongside this as an additive field, fed by the same source Position.rewards
978
- * uses — data-api's RewardsBL.getPoolAprsByToken, which is pool-keyed and needs
979
- * no wallet. Reuse Position.rewards' per-token semantics for it rather than
980
- * inventing a third granularity.
981
- *
982
- * @generated from field: repeated uniswap.liquidity.v2.RewardsCampaign rewards_campaigns = 25;
977
+ * @generated from field: repeated uniswap.liquidity.v2.RewardsCampaign rewards_campaigns = 25 [deprecated = true];
978
+ * @deprecated
983
979
  */
984
980
  this.rewardsCampaigns = [];
981
+ /**
982
+ * Live LP-incentive rewards, grouped by the token they pay (see
983
+ * PoolTokenRewards). Sourced from data-api, which owns campaign scoping, so this
984
+ * agrees with the boost Position.rewards reports for the same pool.
985
+ *
986
+ * Empty for V2 (no campaigns), when the pool has no live campaign, and when the
987
+ * lookup degrades — rewards never fail a pool read.
988
+ *
989
+ * @generated from field: repeated uniswap.liquidity.v2.PoolTokenRewards token_rewards = 28;
990
+ */
991
+ this.tokenRewards = [];
985
992
  proto3.util.initPartial(data, this);
986
993
  }
987
994
  static fromBinary(bytes, options) {
@@ -1027,6 +1034,7 @@ PoolSummary.fields = proto3.util.newFieldList(() => [
1027
1034
  { no: 25, name: "rewards_campaigns", kind: "message", T: RewardsCampaign, repeated: true },
1028
1035
  { no: 26, name: "tvl_usd_change_1d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1029
1036
  { no: 27, name: "volume_usd_1d_change", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1037
+ { no: 28, name: "token_rewards", kind: "message", T: PoolTokenRewards, repeated: true },
1030
1038
  ]);
1031
1039
  /**
1032
1040
  * A reward token's on-chain identity, so a client can interpret and format a
@@ -1145,6 +1153,114 @@ RewardsCampaign.fields = proto3.util.newFieldList(() => [
1145
1153
  { no: 6, name: "distributed_rewards", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1146
1154
  { no: 7, name: "reward_token", kind: "message", T: RewardToken },
1147
1155
  ]);
1156
+ /**
1157
+ * One live campaign behind a pool's per-token boost. It carries no reward token —
1158
+ * campaigns are always grouped under one (see PoolTokenRewards).
1159
+ *
1160
+ * @generated from message uniswap.liquidity.v2.PoolCampaign
1161
+ */
1162
+ export class PoolCampaign extends Message {
1163
+ constructor(data) {
1164
+ super();
1165
+ /**
1166
+ * Merkl campaign id.
1167
+ *
1168
+ * @generated from field: string id = 1;
1169
+ */
1170
+ this.id = "";
1171
+ /**
1172
+ * This campaign's APR alone, in percent. Already included in the parent's
1173
+ * boosted_apr — don't sum these and add them to it.
1174
+ *
1175
+ * @generated from field: double apr = 2;
1176
+ */
1177
+ this.apr = 0;
1178
+ /**
1179
+ * Campaign window, unix seconds.
1180
+ *
1181
+ * @generated from field: int64 start_timestamp = 3;
1182
+ */
1183
+ this.startTimestamp = protoInt64.zero;
1184
+ /**
1185
+ * @generated from field: int64 end_timestamp = 4;
1186
+ */
1187
+ this.endTimestamp = protoInt64.zero;
1188
+ /**
1189
+ * Total allocation, uint256 decimal string in the reward token's smallest unit.
1190
+ *
1191
+ * @generated from field: string total_reward_allocation = 5;
1192
+ */
1193
+ this.totalRewardAllocation = "";
1194
+ proto3.util.initPartial(data, this);
1195
+ }
1196
+ static fromBinary(bytes, options) {
1197
+ return new PoolCampaign().fromBinary(bytes, options);
1198
+ }
1199
+ static fromJson(jsonValue, options) {
1200
+ return new PoolCampaign().fromJson(jsonValue, options);
1201
+ }
1202
+ static fromJsonString(jsonString, options) {
1203
+ return new PoolCampaign().fromJsonString(jsonString, options);
1204
+ }
1205
+ static equals(a, b) {
1206
+ return proto3.util.equals(PoolCampaign, a, b);
1207
+ }
1208
+ }
1209
+ PoolCampaign.runtime = proto3;
1210
+ PoolCampaign.typeName = "uniswap.liquidity.v2.PoolCampaign";
1211
+ PoolCampaign.fields = proto3.util.newFieldList(() => [
1212
+ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1213
+ { no: 2, name: "apr", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1214
+ { no: 3, name: "start_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
1215
+ { no: 4, name: "end_timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
1216
+ { no: 5, name: "total_reward_allocation", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1217
+ { no: 6, name: "daily_rewards_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1218
+ { no: 7, name: "daily_rewards", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1219
+ ]);
1220
+ /**
1221
+ * A pool's live rewards in one reward token: the summed boost plus the campaigns
1222
+ * it came from. A pool running concurrent campaigns in different tokens yields one
1223
+ * entry per token.
1224
+ *
1225
+ * @generated from message uniswap.liquidity.v2.PoolTokenRewards
1226
+ */
1227
+ export class PoolTokenRewards extends Message {
1228
+ constructor(data) {
1229
+ super();
1230
+ /**
1231
+ * Sum of this token's live campaign APRs on the pool, in percent, on top of the
1232
+ * pool's fee APR (PoolSummary.apr). Same number Position.rewards reports as
1233
+ * boosted_pool_apr for this pool and token.
1234
+ *
1235
+ * @generated from field: double boosted_apr = 2;
1236
+ */
1237
+ this.boostedApr = 0;
1238
+ /**
1239
+ * @generated from field: repeated uniswap.liquidity.v2.PoolCampaign campaigns = 3;
1240
+ */
1241
+ this.campaigns = [];
1242
+ proto3.util.initPartial(data, this);
1243
+ }
1244
+ static fromBinary(bytes, options) {
1245
+ return new PoolTokenRewards().fromBinary(bytes, options);
1246
+ }
1247
+ static fromJson(jsonValue, options) {
1248
+ return new PoolTokenRewards().fromJson(jsonValue, options);
1249
+ }
1250
+ static fromJsonString(jsonString, options) {
1251
+ return new PoolTokenRewards().fromJsonString(jsonString, options);
1252
+ }
1253
+ static equals(a, b) {
1254
+ return proto3.util.equals(PoolTokenRewards, a, b);
1255
+ }
1256
+ }
1257
+ PoolTokenRewards.runtime = proto3;
1258
+ PoolTokenRewards.typeName = "uniswap.liquidity.v2.PoolTokenRewards";
1259
+ PoolTokenRewards.fields = proto3.util.newFieldList(() => [
1260
+ { no: 1, name: "token", kind: "message", T: RewardToken },
1261
+ { no: 2, name: "boosted_apr", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1262
+ { no: 3, name: "campaigns", kind: "message", T: PoolCampaign, repeated: true },
1263
+ ]);
1148
1264
  /**
1149
1265
  * What a position earns in one LP-incentive reward token: the pool's boosted APR
1150
1266
  * and the position's unclaimed balance. One entry per token, since a pool can run
@@ -1164,10 +1280,9 @@ export class PositionReward extends Message {
1164
1280
  * token's live campaign APRs, in percent, on top of the pool's fee APR. Shared
1165
1281
  * by every position in the pool, not specific to this one. 0 = no live campaign.
1166
1282
  *
1167
- * The same number a pool-level per-token APR on PoolSummary will report for
1168
- * this (pool, token) see the note on PoolSummary.rewards_campaigns. Distinct
1169
- * from RewardsCampaign.boosted_apr, which is ONE campaign's APR; this sums
1170
- * every live campaign paying this token, so don't add the two together.
1283
+ * The same number PoolSummary.token_rewards reports as boosted_apr for this
1284
+ * (pool, token). Distinct from PoolCampaign.apr, which is ONE campaign's APR;
1285
+ * this sums every live campaign paying the token, so don't add the two.
1171
1286
  *
1172
1287
  * @generated from field: double boosted_pool_apr = 2;
1173
1288
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-liquidity",
3
- "version": "1.4.28",
3
+ "version": "1.4.29",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },