@uniswap/client-liquidity 1.4.25 → 1.4.28

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.
@@ -791,7 +791,14 @@ export declare class PoolSummary extends Message<PoolSummary> {
791
791
  /**
792
792
  * Live Merkl LP-incentive campaigns for this pool (V3/V4). Composed at read
793
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.
794
+ * campaign or the lookup degrades. One entry per campaign — not aggregated,
795
+ * so two concurrent UNI campaigns are two entries.
796
+ *
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.
795
802
  *
796
803
  * @generated from field: repeated uniswap.liquidity.v2.RewardsCampaign rewards_campaigns = 25;
797
804
  */
@@ -917,6 +924,61 @@ export declare class RewardsCampaign extends Message<RewardsCampaign> {
917
924
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RewardsCampaign;
918
925
  static equals(a: RewardsCampaign | PlainMessage<RewardsCampaign> | undefined, b: RewardsCampaign | PlainMessage<RewardsCampaign> | undefined): boolean;
919
926
  }
927
+ /**
928
+ * What a position earns in one LP-incentive reward token: the pool's boosted APR
929
+ * and the position's unclaimed balance. One entry per token, since a pool can run
930
+ * concurrent campaigns paying different tokens.
931
+ *
932
+ * Either half can stand alone. An ended campaign leaves a claimable balance with
933
+ * no boost (apr 0), and a live campaign can have a boost with nothing accrued —
934
+ * or, on V3, no per-position attribution at all.
935
+ *
936
+ * @generated from message uniswap.liquidity.v2.PositionReward
937
+ */
938
+ export declare class PositionReward extends Message<PositionReward> {
939
+ /**
940
+ * The token both values below refer to, on its own distribution chain (which
941
+ * can differ from the position's chain).
942
+ *
943
+ * @generated from field: uniswap.liquidity.v2.RewardToken token = 1;
944
+ */
945
+ token?: RewardToken;
946
+ /**
947
+ * The POOL's boosted APR from campaigns paying this token — the sum of that
948
+ * token's live campaign APRs, in percent, on top of the pool's fee APR. Shared
949
+ * by every position in the pool, not specific to this one. 0 = no live campaign.
950
+ *
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.
955
+ *
956
+ * @generated from field: double boosted_pool_apr = 2;
957
+ */
958
+ boostedPoolApr: number;
959
+ /**
960
+ * Unclaimed amount in token's smallest unit (uint256 decimal string). Unset
961
+ * when there is no per-position attribution upstream (V3) — distinct from a
962
+ * known zero.
963
+ *
964
+ * @generated from field: optional string unclaimed_amount = 3;
965
+ */
966
+ unclaimedAmount?: string;
967
+ /**
968
+ * Unclaimed amount in USD. Unset when the token could not be priced.
969
+ *
970
+ * @generated from field: optional double unclaimed_amount_usd = 4;
971
+ */
972
+ unclaimedAmountUsd?: number;
973
+ constructor(data?: PartialMessage<PositionReward>);
974
+ static readonly runtime: typeof proto3;
975
+ static readonly typeName = "uniswap.liquidity.v2.PositionReward";
976
+ static readonly fields: FieldList;
977
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PositionReward;
978
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PositionReward;
979
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PositionReward;
980
+ static equals(a: PositionReward | PlainMessage<PositionReward> | undefined, b: PositionReward | PlainMessage<PositionReward> | undefined): boolean;
981
+ }
920
982
  /**
921
983
  * @generated from message uniswap.liquidity.v2.PoolListCursor
922
984
  */
@@ -1267,6 +1329,72 @@ export declare class Position extends Message<Position> {
1267
1329
  * @generated from field: optional string token1_price_usd = 25;
1268
1330
  */
1269
1331
  token1PriceUsd?: string;
1332
+ /**
1333
+ * @generated from field: optional string amount0 = 26;
1334
+ */
1335
+ amount0?: string;
1336
+ /**
1337
+ * @generated from field: optional string amount1 = 27;
1338
+ */
1339
+ amount1?: string;
1340
+ /**
1341
+ * @generated from field: optional double value_usd = 28;
1342
+ */
1343
+ valueUsd?: number;
1344
+ /**
1345
+ * @generated from field: optional string token0_uncollected_fees = 29;
1346
+ */
1347
+ token0UncollectedFees?: string;
1348
+ /**
1349
+ * @generated from field: optional string token1_uncollected_fees = 30;
1350
+ */
1351
+ token1UncollectedFees?: string;
1352
+ /**
1353
+ * @generated from field: optional double uncollected_fees_usd = 31;
1354
+ */
1355
+ uncollectedFeesUsd?: number;
1356
+ /**
1357
+ * @generated from field: optional double apr_1d = 32;
1358
+ */
1359
+ apr1d?: number;
1360
+ /**
1361
+ * @generated from field: optional double apr_7d = 33;
1362
+ */
1363
+ apr7d?: number;
1364
+ /**
1365
+ * @generated from field: optional double apr_30d = 34;
1366
+ */
1367
+ apr30d?: number;
1368
+ /**
1369
+ * V2 only: raw pair reserves and LP token total supply (uint256 as decimal
1370
+ * strings), so clients can derive the wallet's underlying token amounts (and
1371
+ * USD value) from lp_shares. Unset for V3/V4, which derive amounts from
1372
+ * liquidity + tick range + current_tick/sqrt_price_x96 instead.
1373
+ *
1374
+ * @generated from field: optional string reserve0 = 35;
1375
+ */
1376
+ reserve0?: string;
1377
+ /**
1378
+ * @generated from field: optional string reserve1 = 36;
1379
+ */
1380
+ reserve1?: string;
1381
+ /**
1382
+ * @generated from field: optional string total_supply = 37;
1383
+ */
1384
+ totalSupply?: string;
1385
+ /**
1386
+ * LP-incentive rewards for this position, one entry per reward token (see
1387
+ * PositionReward). Sourced from data-api, which owns campaign scoping and the
1388
+ * reward-token/creator allowlists, so these agree with what its GetRewards
1389
+ * reports for the same wallet.
1390
+ *
1391
+ * Empty for V2 (no campaigns), and empty when the lookup degrades — rewards
1392
+ * never fail a positions read. Populated by GetWalletPositions; GetPosition
1393
+ * leaves it empty for now.
1394
+ *
1395
+ * @generated from field: repeated uniswap.liquidity.v2.PositionReward rewards = 38;
1396
+ */
1397
+ rewards: PositionReward[];
1270
1398
  constructor(data?: PartialMessage<Position>);
1271
1399
  static readonly runtime: typeof proto3;
1272
1400
  static readonly typeName = "uniswap.liquidity.v2.Position";
@@ -970,7 +970,14 @@ export class PoolSummary extends Message {
970
970
  /**
971
971
  * Live Merkl LP-incentive campaigns for this pool (V3/V4). Composed at read
972
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.
973
+ * campaign or the lookup degrades. One entry per campaign — not aggregated,
974
+ * so two concurrent UNI campaigns are two entries.
975
+ *
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.
974
981
  *
975
982
  * @generated from field: repeated uniswap.liquidity.v2.RewardsCampaign rewards_campaigns = 25;
976
983
  */
@@ -1138,6 +1145,56 @@ RewardsCampaign.fields = proto3.util.newFieldList(() => [
1138
1145
  { no: 6, name: "distributed_rewards", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1139
1146
  { no: 7, name: "reward_token", kind: "message", T: RewardToken },
1140
1147
  ]);
1148
+ /**
1149
+ * What a position earns in one LP-incentive reward token: the pool's boosted APR
1150
+ * and the position's unclaimed balance. One entry per token, since a pool can run
1151
+ * concurrent campaigns paying different tokens.
1152
+ *
1153
+ * Either half can stand alone. An ended campaign leaves a claimable balance with
1154
+ * no boost (apr 0), and a live campaign can have a boost with nothing accrued —
1155
+ * or, on V3, no per-position attribution at all.
1156
+ *
1157
+ * @generated from message uniswap.liquidity.v2.PositionReward
1158
+ */
1159
+ export class PositionReward extends Message {
1160
+ constructor(data) {
1161
+ super();
1162
+ /**
1163
+ * The POOL's boosted APR from campaigns paying this token — the sum of that
1164
+ * token's live campaign APRs, in percent, on top of the pool's fee APR. Shared
1165
+ * by every position in the pool, not specific to this one. 0 = no live campaign.
1166
+ *
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.
1171
+ *
1172
+ * @generated from field: double boosted_pool_apr = 2;
1173
+ */
1174
+ this.boostedPoolApr = 0;
1175
+ proto3.util.initPartial(data, this);
1176
+ }
1177
+ static fromBinary(bytes, options) {
1178
+ return new PositionReward().fromBinary(bytes, options);
1179
+ }
1180
+ static fromJson(jsonValue, options) {
1181
+ return new PositionReward().fromJson(jsonValue, options);
1182
+ }
1183
+ static fromJsonString(jsonString, options) {
1184
+ return new PositionReward().fromJsonString(jsonString, options);
1185
+ }
1186
+ static equals(a, b) {
1187
+ return proto3.util.equals(PositionReward, a, b);
1188
+ }
1189
+ }
1190
+ PositionReward.runtime = proto3;
1191
+ PositionReward.typeName = "uniswap.liquidity.v2.PositionReward";
1192
+ PositionReward.fields = proto3.util.newFieldList(() => [
1193
+ { no: 1, name: "token", kind: "message", T: RewardToken },
1194
+ { no: 2, name: "boosted_pool_apr", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1195
+ { no: 3, name: "unclaimed_amount", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1196
+ { no: 4, name: "unclaimed_amount_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1197
+ ]);
1141
1198
  /**
1142
1199
  * @generated from message uniswap.liquidity.v2.PoolListCursor
1143
1200
  */
@@ -1466,6 +1523,19 @@ export class Position extends Message {
1466
1523
  * @generated from field: uniswap.liquidity.v2.PositionStatus status = 14;
1467
1524
  */
1468
1525
  this.status = PositionStatus.UNSPECIFIED;
1526
+ /**
1527
+ * LP-incentive rewards for this position, one entry per reward token (see
1528
+ * PositionReward). Sourced from data-api, which owns campaign scoping and the
1529
+ * reward-token/creator allowlists, so these agree with what its GetRewards
1530
+ * reports for the same wallet.
1531
+ *
1532
+ * Empty for V2 (no campaigns), and empty when the lookup degrades — rewards
1533
+ * never fail a positions read. Populated by GetWalletPositions; GetPosition
1534
+ * leaves it empty for now.
1535
+ *
1536
+ * @generated from field: repeated uniswap.liquidity.v2.PositionReward rewards = 38;
1537
+ */
1538
+ this.rewards = [];
1469
1539
  proto3.util.initPartial(data, this);
1470
1540
  }
1471
1541
  static fromBinary(bytes, options) {
@@ -1509,6 +1579,19 @@ Position.fields = proto3.util.newFieldList(() => [
1509
1579
  { no: 23, name: "pool_liquidity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1510
1580
  { no: 24, name: "token0_price_usd", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1511
1581
  { no: 25, name: "token1_price_usd", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1582
+ { no: 26, name: "amount0", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1583
+ { no: 27, name: "amount1", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1584
+ { no: 28, name: "value_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1585
+ { no: 29, name: "token0_uncollected_fees", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1586
+ { no: 30, name: "token1_uncollected_fees", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1587
+ { no: 31, name: "uncollected_fees_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1588
+ { no: 32, name: "apr_1d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1589
+ { no: 33, name: "apr_7d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1590
+ { no: 34, name: "apr_30d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
1591
+ { no: 35, name: "reserve0", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1592
+ { no: 36, name: "reserve1", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1593
+ { no: 37, name: "total_supply", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1594
+ { no: 38, name: "rewards", kind: "message", T: PositionReward, repeated: true },
1512
1595
  ]);
1513
1596
  /**
1514
1597
  * 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.25",
3
+ "version": "1.4.28",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },