@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.
@@ -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, HookEntry, LPAction, LPToken, PoolListCursor, PoolSortBy, PoolSummary, PositionPriceBounds, 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, PositionPriceBounds, PositionStatus, PositionTickBounds, V2PoolParameters } from "./types_pb.js";
8
8
  /**
9
9
  * MigrateV2ToV3LPPosition
10
10
  *
@@ -834,3 +834,410 @@ ListPoolsResponse.fields = proto3.util.newFieldList(() => [
834
834
  { no: 1, name: "pools", kind: "message", T: PoolSummary, repeated: true },
835
835
  { no: 2, name: "next_cursor", kind: "message", T: PoolListCursor, opt: true },
836
836
  ]);
837
+ /**
838
+ * GetPool — unified V2/V3/V4 pool details for the Pool Details Page.
839
+ * Responses reuse PoolSummary (same shape as ListPools rows, TVL included).
840
+ * TODO: tx_count and tvl 24h change await the TVL pipeline / stats tables.
841
+ *
842
+ * @generated from message uniswap.liquidity.v2.GetPoolRequest
843
+ */
844
+ export class GetPoolRequest extends Message {
845
+ constructor(data) {
846
+ super();
847
+ proto3.util.initPartial(data, this);
848
+ }
849
+ static fromBinary(bytes, options) {
850
+ return new GetPoolRequest().fromBinary(bytes, options);
851
+ }
852
+ static fromJson(jsonValue, options) {
853
+ return new GetPoolRequest().fromJson(jsonValue, options);
854
+ }
855
+ static fromJsonString(jsonString, options) {
856
+ return new GetPoolRequest().fromJsonString(jsonString, options);
857
+ }
858
+ static equals(a, b) {
859
+ return proto3.util.equals(GetPoolRequest, a, b);
860
+ }
861
+ }
862
+ GetPoolRequest.runtime = proto3;
863
+ GetPoolRequest.typeName = "uniswap.liquidity.v2.GetPoolRequest";
864
+ GetPoolRequest.fields = proto3.util.newFieldList(() => [
865
+ { no: 1, name: "pool", kind: "message", T: PoolReference },
866
+ ]);
867
+ /**
868
+ * @generated from message uniswap.liquidity.v2.GetPoolResponse
869
+ */
870
+ export class GetPoolResponse extends Message {
871
+ constructor(data) {
872
+ super();
873
+ proto3.util.initPartial(data, this);
874
+ }
875
+ static fromBinary(bytes, options) {
876
+ return new GetPoolResponse().fromBinary(bytes, options);
877
+ }
878
+ static fromJson(jsonValue, options) {
879
+ return new GetPoolResponse().fromJson(jsonValue, options);
880
+ }
881
+ static fromJsonString(jsonString, options) {
882
+ return new GetPoolResponse().fromJsonString(jsonString, options);
883
+ }
884
+ static equals(a, b) {
885
+ return proto3.util.equals(GetPoolResponse, a, b);
886
+ }
887
+ }
888
+ GetPoolResponse.runtime = proto3;
889
+ GetPoolResponse.typeName = "uniswap.liquidity.v2.GetPoolResponse";
890
+ GetPoolResponse.fields = proto3.util.newFieldList(() => [
891
+ { no: 1, name: "pool", kind: "message", T: PoolSummary },
892
+ ]);
893
+ /**
894
+ * GetPoolHistoryPrice — pool relative-price chart (PDP graphs).
895
+ *
896
+ * @generated from message uniswap.liquidity.v2.GetPoolHistoryPriceRequest
897
+ */
898
+ export class GetPoolHistoryPriceRequest extends Message {
899
+ constructor(data) {
900
+ super();
901
+ /**
902
+ * UNSPECIFIED -> DAY
903
+ *
904
+ * @generated from field: uniswap.liquidity.v2.HistoryDuration duration = 2;
905
+ */
906
+ this.duration = HistoryDuration.UNSPECIFIED;
907
+ proto3.util.initPartial(data, this);
908
+ }
909
+ static fromBinary(bytes, options) {
910
+ return new GetPoolHistoryPriceRequest().fromBinary(bytes, options);
911
+ }
912
+ static fromJson(jsonValue, options) {
913
+ return new GetPoolHistoryPriceRequest().fromJson(jsonValue, options);
914
+ }
915
+ static fromJsonString(jsonString, options) {
916
+ return new GetPoolHistoryPriceRequest().fromJsonString(jsonString, options);
917
+ }
918
+ static equals(a, b) {
919
+ return proto3.util.equals(GetPoolHistoryPriceRequest, a, b);
920
+ }
921
+ }
922
+ GetPoolHistoryPriceRequest.runtime = proto3;
923
+ GetPoolHistoryPriceRequest.typeName = "uniswap.liquidity.v2.GetPoolHistoryPriceRequest";
924
+ GetPoolHistoryPriceRequest.fields = proto3.util.newFieldList(() => [
925
+ { no: 1, name: "pool", kind: "message", T: PoolReference },
926
+ { no: 2, name: "duration", kind: "enum", T: proto3.getEnumType(HistoryDuration) },
927
+ ]);
928
+ /**
929
+ * @generated from message uniswap.liquidity.v2.GetPoolHistoryPriceResponse
930
+ */
931
+ export class GetPoolHistoryPriceResponse extends Message {
932
+ constructor(data) {
933
+ super();
934
+ /**
935
+ * ascending time order
936
+ *
937
+ * @generated from field: repeated uniswap.liquidity.v2.PoolPricePoint points = 1;
938
+ */
939
+ this.points = [];
940
+ proto3.util.initPartial(data, this);
941
+ }
942
+ static fromBinary(bytes, options) {
943
+ return new GetPoolHistoryPriceResponse().fromBinary(bytes, options);
944
+ }
945
+ static fromJson(jsonValue, options) {
946
+ return new GetPoolHistoryPriceResponse().fromJson(jsonValue, options);
947
+ }
948
+ static fromJsonString(jsonString, options) {
949
+ return new GetPoolHistoryPriceResponse().fromJsonString(jsonString, options);
950
+ }
951
+ static equals(a, b) {
952
+ return proto3.util.equals(GetPoolHistoryPriceResponse, a, b);
953
+ }
954
+ }
955
+ GetPoolHistoryPriceResponse.runtime = proto3;
956
+ GetPoolHistoryPriceResponse.typeName = "uniswap.liquidity.v2.GetPoolHistoryPriceResponse";
957
+ GetPoolHistoryPriceResponse.fields = proto3.util.newFieldList(() => [
958
+ { no: 1, name: "points", kind: "message", T: PoolPricePoint, repeated: true },
959
+ ]);
960
+ /**
961
+ * GetPoolHistoryVolume — pool swap-volume chart, USD (PDP graphs).
962
+ *
963
+ * @generated from message uniswap.liquidity.v2.GetPoolHistoryVolumeRequest
964
+ */
965
+ export class GetPoolHistoryVolumeRequest extends Message {
966
+ constructor(data) {
967
+ super();
968
+ /**
969
+ * UNSPECIFIED -> DAY
970
+ *
971
+ * @generated from field: uniswap.liquidity.v2.HistoryDuration duration = 2;
972
+ */
973
+ this.duration = HistoryDuration.UNSPECIFIED;
974
+ proto3.util.initPartial(data, this);
975
+ }
976
+ static fromBinary(bytes, options) {
977
+ return new GetPoolHistoryVolumeRequest().fromBinary(bytes, options);
978
+ }
979
+ static fromJson(jsonValue, options) {
980
+ return new GetPoolHistoryVolumeRequest().fromJson(jsonValue, options);
981
+ }
982
+ static fromJsonString(jsonString, options) {
983
+ return new GetPoolHistoryVolumeRequest().fromJsonString(jsonString, options);
984
+ }
985
+ static equals(a, b) {
986
+ return proto3.util.equals(GetPoolHistoryVolumeRequest, a, b);
987
+ }
988
+ }
989
+ GetPoolHistoryVolumeRequest.runtime = proto3;
990
+ GetPoolHistoryVolumeRequest.typeName = "uniswap.liquidity.v2.GetPoolHistoryVolumeRequest";
991
+ GetPoolHistoryVolumeRequest.fields = proto3.util.newFieldList(() => [
992
+ { no: 1, name: "pool", kind: "message", T: PoolReference },
993
+ { no: 2, name: "duration", kind: "enum", T: proto3.getEnumType(HistoryDuration) },
994
+ ]);
995
+ /**
996
+ * @generated from message uniswap.liquidity.v2.GetPoolHistoryVolumeResponse
997
+ */
998
+ export class GetPoolHistoryVolumeResponse extends Message {
999
+ constructor(data) {
1000
+ super();
1001
+ /**
1002
+ * ascending time order
1003
+ *
1004
+ * @generated from field: repeated uniswap.liquidity.v2.PoolVolumeBucket buckets = 1;
1005
+ */
1006
+ this.buckets = [];
1007
+ proto3.util.initPartial(data, this);
1008
+ }
1009
+ static fromBinary(bytes, options) {
1010
+ return new GetPoolHistoryVolumeResponse().fromBinary(bytes, options);
1011
+ }
1012
+ static fromJson(jsonValue, options) {
1013
+ return new GetPoolHistoryVolumeResponse().fromJson(jsonValue, options);
1014
+ }
1015
+ static fromJsonString(jsonString, options) {
1016
+ return new GetPoolHistoryVolumeResponse().fromJsonString(jsonString, options);
1017
+ }
1018
+ static equals(a, b) {
1019
+ return proto3.util.equals(GetPoolHistoryVolumeResponse, a, b);
1020
+ }
1021
+ }
1022
+ GetPoolHistoryVolumeResponse.runtime = proto3;
1023
+ GetPoolHistoryVolumeResponse.typeName = "uniswap.liquidity.v2.GetPoolHistoryVolumeResponse";
1024
+ GetPoolHistoryVolumeResponse.fields = proto3.util.newFieldList(() => [
1025
+ { no: 1, name: "buckets", kind: "message", T: PoolVolumeBucket, repeated: true },
1026
+ ]);
1027
+ /**
1028
+ * GetPoolTicks — tick/liquidity distribution for the PDP liquidity chart.
1029
+ * V3/V4 only: V2 pools are constant-product and have no ticks — a V2
1030
+ * reference is rejected as invalid_argument.
1031
+ *
1032
+ * @generated from message uniswap.liquidity.v2.GetPoolTicksRequest
1033
+ */
1034
+ export class GetPoolTicksRequest extends Message {
1035
+ constructor(data) {
1036
+ super();
1037
+ proto3.util.initPartial(data, this);
1038
+ }
1039
+ static fromBinary(bytes, options) {
1040
+ return new GetPoolTicksRequest().fromBinary(bytes, options);
1041
+ }
1042
+ static fromJson(jsonValue, options) {
1043
+ return new GetPoolTicksRequest().fromJson(jsonValue, options);
1044
+ }
1045
+ static fromJsonString(jsonString, options) {
1046
+ return new GetPoolTicksRequest().fromJsonString(jsonString, options);
1047
+ }
1048
+ static equals(a, b) {
1049
+ return proto3.util.equals(GetPoolTicksRequest, a, b);
1050
+ }
1051
+ }
1052
+ GetPoolTicksRequest.runtime = proto3;
1053
+ GetPoolTicksRequest.typeName = "uniswap.liquidity.v2.GetPoolTicksRequest";
1054
+ GetPoolTicksRequest.fields = proto3.util.newFieldList(() => [
1055
+ { no: 1, name: "pool", kind: "message", T: PoolReference },
1056
+ { no: 2, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
1057
+ ]);
1058
+ /**
1059
+ * @generated from message uniswap.liquidity.v2.GetPoolTicksResponse
1060
+ */
1061
+ export class GetPoolTicksResponse extends Message {
1062
+ constructor(data) {
1063
+ super();
1064
+ /**
1065
+ * @generated from field: repeated uniswap.liquidity.v2.PoolTick ticks = 1;
1066
+ */
1067
+ this.ticks = [];
1068
+ proto3.util.initPartial(data, this);
1069
+ }
1070
+ static fromBinary(bytes, options) {
1071
+ return new GetPoolTicksResponse().fromBinary(bytes, options);
1072
+ }
1073
+ static fromJson(jsonValue, options) {
1074
+ return new GetPoolTicksResponse().fromJson(jsonValue, options);
1075
+ }
1076
+ static fromJsonString(jsonString, options) {
1077
+ return new GetPoolTicksResponse().fromJsonString(jsonString, options);
1078
+ }
1079
+ static equals(a, b) {
1080
+ return proto3.util.equals(GetPoolTicksResponse, a, b);
1081
+ }
1082
+ }
1083
+ GetPoolTicksResponse.runtime = proto3;
1084
+ GetPoolTicksResponse.typeName = "uniswap.liquidity.v2.GetPoolTicksResponse";
1085
+ GetPoolTicksResponse.fields = proto3.util.newFieldList(() => [
1086
+ { no: 1, name: "ticks", kind: "message", T: PoolTick, repeated: true },
1087
+ ]);
1088
+ /**
1089
+ * GetPosition — single LP position (Position Details Page).
1090
+ * V3/V4 positions are keyed by NFT token id; a V2 position is the wallet's
1091
+ * LP-share balance in a pair, keyed by (pair, wallet).
1092
+ *
1093
+ * @generated from message uniswap.liquidity.v2.GetPositionRequest
1094
+ */
1095
+ export class GetPositionRequest extends Message {
1096
+ constructor(data) {
1097
+ super();
1098
+ /**
1099
+ * @generated from field: uniswap.liquidity.v1.ChainId chain_id = 1;
1100
+ */
1101
+ this.chainId = ChainId.CHAIN_ID_UNSPECIFIED;
1102
+ /**
1103
+ * @generated from field: uniswap.liquidity.v1.Protocols version = 2;
1104
+ */
1105
+ this.version = Protocols.V2;
1106
+ proto3.util.initPartial(data, this);
1107
+ }
1108
+ static fromBinary(bytes, options) {
1109
+ return new GetPositionRequest().fromBinary(bytes, options);
1110
+ }
1111
+ static fromJson(jsonValue, options) {
1112
+ return new GetPositionRequest().fromJson(jsonValue, options);
1113
+ }
1114
+ static fromJsonString(jsonString, options) {
1115
+ return new GetPositionRequest().fromJsonString(jsonString, options);
1116
+ }
1117
+ static equals(a, b) {
1118
+ return proto3.util.equals(GetPositionRequest, a, b);
1119
+ }
1120
+ }
1121
+ GetPositionRequest.runtime = proto3;
1122
+ GetPositionRequest.typeName = "uniswap.liquidity.v2.GetPositionRequest";
1123
+ GetPositionRequest.fields = proto3.util.newFieldList(() => [
1124
+ { no: 1, name: "chain_id", kind: "enum", T: proto3.getEnumType(ChainId) },
1125
+ { no: 2, name: "version", kind: "enum", T: proto3.getEnumType(Protocols) },
1126
+ { no: 3, name: "token_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1127
+ { no: 4, name: "pair_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1128
+ { no: 5, name: "wallet_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1129
+ { no: 6, name: "position_manager_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1130
+ ]);
1131
+ /**
1132
+ * @generated from message uniswap.liquidity.v2.GetPositionResponse
1133
+ */
1134
+ export class GetPositionResponse extends Message {
1135
+ constructor(data) {
1136
+ super();
1137
+ proto3.util.initPartial(data, this);
1138
+ }
1139
+ static fromBinary(bytes, options) {
1140
+ return new GetPositionResponse().fromBinary(bytes, options);
1141
+ }
1142
+ static fromJson(jsonValue, options) {
1143
+ return new GetPositionResponse().fromJson(jsonValue, options);
1144
+ }
1145
+ static fromJsonString(jsonString, options) {
1146
+ return new GetPositionResponse().fromJsonString(jsonString, options);
1147
+ }
1148
+ static equals(a, b) {
1149
+ return proto3.util.equals(GetPositionResponse, a, b);
1150
+ }
1151
+ }
1152
+ GetPositionResponse.runtime = proto3;
1153
+ GetPositionResponse.typeName = "uniswap.liquidity.v2.GetPositionResponse";
1154
+ GetPositionResponse.fields = proto3.util.newFieldList(() => [
1155
+ { no: 1, name: "position", kind: "message", T: Position },
1156
+ ]);
1157
+ /**
1158
+ * GetWalletPositions — a wallet's LP positions (Positions Page), paginated
1159
+ * with the service's structured-cursor convention (see ListPools).
1160
+ *
1161
+ * @generated from message uniswap.liquidity.v2.GetWalletPositionsRequest
1162
+ */
1163
+ export class GetWalletPositionsRequest extends Message {
1164
+ constructor(data) {
1165
+ super();
1166
+ /**
1167
+ * @generated from field: string wallet_address = 1;
1168
+ */
1169
+ this.walletAddress = "";
1170
+ /**
1171
+ * Empty = all chains with positions data.
1172
+ *
1173
+ * @generated from field: repeated uniswap.liquidity.v1.ChainId chain_ids = 2;
1174
+ */
1175
+ this.chainIds = [];
1176
+ /**
1177
+ * Empty = all protocol versions.
1178
+ *
1179
+ * @generated from field: repeated uniswap.liquidity.v1.Protocols versions = 3;
1180
+ */
1181
+ this.versions = [];
1182
+ /**
1183
+ * Empty = all statuses (open and closed) — the behavior before this field.
1184
+ *
1185
+ * @generated from field: repeated uniswap.liquidity.v2.PositionStatus statuses = 6;
1186
+ */
1187
+ this.statuses = [];
1188
+ proto3.util.initPartial(data, this);
1189
+ }
1190
+ static fromBinary(bytes, options) {
1191
+ return new GetWalletPositionsRequest().fromBinary(bytes, options);
1192
+ }
1193
+ static fromJson(jsonValue, options) {
1194
+ return new GetWalletPositionsRequest().fromJson(jsonValue, options);
1195
+ }
1196
+ static fromJsonString(jsonString, options) {
1197
+ return new GetWalletPositionsRequest().fromJsonString(jsonString, options);
1198
+ }
1199
+ static equals(a, b) {
1200
+ return proto3.util.equals(GetWalletPositionsRequest, a, b);
1201
+ }
1202
+ }
1203
+ GetWalletPositionsRequest.runtime = proto3;
1204
+ GetWalletPositionsRequest.typeName = "uniswap.liquidity.v2.GetWalletPositionsRequest";
1205
+ GetWalletPositionsRequest.fields = proto3.util.newFieldList(() => [
1206
+ { no: 1, name: "wallet_address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1207
+ { no: 2, name: "chain_ids", kind: "enum", T: proto3.getEnumType(ChainId), repeated: true },
1208
+ { no: 3, name: "versions", kind: "enum", T: proto3.getEnumType(Protocols), repeated: true },
1209
+ { no: 4, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
1210
+ { no: 5, name: "cursor", kind: "message", T: PositionListCursor, opt: true },
1211
+ { no: 6, name: "statuses", kind: "enum", T: proto3.getEnumType(PositionStatus), repeated: true },
1212
+ ]);
1213
+ /**
1214
+ * @generated from message uniswap.liquidity.v2.GetWalletPositionsResponse
1215
+ */
1216
+ export class GetWalletPositionsResponse extends Message {
1217
+ constructor(data) {
1218
+ super();
1219
+ /**
1220
+ * @generated from field: repeated uniswap.liquidity.v2.Position positions = 1;
1221
+ */
1222
+ this.positions = [];
1223
+ proto3.util.initPartial(data, this);
1224
+ }
1225
+ static fromBinary(bytes, options) {
1226
+ return new GetWalletPositionsResponse().fromBinary(bytes, options);
1227
+ }
1228
+ static fromJson(jsonValue, options) {
1229
+ return new GetWalletPositionsResponse().fromJson(jsonValue, options);
1230
+ }
1231
+ static fromJsonString(jsonString, options) {
1232
+ return new GetWalletPositionsResponse().fromJsonString(jsonString, options);
1233
+ }
1234
+ static equals(a, b) {
1235
+ return proto3.util.equals(GetWalletPositionsResponse, a, b);
1236
+ }
1237
+ }
1238
+ GetWalletPositionsResponse.runtime = proto3;
1239
+ GetWalletPositionsResponse.typeName = "uniswap.liquidity.v2.GetWalletPositionsResponse";
1240
+ GetWalletPositionsResponse.fields = proto3.util.newFieldList(() => [
1241
+ { no: 1, name: "positions", kind: "message", T: Position, repeated: true },
1242
+ { no: 2, name: "next_cursor", kind: "message", T: PositionListCursor, opt: true },
1243
+ ]);