@uniswap/client-data-api 0.0.293 → 0.0.295

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.
@@ -0,0 +1,349 @@
1
+ // @generated by protoc-gen-es v1.10.1 with parameter "target=ts"
2
+ // @generated from file data/v2/hooks.proto (package data.v2, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { Message, proto3 } from "@bufbuild/protobuf";
6
+ import { PoolStatRangeFilter } from "./types_pb.js";
7
+ /**
8
+ * @generated from enum data.v2.HooksOrderBy
9
+ */
10
+ export var HooksOrderBy;
11
+ (function (HooksOrderBy) {
12
+ /**
13
+ * @generated from enum value: HOOKS_ORDER_BY_UNSPECIFIED = 0;
14
+ */
15
+ HooksOrderBy[HooksOrderBy["UNSPECIFIED"] = 0] = "UNSPECIFIED";
16
+ /**
17
+ * @generated from enum value: HOOKS_ORDER_BY_VOLUME_1D = 1;
18
+ */
19
+ HooksOrderBy[HooksOrderBy["VOLUME_1D"] = 1] = "VOLUME_1D";
20
+ /**
21
+ * @generated from enum value: HOOKS_ORDER_BY_VOLUME_7D = 2;
22
+ */
23
+ HooksOrderBy[HooksOrderBy["VOLUME_7D"] = 2] = "VOLUME_7D";
24
+ /**
25
+ * @generated from enum value: HOOKS_ORDER_BY_VOLUME_30D = 3;
26
+ */
27
+ HooksOrderBy[HooksOrderBy["VOLUME_30D"] = 3] = "VOLUME_30D";
28
+ /**
29
+ * @generated from enum value: HOOKS_ORDER_BY_TVL = 4;
30
+ */
31
+ HooksOrderBy[HooksOrderBy["TVL"] = 4] = "TVL";
32
+ /**
33
+ * @generated from enum value: HOOKS_ORDER_BY_POOL_COUNT = 5;
34
+ */
35
+ HooksOrderBy[HooksOrderBy["POOL_COUNT"] = 5] = "POOL_COUNT";
36
+ })(HooksOrderBy || (HooksOrderBy = {}));
37
+ // Retrieve enum metadata with: proto3.getEnumType(HooksOrderBy)
38
+ proto3.util.setEnumType(HooksOrderBy, "data.v2.HooksOrderBy", [
39
+ { no: 0, name: "HOOKS_ORDER_BY_UNSPECIFIED" },
40
+ { no: 1, name: "HOOKS_ORDER_BY_VOLUME_1D" },
41
+ { no: 2, name: "HOOKS_ORDER_BY_VOLUME_7D" },
42
+ { no: 3, name: "HOOKS_ORDER_BY_VOLUME_30D" },
43
+ { no: 4, name: "HOOKS_ORDER_BY_TVL" },
44
+ { no: 5, name: "HOOKS_ORDER_BY_POOL_COUNT" },
45
+ ]);
46
+ /**
47
+ * @generated from message data.v2.Hook
48
+ */
49
+ export class Hook extends Message {
50
+ constructor(data) {
51
+ super();
52
+ /**
53
+ * Every deployment in the group on every chain, whatever the request's
54
+ * chains, ordered by chain id then TVL (highest first). A chain can hold
55
+ * several deployments (a team's per-pool hooks).
56
+ *
57
+ * @generated from field: repeated data.v2.HookDeployment deployments = 5;
58
+ */
59
+ this.deployments = [];
60
+ /**
61
+ * true if any deployment's address has the swap return-delta permission
62
+ * bits, so its volume is grayed out.
63
+ *
64
+ * @generated from field: bool has_custom_accounting = 6;
65
+ */
66
+ this.hasCustomAccounting = false;
67
+ /**
68
+ * true if any deployment is a known aggregator hook, whose liquidity sits
69
+ * outside the pool, so its TVL and volume read about zero.
70
+ *
71
+ * @generated from field: bool is_aggregator_hook = 10;
72
+ */
73
+ this.isAggregatorHook = false;
74
+ proto3.util.initPartial(data, this);
75
+ }
76
+ static fromBinary(bytes, options) {
77
+ return new Hook().fromBinary(bytes, options);
78
+ }
79
+ static fromJson(jsonValue, options) {
80
+ return new Hook().fromJson(jsonValue, options);
81
+ }
82
+ static fromJsonString(jsonString, options) {
83
+ return new Hook().fromJsonString(jsonString, options);
84
+ }
85
+ static equals(a, b) {
86
+ return proto3.util.equals(Hook, a, b);
87
+ }
88
+ }
89
+ Hook.runtime = proto3;
90
+ Hook.typeName = "data.v2.Hook";
91
+ Hook.fields = proto3.util.newFieldList(() => [
92
+ { no: 1, name: "group_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
93
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
94
+ { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
95
+ { no: 4, name: "verified_source", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
96
+ { no: 5, name: "deployments", kind: "message", T: HookDeployment, repeated: true },
97
+ { no: 6, name: "has_custom_accounting", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
98
+ { no: 7, name: "routing_allowlisted", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
99
+ { no: 8, name: "built_by_uniswap", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
100
+ { no: 9, name: "configured_by", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
101
+ { no: 10, name: "is_aggregator_hook", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
102
+ ]);
103
+ /**
104
+ * @generated from message data.v2.HookDeployment
105
+ */
106
+ export class HookDeployment extends Message {
107
+ constructor(data) {
108
+ super();
109
+ /**
110
+ * @generated from field: uint32 chain_id = 1;
111
+ */
112
+ this.chainId = 0;
113
+ /**
114
+ * lowercase
115
+ *
116
+ * @generated from field: string address = 2;
117
+ */
118
+ this.address = "";
119
+ /**
120
+ * the address's low 14 bits: the hook's V4 permission flags
121
+ *
122
+ * @generated from field: uint32 flags_bitmask = 3;
123
+ */
124
+ this.flagsBitmask = 0;
125
+ proto3.util.initPartial(data, this);
126
+ }
127
+ static fromBinary(bytes, options) {
128
+ return new HookDeployment().fromBinary(bytes, options);
129
+ }
130
+ static fromJson(jsonValue, options) {
131
+ return new HookDeployment().fromJson(jsonValue, options);
132
+ }
133
+ static fromJsonString(jsonString, options) {
134
+ return new HookDeployment().fromJsonString(jsonString, options);
135
+ }
136
+ static equals(a, b) {
137
+ return proto3.util.equals(HookDeployment, a, b);
138
+ }
139
+ }
140
+ HookDeployment.runtime = proto3;
141
+ HookDeployment.typeName = "data.v2.HookDeployment";
142
+ HookDeployment.fields = proto3.util.newFieldList(() => [
143
+ { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
144
+ { no: 2, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
145
+ { no: 3, name: "flags_bitmask", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
146
+ { no: 4, name: "deployer", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
147
+ { no: 5, name: "verified_source", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
148
+ { no: 6, name: "routing_allowlisted", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
149
+ ]);
150
+ /**
151
+ * @generated from message data.v2.HookRankStats
152
+ */
153
+ export class HookRankStats extends Message {
154
+ constructor(data) {
155
+ super();
156
+ /**
157
+ * pools counted in the hook's stats
158
+ *
159
+ * @generated from field: uint32 pool_count = 7;
160
+ */
161
+ this.poolCount = 0;
162
+ proto3.util.initPartial(data, this);
163
+ }
164
+ static fromBinary(bytes, options) {
165
+ return new HookRankStats().fromBinary(bytes, options);
166
+ }
167
+ static fromJson(jsonValue, options) {
168
+ return new HookRankStats().fromJson(jsonValue, options);
169
+ }
170
+ static fromJsonString(jsonString, options) {
171
+ return new HookRankStats().fromJsonString(jsonString, options);
172
+ }
173
+ static equals(a, b) {
174
+ return proto3.util.equals(HookRankStats, a, b);
175
+ }
176
+ }
177
+ HookRankStats.runtime = proto3;
178
+ HookRankStats.typeName = "data.v2.HookRankStats";
179
+ HookRankStats.fields = proto3.util.newFieldList(() => [
180
+ { no: 1, name: "tvl", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
181
+ { no: 2, name: "volume_1d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
182
+ { no: 3, name: "volume_7d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
183
+ { no: 4, name: "volume_30d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
184
+ { no: 5, name: "volume_all", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
185
+ { no: 6, name: "fees_all", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
186
+ { no: 7, name: "pool_count", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
187
+ ]);
188
+ /**
189
+ * @generated from message data.v2.ChainHookRankStats
190
+ */
191
+ export class ChainHookRankStats extends Message {
192
+ constructor(data) {
193
+ super();
194
+ /**
195
+ * @generated from field: uint32 chain_id = 1;
196
+ */
197
+ this.chainId = 0;
198
+ proto3.util.initPartial(data, this);
199
+ }
200
+ static fromBinary(bytes, options) {
201
+ return new ChainHookRankStats().fromBinary(bytes, options);
202
+ }
203
+ static fromJson(jsonValue, options) {
204
+ return new ChainHookRankStats().fromJson(jsonValue, options);
205
+ }
206
+ static fromJsonString(jsonString, options) {
207
+ return new ChainHookRankStats().fromJsonString(jsonString, options);
208
+ }
209
+ static equals(a, b) {
210
+ return proto3.util.equals(ChainHookRankStats, a, b);
211
+ }
212
+ }
213
+ ChainHookRankStats.runtime = proto3;
214
+ ChainHookRankStats.typeName = "data.v2.ChainHookRankStats";
215
+ ChainHookRankStats.fields = proto3.util.newFieldList(() => [
216
+ { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
217
+ { no: 2, name: "stats", kind: "message", T: HookRankStats },
218
+ ]);
219
+ /**
220
+ * @generated from message data.v2.RankedHook
221
+ */
222
+ export class RankedHook extends Message {
223
+ constructor(data) {
224
+ super();
225
+ /**
226
+ * one entry per requested chain the hook is on
227
+ *
228
+ * @generated from field: repeated data.v2.ChainHookRankStats chain_stats = 3;
229
+ */
230
+ this.chainStats = [];
231
+ proto3.util.initPartial(data, this);
232
+ }
233
+ static fromBinary(bytes, options) {
234
+ return new RankedHook().fromBinary(bytes, options);
235
+ }
236
+ static fromJson(jsonValue, options) {
237
+ return new RankedHook().fromJson(jsonValue, options);
238
+ }
239
+ static fromJsonString(jsonString, options) {
240
+ return new RankedHook().fromJsonString(jsonString, options);
241
+ }
242
+ static equals(a, b) {
243
+ return proto3.util.equals(RankedHook, a, b);
244
+ }
245
+ }
246
+ RankedHook.runtime = proto3;
247
+ RankedHook.typeName = "data.v2.RankedHook";
248
+ RankedHook.fields = proto3.util.newFieldList(() => [
249
+ { no: 1, name: "hook", kind: "message", T: Hook },
250
+ { no: 2, name: "stats", kind: "message", T: HookRankStats },
251
+ { no: 3, name: "chain_stats", kind: "message", T: ChainHookRankStats, repeated: true },
252
+ ]);
253
+ /**
254
+ * @generated from message data.v2.HookListFilter
255
+ */
256
+ export class HookListFilter extends Message {
257
+ constructor(data) {
258
+ super();
259
+ proto3.util.initPartial(data, this);
260
+ }
261
+ static fromBinary(bytes, options) {
262
+ return new HookListFilter().fromBinary(bytes, options);
263
+ }
264
+ static fromJson(jsonValue, options) {
265
+ return new HookListFilter().fromJson(jsonValue, options);
266
+ }
267
+ static fromJsonString(jsonString, options) {
268
+ return new HookListFilter().fromJsonString(jsonString, options);
269
+ }
270
+ static equals(a, b) {
271
+ return proto3.util.equals(HookListFilter, a, b);
272
+ }
273
+ }
274
+ HookListFilter.runtime = proto3;
275
+ HookListFilter.typeName = "data.v2.HookListFilter";
276
+ HookListFilter.fields = proto3.util.newFieldList(() => [
277
+ { no: 1, name: "verified_only", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
278
+ { no: 2, name: "routed_only", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
279
+ { no: 3, name: "has_metadata", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
280
+ { no: 4, name: "tvl", kind: "message", T: PoolStatRangeFilter, opt: true },
281
+ { no: 5, name: "search_query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
282
+ ]);
283
+ /**
284
+ * Zero values sort after positive ones and unset values sort last, in both
285
+ * directions.
286
+ *
287
+ * @generated from message data.v2.HooksSort
288
+ */
289
+ export class HooksSort extends Message {
290
+ constructor(data) {
291
+ super();
292
+ proto3.util.initPartial(data, this);
293
+ }
294
+ static fromBinary(bytes, options) {
295
+ return new HooksSort().fromBinary(bytes, options);
296
+ }
297
+ static fromJson(jsonValue, options) {
298
+ return new HooksSort().fromJson(jsonValue, options);
299
+ }
300
+ static fromJsonString(jsonString, options) {
301
+ return new HooksSort().fromJsonString(jsonString, options);
302
+ }
303
+ static equals(a, b) {
304
+ return proto3.util.equals(HooksSort, a, b);
305
+ }
306
+ }
307
+ HooksSort.runtime = proto3;
308
+ HooksSort.typeName = "data.v2.HooksSort";
309
+ HooksSort.fields = proto3.util.newFieldList(() => [
310
+ { no: 1, name: "order_by", kind: "enum", T: proto3.getEnumType(HooksOrderBy), opt: true },
311
+ { no: 2, name: "ascending", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
312
+ ]);
313
+ /**
314
+ * @generated from message data.v2.HookIdentifier
315
+ */
316
+ export class HookIdentifier extends Message {
317
+ constructor(data) {
318
+ super();
319
+ /**
320
+ * @generated from field: uint32 chain_id = 1;
321
+ */
322
+ this.chainId = 0;
323
+ /**
324
+ * any casing
325
+ *
326
+ * @generated from field: string address = 2;
327
+ */
328
+ this.address = "";
329
+ proto3.util.initPartial(data, this);
330
+ }
331
+ static fromBinary(bytes, options) {
332
+ return new HookIdentifier().fromBinary(bytes, options);
333
+ }
334
+ static fromJson(jsonValue, options) {
335
+ return new HookIdentifier().fromJson(jsonValue, options);
336
+ }
337
+ static fromJsonString(jsonString, options) {
338
+ return new HookIdentifier().fromJsonString(jsonString, options);
339
+ }
340
+ static equals(a, b) {
341
+ return proto3.util.equals(HookIdentifier, a, b);
342
+ }
343
+ }
344
+ HookIdentifier.runtime = proto3;
345
+ HookIdentifier.typeName = "data.v2.HookIdentifier";
346
+ HookIdentifier.fields = proto3.util.newFieldList(() => [
347
+ { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
348
+ { no: 2, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
349
+ ]);
@@ -826,6 +826,10 @@ export declare class TokenMarketStats extends Message<TokenMarketStats> {
826
826
  * @generated from field: optional double pools_total_value_locked_usd = 8;
827
827
  */
828
828
  poolsTotalValueLockedUsd?: number;
829
+ /**
830
+ * @generated from field: optional double price_all_time_high_usd = 9;
831
+ */
832
+ priceAllTimeHighUsd?: number;
829
833
  constructor(data?: PartialMessage<TokenMarketStats>);
830
834
  static readonly runtime: typeof proto3;
831
835
  static readonly typeName = "data.v2.TokenMarketStats";
@@ -1733,6 +1737,20 @@ export declare class PoolListFilter extends Message<PoolListFilter> {
1733
1737
  * @generated from field: repeated string category_ids = 12;
1734
1738
  */
1735
1739
  categoryIds: string[];
1740
+ /**
1741
+ * V4 pools using any of these hook addresses (any casing), such as every
1742
+ * deployment of one hook; max 25.
1743
+ *
1744
+ * @generated from field: repeated string hook_addresses = 13;
1745
+ */
1746
+ hookAddresses: string[];
1747
+ /**
1748
+ * Only pools with a hook: V4 pools whose hook is neither unset nor the zero
1749
+ * address.
1750
+ *
1751
+ * @generated from field: optional bool hooked_only = 14;
1752
+ */
1753
+ hookedOnly?: boolean;
1736
1754
  constructor(data?: PartialMessage<PoolListFilter>);
1737
1755
  static readonly runtime: typeof proto3;
1738
1756
  static readonly typeName = "data.v2.PoolListFilter";
@@ -915,6 +915,7 @@ TokenMarketStats.fields = proto3.util.newFieldList(() => [
915
915
  { no: 6, name: "volume_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
916
916
  { no: 7, name: "volume_duration", kind: "enum", T: proto3.getEnumType(HistoryDuration) },
917
917
  { no: 8, name: "pools_total_value_locked_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
918
+ { no: 9, name: "price_all_time_high_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
918
919
  ]);
919
920
  /**
920
921
  * Buy/sell activity for one window, summed over the requested chains. Buy and
@@ -1768,6 +1769,13 @@ export class PoolListFilter extends Message {
1768
1769
  * @generated from field: repeated string category_ids = 12;
1769
1770
  */
1770
1771
  this.categoryIds = [];
1772
+ /**
1773
+ * V4 pools using any of these hook addresses (any casing), such as every
1774
+ * deployment of one hook; max 25.
1775
+ *
1776
+ * @generated from field: repeated string hook_addresses = 13;
1777
+ */
1778
+ this.hookAddresses = [];
1771
1779
  proto3.util.initPartial(data, this);
1772
1780
  }
1773
1781
  static fromBinary(bytes, options) {
@@ -1797,6 +1805,8 @@ PoolListFilter.fields = proto3.util.newFieldList(() => [
1797
1805
  { no: 9, name: "rewards_only", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
1798
1806
  { no: 10, name: "search_query", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1799
1807
  { no: 12, name: "category_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1808
+ { no: 13, name: "hook_addresses", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
1809
+ { no: 14, name: "hooked_only", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
1800
1810
  ]);
1801
1811
  /**
1802
1812
  * Returned by ListPools — wraps a Pool with its ranking stats.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-data-api",
3
- "version": "0.0.293",
3
+ "version": "0.0.295",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },