@uniswap/client-liquidity 1.4.36 → 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.
- package/dist/uniswap/liquidity/v1/types_pb.d.ts +40 -1
- package/dist/uniswap/liquidity/v1/types_pb.js +48 -0
- package/dist/uniswap/liquidity/v2/api_pb.d.ts +24 -1
- package/dist/uniswap/liquidity/v2/api_pb.js +11 -1
- package/dist/uniswap/liquidity/v2/types_pb.d.ts +53 -0
- package/dist/uniswap/liquidity/v2/types_pb.js +50 -0
- package/package.json +1 -1
|
@@ -217,7 +217,11 @@ export declare enum ValidationType {
|
|
|
217
217
|
/**
|
|
218
218
|
* @generated from enum value: ERC_1155_GATEWAY = 2;
|
|
219
219
|
*/
|
|
220
|
-
ERC_1155_GATEWAY = 2
|
|
220
|
+
ERC_1155_GATEWAY = 2,
|
|
221
|
+
/**
|
|
222
|
+
* @generated from enum value: MAX_BID_PRICE = 3;
|
|
223
|
+
*/
|
|
224
|
+
MAX_BID_PRICE = 3
|
|
221
225
|
}
|
|
222
226
|
/**
|
|
223
227
|
* CORE TYPE OBJECTS
|
|
@@ -1942,6 +1946,31 @@ export declare class Erc1155GateData extends Message<Erc1155GateData> {
|
|
|
1942
1946
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Erc1155GateData;
|
|
1943
1947
|
static equals(a: Erc1155GateData | PlainMessage<Erc1155GateData> | undefined, b: Erc1155GateData | PlainMessage<Erc1155GateData> | undefined): boolean;
|
|
1944
1948
|
}
|
|
1949
|
+
/**
|
|
1950
|
+
* An auction-wide ceiling on the price a bid may be submitted at, enforced by a
|
|
1951
|
+
* validation hook exposing `maxBidPrice()`. Because the auction requires bids to be
|
|
1952
|
+
* strictly above the clearing price, no new bid can be placed once the clearing price
|
|
1953
|
+
* reaches this ceiling -- existing bids stay active and partially fill.
|
|
1954
|
+
*
|
|
1955
|
+
* @generated from message uniswap.liquidity.v1.MaxBidPriceData
|
|
1956
|
+
*/
|
|
1957
|
+
export declare class MaxBidPriceData extends Message<MaxBidPriceData> {
|
|
1958
|
+
/**
|
|
1959
|
+
* The ceiling as a Q96 fixed-point price, in the auction's bid-currency units.
|
|
1960
|
+
* Decimal string because the value does not fit a uint64.
|
|
1961
|
+
*
|
|
1962
|
+
* @generated from field: string max_bid_price_q96 = 1;
|
|
1963
|
+
*/
|
|
1964
|
+
maxBidPriceQ96: string;
|
|
1965
|
+
constructor(data?: PartialMessage<MaxBidPriceData>);
|
|
1966
|
+
static readonly runtime: typeof proto3;
|
|
1967
|
+
static readonly typeName = "uniswap.liquidity.v1.MaxBidPriceData";
|
|
1968
|
+
static readonly fields: FieldList;
|
|
1969
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MaxBidPriceData;
|
|
1970
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MaxBidPriceData;
|
|
1971
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MaxBidPriceData;
|
|
1972
|
+
static equals(a: MaxBidPriceData | PlainMessage<MaxBidPriceData> | undefined, b: MaxBidPriceData | PlainMessage<MaxBidPriceData> | undefined): boolean;
|
|
1973
|
+
}
|
|
1945
1974
|
/**
|
|
1946
1975
|
* @generated from message uniswap.liquidity.v1.AuctionValidation
|
|
1947
1976
|
*/
|
|
@@ -1965,11 +1994,21 @@ export declare class AuctionValidation extends Message<AuctionValidation> {
|
|
|
1965
1994
|
*/
|
|
1966
1995
|
value: Erc1155GateData;
|
|
1967
1996
|
case: "erc1155GateData";
|
|
1997
|
+
} | {
|
|
1998
|
+
/**
|
|
1999
|
+
* @generated from field: uniswap.liquidity.v1.MaxBidPriceData max_bid_price_data = 5;
|
|
2000
|
+
*/
|
|
2001
|
+
value: MaxBidPriceData;
|
|
2002
|
+
case: "maxBidPriceData";
|
|
1968
2003
|
} | {
|
|
1969
2004
|
case: undefined;
|
|
1970
2005
|
value?: undefined;
|
|
1971
2006
|
};
|
|
1972
2007
|
/**
|
|
2008
|
+
* Whether this validation permits the wallet to bid. Always true for MAX_BID_PRICE:
|
|
2009
|
+
* the ceiling is a property of the auction, not of the wallet, so it must not gate
|
|
2010
|
+
* wallet verification. Clients derive the "cap reached" state from the value itself.
|
|
2011
|
+
*
|
|
1973
2012
|
* @generated from field: bool validation_passed = 4;
|
|
1974
2013
|
*/
|
|
1975
2014
|
validationPassed: boolean;
|
|
@@ -288,12 +288,17 @@ export var ValidationType;
|
|
|
288
288
|
* @generated from enum value: ERC_1155_GATEWAY = 2;
|
|
289
289
|
*/
|
|
290
290
|
ValidationType[ValidationType["ERC_1155_GATEWAY"] = 2] = "ERC_1155_GATEWAY";
|
|
291
|
+
/**
|
|
292
|
+
* @generated from enum value: MAX_BID_PRICE = 3;
|
|
293
|
+
*/
|
|
294
|
+
ValidationType[ValidationType["MAX_BID_PRICE"] = 3] = "MAX_BID_PRICE";
|
|
291
295
|
})(ValidationType || (ValidationType = {}));
|
|
292
296
|
// Retrieve enum metadata with: proto3.getEnumType(ValidationType)
|
|
293
297
|
proto3.util.setEnumType(ValidationType, "uniswap.liquidity.v1.ValidationType", [
|
|
294
298
|
{ no: 0, name: "VALIDATION_TYPE_UNSPECIFIED" },
|
|
295
299
|
{ no: 1, name: "KYC_VERIFICATION" },
|
|
296
300
|
{ no: 2, name: "ERC_1155_GATEWAY" },
|
|
301
|
+
{ no: 3, name: "MAX_BID_PRICE" },
|
|
297
302
|
]);
|
|
298
303
|
/**
|
|
299
304
|
* CORE TYPE OBJECTS
|
|
@@ -2200,6 +2205,44 @@ Erc1155GateData.typeName = "uniswap.liquidity.v1.Erc1155GateData";
|
|
|
2200
2205
|
Erc1155GateData.fields = proto3.util.newFieldList(() => [
|
|
2201
2206
|
{ no: 1, name: "expiration_block", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
2202
2207
|
]);
|
|
2208
|
+
/**
|
|
2209
|
+
* An auction-wide ceiling on the price a bid may be submitted at, enforced by a
|
|
2210
|
+
* validation hook exposing `maxBidPrice()`. Because the auction requires bids to be
|
|
2211
|
+
* strictly above the clearing price, no new bid can be placed once the clearing price
|
|
2212
|
+
* reaches this ceiling -- existing bids stay active and partially fill.
|
|
2213
|
+
*
|
|
2214
|
+
* @generated from message uniswap.liquidity.v1.MaxBidPriceData
|
|
2215
|
+
*/
|
|
2216
|
+
export class MaxBidPriceData extends Message {
|
|
2217
|
+
constructor(data) {
|
|
2218
|
+
super();
|
|
2219
|
+
/**
|
|
2220
|
+
* The ceiling as a Q96 fixed-point price, in the auction's bid-currency units.
|
|
2221
|
+
* Decimal string because the value does not fit a uint64.
|
|
2222
|
+
*
|
|
2223
|
+
* @generated from field: string max_bid_price_q96 = 1;
|
|
2224
|
+
*/
|
|
2225
|
+
this.maxBidPriceQ96 = "";
|
|
2226
|
+
proto3.util.initPartial(data, this);
|
|
2227
|
+
}
|
|
2228
|
+
static fromBinary(bytes, options) {
|
|
2229
|
+
return new MaxBidPriceData().fromBinary(bytes, options);
|
|
2230
|
+
}
|
|
2231
|
+
static fromJson(jsonValue, options) {
|
|
2232
|
+
return new MaxBidPriceData().fromJson(jsonValue, options);
|
|
2233
|
+
}
|
|
2234
|
+
static fromJsonString(jsonString, options) {
|
|
2235
|
+
return new MaxBidPriceData().fromJsonString(jsonString, options);
|
|
2236
|
+
}
|
|
2237
|
+
static equals(a, b) {
|
|
2238
|
+
return proto3.util.equals(MaxBidPriceData, a, b);
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
MaxBidPriceData.runtime = proto3;
|
|
2242
|
+
MaxBidPriceData.typeName = "uniswap.liquidity.v1.MaxBidPriceData";
|
|
2243
|
+
MaxBidPriceData.fields = proto3.util.newFieldList(() => [
|
|
2244
|
+
{ no: 1, name: "max_bid_price_q96", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
2245
|
+
]);
|
|
2203
2246
|
/**
|
|
2204
2247
|
* @generated from message uniswap.liquidity.v1.AuctionValidation
|
|
2205
2248
|
*/
|
|
@@ -2215,6 +2258,10 @@ export class AuctionValidation extends Message {
|
|
|
2215
2258
|
*/
|
|
2216
2259
|
this.data = { case: undefined };
|
|
2217
2260
|
/**
|
|
2261
|
+
* Whether this validation permits the wallet to bid. Always true for MAX_BID_PRICE:
|
|
2262
|
+
* the ceiling is a property of the auction, not of the wallet, so it must not gate
|
|
2263
|
+
* wallet verification. Clients derive the "cap reached" state from the value itself.
|
|
2264
|
+
*
|
|
2218
2265
|
* @generated from field: bool validation_passed = 4;
|
|
2219
2266
|
*/
|
|
2220
2267
|
this.validationPassed = false;
|
|
@@ -2239,5 +2286,6 @@ AuctionValidation.fields = proto3.util.newFieldList(() => [
|
|
|
2239
2286
|
{ no: 1, name: "validation_type", kind: "enum", T: proto3.getEnumType(ValidationType) },
|
|
2240
2287
|
{ no: 2, name: "kyc_verification_data", kind: "message", T: PredicateKycVerificationData, oneof: "data" },
|
|
2241
2288
|
{ no: 3, name: "erc_1155_gate_data", kind: "message", T: Erc1155GateData, oneof: "data" },
|
|
2289
|
+
{ no: 5, name: "max_bid_price_data", kind: "message", T: MaxBidPriceData, oneof: "data" },
|
|
2242
2290
|
{ no: 4, name: "validation_passed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
|
|
2243
2291
|
]);
|
|
@@ -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,
|