@uniswap/client-liquidity 1.4.26 → 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,11 +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.
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).
795
797
  *
796
- * @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
797
800
  */
798
801
  rewardsCampaigns: RewardsCampaign[];
799
802
  /**
@@ -810,6 +813,17 @@ export declare class PoolSummary extends Message<PoolSummary> {
810
813
  * @generated from field: optional double volume_usd_1d_change = 27;
811
814
  */
812
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[];
813
827
  constructor(data?: PartialMessage<PoolSummary>);
814
828
  static readonly runtime: typeof proto3;
815
829
  static readonly typeName = "uniswap.liquidity.v2.PoolSummary";
@@ -917,6 +931,151 @@ export declare class RewardsCampaign extends Message<RewardsCampaign> {
917
931
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RewardsCampaign;
918
932
  static equals(a: RewardsCampaign | PlainMessage<RewardsCampaign> | undefined, b: RewardsCampaign | PlainMessage<RewardsCampaign> | undefined): boolean;
919
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
+ }
1025
+ /**
1026
+ * What a position earns in one LP-incentive reward token: the pool's boosted APR
1027
+ * and the position's unclaimed balance. One entry per token, since a pool can run
1028
+ * concurrent campaigns paying different tokens.
1029
+ *
1030
+ * Either half can stand alone. An ended campaign leaves a claimable balance with
1031
+ * no boost (apr 0), and a live campaign can have a boost with nothing accrued —
1032
+ * or, on V3, no per-position attribution at all.
1033
+ *
1034
+ * @generated from message uniswap.liquidity.v2.PositionReward
1035
+ */
1036
+ export declare class PositionReward extends Message<PositionReward> {
1037
+ /**
1038
+ * The token both values below refer to, on its own distribution chain (which
1039
+ * can differ from the position's chain).
1040
+ *
1041
+ * @generated from field: uniswap.liquidity.v2.RewardToken token = 1;
1042
+ */
1043
+ token?: RewardToken;
1044
+ /**
1045
+ * The POOL's boosted APR from campaigns paying this token — the sum of that
1046
+ * token's live campaign APRs, in percent, on top of the pool's fee APR. Shared
1047
+ * by every position in the pool, not specific to this one. 0 = no live campaign.
1048
+ *
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.
1052
+ *
1053
+ * @generated from field: double boosted_pool_apr = 2;
1054
+ */
1055
+ boostedPoolApr: number;
1056
+ /**
1057
+ * Unclaimed amount in token's smallest unit (uint256 decimal string). Unset
1058
+ * when there is no per-position attribution upstream (V3) — distinct from a
1059
+ * known zero.
1060
+ *
1061
+ * @generated from field: optional string unclaimed_amount = 3;
1062
+ */
1063
+ unclaimedAmount?: string;
1064
+ /**
1065
+ * Unclaimed amount in USD. Unset when the token could not be priced.
1066
+ *
1067
+ * @generated from field: optional double unclaimed_amount_usd = 4;
1068
+ */
1069
+ unclaimedAmountUsd?: number;
1070
+ constructor(data?: PartialMessage<PositionReward>);
1071
+ static readonly runtime: typeof proto3;
1072
+ static readonly typeName = "uniswap.liquidity.v2.PositionReward";
1073
+ static readonly fields: FieldList;
1074
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PositionReward;
1075
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PositionReward;
1076
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PositionReward;
1077
+ static equals(a: PositionReward | PlainMessage<PositionReward> | undefined, b: PositionReward | PlainMessage<PositionReward> | undefined): boolean;
1078
+ }
920
1079
  /**
921
1080
  * @generated from message uniswap.liquidity.v2.PoolListCursor
922
1081
  */
@@ -1320,6 +1479,19 @@ export declare class Position extends Message<Position> {
1320
1479
  * @generated from field: optional string total_supply = 37;
1321
1480
  */
1322
1481
  totalSupply?: string;
1482
+ /**
1483
+ * LP-incentive rewards for this position, one entry per reward token (see
1484
+ * PositionReward). Sourced from data-api, which owns campaign scoping and the
1485
+ * reward-token/creator allowlists, so these agree with what its GetRewards
1486
+ * reports for the same wallet.
1487
+ *
1488
+ * Empty for V2 (no campaigns), and empty when the lookup degrades — rewards
1489
+ * never fail a positions read. Populated by GetWalletPositions; GetPosition
1490
+ * leaves it empty for now.
1491
+ *
1492
+ * @generated from field: repeated uniswap.liquidity.v2.PositionReward rewards = 38;
1493
+ */
1494
+ rewards: PositionReward[];
1323
1495
  constructor(data?: PartialMessage<Position>);
1324
1496
  static readonly runtime: typeof proto3;
1325
1497
  static readonly typeName = "uniswap.liquidity.v2.Position";
@@ -968,13 +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.
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).
974
976
  *
975
- * @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
976
979
  */
977
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 = [];
978
992
  proto3.util.initPartial(data, this);
979
993
  }
980
994
  static fromBinary(bytes, options) {
@@ -1020,6 +1034,7 @@ PoolSummary.fields = proto3.util.newFieldList(() => [
1020
1034
  { no: 25, name: "rewards_campaigns", kind: "message", T: RewardsCampaign, repeated: true },
1021
1035
  { no: 26, name: "tvl_usd_change_1d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1022
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 },
1023
1038
  ]);
1024
1039
  /**
1025
1040
  * A reward token's on-chain identity, so a client can interpret and format a
@@ -1138,6 +1153,163 @@ RewardsCampaign.fields = proto3.util.newFieldList(() => [
1138
1153
  { no: 6, name: "distributed_rewards", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1139
1154
  { no: 7, name: "reward_token", kind: "message", T: RewardToken },
1140
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
+ ]);
1264
+ /**
1265
+ * What a position earns in one LP-incentive reward token: the pool's boosted APR
1266
+ * and the position's unclaimed balance. One entry per token, since a pool can run
1267
+ * concurrent campaigns paying different tokens.
1268
+ *
1269
+ * Either half can stand alone. An ended campaign leaves a claimable balance with
1270
+ * no boost (apr 0), and a live campaign can have a boost with nothing accrued —
1271
+ * or, on V3, no per-position attribution at all.
1272
+ *
1273
+ * @generated from message uniswap.liquidity.v2.PositionReward
1274
+ */
1275
+ export class PositionReward extends Message {
1276
+ constructor(data) {
1277
+ super();
1278
+ /**
1279
+ * The POOL's boosted APR from campaigns paying this token — the sum of that
1280
+ * token's live campaign APRs, in percent, on top of the pool's fee APR. Shared
1281
+ * by every position in the pool, not specific to this one. 0 = no live campaign.
1282
+ *
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.
1286
+ *
1287
+ * @generated from field: double boosted_pool_apr = 2;
1288
+ */
1289
+ this.boostedPoolApr = 0;
1290
+ proto3.util.initPartial(data, this);
1291
+ }
1292
+ static fromBinary(bytes, options) {
1293
+ return new PositionReward().fromBinary(bytes, options);
1294
+ }
1295
+ static fromJson(jsonValue, options) {
1296
+ return new PositionReward().fromJson(jsonValue, options);
1297
+ }
1298
+ static fromJsonString(jsonString, options) {
1299
+ return new PositionReward().fromJsonString(jsonString, options);
1300
+ }
1301
+ static equals(a, b) {
1302
+ return proto3.util.equals(PositionReward, a, b);
1303
+ }
1304
+ }
1305
+ PositionReward.runtime = proto3;
1306
+ PositionReward.typeName = "uniswap.liquidity.v2.PositionReward";
1307
+ PositionReward.fields = proto3.util.newFieldList(() => [
1308
+ { no: 1, name: "token", kind: "message", T: RewardToken },
1309
+ { no: 2, name: "boosted_pool_apr", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1310
+ { no: 3, name: "unclaimed_amount", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1311
+ { no: 4, name: "unclaimed_amount_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1312
+ ]);
1141
1313
  /**
1142
1314
  * @generated from message uniswap.liquidity.v2.PoolListCursor
1143
1315
  */
@@ -1466,6 +1638,19 @@ export class Position extends Message {
1466
1638
  * @generated from field: uniswap.liquidity.v2.PositionStatus status = 14;
1467
1639
  */
1468
1640
  this.status = PositionStatus.UNSPECIFIED;
1641
+ /**
1642
+ * LP-incentive rewards for this position, one entry per reward token (see
1643
+ * PositionReward). Sourced from data-api, which owns campaign scoping and the
1644
+ * reward-token/creator allowlists, so these agree with what its GetRewards
1645
+ * reports for the same wallet.
1646
+ *
1647
+ * Empty for V2 (no campaigns), and empty when the lookup degrades — rewards
1648
+ * never fail a positions read. Populated by GetWalletPositions; GetPosition
1649
+ * leaves it empty for now.
1650
+ *
1651
+ * @generated from field: repeated uniswap.liquidity.v2.PositionReward rewards = 38;
1652
+ */
1653
+ this.rewards = [];
1469
1654
  proto3.util.initPartial(data, this);
1470
1655
  }
1471
1656
  static fromBinary(bytes, options) {
@@ -1521,6 +1706,7 @@ Position.fields = proto3.util.newFieldList(() => [
1521
1706
  { no: 35, name: "reserve0", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1522
1707
  { no: 36, name: "reserve1", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1523
1708
  { no: 37, name: "total_supply", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1709
+ { no: 38, name: "rewards", kind: "message", T: PositionReward, repeated: true },
1524
1710
  ]);
1525
1711
  /**
1526
1712
  * Keyset cursor for GetWalletPositions. position_key is the last returned
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-liquidity",
3
- "version": "1.4.26",
3
+ "version": "1.4.29",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },