@uniswap/client-data-api 0.0.109 → 0.0.110

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,5 +1,5 @@
1
1
  import { MethodKind } from "@bufbuild/protobuf";
2
- import { ConvertFiatRequest, ConvertFiatResponse, GetEarnPositionRequest, GetEarnPositionResponse, GetTokenHistoryOHLCRequest, GetTokenHistoryOHLCResponse, GetTokenMarketsMultiChainRequest, GetTokenMarketsMultiChainResponse, GetTokenMarketsRequest, GetTokenMarketsResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse, ListTokensRequest, ListTokensResponse } from "./api_pb.js";
2
+ import { ConvertFiatRequest, ConvertFiatResponse, GetEarnPositionRequest, GetEarnPositionResponse, GetTokenHistoryOHLCRequest, GetTokenHistoryOHLCResponse, GetTokenHistoryVolumeRequest, GetTokenHistoryVolumeResponse, GetTokenMarketsMultiChainRequest, GetTokenMarketsMultiChainResponse, GetTokenMarketsRequest, GetTokenMarketsResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse, ListTokensRequest, ListTokensResponse } from "./api_pb.js";
3
3
  /**
4
4
  * @generated from rpc data.v2.DataApiService.GetToken
5
5
  */
@@ -91,6 +91,19 @@ export declare const getTokenHistoryOHLC: {
91
91
  readonly typeName: "data.v2.DataApiService";
92
92
  };
93
93
  };
94
+ /**
95
+ * @generated from rpc data.v2.DataApiService.GetTokenHistoryVolume
96
+ */
97
+ export declare const getTokenHistoryVolume: {
98
+ readonly localName: "getTokenHistoryVolume";
99
+ readonly name: "GetTokenHistoryVolume";
100
+ readonly kind: MethodKind.Unary;
101
+ readonly I: typeof GetTokenHistoryVolumeRequest;
102
+ readonly O: typeof GetTokenHistoryVolumeResponse;
103
+ readonly service: {
104
+ readonly typeName: "data.v2.DataApiService";
105
+ };
106
+ };
94
107
  /**
95
108
  * @generated from rpc data.v2.DataApiService.ConvertFiat
96
109
  */
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { MethodKind } from "@bufbuild/protobuf";
6
- import { ConvertFiatRequest, ConvertFiatResponse, GetEarnPositionRequest, GetEarnPositionResponse, GetTokenHistoryOHLCRequest, GetTokenHistoryOHLCResponse, GetTokenMarketsMultiChainRequest, GetTokenMarketsMultiChainResponse, GetTokenMarketsRequest, GetTokenMarketsResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse, ListTokensRequest, ListTokensResponse } from "./api_pb.js";
6
+ import { ConvertFiatRequest, ConvertFiatResponse, GetEarnPositionRequest, GetEarnPositionResponse, GetTokenHistoryOHLCRequest, GetTokenHistoryOHLCResponse, GetTokenHistoryVolumeRequest, GetTokenHistoryVolumeResponse, GetTokenMarketsMultiChainRequest, GetTokenMarketsMultiChainResponse, GetTokenMarketsRequest, GetTokenMarketsResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse, ListTokensRequest, ListTokensResponse } from "./api_pb.js";
7
7
  /**
8
8
  * @generated from rpc data.v2.DataApiService.GetToken
9
9
  */
@@ -95,6 +95,19 @@ export const getTokenHistoryOHLC = {
95
95
  typeName: "data.v2.DataApiService"
96
96
  }
97
97
  };
98
+ /**
99
+ * @generated from rpc data.v2.DataApiService.GetTokenHistoryVolume
100
+ */
101
+ export const getTokenHistoryVolume = {
102
+ localName: "getTokenHistoryVolume",
103
+ name: "GetTokenHistoryVolume",
104
+ kind: MethodKind.Unary,
105
+ I: GetTokenHistoryVolumeRequest,
106
+ O: GetTokenHistoryVolumeResponse,
107
+ service: {
108
+ typeName: "data.v2.DataApiService"
109
+ }
110
+ };
98
111
  /**
99
112
  * @generated from rpc data.v2.DataApiService.ConvertFiat
100
113
  */
@@ -1,4 +1,4 @@
1
- import { ConvertFiatRequest, ConvertFiatResponse, GetEarnPositionRequest, GetEarnPositionResponse, GetTokenHistoryOHLCRequest, GetTokenHistoryOHLCResponse, GetTokenMarketsMultiChainRequest, GetTokenMarketsMultiChainResponse, GetTokenMarketsRequest, GetTokenMarketsResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse, ListTokensRequest, ListTokensResponse } from "./api_pb.js";
1
+ import { ConvertFiatRequest, ConvertFiatResponse, GetEarnPositionRequest, GetEarnPositionResponse, GetTokenHistoryOHLCRequest, GetTokenHistoryOHLCResponse, GetTokenHistoryVolumeRequest, GetTokenHistoryVolumeResponse, GetTokenMarketsMultiChainRequest, GetTokenMarketsMultiChainResponse, GetTokenMarketsRequest, GetTokenMarketsResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse, ListTokensRequest, ListTokensResponse } from "./api_pb.js";
2
2
  import { MethodKind } from "@bufbuild/protobuf";
3
3
  /**
4
4
  * @generated from service data.v2.DataApiService
@@ -69,6 +69,15 @@ export declare const DataApiService: {
69
69
  readonly O: typeof GetTokenHistoryOHLCResponse;
70
70
  readonly kind: MethodKind.Unary;
71
71
  };
72
+ /**
73
+ * @generated from rpc data.v2.DataApiService.GetTokenHistoryVolume
74
+ */
75
+ readonly getTokenHistoryVolume: {
76
+ readonly name: "GetTokenHistoryVolume";
77
+ readonly I: typeof GetTokenHistoryVolumeRequest;
78
+ readonly O: typeof GetTokenHistoryVolumeResponse;
79
+ readonly kind: MethodKind.Unary;
80
+ };
72
81
  /**
73
82
  * @generated from rpc data.v2.DataApiService.ConvertFiat
74
83
  */
@@ -2,7 +2,7 @@
2
2
  // @generated from file data/v2/api.proto (package data.v2, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
- import { ConvertFiatRequest, ConvertFiatResponse, GetEarnPositionRequest, GetEarnPositionResponse, GetTokenHistoryOHLCRequest, GetTokenHistoryOHLCResponse, GetTokenMarketsMultiChainRequest, GetTokenMarketsMultiChainResponse, GetTokenMarketsRequest, GetTokenMarketsResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse, ListTokensRequest, ListTokensResponse } from "./api_pb.js";
5
+ import { ConvertFiatRequest, ConvertFiatResponse, GetEarnPositionRequest, GetEarnPositionResponse, GetTokenHistoryOHLCRequest, GetTokenHistoryOHLCResponse, GetTokenHistoryVolumeRequest, GetTokenHistoryVolumeResponse, GetTokenMarketsMultiChainRequest, GetTokenMarketsMultiChainResponse, GetTokenMarketsRequest, GetTokenMarketsResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse, ListTokensRequest, ListTokensResponse } from "./api_pb.js";
6
6
  import { MethodKind } from "@bufbuild/protobuf";
7
7
  /**
8
8
  * @generated from service data.v2.DataApiService
@@ -73,6 +73,15 @@ export const DataApiService = {
73
73
  O: GetTokenHistoryOHLCResponse,
74
74
  kind: MethodKind.Unary,
75
75
  },
76
+ /**
77
+ * @generated from rpc data.v2.DataApiService.GetTokenHistoryVolume
78
+ */
79
+ getTokenHistoryVolume: {
80
+ name: "GetTokenHistoryVolume",
81
+ I: GetTokenHistoryVolumeRequest,
82
+ O: GetTokenHistoryVolumeResponse,
83
+ kind: MethodKind.Unary,
84
+ },
76
85
  /**
77
86
  * @generated from rpc data.v2.DataApiService.ConvertFiat
78
87
  */
@@ -224,6 +224,94 @@ export declare class OhlcCandle extends Message<OhlcCandle> {
224
224
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OhlcCandle;
225
225
  static equals(a: OhlcCandle | PlainMessage<OhlcCandle> | undefined, b: OhlcCandle | PlainMessage<OhlcCandle> | undefined): boolean;
226
226
  }
