@uniswap/client-liquidity 1.4.37 → 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, 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
|
*
|
|
@@ -1172,6 +1172,39 @@ export declare class GetWalletPositionsRequest extends Message<GetWalletPosition
|
|
|
1172
1172
|
* @generated from field: optional string search = 11;
|
|
1173
1173
|
*/
|
|
1174
1174
|
search?: string;
|
|
1175
|
+
/**
|
|
1176
|
+
* Group a wallet's positions by token pair. When true, positions sharing a
|
|
1177
|
+
* pair on the same chain are collapsed into one PositionGroup and the response
|
|
1178
|
+
* returns `groups` instead of `positions`. The pair key is (chain, token0,
|
|
1179
|
+
* token1) with each chain's wrapped native normalized to native, so a V4
|
|
1180
|
+
* ETH/USDC pool and a V3 WETH/USDC pool group together; protocol version and
|
|
1181
|
+
* fee tier do NOT split a group. Grouping needs resolved token identity, so
|
|
1182
|
+
* (like search/sort) it reads the whole bounded set, enriches, groups, then
|
|
1183
|
+
* pages by offset OVER GROUPS — a group never splits across a page. Composes
|
|
1184
|
+
* with search, statuses, range_statuses, modifier, and sort_by (groups order
|
|
1185
|
+
* by their top-ranked member). Absent/false = the flat `positions` list.
|
|
1186
|
+
*
|
|
1187
|
+
* @generated from field: optional bool group = 12;
|
|
1188
|
+
*/
|
|
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;
|
|
1175
1208
|
constructor(data?: PartialMessage<GetWalletPositionsRequest>);
|
|
1176
1209
|
static readonly runtime: typeof proto3;
|
|
1177
1210
|
static readonly typeName = "uniswap.liquidity.v2.GetWalletPositionsRequest";
|
|
@@ -1186,6 +1219,8 @@ export declare class GetWalletPositionsRequest extends Message<GetWalletPosition
|
|
|
1186
1219
|
*/
|
|
1187
1220
|
export declare class GetWalletPositionsResponse extends Message<GetWalletPositionsResponse> {
|
|
1188
1221
|
/**
|
|
1222
|
+
* Populated when the request did not set group=true.
|
|
1223
|
+
*
|
|
1189
1224
|
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 1;
|
|
1190
1225
|
*/
|
|
1191
1226
|
positions: Position[];
|
|
@@ -1193,6 +1228,12 @@ export declare class GetWalletPositionsResponse extends Message<GetWalletPositio
|
|
|
1193
1228
|
* @generated from field: optional uniswap.liquidity.v2.PositionListCursor next_cursor = 2;
|
|
1194
1229
|
*/
|
|
1195
1230
|
nextCursor?: PositionListCursor;
|
|
1231
|
+
/**
|
|
1232
|
+
* Populated when the request set group=true (and `positions` is then empty).
|
|
1233
|
+
*
|
|
1234
|
+
* @generated from field: repeated uniswap.liquidity.v2.PositionGroup groups = 3;
|
|
1235
|
+
*/
|
|
1236
|
+
groups: PositionGroup[];
|
|
1196
1237
|
constructor(data?: PartialMessage<GetWalletPositionsResponse>);
|
|
1197
1238
|
static readonly runtime: typeof proto3;
|
|
1198
1239
|
static readonly typeName = "uniswap.liquidity.v2.GetWalletPositionsResponse";
|
|
@@ -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, 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
|
*
|
|
@@ -1221,6 +1221,9 @@ GetWalletPositionsRequest.fields = proto3.util.newFieldList(() => [
|
|
|
1221
1221
|
{ no: 9, name: "sort_by", kind: "enum", T: proto3.getEnumType(PositionSortBy), opt: true },
|
|
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
|
+
{ 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 },
|
|
1224
1227
|
]);
|
|
1225
1228
|
/**
|
|
1226
1229
|
* @generated from message uniswap.liquidity.v2.GetWalletPositionsResponse
|
|
@@ -1229,9 +1232,17 @@ export class GetWalletPositionsResponse extends Message {
|
|
|
1229
1232
|
constructor(data) {
|
|
1230
1233
|
super();
|
|
1231
1234
|
/**
|
|
1235
|
+
* Populated when the request did not set group=true.
|
|
1236
|
+
*
|
|
1232
1237
|
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 1;
|
|
1233
1238
|
*/
|
|
1234
1239
|
this.positions = [];
|
|
1240
|
+
/**
|
|
1241
|
+
* Populated when the request set group=true (and `positions` is then empty).
|
|
1242
|
+
*
|
|
1243
|
+
* @generated from field: repeated uniswap.liquidity.v2.PositionGroup groups = 3;
|
|
1244
|
+
*/
|
|
1245
|
+
this.groups = [];
|
|
1235
1246
|
proto3.util.initPartial(data, this);
|
|
1236
1247
|
}
|
|
1237
1248
|
static fromBinary(bytes, options) {
|
|
@@ -1252,6 +1263,7 @@ GetWalletPositionsResponse.typeName = "uniswap.liquidity.v2.GetWalletPositionsRe
|
|
|
1252
1263
|
GetWalletPositionsResponse.fields = proto3.util.newFieldList(() => [
|
|
1253
1264
|
{ no: 1, name: "positions", kind: "message", T: Position, repeated: true },
|
|
1254
1265
|
{ no: 2, name: "next_cursor", kind: "message", T: PositionListCursor, opt: true },
|
|
1266
|
+
{ no: 3, name: "groups", kind: "message", T: PositionGroup, repeated: true },
|
|
1255
1267
|
]);
|
|
1256
1268
|
/**
|
|
1257
1269
|
* GetWalletPositionsBalance — aggregate USD value of a wallet's LP positions
|
|
@@ -1439,6 +1439,137 @@ export declare class Position extends Message<Position> {
|
|
|
1439
1439
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Position;
|
|
1440
1440
|
static equals(a: Position | PlainMessage<Position> | undefined, b: Position | PlainMessage<Position> | undefined): boolean;
|
|
1441
1441
|
}
|
|
1442
|
+
/**
|
|
1443
|
+
* A wallet's positions collapsed by token pair, returned by GetWalletPositions
|
|
1444
|
+
* when the request sets group=true. Every position in a group shares the pair
|
|
1445
|
+
* key (chain_id, token0_address, token1_address) after normalizing each chain's
|
|
1446
|
+
* wrapped native to native — so V2/V3/V4 and all fee tiers of the same pair land
|
|
1447
|
+
* together. Positions whose pool metadata could not be resolved (no token
|
|
1448
|
+
* identity) each form their own singleton group and leave the pair fields unset.
|
|
1449
|
+
*
|
|
1450
|
+
* @generated from message uniswap.liquidity.v2.PositionGroup
|
|
1451
|
+
*/
|
|
1452
|
+
export declare class PositionGroup extends Message<PositionGroup> {
|
|
1453
|
+
/**
|
|
1454
|
+
* @generated from field: int32 chain_id = 1;
|
|
1455
|
+
*/
|
|
1456
|
+
chainId: number;
|
|
1457
|
+
/**
|
|
1458
|
+
* The group's pair, in canonical (token0 < token1) order after wrapped-native
|
|
1459
|
+
* normalization. Prefers a native member's identity when the group holds one
|
|
1460
|
+
* (so an ETH/WETH-mixed group displays ETH), else the wrapped token. Unset for
|
|
1461
|
+
* a singleton group formed from a position with unresolved pool metadata.
|
|
1462
|
+
*
|
|
1463
|
+
* @generated from field: optional string token0_address = 2;
|
|
1464
|
+
*/
|
|
1465
|
+
token0Address?: string;
|
|
1466
|
+
/**
|
|
1467
|
+
* @generated from field: optional string token1_address = 3;
|
|
1468
|
+
*/
|
|
1469
|
+
token1Address?: string;
|
|
1470
|
+
/**
|
|
1471
|
+
* @generated from field: optional uniswap.liquidity.v2.TokenMetadata token0_metadata = 4;
|
|
1472
|
+
*/
|
|
1473
|
+
token0Metadata?: TokenMetadata;
|
|
1474
|
+
/**
|
|
1475
|
+
* @generated from field: optional uniswap.liquidity.v2.TokenMetadata token1_metadata = 5;
|
|
1476
|
+
*/
|
|
1477
|
+
token1Metadata?: TokenMetadata;
|
|
1478
|
+
/**
|
|
1479
|
+
* The grouped positions, in the request's sort/default order. Each carries its
|
|
1480
|
+
* own raw pool tokens (a WETH position still reports WETH), untouched by the
|
|
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.
|
|
1484
|
+
*
|
|
1485
|
+
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 6;
|
|
1486
|
+
*/
|
|
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;
|
|
1518
|
+
constructor(data?: PartialMessage<PositionGroup>);
|
|
1519
|
+
static readonly runtime: typeof proto3;
|
|
1520
|
+
static readonly typeName = "uniswap.liquidity.v2.PositionGroup";
|
|
1521
|
+
static readonly fields: FieldList;
|
|
1522
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PositionGroup;
|
|
1523
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PositionGroup;
|
|
1524
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PositionGroup;
|
|
1525
|
+
static equals(a: PositionGroup | PlainMessage<PositionGroup> | undefined, b: PositionGroup | PlainMessage<PositionGroup> | undefined): boolean;
|
|
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
|
+
}
|
|
1442
1573
|
/**
|
|
1443
1574
|
* Keyset cursor for GetWalletPositions. position_key is the last returned
|
|
1444
1575
|
* position's key within (chain_id, version): V2 pair address, V3 token id,
|
|
@@ -1578,6 +1578,118 @@ Position.fields = proto3.util.newFieldList(() => [
|
|
|
1578
1578
|
{ no: 39, name: "total_apr", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
1579
1579
|
{ no: 40, name: "protocol_fee", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
|
|
1580
1580
|
]);
|
|
1581
|
+
/**
|
|
1582
|
+
* A wallet's positions collapsed by token pair, returned by GetWalletPositions
|
|
1583
|
+
* when the request sets group=true. Every position in a group shares the pair
|
|
1584
|
+
* key (chain_id, token0_address, token1_address) after normalizing each chain's
|
|
1585
|
+
* wrapped native to native — so V2/V3/V4 and all fee tiers of the same pair land
|
|
1586
|
+
* together. Positions whose pool metadata could not be resolved (no token
|
|
1587
|
+
* identity) each form their own singleton group and leave the pair fields unset.
|
|
1588
|
+
*
|
|
1589
|
+
* @generated from message uniswap.liquidity.v2.PositionGroup
|
|
1590
|
+
*/
|
|
1591
|
+
export class PositionGroup extends Message {
|
|
1592
|
+
constructor(data) {
|
|
1593
|
+
super();
|
|
1594
|
+
/**
|
|
1595
|
+
* @generated from field: int32 chain_id = 1;
|
|
1596
|
+
*/
|
|
1597
|
+
this.chainId = 0;
|
|
1598
|
+
/**
|
|
1599
|
+
* The grouped positions, in the request's sort/default order. Each carries its
|
|
1600
|
+
* own raw pool tokens (a WETH position still reports WETH), untouched by the
|
|
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.
|
|
1604
|
+
*
|
|
1605
|
+
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 6;
|
|
1606
|
+
*/
|
|
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;
|
|
1615
|
+
proto3.util.initPartial(data, this);
|
|
1616
|
+
}
|
|
1617
|
+
static fromBinary(bytes, options) {
|
|
1618
|
+
return new PositionGroup().fromBinary(bytes, options);
|
|
1619
|
+
}
|
|
1620
|
+
static fromJson(jsonValue, options) {
|
|
1621
|
+
return new PositionGroup().fromJson(jsonValue, options);
|
|
1622
|
+
}
|
|
1623
|
+
static fromJsonString(jsonString, options) {
|
|
1624
|
+
return new PositionGroup().fromJsonString(jsonString, options);
|
|
1625
|
+
}
|
|
1626
|
+
static equals(a, b) {
|
|
1627
|
+
return proto3.util.equals(PositionGroup, a, b);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
PositionGroup.runtime = proto3;
|
|
1631
|
+
PositionGroup.typeName = "uniswap.liquidity.v2.PositionGroup";
|
|
1632
|
+
PositionGroup.fields = proto3.util.newFieldList(() => [
|
|
1633
|
+
{ no: 1, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1634
|
+
{ no: 2, name: "token0_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1635
|
+
{ no: 3, name: "token1_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1636
|
+
{ no: 4, name: "token0_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
1637
|
+
{ no: 5, name: "token1_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
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 },
|
|
1692
|
+
]);
|
|
1581
1693
|
/**
|
|
1582
1694
|
* Keyset cursor for GetWalletPositions. position_key is the last returned
|
|
1583
1695
|
* position's key within (chain_id, version): V2 pair address, V3 token id,
|