@uniswap/client-liquidity 1.4.37 → 1.4.38
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, PositionListCursor, PositionModifier, PositionPriceBounds, PositionSortBy, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
5
5
|
/**
|
|
6
6
|
* MigrateV2ToV3LPPosition
|
|
7
7
|
*
|
|
@@ -1172,6 +1172,21 @@ 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;
|
|
1175
1190
|
constructor(data?: PartialMessage<GetWalletPositionsRequest>);
|
|
1176
1191
|
static readonly runtime: typeof proto3;
|
|
1177
1192
|
static readonly typeName = "uniswap.liquidity.v2.GetWalletPositionsRequest";
|
|
@@ -1186,6 +1201,8 @@ export declare class GetWalletPositionsRequest extends Message<GetWalletPosition
|
|
|
1186
1201
|
*/
|
|
1187
1202
|
export declare class GetWalletPositionsResponse extends Message<GetWalletPositionsResponse> {
|
|
1188
1203
|
/**
|
|
1204
|
+
* Populated when the request did not set group=true.
|
|
1205
|
+
*
|
|
1189
1206
|
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 1;
|
|
1190
1207
|
*/
|
|
1191
1208
|
positions: Position[];
|
|
@@ -1193,6 +1210,12 @@ export declare class GetWalletPositionsResponse extends Message<GetWalletPositio
|
|
|
1193
1210
|
* @generated from field: optional uniswap.liquidity.v2.PositionListCursor next_cursor = 2;
|
|
1194
1211
|
*/
|
|
1195
1212
|
nextCursor?: PositionListCursor;
|
|
1213
|
+
/**
|
|
1214
|
+
* Populated when the request set group=true (and `positions` is then empty).
|
|
1215
|
+
*
|
|
1216
|
+
* @generated from field: repeated uniswap.liquidity.v2.PositionGroup groups = 3;
|
|
1217
|
+
*/
|
|
1218
|
+
groups: PositionGroup[];
|
|
1196
1219
|
constructor(data?: PartialMessage<GetWalletPositionsResponse>);
|
|
1197
1220
|
static readonly runtime: typeof proto3;
|
|
1198
1221
|
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, PositionListCursor, PositionModifier, PositionPriceBounds, PositionSortBy, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
8
8
|
/**
|
|
9
9
|
* MigrateV2ToV3LPPosition
|
|
10
10
|
*
|
|
@@ -1221,6 +1221,7 @@ 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 },
|
|
1224
1225
|
]);
|
|
1225
1226
|
/**
|
|
1226
1227
|
* @generated from message uniswap.liquidity.v2.GetWalletPositionsResponse
|
|
@@ -1229,9 +1230,17 @@ export class GetWalletPositionsResponse extends Message {
|
|
|
1229
1230
|
constructor(data) {
|
|
1230
1231
|
super();
|
|
1231
1232
|
/**
|
|
1233
|
+
* Populated when the request did not set group=true.
|
|
1234
|
+
*
|
|
1232
1235
|
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 1;
|
|
1233
1236
|
*/
|
|
1234
1237
|
this.positions = [];
|
|
1238
|
+
/**
|
|
1239
|
+
* Populated when the request set group=true (and `positions` is then empty).
|
|
1240
|
+
*
|
|
1241
|
+
* @generated from field: repeated uniswap.liquidity.v2.PositionGroup groups = 3;
|
|
1242
|
+
*/
|
|
1243
|
+
this.groups = [];
|
|
1235
1244
|
proto3.util.initPartial(data, this);
|
|
1236
1245
|
}
|
|
1237
1246
|
static fromBinary(bytes, options) {
|
|
@@ -1252,6 +1261,7 @@ GetWalletPositionsResponse.typeName = "uniswap.liquidity.v2.GetWalletPositionsRe
|
|
|
1252
1261
|
GetWalletPositionsResponse.fields = proto3.util.newFieldList(() => [
|
|
1253
1262
|
{ no: 1, name: "positions", kind: "message", T: Position, repeated: true },
|
|
1254
1263
|
{ no: 2, name: "next_cursor", kind: "message", T: PositionListCursor, opt: true },
|
|
1264
|
+
{ no: 3, name: "groups", kind: "message", T: PositionGroup, repeated: true },
|
|
1255
1265
|
]);
|
|
1256
1266
|
/**
|
|
1257
1267
|
* GetWalletPositionsBalance — aggregate USD value of a wallet's LP positions
|
|
@@ -1439,6 +1439,59 @@ 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.
|
|
1482
|
+
*
|
|
1483
|
+
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 6;
|
|
1484
|
+
*/
|
|
1485
|
+
positions: Position[];
|
|
1486
|
+
constructor(data?: PartialMessage<PositionGroup>);
|
|
1487
|
+
static readonly runtime: typeof proto3;
|
|
1488
|
+
static readonly typeName = "uniswap.liquidity.v2.PositionGroup";
|
|
1489
|
+
static readonly fields: FieldList;
|
|
1490
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PositionGroup;
|
|
1491
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PositionGroup;
|
|
1492
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PositionGroup;
|
|
1493
|
+
static equals(a: PositionGroup | PlainMessage<PositionGroup> | undefined, b: PositionGroup | PlainMessage<PositionGroup> | undefined): boolean;
|
|
1494
|
+
}
|
|
1442
1495
|
/**
|
|
1443
1496
|
* Keyset cursor for GetWalletPositions. position_key is the last returned
|
|
1444
1497
|
* position's key within (chain_id, version): V2 pair address, V3 token id,
|
|
@@ -1578,6 +1578,56 @@ 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.
|
|
1602
|
+
*
|
|
1603
|
+
* @generated from field: repeated uniswap.liquidity.v2.Position positions = 6;
|
|
1604
|
+
*/
|
|
1605
|
+
this.positions = [];
|
|
1606
|
+
proto3.util.initPartial(data, this);
|
|
1607
|
+
}
|
|
1608
|
+
static fromBinary(bytes, options) {
|
|
1609
|
+
return new PositionGroup().fromBinary(bytes, options);
|
|
1610
|
+
}
|
|
1611
|
+
static fromJson(jsonValue, options) {
|
|
1612
|
+
return new PositionGroup().fromJson(jsonValue, options);
|
|
1613
|
+
}
|
|
1614
|
+
static fromJsonString(jsonString, options) {
|
|
1615
|
+
return new PositionGroup().fromJsonString(jsonString, options);
|
|
1616
|
+
}
|
|
1617
|
+
static equals(a, b) {
|
|
1618
|
+
return proto3.util.equals(PositionGroup, a, b);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
PositionGroup.runtime = proto3;
|
|
1622
|
+
PositionGroup.typeName = "uniswap.liquidity.v2.PositionGroup";
|
|
1623
|
+
PositionGroup.fields = proto3.util.newFieldList(() => [
|
|
1624
|
+
{ no: 1, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1625
|
+
{ no: 2, name: "token0_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1626
|
+
{ no: 3, name: "token1_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1627
|
+
{ no: 4, name: "token0_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
1628
|
+
{ no: 5, name: "token1_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
1629
|
+
{ no: 6, name: "positions", kind: "message", T: Position, repeated: true },
|
|
1630
|
+
]);
|
|
1581
1631
|
/**
|
|
1582
1632
|
* Keyset cursor for GetWalletPositions. position_key is the last returned
|
|
1583
1633
|
* position's key within (chain_id, version): V2 pair address, V3 token id,
|