227
+ /**
228
+ * Swap-volume history for a token's chart. single_chain is that chain's volume;
229
+ * multichain SUMS volume across the asset's chains (volume is additive, unlike
230
+ * OHLC price which reads one canonical chain).
231
+ *
232
+ * @generated from message data.v2.GetTokenHistoryVolumeRequest
233
+ */
234
+ export declare class GetTokenHistoryVolumeRequest extends Message<GetTokenHistoryVolumeRequest> {
235
+ /**
236
+ * @generated from oneof data.v2.GetTokenHistoryVolumeRequest.target
237
+ */
238
+ target: {
239
+ /**
240
+ * @generated from field: data.v2.TokenIdentifier single_chain = 1;
241
+ */
242
+ value: TokenIdentifier;
243
+ case: "singleChain";
244
+ } | {
245
+ /**
246
+ * @generated from field: data.v2.MultichainTarget multichain = 2;
247
+ */
248
+ value: MultichainTarget;
249
+ case: "multichain";
250
+ } | {
251
+ case: undefined;
252
+ value?: undefined;
253
+ };
254
+ /**
255
+ * UNSPECIFIED -> DAY
256
+ *
257
+ * @generated from field: data.v2.HistoryDuration duration = 3;
258
+ */
259
+ duration: HistoryDuration;
260
+ constructor(data?: PartialMessage<GetTokenHistoryVolumeRequest>);
261
+ static readonly runtime: typeof proto3;
262
+ static readonly typeName = "data.v2.GetTokenHistoryVolumeRequest";
263
+ static readonly fields: FieldList;
264
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetTokenHistoryVolumeRequest;
265
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetTokenHistoryVolumeRequest;
266
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetTokenHistoryVolumeRequest;
267
+ static equals(a: GetTokenHistoryVolumeRequest | PlainMessage<GetTokenHistoryVolumeRequest> | undefined, b: GetTokenHistoryVolumeRequest | PlainMessage<GetTokenHistoryVolumeRequest> | undefined): boolean;
268
+ }
269
+ /**
270
+ * @generated from message data.v2.GetTokenHistoryVolumeResponse
271
+ */
272
+ export declare class GetTokenHistoryVolumeResponse extends Message<GetTokenHistoryVolumeResponse> {
273
+ /**
274
+ * ascending time order
275
+ *
276
+ * @generated from field: repeated data.v2.VolumeBucket buckets = 1;
277
+ */
278
+ buckets: VolumeBucket[];
279
+ constructor(data?: PartialMessage<GetTokenHistoryVolumeResponse>);
280
+ static readonly runtime: typeof proto3;
281
+ static readonly typeName = "data.v2.GetTokenHistoryVolumeResponse";
282
+ static readonly fields: FieldList;
283
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetTokenHistoryVolumeResponse;
284
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetTokenHistoryVolumeResponse;
285
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetTokenHistoryVolumeResponse;
286
+ static equals(a: GetTokenHistoryVolumeResponse | PlainMessage<GetTokenHistoryVolumeResponse> | undefined, b: GetTokenHistoryVolumeResponse | PlainMessage<GetTokenHistoryVolumeResponse> | undefined): boolean;
287
+ }
288
+ /**
289
+ * One swap-volume bucket, labeled by its bucket-start time.
290
+ *
291
+ * @generated from message data.v2.VolumeBucket
292
+ */
293
+ export declare class VolumeBucket extends Message<VolumeBucket> {
294
+ /**
295
+ * unix seconds, bucket start (inclusive)
296
+ *
297
+ * @generated from field: int64 timestamp = 1;
298
+ */
299
+ timestamp: bigint;
300
+ /**
301
+ * unset when no swap in the bucket had a known USD price
302
+ *
303
+ * @generated from field: optional double volume_usd = 2;
304
+ */
305
+ volumeUsd?: number;
306
+ constructor(data?: PartialMessage<VolumeBucket>);
307
+ static readonly runtime: typeof proto3;
308
+ static readonly typeName = "data.v2.VolumeBucket";
309
+ static readonly fields: FieldList;
310
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VolumeBucket;
311
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VolumeBucket;
312
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VolumeBucket;
313
+ static equals(a: VolumeBucket | PlainMessage<VolumeBucket> | undefined, b: VolumeBucket | PlainMessage<VolumeBucket> | undefined): boolean;
314
+ }
227
315
  /**
228
316
  * 1:1 REST port of the legacy GraphQL `convert` query. Cross-currency pairs
229
317
  * (e.g. EUR -> JPY) are computed from the same USD-base rates snapshot.
@@ -294,6 +294,115 @@ OhlcCandle.fields = proto3.util.newFieldList(() => [
294
294
  { no: 4, name: "low_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
295
295
  { no: 5, name: "close_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
296
296
  ]);
297
+ /**
298
+ * Swap-volume history for a token's chart. single_chain is that chain's volume;
299
+ * multichain SUMS volume across the asset's chains (volume is additive, unlike
300
+ * OHLC price which reads one canonical chain).
301
+ *
302
+ * @generated from message data.v2.GetTokenHistoryVolumeRequest
303
+ */
304
+ export class GetTokenHistoryVolumeRequest extends Message {
305
+ constructor(data) {
306
+ super();
307
+ /**
308
+ * @generated from oneof data.v2.GetTokenHistoryVolumeRequest.target
309
+ */
310
+ this.target = { case: undefined };
311
+ /**
312
+ * UNSPECIFIED -> DAY
313
+ *
314
+ * @generated from field: data.v2.HistoryDuration duration = 3;
315
+ */
316
+ this.duration = HistoryDuration.UNSPECIFIED;
317
+ proto3.util.initPartial(data, this);
318
+ }
319
+ static fromBinary(bytes, options) {
320
+ return new GetTokenHistoryVolumeRequest().fromBinary(bytes, options);
321
+ }
322
+ static fromJson(jsonValue, options) {
323
+ return new GetTokenHistoryVolumeRequest().fromJson(jsonValue, options);
324
+ }
325
+ static fromJsonString(jsonString, options) {
326
+ return new GetTokenHistoryVolumeRequest().fromJsonString(jsonString, options);
327
+ }
328
+ static equals(a, b) {
329
+ return proto3.util.equals(GetTokenHistoryVolumeRequest, a, b);
330
+ }
331
+ }
332
+ GetTokenHistoryVolumeRequest.runtime = proto3;
333
+ GetTokenHistoryVolumeRequest.typeName = "data.v2.GetTokenHistoryVolumeRequest";
334
+ GetTokenHistoryVolumeRequest.fields = proto3.util.newFieldList(() => [
335
+ { no: 1, name: "single_chain", kind: "message", T: TokenIdentifier, oneof: "target" },
336
+ { no: 2, name: "multichain", kind: "message", T: MultichainTarget, oneof: "target" },
337
+ { no: 3, name: "duration", kind: "enum", T: proto3.getEnumType(HistoryDuration) },
338
+ ]);
339
+ /**
340
+ * @generated from message data.v2.GetTokenHistoryVolumeResponse
341
+ */
342
+ export class GetTokenHistoryVolumeResponse extends Message {
343
+ constructor(data) {
344
+ super();
345
+ /**
346
+ * ascending time order
347
+ *
348
+ * @generated from field: repeated data.v2.VolumeBucket buckets = 1;
349
+ */
350
+ this.buckets = [];
351
+ proto3.util.initPartial(data, this);
352
+ }
353
+ static fromBinary(bytes, options) {
354
+ return new GetTokenHistoryVolumeResponse().fromBinary(bytes, options);
355
+ }
356
+ static fromJson(jsonValue, options) {
357
+ return new GetTokenHistoryVolumeResponse().fromJson(jsonValue, options);
358
+ }
359
+ static fromJsonString(jsonString, options) {
360
+ return new GetTokenHistoryVolumeResponse().fromJsonString(jsonString, options);
361
+ }
362
+ static equals(a, b) {
363
+ return proto3.util.equals(GetTokenHistoryVolumeResponse, a, b);
364
+ }
365
+ }
366
+ GetTokenHistoryVolumeResponse.runtime = proto3;
367
+ GetTokenHistoryVolumeResponse.typeName = "data.v2.GetTokenHistoryVolumeResponse";
368
+ GetTokenHistoryVolumeResponse.fields = proto3.util.newFieldList(() => [
369
+ { no: 1, name: "buckets", kind: "message", T: VolumeBucket, repeated: true },
370
+ ]);
371
+ /**
372
+ * One swap-volume bucket, labeled by its bucket-start time.
373
+ *
374
+ * @generated from message data.v2.VolumeBucket
375
+ */
376
+ export class VolumeBucket extends Message {
377
+ constructor(data) {
378
+ super();
379
+ /**
380
+ * unix seconds, bucket start (inclusive)
381
+ *
382
+ * @generated from field: int64 timestamp = 1;
383
+ */
384
+ this.timestamp = protoInt64.zero;
385
+ proto3.util.initPartial(data, this);
386
+ }
387
+ static fromBinary(bytes, options) {
388
+ return new VolumeBucket().fromBinary(bytes, options);
389
+ }
390
+ static fromJson(jsonValue, options) {
391
+ return new VolumeBucket().fromJson(jsonValue, options);
392
+ }
393
+ static fromJsonString(jsonString, options) {
394
+ return new VolumeBucket().fromJsonString(jsonString, options);
395
+ }
396
+ static equals(a, b) {
397
+ return proto3.util.equals(VolumeBucket, a, b);
398
+ }
399
+ }
400
+ VolumeBucket.runtime = proto3;
401
+ VolumeBucket.typeName = "data.v2.VolumeBucket";
402
+ VolumeBucket.fields = proto3.util.newFieldList(() => [
403
+ { no: 1, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
404
+ { no: 2, name: "volume_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
405
+ ]);
297
406
  /**
298
407
  * 1:1 REST port of the legacy GraphQL `convert` query. Cross-currency pairs
299
408
  * (e.g. EUR -> JPY) are computed from the same USD-base rates snapshot.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-data-api",
3
- "version": "0.0.109",
3
+ "version": "0.0.110",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },