@uniswap/client-liquidity 1.4.7 → 1.4.8
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, PoolListCursor, PoolPricePoint, PoolReference, PoolSortBy, PoolSummary, PoolTick, PoolVolumeBucket, Position, PositionListCursor, PositionModifier, PositionPriceBounds, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
4
|
+
import { ApprovalTransactionRequest, CreatePoolParameters, CreatePositionExistingPoolParameters, CreateToken, GasUrgency, HistoryDuration, HookEntry, LPAction, LPToken, PoolListCursor, PoolPricePoint, PoolReference, PoolSortBy, PoolSummary, PoolTick, PoolVolumeBucket, Position, PositionListCursor, PositionModifier, PositionPriceBounds, PositionSortBy, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
5
5
|
/**
|
|
6
6
|
* MigrateV2ToV3LPPosition
|
|
7
7
|
*
|
|
@@ -1164,6 +1164,19 @@ export declare class GetWalletPositionsRequest extends Message<GetWalletPosition
|
|
|
1164
1164
|
* @generated from field: repeated uniswap.liquidity.v2.RangeStatus range_statuses = 8;
|
|
1165
1165
|
*/
|
|
1166
1166
|
rangeStatuses: RangeStatus[];
|
|
1167
|
+
/**
|
|
1168
|
+
* Sort order. Unset/UNSPECIFIED = default (chain, version, key). FEES/APR are
|
|
1169
|
+
* accepted but currently no-op (see PositionSortBy).
|
|
1170
|
+
*
|
|
1171
|
+
* @generated from field: optional uniswap.liquidity.v2.PositionSortBy sort_by = 9;
|
|
1172
|
+
*/
|
|
1173
|
+
sortBy?: PositionSortBy;
|
|
1174
|
+
/**
|
|
1175
|
+
* Sort direction; defaults to descending (newest / largest first).
|
|
1176
|
+
*
|
|
1177
|
+
* @generated from field: optional bool ascending = 10;
|
|
1178
|
+
*/
|
|
1179
|
+
ascending?: boolean;
|
|
1167
1180
|
constructor(data?: PartialMessage<GetWalletPositionsRequest>);
|
|
1168
1181
|
static readonly runtime: typeof proto3;
|
|
1169
1182
|
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, PoolListCursor, PoolPricePoint, PoolReference, PoolSortBy, PoolSummary, PoolTick, PoolVolumeBucket, Position, PositionListCursor, PositionModifier, PositionPriceBounds, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
7
|
+
import { ApprovalTransactionRequest, CreatePoolParameters, CreatePositionExistingPoolParameters, CreateToken, GasUrgency, HistoryDuration, HookEntry, LPAction, LPToken, PoolListCursor, PoolPricePoint, PoolReference, PoolSortBy, PoolSummary, PoolTick, PoolVolumeBucket, Position, PositionListCursor, PositionModifier, PositionPriceBounds, PositionSortBy, PositionStatus, PositionTickBounds, RangeStatus, V2PoolParameters } from "./types_pb.js";
|
|
8
8
|
/**
|
|
9
9
|
* MigrateV2ToV3LPPosition
|
|
10
10
|
*
|
|
@@ -1223,6 +1223,8 @@ GetWalletPositionsRequest.fields = proto3.util.newFieldList(() => [
|
|
|
1223
1223
|
{ no: 6, name: "statuses", kind: "enum", T: proto3.getEnumType(PositionStatus), repeated: true },
|
|
1224
1224
|
{ no: 7, name: "modifier", kind: "message", T: PositionModifier, opt: true },
|
|
1225
1225
|
{ no: 8, name: "range_statuses", kind: "enum", T: proto3.getEnumType(RangeStatus), repeated: true },
|
|
1226
|
+
{ no: 9, name: "sort_by", kind: "enum", T: proto3.getEnumType(PositionSortBy), opt: true },
|
|
1227
|
+
{ no: 10, name: "ascending", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
|
|
1226
1228
|
]);
|
|
1227
1229
|
/**
|
|
1228
1230
|
* @generated from message uniswap.liquidity.v2.GetWalletPositionsResponse
|
|
@@ -185,6 +185,52 @@ export declare enum RangeStatus {
|
|
|
185
185
|
*/
|
|
186
186
|
OUT_OF_RANGE = 2
|
|
187
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* Sort order for GetWalletPositions. UNSPECIFIED keeps the default deterministic
|
|
190
|
+
* order (chain asc, version, per-version key). Each real sort still resolves
|
|
191
|
+
* ties by that key so the keyset cursor stays stable.
|
|
192
|
+
*
|
|
193
|
+
* @generated from enum uniswap.liquidity.v2.PositionSortBy
|
|
194
|
+
*/
|
|
195
|
+
export declare enum PositionSortBy {
|
|
196
|
+
/**
|
|
197
|
+
* @generated from enum value: POSITION_SORT_BY_UNSPECIFIED = 0;
|
|
198
|
+
*/
|
|
199
|
+
UNSPECIFIED = 0,
|
|
200
|
+
/**
|
|
201
|
+
* created_at_timestamp — the position's on-chain creation time.
|
|
202
|
+
*
|
|
203
|
+
* @generated from enum value: POSITION_SORT_BY_CREATED_AT = 1;
|
|
204
|
+
*/
|
|
205
|
+
CREATED_AT = 1,
|
|
206
|
+
/**
|
|
207
|
+
* Range proximity, derived purely from ticks (current tick vs the position's
|
|
208
|
+
* [tick_lower, tick_upper)). V3/V4 only; V2 sorts last.
|
|
209
|
+
*
|
|
210
|
+
* @generated from enum value: POSITION_SORT_BY_DISTRIBUTION = 2;
|
|
211
|
+
*/
|
|
212
|
+
DISTRIBUTION = 2,
|
|
213
|
+
/**
|
|
214
|
+
* Position USD value, computed read-time (position amounts * token prices —
|
|
215
|
+
* "sort after join", not materialized). V3/V4 amounts come from pool state +
|
|
216
|
+
* liquidity; V2 from the LP-token share of pair reserves.
|
|
217
|
+
*
|
|
218
|
+
* @generated from enum value: POSITION_SORT_BY_LIQUIDITY = 3;
|
|
219
|
+
*/
|
|
220
|
+
LIQUIDITY = 3,
|
|
221
|
+
/**
|
|
222
|
+
* NO-OP: uncollected-fee data is not ingested yet.
|
|
223
|
+
*
|
|
224
|
+
* @generated from enum value: POSITION_SORT_BY_FEES = 4;
|
|
225
|
+
*/
|
|
226
|
+
FEES = 4,
|
|
227
|
+
/**
|
|
228
|
+
* NO-OP: APR depends on fee data that is not ingested yet.
|
|
229
|
+
*
|
|
230
|
+
* @generated from enum value: POSITION_SORT_BY_APR = 5;
|
|
231
|
+
*/
|
|
232
|
+
APR = 5
|
|
233
|
+
}
|
|
188
234
|
/**
|
|
189
235
|
* @generated from message uniswap.liquidity.v2.LPToken
|
|
190
236
|
*/
|
|
@@ -1048,6 +1094,8 @@ export declare class Position extends Message<Position> {
|
|
|
1048
1094
|
*/
|
|
1049
1095
|
export declare class PositionListCursor extends Message<PositionListCursor> {
|
|
1050
1096
|
/**
|
|
1097
|
+
* Default (unsorted) order uses a keyset cursor: (chain, version, key).
|
|
1098
|
+
*
|
|
1051
1099
|
* @generated from field: int32 chain_id = 1;
|
|
1052
1100
|
*/
|
|
1053
1101
|
chainId: number;
|
|
@@ -1059,6 +1107,14 @@ export declare class PositionListCursor extends Message<PositionListCursor> {
|
|
|
1059
1107
|
* @generated from field: string position_key = 3;
|
|
1060
1108
|
*/
|
|
1061
1109
|
positionKey: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* Sorted order (sort_by set) uses an offset cursor instead: the count already
|
|
1112
|
+
* returned. A wallet's positions are a bounded set, so sorted requests read +
|
|
1113
|
+
* sort the whole set and page by offset. Unset in default order.
|
|
1114
|
+
*
|
|
1115
|
+
* @generated from field: optional int32 offset = 4;
|
|
1116
|
+
*/
|
|
1117
|
+
offset?: number;
|
|
1062
1118
|
constructor(data?: PartialMessage<PositionListCursor>);
|
|
1063
1119
|
static readonly runtime: typeof proto3;
|
|
1064
1120
|
static readonly typeName = "uniswap.liquidity.v2.PositionListCursor";
|
|
@@ -245,6 +245,62 @@ proto3.util.setEnumType(RangeStatus, "uniswap.liquidity.v2.RangeStatus", [
|
|
|
245
245
|
{ no: 1, name: "RANGE_STATUS_IN_RANGE" },
|
|
246
246
|
{ no: 2, name: "RANGE_STATUS_OUT_OF_RANGE" },
|
|
247
247
|
]);
|
|
248
|
+
/**
|
|
249
|
+
* Sort order for GetWalletPositions. UNSPECIFIED keeps the default deterministic
|
|
250
|
+
* order (chain asc, version, per-version key). Each real sort still resolves
|
|
251
|
+
* ties by that key so the keyset cursor stays stable.
|
|
252
|
+
*
|
|
253
|
+
* @generated from enum uniswap.liquidity.v2.PositionSortBy
|
|
254
|
+
*/
|
|
255
|
+
export var PositionSortBy;
|
|
256
|
+
(function (PositionSortBy) {
|
|
257
|
+
/**
|
|
258
|
+
* @generated from enum value: POSITION_SORT_BY_UNSPECIFIED = 0;
|
|
259
|
+
*/
|
|
260
|
+
PositionSortBy[PositionSortBy["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
261
|
+
/**
|
|
262
|
+
* created_at_timestamp — the position's on-chain creation time.
|
|
263
|
+
*
|
|
264
|
+
* @generated from enum value: POSITION_SORT_BY_CREATED_AT = 1;
|
|
265
|
+
*/
|
|
266
|
+
PositionSortBy[PositionSortBy["CREATED_AT"] = 1] = "CREATED_AT";
|
|
267
|
+
/**
|
|
268
|
+
* Range proximity, derived purely from ticks (current tick vs the position's
|
|
269
|
+
* [tick_lower, tick_upper)). V3/V4 only; V2 sorts last.
|
|
270
|
+
*
|
|
271
|
+
* @generated from enum value: POSITION_SORT_BY_DISTRIBUTION = 2;
|
|
272
|
+
*/
|
|
273
|
+
PositionSortBy[PositionSortBy["DISTRIBUTION"] = 2] = "DISTRIBUTION";
|
|
274
|
+
/**
|
|
275
|
+
* Position USD value, computed read-time (position amounts * token prices —
|
|
276
|
+
* "sort after join", not materialized). V3/V4 amounts come from pool state +
|
|
277
|
+
* liquidity; V2 from the LP-token share of pair reserves.
|
|
278
|
+
*
|
|
279
|
+
* @generated from enum value: POSITION_SORT_BY_LIQUIDITY = 3;
|
|
280
|
+
*/
|
|
281
|
+
PositionSortBy[PositionSortBy["LIQUIDITY"] = 3] = "LIQUIDITY";
|
|
282
|
+
/**
|
|
283
|
+
* NO-OP: uncollected-fee data is not ingested yet.
|
|
284
|
+
*
|
|
285
|
+
* @generated from enum value: POSITION_SORT_BY_FEES = 4;
|
|
286
|
+
*/
|
|
287
|
+
PositionSortBy[PositionSortBy["FEES"] = 4] = "FEES";
|
|
288
|
+
/**
|
|
289
|
+
* NO-OP: APR depends on fee data that is not ingested yet.
|
|
290
|
+
*
|
|
291
|
+
* @generated from enum value: POSITION_SORT_BY_APR = 5;
|
|
292
|
+
*/
|
|
293
|
+
PositionSortBy[PositionSortBy["APR"] = 5] = "APR";
|
|
294
|
+
})(PositionSortBy || (PositionSortBy = {}));
|
|
295
|
+
// Retrieve enum metadata with: proto3.getEnumType(PositionSortBy)
|
|
296
|
+
proto3.util.setEnumType(PositionSortBy, "uniswap.liquidity.v2.PositionSortBy", [
|
|
297
|
+
{ no: 0, name: "POSITION_SORT_BY_UNSPECIFIED" },
|
|
298
|
+
{ no: 1, name: "POSITION_SORT_BY_CREATED_AT" },
|
|
299
|
+
{ no: 2, name: "POSITION_SORT_BY_DISTRIBUTION" },
|
|
300
|
+
{ no: 3, name: "POSITION_SORT_BY_LIQUIDITY" },
|
|
301
|
+
{ no: 4, name: "POSITION_SORT_BY_FEES" },
|
|
302
|
+
{ no: 5, name: "POSITION_SORT_BY_APR" },
|
|
303
|
+
]);
|
|
248
304
|
/**
|
|
249
305
|
* @generated from message uniswap.liquidity.v2.LPToken
|
|
250
306
|
*/
|
|
@@ -1292,6 +1348,8 @@ export class PositionListCursor extends Message {
|
|
|
1292
1348
|
constructor(data) {
|
|
1293
1349
|
super();
|
|
1294
1350
|
/**
|
|
1351
|
+
* Default (unsorted) order uses a keyset cursor: (chain, version, key).
|
|
1352
|
+
*
|
|
1295
1353
|
* @generated from field: int32 chain_id = 1;
|
|
1296
1354
|
*/
|
|
1297
1355
|
this.chainId = 0;
|
|
@@ -1324,6 +1382,7 @@ PositionListCursor.fields = proto3.util.newFieldList(() => [
|
|
|
1324
1382
|
{ no: 1, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1325
1383
|
{ no: 2, name: "version", kind: "enum", T: proto3.getEnumType(Protocols) },
|
|
1326
1384
|
{ no: 3, name: "position_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1385
|
+
{ no: 4, name: "offset", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
1327
1386
|
]);
|
|
1328
1387
|
/**
|
|
1329
1388
|
* One initialized tick of a V3/V4 pool's liquidity distribution.
|