@uniswap/client-liquidity 1.4.5 → 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, 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
|
*
|
|
@@ -1155,6 +1155,28 @@ export declare class GetWalletPositionsRequest extends Message<GetWalletPosition
|
|
|
1155
1155
|
* @generated from field: optional uniswap.liquidity.v2.PositionModifier modifier = 7;
|
|
1156
1156
|
*/
|
|
1157
1157
|
modifier?: PositionModifier;
|
|
1158
|
+
/**
|
|
1159
|
+
* In/out-of-range filter over open concentrated (V3/V4) positions. Empty = no
|
|
1160
|
+
* range filter. Values union. Composes with `statuses` and `modifier`: e.g.
|
|
1161
|
+
* statuses=[OPEN] + range_statuses=[IN_RANGE] returns open, in-range,
|
|
1162
|
+
* non-spam positions. V2 matches no range bucket.
|
|
1163
|
+
*
|
|
1164
|
+
* @generated from field: repeated uniswap.liquidity.v2.RangeStatus range_statuses = 8;
|
|
1165
|
+
*/
|
|
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;
|
|
1158
1180
|
constructor(data?: PartialMessage<GetWalletPositionsRequest>);
|
|
1159
1181
|
static readonly runtime: typeof proto3;
|
|
1160
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, 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
|
*
|
|
@@ -1188,6 +1188,15 @@ export class GetWalletPositionsRequest extends Message {
|
|
|
1188
1188
|
* @generated from field: repeated uniswap.liquidity.v2.PositionStatus statuses = 6;
|
|
1189
1189
|
*/
|
|
1190
1190
|
this.statuses = [];
|
|
1191
|
+
/**
|
|
1192
|
+
* In/out-of-range filter over open concentrated (V3/V4) positions. Empty = no
|
|
1193
|
+
* range filter. Values union. Composes with `statuses` and `modifier`: e.g.
|
|
1194
|
+
* statuses=[OPEN] + range_statuses=[IN_RANGE] returns open, in-range,
|
|
1195
|
+
* non-spam positions. V2 matches no range bucket.
|
|
1196
|
+
*
|
|
1197
|
+
* @generated from field: repeated uniswap.liquidity.v2.RangeStatus range_statuses = 8;
|
|
1198
|
+
*/
|
|
1199
|
+
this.rangeStatuses = [];
|
|
1191
1200
|
proto3.util.initPartial(data, this);
|
|
1192
1201
|
}
|
|
1193
1202
|
static fromBinary(bytes, options) {
|
|
@@ -1213,6 +1222,9 @@ GetWalletPositionsRequest.fields = proto3.util.newFieldList(() => [
|
|
|
1213
1222
|
{ no: 5, name: "cursor", kind: "message", T: PositionListCursor, opt: true },
|
|
1214
1223
|
{ no: 6, name: "statuses", kind: "enum", T: proto3.getEnumType(PositionStatus), repeated: true },
|
|
1215
1224
|
{ no: 7, name: "modifier", kind: "message", T: PositionModifier, opt: true },
|
|
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 },
|
|
1216
1228
|
]);
|
|
1217
1229
|
/**
|
|
1218
1230
|
* @generated from message uniswap.liquidity.v2.GetWalletPositionsResponse
|
|
@@ -154,6 +154,83 @@ export declare enum PositionStatus {
|
|
|
154
154
|
*/
|
|
155
155
|
HIDDEN = 3
|
|
156
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* In/out-of-range classification of an open concentrated (V3/V4) position,
|
|
159
|
+
* derived from the pool's current tick. This is a filter dimension separate
|
|
160
|
+
* from PositionStatus (lifecycle) and PositionModifier (spam visibility): a
|
|
161
|
+
* caller can ask for OPEN positions that are additionally IN_RANGE. V2 is
|
|
162
|
+
* full-range with no ticks, so it matches neither bucket.
|
|
163
|
+
*
|
|
164
|
+
* @generated from enum uniswap.liquidity.v2.RangeStatus
|
|
165
|
+
*/
|
|
166
|
+
export declare enum RangeStatus {
|
|
167
|
+
/**
|
|
168
|
+
* @generated from enum value: RANGE_STATUS_UNSPECIFIED = 0;
|
|
169
|
+
*/
|
|
170
|
+
UNSPECIFIED = 0,
|
|
171
|
+
/**
|
|
172
|
+
* An open concentrated position (V3/V4) whose pool has a current state row
|
|
173
|
+
* with tick within [tick_lower, tick_upper).
|
|
174
|
+
*
|
|
175
|
+
* @generated from enum value: RANGE_STATUS_IN_RANGE = 1;
|
|
176
|
+
*/
|
|
177
|
+
IN_RANGE = 1,
|
|
178
|
+
/**
|
|
179
|
+
* An open concentrated position (V3/V4) that is not IN_RANGE: the pool's
|
|
180
|
+
* current tick is outside [tick_lower, tick_upper), OR the pool has no state
|
|
181
|
+
* row yet (so a position is never dropped from both IN_RANGE and
|
|
182
|
+
* OUT_OF_RANGE while its pool awaits its first state event).
|
|
183
|
+
*
|
|
184
|
+
* @generated from enum value: RANGE_STATUS_OUT_OF_RANGE = 2;
|
|
185
|
+
*/
|
|
186
|
+
OUT_OF_RANGE = 2
|
|
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
|
+
}
|
|
157
234
|
/**
|
|
158
235
|
* @generated from message uniswap.liquidity.v2.LPToken
|
|
159
236
|
*/
|
|
@@ -1017,6 +1094,8 @@ export declare class Position extends Message<Position> {
|
|
|
1017
1094
|
*/
|
|
1018
1095
|
export declare class PositionListCursor extends Message<PositionListCursor> {
|
|
1019
1096
|
/**
|
|
1097
|
+
* Default (unsorted) order uses a keyset cursor: (chain, version, key).
|
|
1098
|
+
*
|
|
1020
1099
|
* @generated from field: int32 chain_id = 1;
|
|
1021
1100
|
*/
|
|
1022
1101
|
chainId: number;
|
|
@@ -1028,6 +1107,14 @@ export declare class PositionListCursor extends Message<PositionListCursor> {
|
|
|
1028
1107
|
* @generated from field: string position_key = 3;
|
|
1029
1108
|
*/
|
|
1030
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;
|
|
1031
1118
|
constructor(data?: PartialMessage<PositionListCursor>);
|
|
1032
1119
|
static readonly runtime: typeof proto3;
|
|
1033
1120
|
static readonly typeName = "uniswap.liquidity.v2.PositionListCursor";
|
|
@@ -207,6 +207,100 @@ proto3.util.setEnumType(PositionStatus, "uniswap.liquidity.v2.PositionStatus", [
|
|
|
207
207
|
{ no: 2, name: "POSITION_STATUS_CLOSED" },
|
|
208
208
|
{ no: 3, name: "POSITION_STATUS_HIDDEN" },
|
|
209
209
|
]);
|
|
210
|
+
/**
|
|
211
|
+
* In/out-of-range classification of an open concentrated (V3/V4) position,
|
|
212
|
+
* derived from the pool's current tick. This is a filter dimension separate
|
|
213
|
+
* from PositionStatus (lifecycle) and PositionModifier (spam visibility): a
|
|
214
|
+
* caller can ask for OPEN positions that are additionally IN_RANGE. V2 is
|
|
215
|
+
* full-range with no ticks, so it matches neither bucket.
|
|
216
|
+
*
|
|
217
|
+
* @generated from enum uniswap.liquidity.v2.RangeStatus
|
|
218
|
+
*/
|
|
219
|
+
export var RangeStatus;
|
|
220
|
+
(function (RangeStatus) {
|
|
221
|
+
/**
|
|
222
|
+
* @generated from enum value: RANGE_STATUS_UNSPECIFIED = 0;
|
|
223
|
+
*/
|
|
224
|
+
RangeStatus[RangeStatus["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
225
|
+
/**
|
|
226
|
+
* An open concentrated position (V3/V4) whose pool has a current state row
|
|
227
|
+
* with tick within [tick_lower, tick_upper).
|
|
228
|
+
*
|
|
229
|
+
* @generated from enum value: RANGE_STATUS_IN_RANGE = 1;
|
|
230
|
+
*/
|
|
231
|
+
RangeStatus[RangeStatus["IN_RANGE"] = 1] = "IN_RANGE";
|
|
232
|
+
/**
|
|
233
|
+
* An open concentrated position (V3/V4) that is not IN_RANGE: the pool's
|
|
234
|
+
* current tick is outside [tick_lower, tick_upper), OR the pool has no state
|
|
235
|
+
* row yet (so a position is never dropped from both IN_RANGE and
|
|
236
|
+
* OUT_OF_RANGE while its pool awaits its first state event).
|
|
237
|
+
*
|
|
238
|
+
* @generated from enum value: RANGE_STATUS_OUT_OF_RANGE = 2;
|
|
239
|
+
*/
|
|
240
|
+
RangeStatus[RangeStatus["OUT_OF_RANGE"] = 2] = "OUT_OF_RANGE";
|
|
241
|
+
})(RangeStatus || (RangeStatus = {}));
|
|
242
|
+
// Retrieve enum metadata with: proto3.getEnumType(RangeStatus)
|
|
243
|
+
proto3.util.setEnumType(RangeStatus, "uniswap.liquidity.v2.RangeStatus", [
|
|
244
|
+
{ no: 0, name: "RANGE_STATUS_UNSPECIFIED" },
|
|
245
|
+
{ no: 1, name: "RANGE_STATUS_IN_RANGE" },
|
|
246
|
+
{ no: 2, name: "RANGE_STATUS_OUT_OF_RANGE" },
|
|
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
|
+
]);
|
|
210
304
|
/**
|
|
211
305
|
* @generated from message uniswap.liquidity.v2.LPToken
|
|
212
306
|
*/
|
|
@@ -1254,6 +1348,8 @@ export class PositionListCursor extends Message {
|
|
|
1254
1348
|
constructor(data) {
|
|
1255
1349
|
super();
|
|
1256
1350
|
/**
|
|
1351
|
+
* Default (unsorted) order uses a keyset cursor: (chain, version, key).
|
|
1352
|
+
*
|
|
1257
1353
|
* @generated from field: int32 chain_id = 1;
|
|
1258
1354
|
*/
|
|
1259
1355
|
this.chainId = 0;
|
|
@@ -1286,6 +1382,7 @@ PositionListCursor.fields = proto3.util.newFieldList(() => [
|
|
|
1286
1382
|
{ no: 1, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1287
1383
|
{ no: 2, name: "version", kind: "enum", T: proto3.getEnumType(Protocols) },
|
|
1288
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 },
|
|
1289
1386
|
]);
|
|
1290
1387
|
/**
|
|
1291
1388
|
* One initialized tick of a V3/V4 pool's liquidity distribution.
|