@uniswap/client-liquidity 1.4.38 → 1.4.39
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
2
2
|
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
3
3
|
import { ChainId, NFTPermitData, PermitBatchData, Protocols, TransactionRequest, V3Position } from "../v1/types_pb.js";
|
|
4
|
-
import { ApprovalTransactionRequest, CreatePoolParameters, CreatePositionExistingPoolParameters, CreateToken, GasUrgency, HistoryDuration, HookEntry, LPAction, LPToken, PoolPricePoint, PoolReference, PoolSummary, PoolTick, PoolTransaction, PoolTransactionCursor, PoolVolumeBucket, Position, PositionGroup, PositionListCursor, PositionModifier, PositionPriceBounds, PositionSortBy, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
4
|
+
import { ApprovalTransactionRequest, CreatePoolParameters, CreatePositionExistingPoolParameters, CreateToken, GasUrgency, HistoryDuration, HookEntry, LPAction, LPToken, PoolPricePoint, PoolReference, PoolSummary, PoolTick, PoolTransaction, PoolTransactionCursor, PoolVolumeBucket, Position, PositionGroup, PositionGroupTarget, PositionListCursor, PositionModifier, PositionPriceBounds, PositionSortBy, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
5
5
|
/**
|
|
6
6
|
* MigrateV2ToV3LPPosition
|
|
7
7
|
*
|
|
@@ -1187,6 +1187,24 @@ export declare class GetWalletPositionsRequest extends Message<GetWalletPosition
|
|
|
1187
1187
|
* @generated from field: optional bool group = 12;
|
|
1188
1188
|
*/
|
|
1189
1189
|
group?: boolean;
|
|
1190
|
+
/**
|
|
1191
|
+
* On a grouped read, cap how many positions each group returns inline. The
|
|
1192
|
+
* group-level totals and total_position_count still cover ALL members, so a
|
|
1193
|
+
* capped page keeps correct aggregates. Absent = a service default; 0 = totals
|
|
1194
|
+
* only (no inline positions). Ignored when group is false.
|
|
1195
|
+
*
|
|
1196
|
+
* @generated from field: optional int32 positions_per_group_limit = 13;
|
|
1197
|
+
*/
|
|
1198
|
+
positionsPerGroupLimit?: number;
|
|
1199
|
+
/**
|
|
1200
|
+
* Expand a single group: return only that group's positions, paged by offset
|
|
1201
|
+
* within the group. Implies a grouped read (group need not be set) and the
|
|
1202
|
+
* response's `groups` holds just the one targeted group. Its own limit/offset
|
|
1203
|
+
* page the positions inside the group; the top-level limit/cursor are ignored.
|
|
1204
|
+
*
|
|
1205
|
+
* @generated from field: optional uniswap.liquidity.v2.PositionGroupTarget group_target = 14;
|
|
1206
|
+
*/
|
|
1207
|
+
groupTarget?: PositionGroupTarget;
|
|
1190
1208
|
constructor(data?: PartialMessage<GetWalletPositionsRequest>);
|
|
1191
1209
|
static readonly runtime: typeof proto3;
|
|
1192
1210
|
static readonly typeName = "uniswap.liquidity.v2.GetWalletPositionsRequest";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
6
6
|
import { ChainId, NFTPermitData, PermitBatchData, Protocols, TransactionRequest, V3Position } from "../v1/types_pb.js";
|
|
7
|
-
import { ApprovalTransactionRequest, CreatePoolParameters, CreatePositionExistingPoolParameters, CreateToken, GasUrgency, HistoryDuration, HookEntry, LPAction, LPToken, PoolPricePoint, PoolReference, PoolSummary, PoolTick, PoolTransaction, PoolTransactionCursor, PoolVolumeBucket, Position, PositionGroup, PositionListCursor, PositionModifier, PositionPriceBounds, PositionSortBy, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
7
|
+
import { ApprovalTransactionRequest, CreatePoolParameters, CreatePositionExistingPoolParameters, CreateToken, GasUrgency, HistoryDuration, HookEntry, LPAction, LPToken, PoolPricePoint, PoolReference, PoolSummary, PoolTick, PoolTransaction, PoolTransactionCursor, PoolVolumeBucket, Position, PositionGroup, PositionGroupTarget, PositionListCursor, PositionModifier, PositionPriceBounds, PositionSortBy, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
8
8
|
/**
|
|
9
9
|
* MigrateV2ToV3LPPosition
|
|
10
10
|
*
|
|
@@ -1222,6 +1222,8 @@ GetWalletPositionsRequest.fields = proto3.util.newFieldList(() => [
|
|
|
1222
1222
|
{ no: 10, name: "ascending", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
1223
1223
|
{ no: 11, name: "search", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1224
1224
|
{ no: 12, name: "group", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
1225
|
+
{ no: 13, name: "positions_per_group_limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
1226
|
+
{ no: 14, name: "group_target", kind: "message", T: PositionGroupTarget, opt: true },
|
|
1225
1227
|
]);
|
|
1226
1228
|
/**
|
|
1227
1229
|
* @generated from message uniswap.liquidity.v2.GetWalletPositionsResponse
|
|
@@ -1478,11 +1478,43 @@ export declare class PositionGroup extends Message<PositionGroup> {
|
|
|
1478
1478
|
/**
|
|
1479
1479
|
* The grouped positions, in the request's sort/default order. Each carries its
|
|
1480
1480
|
* own raw pool tokens (a WETH position still reports WETH), untouched by the
|
|
1481
|
-
* group-level native normalization.
|
|
1481
|
+
* group-level native normalization. Capped by the request's
|
|
1482
|
+
* positions_per_group_limit; the totals below still cover ALL members so a
|
|
1483
|
+
* capped page keeps correct aggregates.
|
|
1482
1484
|
*
|
|
1483
1485
|
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 6;
|
|
1484
1486
|
*/
|
|
1485
1487
|
positions: Position[];
|
|
1488
|
+
/**
|
|
1489
|
+
* Aggregates over ALL positions in the group, not just the returned page, so
|
|
1490
|
+
* a capped `positions` list still shows correct group-level totals. Populated
|
|
1491
|
+
* on a grouped read (group=true). On a single-group expansion (group_target),
|
|
1492
|
+
* only total_value_usd and total_position_count are set — the fee/APR totals
|
|
1493
|
+
* were delivered on the initial grouped read and are not recomputed there
|
|
1494
|
+
* (that would require re-fetching every member's fees/rewards).
|
|
1495
|
+
*
|
|
1496
|
+
* @generated from field: optional double total_value_usd = 7;
|
|
1497
|
+
*/
|
|
1498
|
+
totalValueUsd?: number;
|
|
1499
|
+
/**
|
|
1500
|
+
* @generated from field: optional double total_uncollected_fees_usd = 8;
|
|
1501
|
+
*/
|
|
1502
|
+
totalUncollectedFeesUsd?: number;
|
|
1503
|
+
/**
|
|
1504
|
+
* Liquidity-weighted mean of members' total_apr, weighted by each member's
|
|
1505
|
+
* value_usd (Σ apr·value / Σ value) — the blended yield on the group's
|
|
1506
|
+
* capital, not a naive per-position average. Unset when no member is priced.
|
|
1507
|
+
*
|
|
1508
|
+
* @generated from field: optional double weighted_apr = 9;
|
|
1509
|
+
*/
|
|
1510
|
+
weightedApr?: number;
|
|
1511
|
+
/**
|
|
1512
|
+
* Full member count (all positions in the group), so a capped page can show
|
|
1513
|
+
* "+N more" and drive expansion.
|
|
1514
|
+
*
|
|
1515
|
+
* @generated from field: int32 total_position_count = 10;
|
|
1516
|
+
*/
|
|
1517
|
+
totalPositionCount: number;
|
|
1486
1518
|
constructor(data?: PartialMessage<PositionGroup>);
|
|
1487
1519
|
static readonly runtime: typeof proto3;
|
|
1488
1520
|
static readonly typeName = "uniswap.liquidity.v2.PositionGroup";
|
|
@@ -1492,6 +1524,52 @@ export declare class PositionGroup extends Message<PositionGroup> {
|
|
|
1492
1524
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PositionGroup;
|
|
1493
1525
|
static equals(a: PositionGroup | PlainMessage<PositionGroup> | undefined, b: PositionGroup | PlainMessage<PositionGroup> | undefined): boolean;
|
|
1494
1526
|
}
|
|
1527
|
+
/**
|
|
1528
|
+
* Targets one PositionGroup for expansion in GetWalletPositions: with this set,
|
|
1529
|
+
* the response returns just that group's positions, paged by offset within the
|
|
1530
|
+
* group. The pair key comes from a prior grouped response's PositionGroup
|
|
1531
|
+
* (chain_id, token0_address, token1_address); addresses are normalized the same
|
|
1532
|
+
* way grouping does (wrapped native -> native), so either the native or the
|
|
1533
|
+
* wrapped address of a slot resolves to the same group. Singleton groups (one
|
|
1534
|
+
* position, unresolved metadata) are not expandable — the caller already holds
|
|
1535
|
+
* their single position.
|
|
1536
|
+
*
|
|
1537
|
+
* @generated from message uniswap.liquidity.v2.PositionGroupTarget
|
|
1538
|
+
*/
|
|
1539
|
+
export declare class PositionGroupTarget extends Message<PositionGroupTarget> {
|
|
1540
|
+
/**
|
|
1541
|
+
* @generated from field: int32 chain_id = 1;
|
|
1542
|
+
*/
|
|
1543
|
+
chainId: number;
|
|
1544
|
+
/**
|
|
1545
|
+
* @generated from field: optional string token0_address = 2;
|
|
1546
|
+
*/
|
|
1547
|
+
token0Address?: string;
|
|
1548
|
+
/**
|
|
1549
|
+
* @generated from field: optional string token1_address = 3;
|
|
1550
|
+
*/
|
|
1551
|
+
token1Address?: string;
|
|
1552
|
+
/**
|
|
1553
|
+
* Offset within the group's positions (in the group's sort/default order).
|
|
1554
|
+
*
|
|
1555
|
+
* @generated from field: int32 offset = 4;
|
|
1556
|
+
*/
|
|
1557
|
+
offset: number;
|
|
1558
|
+
/**
|
|
1559
|
+
* Max positions to return for the group. Default = service default, max 200.
|
|
1560
|
+
*
|
|
1561
|
+
* @generated from field: optional int32 limit = 5;
|
|
1562
|
+
*/
|
|
1563
|
+
limit?: number;
|
|
1564
|
+
constructor(data?: PartialMessage<PositionGroupTarget>);
|
|
1565
|
+
static readonly runtime: typeof proto3;
|
|
1566
|
+
static readonly typeName = "uniswap.liquidity.v2.PositionGroupTarget";
|
|
1567
|
+
static readonly fields: FieldList;
|
|
1568
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PositionGroupTarget;
|
|
1569
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PositionGroupTarget;
|
|
1570
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PositionGroupTarget;
|
|
1571
|
+
static equals(a: PositionGroupTarget | PlainMessage<PositionGroupTarget> | undefined, b: PositionGroupTarget | PlainMessage<PositionGroupTarget> | undefined): boolean;
|
|
1572
|
+
}
|
|
1495
1573
|
/**
|
|
1496
1574
|
* Keyset cursor for GetWalletPositions. position_key is the last returned
|
|
1497
1575
|
* position's key within (chain_id, version): V2 pair address, V3 token id,
|
|
@@ -1598,11 +1598,20 @@ export class PositionGroup extends Message {
|
|
|
1598
1598
|
/**
|
|
1599
1599
|
* The grouped positions, in the request's sort/default order. Each carries its
|
|
1600
1600
|
* own raw pool tokens (a WETH position still reports WETH), untouched by the
|
|
1601
|
-
* group-level native normalization.
|
|
1601
|
+
* group-level native normalization. Capped by the request's
|
|
1602
|
+
* positions_per_group_limit; the totals below still cover ALL members so a
|
|
1603
|
+
* capped page keeps correct aggregates.
|
|
1602
1604
|
*
|
|
1603
1605
|
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 6;
|
|
1604
1606
|
*/
|
|
1605
1607
|
this.positions = [];
|
|
1608
|
+
/**
|
|
1609
|
+
* Full member count (all positions in the group), so a capped page can show
|
|
1610
|
+
* "+N more" and drive expansion.
|
|
1611
|
+
*
|
|
1612
|
+
* @generated from field: int32 total_position_count = 10;
|
|
1613
|
+
*/
|
|
1614
|
+
this.totalPositionCount = 0;
|
|
1606
1615
|
proto3.util.initPartial(data, this);
|
|
1607
1616
|
}
|
|
1608
1617
|
static fromBinary(bytes, options) {
|
|
@@ -1627,6 +1636,59 @@ PositionGroup.fields = proto3.util.newFieldList(() => [
|
|
|
1627
1636
|
{ no: 4, name: "token0_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
1628
1637
|
{ no: 5, name: "token1_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
1629
1638
|
{ no: 6, name: "positions", kind: "message", T: Position, repeated: true },
|
|
1639
|
+
{ no: 7, name: "total_value_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
1640
|
+
{ no: 8, name: "total_uncollected_fees_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
1641
|
+
{ no: 9, name: "weighted_apr", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
1642
|
+
{ no: 10, name: "total_position_count", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1643
|
+
]);
|
|
1644
|
+
/**
|
|
1645
|
+
* Targets one PositionGroup for expansion in GetWalletPositions: with this set,
|
|
1646
|
+
* the response returns just that group's positions, paged by offset within the
|
|
1647
|
+
* group. The pair key comes from a prior grouped response's PositionGroup
|
|
1648
|
+
* (chain_id, token0_address, token1_address); addresses are normalized the same
|
|
1649
|
+
* way grouping does (wrapped native -> native), so either the native or the
|
|
1650
|
+
* wrapped address of a slot resolves to the same group. Singleton groups (one
|
|
1651
|
+
* position, unresolved metadata) are not expandable — the caller already holds
|
|
1652
|
+
* their single position.
|
|
1653
|
+
*
|
|
1654
|
+
* @generated from message uniswap.liquidity.v2.PositionGroupTarget
|
|
1655
|
+
*/
|
|
1656
|
+
export class PositionGroupTarget extends Message {
|
|
1657
|
+
constructor(data) {
|
|
1658
|
+
super();
|
|
1659
|
+
/**
|
|
1660
|
+
* @generated from field: int32 chain_id = 1;
|
|
1661
|
+
*/
|
|
1662
|
+
this.chainId = 0;
|
|
1663
|
+
/**
|
|
1664
|
+
* Offset within the group's positions (in the group's sort/default order).
|
|
1665
|
+
*
|
|
1666
|
+
* @generated from field: int32 offset = 4;
|
|
1667
|
+
*/
|
|
1668
|
+
this.offset = 0;
|
|
1669
|
+
proto3.util.initPartial(data, this);
|
|
1670
|
+
}
|
|
1671
|
+
static fromBinary(bytes, options) {
|
|
1672
|
+
return new PositionGroupTarget().fromBinary(bytes, options);
|
|
1673
|
+
}
|
|
1674
|
+
static fromJson(jsonValue, options) {
|
|
1675
|
+
return new PositionGroupTarget().fromJson(jsonValue, options);
|
|
1676
|
+
}
|
|
1677
|
+
static fromJsonString(jsonString, options) {
|
|
1678
|
+
return new PositionGroupTarget().fromJsonString(jsonString, options);
|
|
1679
|
+
}
|
|
1680
|
+
static equals(a, b) {
|
|
1681
|
+
return proto3.util.equals(PositionGroupTarget, a, b);
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
PositionGroupTarget.runtime = proto3;
|
|
1685
|
+
PositionGroupTarget.typeName = "uniswap.liquidity.v2.PositionGroupTarget";
|
|
1686
|
+
PositionGroupTarget.fields = proto3.util.newFieldList(() => [
|
|
1687
|
+
{ no: 1, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1688
|
+
{ no: 2, name: "token0_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1689
|
+
{ no: 3, name: "token1_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1690
|
+
{ no: 4, name: "offset", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1691
|
+
{ no: 5, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
1630
1692
|
]);
|
|
1631
1693
|
/**
|
|
1632
1694
|
* Keyset cursor for GetWalletPositions. position_key is the last returned
|