@uniswap/client-liquidity 1.4.26 → 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
|
*/
|
|
@@ -1320,6 +1382,19 @@ export declare class Position extends Message<Position> {
|
|
|
1320
1382
|
* @generated from field: optional string total_supply = 37;
|
|
1321
1383
|
*/
|
|
1322
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[];
|
|
1323
1398
|
constructor(data?: PartialMessage<Position>);
|
|
1324
1399
|
static readonly runtime: typeof proto3;
|
|
1325
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) {
|
|
@@ -1521,6 +1591,7 @@ Position.fields = proto3.util.newFieldList(() => [
|
|
|
1521
1591
|
{ no: 35, name: "reserve0", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1522
1592
|
{ no: 36, name: "reserve1", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1523
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 },
|
|
1524
1595
|
]);
|
|
1525
1596
|
/**
|
|
1526
1597
|
* Keyset cursor for GetWalletPositions. position_key is the last returned
|