@uniswap/client-liquidity 1.4.1 → 1.4.3
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/v2/api-LiquidityService_connectquery.d.ts +85 -1
- package/dist/uniswap/liquidity/v2/api-LiquidityService_connectquery.js +85 -1
- package/dist/uniswap/liquidity/v2/api_connect.d.ts +61 -1
- package/dist/uniswap/liquidity/v2/api_connect.js +61 -1
- package/dist/uniswap/liquidity/v2/api_pb.d.ts +306 -1
- package/dist/uniswap/liquidity/v2/api_pb.js +408 -1
- package/dist/uniswap/liquidity/v2/types_pb.d.ts +415 -0
- package/dist/uniswap/liquidity/v2/types_pb.js +446 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @generated from file uniswap/liquidity/v2/types.proto (package uniswap.liquidity.v2, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
// @ts-nocheck
|
|
5
|
-
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
5
|
+
import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
|
|
6
6
|
import { ChainId, Protocols, TransactionRequest } from "../v1/types_pb.js";
|
|
7
7
|
/**
|
|
8
8
|
* @generated from enum uniswap.liquidity.v2.LPAction
|
|
@@ -62,6 +62,38 @@ proto3.util.setEnumType(GasUrgency, "uniswap.liquidity.v2.GasUrgency", [
|
|
|
62
62
|
{ no: 2, name: "FAST" },
|
|
63
63
|
{ no: 3, name: "URGENT" },
|
|
64
64
|
]);
|
|
65
|
+
/**
|
|
66
|
+
* Pool protocol for read endpoints. Unlike v1.Protocols (V2=0), this follows
|
|
67
|
+
* the UNSPECIFIED-at-0 standard so an unset value can't silently mean V2.
|
|
68
|
+
*
|
|
69
|
+
* @generated from enum uniswap.liquidity.v2.PoolProtocol
|
|
70
|
+
*/
|
|
71
|
+
export var PoolProtocol;
|
|
72
|
+
(function (PoolProtocol) {
|
|
73
|
+
/**
|
|
74
|
+
* @generated from enum value: POOL_PROTOCOL_UNSPECIFIED = 0;
|
|
75
|
+
*/
|
|
76
|
+
PoolProtocol[PoolProtocol["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
77
|
+
/**
|
|
78
|
+
* @generated from enum value: POOL_PROTOCOL_V2 = 1;
|
|
79
|
+
*/
|
|
80
|
+
PoolProtocol[PoolProtocol["V2"] = 1] = "V2";
|
|
81
|
+
/**
|
|
82
|
+
* @generated from enum value: POOL_PROTOCOL_V3 = 2;
|
|
83
|
+
*/
|
|
84
|
+
PoolProtocol[PoolProtocol["V3"] = 2] = "V3";
|
|
85
|
+
/**
|
|
86
|
+
* @generated from enum value: POOL_PROTOCOL_V4 = 3;
|
|
87
|
+
*/
|
|
88
|
+
PoolProtocol[PoolProtocol["V4"] = 3] = "V4";
|
|
89
|
+
})(PoolProtocol || (PoolProtocol = {}));
|
|
90
|
+
// Retrieve enum metadata with: proto3.getEnumType(PoolProtocol)
|
|
91
|
+
proto3.util.setEnumType(PoolProtocol, "uniswap.liquidity.v2.PoolProtocol", [
|
|
92
|
+
{ no: 0, name: "POOL_PROTOCOL_UNSPECIFIED" },
|
|
93
|
+
{ no: 1, name: "POOL_PROTOCOL_V2" },
|
|
94
|
+
{ no: 2, name: "POOL_PROTOCOL_V3" },
|
|
95
|
+
{ no: 3, name: "POOL_PROTOCOL_V4" },
|
|
96
|
+
]);
|
|
65
97
|
/**
|
|
66
98
|
* @generated from enum uniswap.liquidity.v2.PoolSortBy
|
|
67
99
|
*/
|
|
@@ -86,6 +118,85 @@ proto3.util.setEnumType(PoolSortBy, "uniswap.liquidity.v2.PoolSortBy", [
|
|
|
86
118
|
{ no: 1, name: "POOL_SORT_BY_VOLUME_USD" },
|
|
87
119
|
{ no: 2, name: "POOL_SORT_BY_APR" },
|
|
88
120
|
]);
|
|
121
|
+
/**
|
|
122
|
+
* Chart time window. Mirrors data.v2's HistoryDuration (shared data.v2 protos
|
|
123
|
+
* are not importable from this package; duplication is the accepted approach
|
|
124
|
+
* until cross-service proto reuse lands post-stage-4).
|
|
125
|
+
*
|
|
126
|
+
* @generated from enum uniswap.liquidity.v2.HistoryDuration
|
|
127
|
+
*/
|
|
128
|
+
export var HistoryDuration;
|
|
129
|
+
(function (HistoryDuration) {
|
|
130
|
+
/**
|
|
131
|
+
* server defaults to DAY
|
|
132
|
+
*
|
|
133
|
+
* @generated from enum value: HISTORY_DURATION_UNSPECIFIED = 0;
|
|
134
|
+
*/
|
|
135
|
+
HistoryDuration[HistoryDuration["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
136
|
+
/**
|
|
137
|
+
* @generated from enum value: HISTORY_DURATION_HOUR = 1;
|
|
138
|
+
*/
|
|
139
|
+
HistoryDuration[HistoryDuration["HOUR"] = 1] = "HOUR";
|
|
140
|
+
/**
|
|
141
|
+
* @generated from enum value: HISTORY_DURATION_DAY = 2;
|
|
142
|
+
*/
|
|
143
|
+
HistoryDuration[HistoryDuration["DAY"] = 2] = "DAY";
|
|
144
|
+
/**
|
|
145
|
+
* @generated from enum value: HISTORY_DURATION_WEEK = 3;
|
|
146
|
+
*/
|
|
147
|
+
HistoryDuration[HistoryDuration["WEEK"] = 3] = "WEEK";
|
|
148
|
+
/**
|
|
149
|
+
* @generated from enum value: HISTORY_DURATION_MONTH = 4;
|
|
150
|
+
*/
|
|
151
|
+
HistoryDuration[HistoryDuration["MONTH"] = 4] = "MONTH";
|
|
152
|
+
/**
|
|
153
|
+
* @generated from enum value: HISTORY_DURATION_YEAR = 5;
|
|
154
|
+
*/
|
|
155
|
+
HistoryDuration[HistoryDuration["YEAR"] = 5] = "YEAR";
|
|
156
|
+
/**
|
|
157
|
+
* @generated from enum value: HISTORY_DURATION_MAX = 6;
|
|
158
|
+
*/
|
|
159
|
+
HistoryDuration[HistoryDuration["MAX"] = 6] = "MAX";
|
|
160
|
+
})(HistoryDuration || (HistoryDuration = {}));
|
|
161
|
+
// Retrieve enum metadata with: proto3.getEnumType(HistoryDuration)
|
|
162
|
+
proto3.util.setEnumType(HistoryDuration, "uniswap.liquidity.v2.HistoryDuration", [
|
|
163
|
+
{ no: 0, name: "HISTORY_DURATION_UNSPECIFIED" },
|
|
164
|
+
{ no: 1, name: "HISTORY_DURATION_HOUR" },
|
|
165
|
+
{ no: 2, name: "HISTORY_DURATION_DAY" },
|
|
166
|
+
{ no: 3, name: "HISTORY_DURATION_WEEK" },
|
|
167
|
+
{ no: 4, name: "HISTORY_DURATION_MONTH" },
|
|
168
|
+
{ no: 5, name: "HISTORY_DURATION_YEAR" },
|
|
169
|
+
{ no: 6, name: "HISTORY_DURATION_MAX" },
|
|
170
|
+
]);
|
|
171
|
+
/**
|
|
172
|
+
* Open/closed state of an LP position. CLOSED = fully withdrawn (V3/V4
|
|
173
|
+
* liquidity or the V2 LP-token balance is zero) — the indexer keeps such rows
|
|
174
|
+
* as tombstones. In/out-of-range needs the pool's current tick and is left to
|
|
175
|
+
* read-time derivation.
|
|
176
|
+
*
|
|
177
|
+
* @generated from enum uniswap.liquidity.v2.PositionStatus
|
|
178
|
+
*/
|
|
179
|
+
export var PositionStatus;
|
|
180
|
+
(function (PositionStatus) {
|
|
181
|
+
/**
|
|
182
|
+
* @generated from enum value: POSITION_STATUS_UNSPECIFIED = 0;
|
|
183
|
+
*/
|
|
184
|
+
PositionStatus[PositionStatus["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
185
|
+
/**
|
|
186
|
+
* @generated from enum value: POSITION_STATUS_OPEN = 1;
|
|
187
|
+
*/
|
|
188
|
+
PositionStatus[PositionStatus["OPEN"] = 1] = "OPEN";
|
|
189
|
+
/**
|
|
190
|
+
* @generated from enum value: POSITION_STATUS_CLOSED = 2;
|
|
191
|
+
*/
|
|
192
|
+
PositionStatus[PositionStatus["CLOSED"] = 2] = "CLOSED";
|
|
193
|
+
})(PositionStatus || (PositionStatus = {}));
|
|
194
|
+
// Retrieve enum metadata with: proto3.getEnumType(PositionStatus)
|
|
195
|
+
proto3.util.setEnumType(PositionStatus, "uniswap.liquidity.v2.PositionStatus", [
|
|
196
|
+
{ no: 0, name: "POSITION_STATUS_UNSPECIFIED" },
|
|
197
|
+
{ no: 1, name: "POSITION_STATUS_OPEN" },
|
|
198
|
+
{ no: 2, name: "POSITION_STATUS_CLOSED" },
|
|
199
|
+
]);
|
|
89
200
|
/**
|
|
90
201
|
* @generated from message uniswap.liquidity.v2.LPToken
|
|
91
202
|
*/
|
|
@@ -747,6 +858,9 @@ PoolSummary.fields = proto3.util.newFieldList(() => [
|
|
|
747
858
|
{ no: 14, name: "token0_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
748
859
|
{ no: 15, name: "token1_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
749
860
|
{ no: 16, name: "tick_spacing", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
861
|
+
{ no: 17, name: "reserve0", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
862
|
+
{ no: 18, name: "reserve1", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
863
|
+
{ no: 19, name: "total_supply", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
750
864
|
]);
|
|
751
865
|
/**
|
|
752
866
|
* @generated from message uniswap.liquidity.v2.PoolListCursor
|
|
@@ -788,3 +902,334 @@ PoolListCursor.fields = proto3.util.newFieldList(() => [
|
|
|
788
902
|
{ no: 2, name: "pool_identifier", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
789
903
|
{ no: 3, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
790
904
|
]);
|
|
905
|
+
/**
|
|
906
|
+
* Identifies one pool. address_or_id is the pair/pool address for V2/V3
|
|
907
|
+
* (0x + 40 hex chars) or the pool id for V4 (0x + 64 hex chars).
|
|
908
|
+
*
|
|
909
|
+
* @generated from message uniswap.liquidity.v2.PoolReference
|
|
910
|
+
*/
|
|
911
|
+
export class PoolReference extends Message {
|
|
912
|
+
constructor(data) {
|
|
913
|
+
super();
|
|
914
|
+
/**
|
|
915
|
+
* @generated from field: uniswap.liquidity.v1.ChainId chain_id = 1;
|
|
916
|
+
*/
|
|
917
|
+
this.chainId = ChainId.CHAIN_ID_UNSPECIFIED;
|
|
918
|
+
/**
|
|
919
|
+
* @generated from field: string address_or_id = 2;
|
|
920
|
+
*/
|
|
921
|
+
this.addressOrId = "";
|
|
922
|
+
/**
|
|
923
|
+
* POOL_PROTOCOL_UNSPECIFIED rejected as invalid_argument
|
|
924
|
+
*
|
|
925
|
+
* @generated from field: uniswap.liquidity.v2.PoolProtocol version = 3;
|
|
926
|
+
*/
|
|
927
|
+
this.version = PoolProtocol.UNSPECIFIED;
|
|
928
|
+
proto3.util.initPartial(data, this);
|
|
929
|
+
}
|
|
930
|
+
static fromBinary(bytes, options) {
|
|
931
|
+
return new PoolReference().fromBinary(bytes, options);
|
|
932
|
+
}
|
|
933
|
+
static fromJson(jsonValue, options) {
|
|
934
|
+
return new PoolReference().fromJson(jsonValue, options);
|
|
935
|
+
}
|
|
936
|
+
static fromJsonString(jsonString, options) {
|
|
937
|
+
return new PoolReference().fromJsonString(jsonString, options);
|
|
938
|
+
}
|
|
939
|
+
static equals(a, b) {
|
|
940
|
+
return proto3.util.equals(PoolReference, a, b);
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
PoolReference.runtime = proto3;
|
|
944
|
+
PoolReference.typeName = "uniswap.liquidity.v2.PoolReference";
|
|
945
|
+
PoolReference.fields = proto3.util.newFieldList(() => [
|
|
946
|
+
{ no: 1, name: "chain_id", kind: "enum", T: proto3.getEnumType(ChainId) },
|
|
947
|
+
{ no: 2, name: "address_or_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
948
|
+
{ no: 3, name: "version", kind: "enum", T: proto3.getEnumType(PoolProtocol) },
|
|
949
|
+
]);
|
|
950
|
+
/**
|
|
951
|
+
* One point of a pool's relative-price history, in raw pool-token
|
|
952
|
+
* denomination (token1 per token0 and its inverse), not USD.
|
|
953
|
+
* TODO(CONS-2536): whether V2/V3 WETH legs should be presented as ETH (and
|
|
954
|
+
* stats combined with V4 native pools) is pending; prices stay in raw pool
|
|
955
|
+
* token terms until that lands.
|
|
956
|
+
*
|
|
957
|
+
* @generated from message uniswap.liquidity.v2.PoolPricePoint
|
|
958
|
+
*/
|
|
959
|
+
export class PoolPricePoint extends Message {
|
|
960
|
+
constructor(data) {
|
|
961
|
+
super();
|
|
962
|
+
/**
|
|
963
|
+
* unix seconds, bucket start (inclusive)
|
|
964
|
+
*
|
|
965
|
+
* @generated from field: int64 timestamp = 1;
|
|
966
|
+
*/
|
|
967
|
+
this.timestamp = protoInt64.zero;
|
|
968
|
+
/**
|
|
969
|
+
* @generated from field: double price_token0_in_token1 = 2;
|
|
970
|
+
*/
|
|
971
|
+
this.priceToken0InToken1 = 0;
|
|
972
|
+
/**
|
|
973
|
+
* @generated from field: double price_token1_in_token0 = 3;
|
|
974
|
+
*/
|
|
975
|
+
this.priceToken1InToken0 = 0;
|
|
976
|
+
proto3.util.initPartial(data, this);
|
|
977
|
+
}
|
|
978
|
+
static fromBinary(bytes, options) {
|
|
979
|
+
return new PoolPricePoint().fromBinary(bytes, options);
|
|
980
|
+
}
|
|
981
|
+
static fromJson(jsonValue, options) {
|
|
982
|
+
return new PoolPricePoint().fromJson(jsonValue, options);
|
|
983
|
+
}
|
|
984
|
+
static fromJsonString(jsonString, options) {
|
|
985
|
+
return new PoolPricePoint().fromJsonString(jsonString, options);
|
|
986
|
+
}
|
|
987
|
+
static equals(a, b) {
|
|
988
|
+
return proto3.util.equals(PoolPricePoint, a, b);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
PoolPricePoint.runtime = proto3;
|
|
992
|
+
PoolPricePoint.typeName = "uniswap.liquidity.v2.PoolPricePoint";
|
|
993
|
+
PoolPricePoint.fields = proto3.util.newFieldList(() => [
|
|
994
|
+
{ no: 1, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
995
|
+
{ no: 2, name: "price_token0_in_token1", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
996
|
+
{ no: 3, name: "price_token1_in_token0", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
997
|
+
]);
|
|
998
|
+
/**
|
|
999
|
+
* One bucket of a pool's swap-volume history, USD-denominated.
|
|
1000
|
+
*
|
|
1001
|
+
* @generated from message uniswap.liquidity.v2.PoolVolumeBucket
|
|
1002
|
+
*/
|
|
1003
|
+
export class PoolVolumeBucket extends Message {
|
|
1004
|
+
constructor(data) {
|
|
1005
|
+
super();
|
|
1006
|
+
/**
|
|
1007
|
+
* unix seconds, bucket start (inclusive)
|
|
1008
|
+
*
|
|
1009
|
+
* @generated from field: int64 timestamp = 1;
|
|
1010
|
+
*/
|
|
1011
|
+
this.timestamp = protoInt64.zero;
|
|
1012
|
+
/**
|
|
1013
|
+
* @generated from field: double volume_usd = 2;
|
|
1014
|
+
*/
|
|
1015
|
+
this.volumeUsd = 0;
|
|
1016
|
+
/**
|
|
1017
|
+
* @generated from field: double fee_usd = 3;
|
|
1018
|
+
*/
|
|
1019
|
+
this.feeUsd = 0;
|
|
1020
|
+
proto3.util.initPartial(data, this);
|
|
1021
|
+
}
|
|
1022
|
+
static fromBinary(bytes, options) {
|
|
1023
|
+
return new PoolVolumeBucket().fromBinary(bytes, options);
|
|
1024
|
+
}
|
|
1025
|
+
static fromJson(jsonValue, options) {
|
|
1026
|
+
return new PoolVolumeBucket().fromJson(jsonValue, options);
|
|
1027
|
+
}
|
|
1028
|
+
static fromJsonString(jsonString, options) {
|
|
1029
|
+
return new PoolVolumeBucket().fromJsonString(jsonString, options);
|
|
1030
|
+
}
|
|
1031
|
+
static equals(a, b) {
|
|
1032
|
+
return proto3.util.equals(PoolVolumeBucket, a, b);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
PoolVolumeBucket.runtime = proto3;
|
|
1036
|
+
PoolVolumeBucket.typeName = "uniswap.liquidity.v2.PoolVolumeBucket";
|
|
1037
|
+
PoolVolumeBucket.fields = proto3.util.newFieldList(() => [
|
|
1038
|
+
{ no: 1, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
1039
|
+
{ no: 2, name: "volume_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
1040
|
+
{ no: 3, name: "fee_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
1041
|
+
]);
|
|
1042
|
+
/**
|
|
1043
|
+
* One LP position, as indexed from chain events (raw position state).
|
|
1044
|
+
* Token amounts, uncollected fees, in-range and USD valuation land with the
|
|
1045
|
+
* positions pricing pipeline (data-ingestion position math) as additive
|
|
1046
|
+
* optional fields.
|
|
1047
|
+
* TODO(CONS-2536): position balances are returned untranslated (V2/V3 pools
|
|
1048
|
+
* report WETH as its own ERC-20); whether to present WETH legs as ETH is an
|
|
1049
|
+
* open LP/CE decision.
|
|
1050
|
+
*
|
|
1051
|
+
* @generated from message uniswap.liquidity.v2.Position
|
|
1052
|
+
*/
|
|
1053
|
+
export class Position extends Message {
|
|
1054
|
+
constructor(data) {
|
|
1055
|
+
super();
|
|
1056
|
+
/**
|
|
1057
|
+
* @generated from field: uniswap.liquidity.v1.Protocols version = 1;
|
|
1058
|
+
*/
|
|
1059
|
+
this.version = Protocols.V2;
|
|
1060
|
+
/**
|
|
1061
|
+
* @generated from field: int32 chain_id = 2;
|
|
1062
|
+
*/
|
|
1063
|
+
this.chainId = 0;
|
|
1064
|
+
/**
|
|
1065
|
+
* @generated from field: string owner = 3;
|
|
1066
|
+
*/
|
|
1067
|
+
this.owner = "";
|
|
1068
|
+
/**
|
|
1069
|
+
* V2/V3: pair/pool address. V4: pool id (0x + 64 hex).
|
|
1070
|
+
*
|
|
1071
|
+
* @generated from field: string pool_address_or_id = 5;
|
|
1072
|
+
*/
|
|
1073
|
+
this.poolAddressOrId = "";
|
|
1074
|
+
/**
|
|
1075
|
+
* Unix seconds of the last indexed event applied to this position.
|
|
1076
|
+
*
|
|
1077
|
+
* @generated from field: int64 updated_at = 12;
|
|
1078
|
+
*/
|
|
1079
|
+
this.updatedAt = protoInt64.zero;
|
|
1080
|
+
/**
|
|
1081
|
+
* Unix seconds of the first indexed event that created this position.
|
|
1082
|
+
*
|
|
1083
|
+
* @generated from field: int64 created_at = 13;
|
|
1084
|
+
*/
|
|
1085
|
+
this.createdAt = protoInt64.zero;
|
|
1086
|
+
/**
|
|
1087
|
+
* Derived from the raw balance: OPEN while liquidity / lp_shares > 0.
|
|
1088
|
+
*
|
|
1089
|
+
* @generated from field: uniswap.liquidity.v2.PositionStatus status = 14;
|
|
1090
|
+
*/
|
|
1091
|
+
this.status = PositionStatus.UNSPECIFIED;
|
|
1092
|
+
proto3.util.initPartial(data, this);
|
|
1093
|
+
}
|
|
1094
|
+
static fromBinary(bytes, options) {
|
|
1095
|
+
return new Position().fromBinary(bytes, options);
|
|
1096
|
+
}
|
|
1097
|
+
static fromJson(jsonValue, options) {
|
|
1098
|
+
return new Position().fromJson(jsonValue, options);
|
|
1099
|
+
}
|
|
1100
|
+
static fromJsonString(jsonString, options) {
|
|
1101
|
+
return new Position().fromJsonString(jsonString, options);
|
|
1102
|
+
}
|
|
1103
|
+
static equals(a, b) {
|
|
1104
|
+
return proto3.util.equals(Position, a, b);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
Position.runtime = proto3;
|
|
1108
|
+
Position.typeName = "uniswap.liquidity.v2.Position";
|
|
1109
|
+
Position.fields = proto3.util.newFieldList(() => [
|
|
1110
|
+
{ no: 1, name: "version", kind: "enum", T: proto3.getEnumType(Protocols) },
|
|
1111
|
+
{ no: 2, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1112
|
+
{ no: 3, name: "owner", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1113
|
+
{ no: 4, name: "token_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1114
|
+
{ no: 5, name: "pool_address_or_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1115
|
+
{ no: 6, name: "fee_tier", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
1116
|
+
{ no: 7, name: "tick_lower", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
|
|
1117
|
+
{ no: 8, name: "tick_upper", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
|
|
1118
|
+
{ no: 9, name: "liquidity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1119
|
+
{ no: 10, name: "lp_shares", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1120
|
+
{ no: 11, name: "position_manager_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1121
|
+
{ no: 12, name: "updated_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
1122
|
+
{ no: 13, name: "created_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
|
|
1123
|
+
{ no: 14, name: "status", kind: "enum", T: proto3.getEnumType(PositionStatus) },
|
|
1124
|
+
{ no: 15, name: "token0_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1125
|
+
{ no: 16, name: "token1_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1126
|
+
{ no: 17, name: "token0_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
1127
|
+
{ no: 18, name: "token1_metadata", kind: "message", T: TokenMetadata, opt: true },
|
|
1128
|
+
{ no: 19, name: "hook_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1129
|
+
{ no: 20, name: "tick_spacing", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
1130
|
+
{ no: 21, name: "current_tick", kind: "scalar", T: 17 /* ScalarType.SINT32 */, opt: true },
|
|
1131
|
+
{ no: 22, name: "sqrt_price_x96", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1132
|
+
{ no: 23, name: "pool_liquidity", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1133
|
+
{ no: 24, name: "token0_price_usd", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1134
|
+
{ no: 25, name: "token1_price_usd", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
1135
|
+
]);
|
|
1136
|
+
/**
|
|
1137
|
+
* Keyset cursor for GetWalletPositions. position_key is the last returned
|
|
1138
|
+
* position's key within (chain_id, version): V2 pair address, V3 token id,
|
|
1139
|
+
* V4 "<position_manager>:<token_id>".
|
|
1140
|
+
*
|
|
1141
|
+
* @generated from message uniswap.liquidity.v2.PositionListCursor
|
|
1142
|
+
*/
|
|
1143
|
+
export class PositionListCursor extends Message {
|
|
1144
|
+
constructor(data) {
|
|
1145
|
+
super();
|
|
1146
|
+
/**
|
|
1147
|
+
* @generated from field: int32 chain_id = 1;
|
|
1148
|
+
*/
|
|
1149
|
+
this.chainId = 0;
|
|
1150
|
+
/**
|
|
1151
|
+
* @generated from field: uniswap.liquidity.v1.Protocols version = 2;
|
|
1152
|
+
*/
|
|
1153
|
+
this.version = Protocols.V2;
|
|
1154
|
+
/**
|
|
1155
|
+
* @generated from field: string position_key = 3;
|
|
1156
|
+
*/
|
|
1157
|
+
this.positionKey = "";
|
|
1158
|
+
proto3.util.initPartial(data, this);
|
|
1159
|
+
}
|
|
1160
|
+
static fromBinary(bytes, options) {
|
|
1161
|
+
return new PositionListCursor().fromBinary(bytes, options);
|
|
1162
|
+
}
|
|
1163
|
+
static fromJson(jsonValue, options) {
|
|
1164
|
+
return new PositionListCursor().fromJson(jsonValue, options);
|
|
1165
|
+
}
|
|
1166
|
+
static fromJsonString(jsonString, options) {
|
|
1167
|
+
return new PositionListCursor().fromJsonString(jsonString, options);
|
|
1168
|
+
}
|
|
1169
|
+
static equals(a, b) {
|
|
1170
|
+
return proto3.util.equals(PositionListCursor, a, b);
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
PositionListCursor.runtime = proto3;
|
|
1174
|
+
PositionListCursor.typeName = "uniswap.liquidity.v2.PositionListCursor";
|
|
1175
|
+
PositionListCursor.fields = proto3.util.newFieldList(() => [
|
|
1176
|
+
{ no: 1, name: "chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1177
|
+
{ no: 2, name: "version", kind: "enum", T: proto3.getEnumType(Protocols) },
|
|
1178
|
+
{ no: 3, name: "position_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1179
|
+
]);
|
|
1180
|
+
/**
|
|
1181
|
+
* One initialized tick of a V3/V4 pool's liquidity distribution.
|
|
1182
|
+
* liquidity_gross/net are raw uint128-scale values serialized as decimal
|
|
1183
|
+
* strings (they overflow doubles).
|
|
1184
|
+
*
|
|
1185
|
+
* @generated from message uniswap.liquidity.v2.PoolTick
|
|
1186
|
+
*/
|
|
1187
|
+
export class PoolTick extends Message {
|
|
1188
|
+
constructor(data) {
|
|
1189
|
+
super();
|
|
1190
|
+
/**
|
|
1191
|
+
* @generated from field: int32 tick_idx = 1;
|
|
1192
|
+
*/
|
|
1193
|
+
this.tickIdx = 0;
|
|
1194
|
+
/**
|
|
1195
|
+
* @generated from field: string liquidity_gross = 2;
|
|
1196
|
+
*/
|
|
1197
|
+
this.liquidityGross = "";
|
|
1198
|
+
/**
|
|
1199
|
+
* @generated from field: string liquidity_net = 3;
|
|
1200
|
+
*/
|
|
1201
|
+
this.liquidityNet = "";
|
|
1202
|
+
/**
|
|
1203
|
+
* Price of token0 in token1 at this tick (1.0001^tick_idx) and its inverse.
|
|
1204
|
+
*
|
|
1205
|
+
* @generated from field: double price_token0_in_token1 = 4;
|
|
1206
|
+
*/
|
|
1207
|
+
this.priceToken0InToken1 = 0;
|
|
1208
|
+
/**
|
|
1209
|
+
* @generated from field: double price_token1_in_token0 = 5;
|
|
1210
|
+
*/
|
|
1211
|
+
this.priceToken1InToken0 = 0;
|
|
1212
|
+
proto3.util.initPartial(data, this);
|
|
1213
|
+
}
|
|
1214
|
+
static fromBinary(bytes, options) {
|
|
1215
|
+
return new PoolTick().fromBinary(bytes, options);
|
|
1216
|
+
}
|
|
1217
|
+
static fromJson(jsonValue, options) {
|
|
1218
|
+
return new PoolTick().fromJson(jsonValue, options);
|
|
1219
|
+
}
|
|
1220
|
+
static fromJsonString(jsonString, options) {
|
|
1221
|
+
return new PoolTick().fromJsonString(jsonString, options);
|
|
1222
|
+
}
|
|
1223
|
+
static equals(a, b) {
|
|
1224
|
+
return proto3.util.equals(PoolTick, a, b);
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
PoolTick.runtime = proto3;
|
|
1228
|
+
PoolTick.typeName = "uniswap.liquidity.v2.PoolTick";
|
|
1229
|
+
PoolTick.fields = proto3.util.newFieldList(() => [
|
|
1230
|
+
{ no: 1, name: "tick_idx", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
|
|
1231
|
+
{ no: 2, name: "liquidity_gross", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1232
|
+
{ no: 3, name: "liquidity_net", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
1233
|
+
{ no: 4, name: "price_token0_in_token1", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
1234
|
+
{ no: 5, name: "price_token1_in_token0", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
1235
|
+
]);
|