@uniswap/client-data-api 0.0.81 → 0.0.83

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 { GetEarnPositionRequest, GetEarnPositionResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse } from "./api_pb.js";
2
+ import { GetEarnPositionRequest, GetEarnPositionResponse, 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
  */
@@ -39,6 +39,19 @@ export declare const getTokensMultiChain: {
39
39
  readonly typeName: "data.v2.DataApiService";
40
40
  };
41
41
  };
42
+ /**
43
+ * @generated from rpc data.v2.DataApiService.ListTokens
44
+ */
45
+ export declare const listTokens: {
46
+ readonly localName: "listTokens";
47
+ readonly name: "ListTokens";
48
+ readonly kind: MethodKind.Unary;
49
+ readonly I: typeof ListTokensRequest;
50
+ readonly O: typeof ListTokensResponse;
51
+ readonly service: {
52
+ readonly typeName: "data.v2.DataApiService";
53
+ };
54
+ };
42
55
  /**
43
56
  * @generated from rpc data.v2.DataApiService.ListEarnVaults
44
57
  */
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { MethodKind } from "@bufbuild/protobuf";
6
- import { GetEarnPositionRequest, GetEarnPositionResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse } from "./api_pb.js";
6
+ import { GetEarnPositionRequest, GetEarnPositionResponse, 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
  */
@@ -43,6 +43,19 @@ export const getTokensMultiChain = {
43
43
  typeName: "data.v2.DataApiService"
44
44
  }
45
45
  };
46
+ /**
47
+ * @generated from rpc data.v2.DataApiService.ListTokens
48
+ */
49
+ export const listTokens = {
50
+ localName: "listTokens",
51
+ name: "ListTokens",
52
+ kind: MethodKind.Unary,
53
+ I: ListTokensRequest,
54
+ O: ListTokensResponse,
55
+ service: {
56
+ typeName: "data.v2.DataApiService"
57
+ }
58
+ };
46
59
  /**
47
60
  * @generated from rpc data.v2.DataApiService.ListEarnVaults
48
61
  */
@@ -1,4 +1,4 @@
1
- import { GetEarnPositionRequest, GetEarnPositionResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse } from "./api_pb.js";
1
+ import { GetEarnPositionRequest, GetEarnPositionResponse, 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
@@ -33,6 +33,15 @@ export declare const DataApiService: {
33
33
  readonly O: typeof GetTokensMultiChainResponse;
34
34
  readonly kind: MethodKind.Unary;
35
35
  };
36
+ /**
37
+ * @generated from rpc data.v2.DataApiService.ListTokens
38
+ */
39
+ readonly listTokens: {
40
+ readonly name: "ListTokens";
41
+ readonly I: typeof ListTokensRequest;
42
+ readonly O: typeof ListTokensResponse;
43
+ readonly kind: MethodKind.Unary;
44
+ };
36
45
  /**
37
46
  * @generated from rpc data.v2.DataApiService.ListEarnVaults
38
47
  */
@@ -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 { GetEarnPositionRequest, GetEarnPositionResponse, GetTokenRequest, GetTokenResponse, GetTokensMultiChainRequest, GetTokensMultiChainResponse, GetTokensRequest, GetTokensResponse, ListEarnPositionsRequest, ListEarnPositionsResponse, ListEarnVaultsRequest, ListEarnVaultsResponse } from "./api_pb.js";
5
+ import { GetEarnPositionRequest, GetEarnPositionResponse, 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
@@ -37,6 +37,15 @@ export const DataApiService = {
37
37
  O: GetTokensMultiChainResponse,
38
38
  kind: MethodKind.Unary,
39
39
  },
40
+ /**
41
+ * @generated from rpc data.v2.DataApiService.ListTokens
42
+ */
43
+ listTokens: {
44
+ name: "ListTokens",
45
+ I: ListTokensRequest,
46
+ O: ListTokensResponse,
47
+ kind: MethodKind.Unary,
48
+ },
40
49
  /**
41
50
  * @generated from rpc data.v2.DataApiService.ListEarnVaults
42
51
  */
@@ -1,7 +1,8 @@
1
1
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
2
  import { Message, proto3 } from "@bufbuild/protobuf";
3
- import { MultichainToken, Token } from "./types_pb.js";
3
+ import { MultichainToken, RankedMultichainToken, Token, TokenListFilter, TokensSort } from "./types_pb.js";
4
4
  import { EarnPosition, EarnVault } from "./earn_pb.js";
5
+ import { PageRequest, PageResponse } from "./common_pb.js";
5
6
  /**
6
7
  * @generated from message data.v2.GetTokenRequest
7
8
  */
@@ -332,3 +333,53 @@ export declare class GetEarnPositionResponse extends Message<GetEarnPositionResp
332
333
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetEarnPositionResponse;
333
334
  static equals(a: GetEarnPositionResponse | PlainMessage<GetEarnPositionResponse> | undefined, b: GetEarnPositionResponse | PlainMessage<GetEarnPositionResponse> | undefined): boolean;
334
335
  }
336
+ /**
337
+ * @generated from message data.v2.ListTokensRequest
338
+ */
339
+ export declare class ListTokensRequest extends Message<ListTokensRequest> {
340
+ /**
341
+ * @generated from field: repeated uint32 chain_ids = 1;
342
+ */
343
+ chainIds: number[];
344
+ /**
345
+ * @generated from field: optional data.v2.TokensSort sort = 2;
346
+ */
347
+ sort?: TokensSort;
348
+ /**
349
+ * @generated from field: optional data.v2.TokenListFilter filter = 3;
350
+ */
351
+ filter?: TokenListFilter;
352
+ /**
353
+ * @generated from field: optional data.v2.PageRequest page = 4;
354
+ */
355
+ page?: PageRequest;
356
+ constructor(data?: PartialMessage<ListTokensRequest>);
357
+ static readonly runtime: typeof proto3;
358
+ static readonly typeName = "data.v2.ListTokensRequest";
359
+ static readonly fields: FieldList;
360
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListTokensRequest;
361
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListTokensRequest;
362
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListTokensRequest;
363
+ static equals(a: ListTokensRequest | PlainMessage<ListTokensRequest> | undefined, b: ListTokensRequest | PlainMessage<ListTokensRequest> | undefined): boolean;
364
+ }
365
+ /**
366
+ * @generated from message data.v2.ListTokensResponse
367
+ */
368
+ export declare class ListTokensResponse extends Message<ListTokensResponse> {
369
+ /**
370
+ * @generated from field: repeated data.v2.RankedMultichainToken multichain_tokens = 1;
371
+ */
372
+ multichainTokens: RankedMultichainToken[];
373
+ /**
374
+ * @generated from field: data.v2.PageResponse page = 2;
375
+ */
376
+ page?: PageResponse;
377
+ constructor(data?: PartialMessage<ListTokensResponse>);
378
+ static readonly runtime: typeof proto3;
379
+ static readonly typeName = "data.v2.ListTokensResponse";
380
+ static readonly fields: FieldList;
381
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListTokensResponse;
382
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListTokensResponse;
383
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListTokensResponse;
384
+ static equals(a: ListTokensResponse | PlainMessage<ListTokensResponse> | undefined, b: ListTokensResponse | PlainMessage<ListTokensResponse> | undefined): boolean;
385
+ }
@@ -3,8 +3,9 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { Message, proto3 } from "@bufbuild/protobuf";
6
- import { MultichainToken, Token } from "./types_pb.js";
6
+ import { MultichainToken, RankedMultichainToken, Token, TokenListFilter, TokensSort } from "./types_pb.js";
7
7
  import { EarnPosition, EarnVault } from "./earn_pb.js";
8
+ import { PageRequest, PageResponse } from "./common_pb.js";
8
9
  /**
9
10
  * @generated from message data.v2.GetTokenRequest
10
11
  */
@@ -492,3 +493,67 @@ GetEarnPositionResponse.typeName = "data.v2.GetEarnPositionResponse";
492
493
  GetEarnPositionResponse.fields = proto3.util.newFieldList(() => [
493
494
  { no: 1, name: "position", kind: "message", T: EarnPosition },
494
495
  ]);
496
+ /**
497
+ * @generated from message data.v2.ListTokensRequest
498
+ */
499
+ export class ListTokensRequest extends Message {
500
+ constructor(data) {
501
+ super();
502
+ /**
503
+ * @generated from field: repeated uint32 chain_ids = 1;
504
+ */
505
+ this.chainIds = [];
506
+ proto3.util.initPartial(data, this);
507
+ }
508
+ static fromBinary(bytes, options) {
509
+ return new ListTokensRequest().fromBinary(bytes, options);
510
+ }
511
+ static fromJson(jsonValue, options) {
512
+ return new ListTokensRequest().fromJson(jsonValue, options);
513
+ }
514
+ static fromJsonString(jsonString, options) {
515
+ return new ListTokensRequest().fromJsonString(jsonString, options);
516
+ }
517
+ static equals(a, b) {
518
+ return proto3.util.equals(ListTokensRequest, a, b);
519
+ }
520
+ }
521
+ ListTokensRequest.runtime = proto3;
522
+ ListTokensRequest.typeName = "data.v2.ListTokensRequest";
523
+ ListTokensRequest.fields = proto3.util.newFieldList(() => [
524
+ { no: 1, name: "chain_ids", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
525
+ { no: 2, name: "sort", kind: "message", T: TokensSort, opt: true },
526
+ { no: 3, name: "filter", kind: "message", T: TokenListFilter, opt: true },
527
+ { no: 4, name: "page", kind: "message", T: PageRequest, opt: true },
528
+ ]);
529
+ /**
530
+ * @generated from message data.v2.ListTokensResponse
531
+ */
532
+ export class ListTokensResponse extends Message {
533
+ constructor(data) {
534
+ super();
535
+ /**
536
+ * @generated from field: repeated data.v2.RankedMultichainToken multichain_tokens = 1;
537
+ */
538
+ this.multichainTokens = [];
539
+ proto3.util.initPartial(data, this);
540
+ }
541
+ static fromBinary(bytes, options) {
542
+ return new ListTokensResponse().fromBinary(bytes, options);
543
+ }
544
+ static fromJson(jsonValue, options) {
545
+ return new ListTokensResponse().fromJson(jsonValue, options);
546
+ }
547
+ static fromJsonString(jsonString, options) {
548
+ return new ListTokensResponse().fromJsonString(jsonString, options);
549
+ }
550
+ static equals(a, b) {
551
+ return proto3.util.equals(ListTokensResponse, a, b);
552
+ }
553
+ }
554
+ ListTokensResponse.runtime = proto3;
555
+ ListTokensResponse.typeName = "data.v2.ListTokensResponse";
556
+ ListTokensResponse.fields = proto3.util.newFieldList(() => [
557
+ { no: 1, name: "multichain_tokens", kind: "message", T: RankedMultichainToken, repeated: true },
558
+ { no: 2, name: "page", kind: "message", T: PageResponse },
559
+ ]);
@@ -0,0 +1,47 @@
1
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
+ import { Message, proto3 } from "@bufbuild/protobuf";
3
+ /**
4
+ * Standard pagination request fields. Embed in any paginated List request.
5
+ * page_size: max items per page; each endpoint defines its own default and cap.
6
+ * page_token: opaque cursor from a previous response; omit for the first page.
7
+ *
8
+ * @generated from message data.v2.PageRequest
9
+ */
10
+ export declare class PageRequest extends Message<PageRequest> {
11
+ /**
12
+ * @generated from field: optional uint32 page_size = 1;
13
+ */
14
+ pageSize?: number;
15
+ /**
16
+ * @generated from field: optional string page_token = 2;
17
+ */
18
+ pageToken?: string;
19
+ constructor(data?: PartialMessage<PageRequest>);
20
+ static readonly runtime: typeof proto3;
21
+ static readonly typeName = "data.v2.PageRequest";
22
+ static readonly fields: FieldList;
23
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PageRequest;
24
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PageRequest;
25
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PageRequest;
26
+ static equals(a: PageRequest | PlainMessage<PageRequest> | undefined, b: PageRequest | PlainMessage<PageRequest> | undefined): boolean;
27
+ }
28
+ /**
29
+ * Standard pagination response fields. Embed in any paginated List response.
30
+ * next_page_token absent means this is the last page.
31
+ *
32
+ * @generated from message data.v2.PageResponse
33
+ */
34
+ export declare class PageResponse extends Message<PageResponse> {
35
+ /**
36
+ * @generated from field: optional string next_page_token = 1;
37
+ */
38
+ nextPageToken?: string;
39
+ constructor(data?: PartialMessage<PageResponse>);
40
+ static readonly runtime: typeof proto3;
41
+ static readonly typeName = "data.v2.PageResponse";
42
+ static readonly fields: FieldList;
43
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PageResponse;
44
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PageResponse;
45
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PageResponse;
46
+ static equals(a: PageResponse | PlainMessage<PageResponse> | undefined, b: PageResponse | PlainMessage<PageResponse> | undefined): boolean;
47
+ }
@@ -0,0 +1,65 @@
1
+ // @generated by protoc-gen-es v1.10.1 with parameter "target=ts"
2
+ // @generated from file data/v2/common.proto (package data.v2, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+ import { Message, proto3 } from "@bufbuild/protobuf";
6
+ /**
7
+ * Standard pagination request fields. Embed in any paginated List request.
8
+ * page_size: max items per page; each endpoint defines its own default and cap.
9
+ * page_token: opaque cursor from a previous response; omit for the first page.
10
+ *
11
+ * @generated from message data.v2.PageRequest
12
+ */
13
+ export class PageRequest extends Message {
14
+ constructor(data) {
15
+ super();
16
+ proto3.util.initPartial(data, this);
17
+ }
18
+ static fromBinary(bytes, options) {
19
+ return new PageRequest().fromBinary(bytes, options);
20
+ }
21
+ static fromJson(jsonValue, options) {
22
+ return new PageRequest().fromJson(jsonValue, options);
23
+ }
24
+ static fromJsonString(jsonString, options) {
25
+ return new PageRequest().fromJsonString(jsonString, options);
26
+ }
27
+ static equals(a, b) {
28
+ return proto3.util.equals(PageRequest, a, b);
29
+ }
30
+ }
31
+ PageRequest.runtime = proto3;
32
+ PageRequest.typeName = "data.v2.PageRequest";
33
+ PageRequest.fields = proto3.util.newFieldList(() => [
34
+ { no: 1, name: "page_size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
35
+ { no: 2, name: "page_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
36
+ ]);
37
+ /**
38
+ * Standard pagination response fields. Embed in any paginated List response.
39
+ * next_page_token absent means this is the last page.
40
+ *
41
+ * @generated from message data.v2.PageResponse
42
+ */
43
+ export class PageResponse extends Message {
44
+ constructor(data) {
45
+ super();
46
+ proto3.util.initPartial(data, this);
47
+ }
48
+ static fromBinary(bytes, options) {
49
+ return new PageResponse().fromBinary(bytes, options);
50
+ }
51
+ static fromJson(jsonValue, options) {
52
+ return new PageResponse().fromJson(jsonValue, options);
53
+ }
54
+ static fromJsonString(jsonString, options) {
55
+ return new PageResponse().fromJsonString(jsonString, options);
56
+ }
57
+ static equals(a, b) {
58
+ return proto3.util.equals(PageResponse, a, b);
59
+ }
60
+ }
61
+ PageResponse.runtime = proto3;
62
+ PageResponse.typeName = "data.v2.PageResponse";
63
+ PageResponse.fields = proto3.util.newFieldList(() => [
64
+ { no: 1, name: "next_page_token", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
65
+ ]);
@@ -112,37 +112,22 @@ export declare class EarnVault extends Message<EarnVault> {
112
112
  */
113
113
  warnings: EarnVaultWarning[];
114
114
  /**
115
- * Deduplicated tokens the vault has exposure to via its allocations.
116
- * Always begins with underlying_token. Only populated on ListEarnVaults;
117
- * EarnPosition.vault only carries underlying_token here.
118
- *
119
115
  * @generated from field: repeated data.v1.Token exposure_tokens = 19;
120
116
  */
121
117
  exposureTokens: Token[];
122
118
  /**
123
- * On-chain curator account (EIP-55 checksummed). Sourced from
124
- * VaultV2.curator.address.
125
- *
126
119
  * @generated from field: string curator_address = 20;
127
120
  */
128
121
  curatorAddress: string;
129
122
  /**
130
- * Display name from the curator's Morpho profile, e.g. "Gauntlet".
131
- * Empty when Morpho has no profile for this vault's curator.
132
- *
133
123
  * @generated from field: string curator_name = 21;
134
124
  */
135
125
  curatorName: string;
136
126
  /**
137
- * Optional avatar URL for the curator profile.
138
- *
139
127
  * @generated from field: optional string curator_image_url = 22;
140
128
  */
141
129
  curatorImageUrl?: string;
142
130
  /**
143
- * Vault deployment time as unix seconds. Sourced from
144
- * VaultV2.creationTimestamp.
145
- *
146
131
  * @generated from field: optional int64 deployment_timestamp = 23;
147
132
  */
148
133
  deploymentTimestamp?: bigint;
@@ -200,6 +185,20 @@ export declare class EarnPosition extends Message<EarnPosition> {
200
185
  * @generated from field: data.v2.EarnPositionStatus status = 5;
201
186
  */
202
187
  status: EarnPositionStatus;
188
+ /**
189
+ * Lifetime PnL in underlying-asset units (signed BigInt as string):
190
+ * current_assets_raw + Σ(withdrawals) − Σ(deposits). Transfers in/out
191
+ * are ignored. Populated by GetEarnPosition only.
192
+ *
193
+ * @generated from field: optional string lifetime_pnl_raw = 6;
194
+ */
195
+ lifetimePnlRaw?: string;
196
+ /**
197
+ * lifetime_pnl_raw valued at the underlying's current USD price.
198
+ *
199
+ * @generated from field: optional double lifetime_pnl_usd = 7;
200
+ */
201
+ lifetimePnlUsd?: number;
203
202
  constructor(data?: PartialMessage<EarnPosition>);
204
203
  static readonly runtime: typeof proto3;
205
204
  static readonly typeName = "data.v2.EarnPosition";
@@ -99,24 +99,14 @@ export class EarnVault extends Message {
99
99
  */
100
100
  this.warnings = [];
101
101
  /**
102
- * Deduplicated tokens the vault has exposure to via its allocations.
103
- * Always begins with underlying_token. Only populated on ListEarnVaults;
104
- * EarnPosition.vault only carries underlying_token here.
105
- *
106
102
  * @generated from field: repeated data.v1.Token exposure_tokens = 19;
107
103
  */
108
104
  this.exposureTokens = [];
109
105
  /**
110
- * On-chain curator account (EIP-55 checksummed). Sourced from
111
- * VaultV2.curator.address.
112
- *
113
106
  * @generated from field: string curator_address = 20;
114
107
  */
115
108
  this.curatorAddress = "";
116
109
  /**
117
- * Display name from the curator's Morpho profile, e.g. "Gauntlet".
118
- * Empty when Morpho has no profile for this vault's curator.
119
- *
120
110
  * @generated from field: string curator_name = 21;
121
111
  */
122
112
  this.curatorName = "";
@@ -238,4 +228,6 @@ EarnPosition.fields = proto3.util.newFieldList(() => [
238
228
  { no: 3, name: "current_assets_raw", kind: "scalar", T: 9 /* ScalarType.STRING */ },
239
229
  { no: 4, name: "current_assets_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
240
230
  { no: 5, name: "status", kind: "enum", T: proto3.getEnumType(EarnPositionStatus) },
231
+ { no: 6, name: "lifetime_pnl_raw", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
232
+ { no: 7, name: "lifetime_pnl_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
241
233
  ]);
@@ -1,6 +1,215 @@
1
1
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
2
  import { Message, proto3 } from "@bufbuild/protobuf";
3
3
  import { TokenType } from "../v1/types_pb.js";
4
+ /**
5
+ * @generated from enum data.v2.TokensOrderBy
6
+ */
7
+ export declare enum TokensOrderBy {
8
+ /**
9
+ * @generated from enum value: TOKENS_ORDER_BY_UNSPECIFIED = 0;
10
+ */
11
+ UNSPECIFIED = 0,
12
+ /**
13
+ * @generated from enum value: TOKENS_ORDER_BY_TVL = 1;
14
+ */
15
+ TVL = 1,
16
+ /**
17
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_1H = 2;
18
+ */
19
+ VOLUME_1H = 2,
20
+ /**
21
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_1D = 3;
22
+ */
23
+ VOLUME_1D = 3,
24
+ /**
25
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_7D = 4;
26
+ */
27
+ VOLUME_7D = 4,
28
+ /**
29
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_30D = 5;
30
+ */
31
+ VOLUME_30D = 5,
32
+ /**
33
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_1Y = 6;
34
+ */
35
+ VOLUME_1Y = 6,
36
+ /**
37
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_ALL = 7;
38
+ */
39
+ VOLUME_ALL = 7,
40
+ /**
41
+ * @generated from enum value: TOKENS_ORDER_BY_FDV = 8;
42
+ */
43
+ FDV = 8,
44
+ /**
45
+ * @generated from enum value: TOKENS_ORDER_BY_PRICE_CHANGE_1H = 9;
46
+ */
47
+ PRICE_CHANGE_1H = 9,
48
+ /**
49
+ * @generated from enum value: TOKENS_ORDER_BY_PRICE_CHANGE_1D = 10;
50
+ */
51
+ PRICE_CHANGE_1D = 10
52
+ }
53
+ /**
54
+ * Volume, TVL, FDV, and price-change stats for a ranked token. All values are USD-denominated.
55
+ * All fields are populated from Clickhouse aggregations.
56
+ *
57
+ * @generated from message data.v2.TokenRankStats
58
+ */
59
+ export declare class TokenRankStats extends Message<TokenRankStats> {
60
+ /**
61
+ * @generated from field: optional double volume_1h = 1;
62
+ */
63
+ volume1h?: number;
64
+ /**
65
+ * @generated from field: optional double volume_1d = 2;
66
+ */
67
+ volume1d?: number;
68
+ /**
69
+ * @generated from field: optional double volume_7d = 3;
70
+ */
71
+ volume7d?: number;
72
+ /**
73
+ * @generated from field: optional double volume_30d = 4;
74
+ */
75
+ volume30d?: number;
76
+ /**
77
+ * @generated from field: optional double volume_1y = 5;
78
+ */
79
+ volume1y?: number;
80
+ /**
81
+ * @generated from field: optional double volume_all = 6;
82
+ */
83
+ volumeAll?: number;
84
+ /**
85
+ * @generated from field: optional double tvl = 7;
86
+ */
87
+ tvl?: number;
88
+ /**
89
+ * @generated from field: optional double fdv = 8;
90
+ */
91
+ fdv?: number;
92
+ /**
93
+ * @generated from field: optional double price_change_1h = 9;
94
+ */
95
+ priceChange1h?: number;
96
+ /**
97
+ * @generated from field: optional double price_change_1d = 10;
98
+ */
99
+ priceChange1d?: number;
100
+ constructor(data?: PartialMessage<TokenRankStats>);
101
+ static readonly runtime: typeof proto3;
102
+ static readonly typeName = "data.v2.TokenRankStats";
103
+ static readonly fields: FieldList;
104
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TokenRankStats;
105
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TokenRankStats;
106
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TokenRankStats;
107
+ static equals(a: TokenRankStats | PlainMessage<TokenRankStats> | undefined, b: TokenRankStats | PlainMessage<TokenRankStats> | undefined): boolean;
108
+ }
109
+ /**
110
+ * Sort field and direction for ListTokens.
111
+ *
112
+ * @generated from message data.v2.TokensSort
113
+ */
114
+ export declare class TokensSort extends Message<TokensSort> {
115
+ /**
116
+ * default: TOKENS_ORDER_BY_VOLUME_1D
117
+ *
118
+ * @generated from field: optional data.v2.TokensOrderBy order_by = 1;
119
+ */
120
+ orderBy?: TokensOrderBy;
121
+ /**
122
+ * default false (highest first)
123
+ *
124
+ * @generated from field: optional bool ascending = 2;
125
+ */
126
+ ascending?: boolean;
127
+ constructor(data?: PartialMessage<TokensSort>);
128
+ static readonly runtime: typeof proto3;
129
+ static readonly typeName = "data.v2.TokensSort";
130
+ static readonly fields: FieldList;
131
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TokensSort;
132
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TokensSort;
133
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TokensSort;
134
+ static equals(a: TokensSort | PlainMessage<TokensSort> | undefined, b: TokensSort | PlainMessage<TokensSort> | undefined): boolean;
135
+ }
136
+ /**
137
+ * Server-side filters applied before ranking and pagination.
138
+ *
139
+ * @generated from message data.v2.TokenListFilter
140
+ */
141
+ export declare class TokenListFilter extends Message<TokenListFilter> {
142
+ /**
143
+ * @generated from field: optional bool include_spam = 1;
144
+ */
145
+ includeSpam?: boolean;
146
+ /**
147
+ * @generated from field: optional double min_volume_1d_usd = 2;
148
+ */
149
+ minVolume1dUsd?: number;
150
+ /**
151
+ * @generated from field: optional double min_tvl_usd = 3;
152
+ */
153
+ minTvlUsd?: number;
154
+ constructor(data?: PartialMessage<TokenListFilter>);
155
+ static readonly runtime: typeof proto3;
156
+ static readonly typeName = "data.v2.TokenListFilter";
157
+ static readonly fields: FieldList;
158
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TokenListFilter;
159
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TokenListFilter;
160
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TokenListFilter;
161
+ static equals(a: TokenListFilter | PlainMessage<TokenListFilter> | undefined, b: TokenListFilter | PlainMessage<TokenListFilter> | undefined): boolean;
162
+ }
163
+ /**
164
+ * Per-chain volume breakdown within a RankedMultichainToken.
165
+ *
166
+ * @generated from message data.v2.ChainTokenRankStats
167
+ */
168
+ export declare class ChainTokenRankStats extends Message<ChainTokenRankStats> {
169
+ /**
170
+ * @generated from field: uint32 chain_id = 1;
171
+ */
172
+ chainId: number;
173
+ /**
174
+ * @generated from field: data.v2.TokenRankStats stats = 2;
175
+ */
176
+ stats?: TokenRankStats;
177
+ constructor(data?: PartialMessage<ChainTokenRankStats>);
178
+ static readonly runtime: typeof proto3;
179
+ static readonly typeName = "data.v2.ChainTokenRankStats";
180
+ static readonly fields: FieldList;
181
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ChainTokenRankStats;
182
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ChainTokenRankStats;
183
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ChainTokenRankStats;
184
+ static equals(a: ChainTokenRankStats | PlainMessage<ChainTokenRankStats> | undefined, b: ChainTokenRankStats | PlainMessage<ChainTokenRankStats> | undefined): boolean;
185
+ }
186
+ /**
187
+ * Returned by ListTokens — wraps a MultichainToken with its ranking stats.
188
+ *
189
+ * @generated from message data.v2.RankedMultichainToken
190
+ */
191
+ export declare class RankedMultichainToken extends Message<RankedMultichainToken> {
192
+ /**
193
+ * @generated from field: data.v2.MultichainToken multichain_token = 1;
194
+ */
195
+ multichainToken?: MultichainToken;
196
+ /**
197
+ * @generated from field: data.v2.TokenRankStats stats = 2;
198
+ */
199
+ stats?: TokenRankStats;
200
+ /**
201
+ * @generated from field: repeated data.v2.ChainTokenRankStats chain_stats = 3;
202
+ */
203
+ chainStats: ChainTokenRankStats[];
204
+ constructor(data?: PartialMessage<RankedMultichainToken>);
205
+ static readonly runtime: typeof proto3;
206
+ static readonly typeName = "data.v2.RankedMultichainToken";
207
+ static readonly fields: FieldList;
208
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RankedMultichainToken;
209
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RankedMultichainToken;
210
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RankedMultichainToken;
211
+ static equals(a: RankedMultichainToken | PlainMessage<RankedMultichainToken> | undefined, b: RankedMultichainToken | PlainMessage<RankedMultichainToken> | undefined): boolean;
212
+ }
4
213
  /**
5
214
  * @generated from message data.v2.TokenPriceData
6
215
  */
@@ -13,6 +222,10 @@ export declare class TokenPriceData extends Message<TokenPriceData> {
13
222
  * @generated from field: optional double percent_change_1d = 2;
14
223
  */
15
224
  percentChange1d?: number;
225
+ /**
226
+ * @generated from field: optional double percent_change_1h = 3;
227
+ */
228
+ percentChange1h?: number;
16
229
  constructor(data?: PartialMessage<TokenPriceData>);
17
230
  static readonly runtime: typeof proto3;
18
231
  static readonly typeName = "data.v2.TokenPriceData";
@@ -4,6 +4,234 @@
4
4
  // @ts-nocheck
5
5
  import { Message, proto3 } from "@bufbuild/protobuf";
6
6
  import { TokenType } from "../v1/types_pb.js";
7
+ /**
8
+ * @generated from enum data.v2.TokensOrderBy
9
+ */
10
+ export var TokensOrderBy;
11
+ (function (TokensOrderBy) {
12
+ /**
13
+ * @generated from enum value: TOKENS_ORDER_BY_UNSPECIFIED = 0;
14
+ */
15
+ TokensOrderBy[TokensOrderBy["UNSPECIFIED"] = 0] = "UNSPECIFIED";
16
+ /**
17
+ * @generated from enum value: TOKENS_ORDER_BY_TVL = 1;
18
+ */
19
+ TokensOrderBy[TokensOrderBy["TVL"] = 1] = "TVL";
20
+ /**
21
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_1H = 2;
22
+ */
23
+ TokensOrderBy[TokensOrderBy["VOLUME_1H"] = 2] = "VOLUME_1H";
24
+ /**
25
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_1D = 3;
26
+ */
27
+ TokensOrderBy[TokensOrderBy["VOLUME_1D"] = 3] = "VOLUME_1D";
28
+ /**
29
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_7D = 4;
30
+ */
31
+ TokensOrderBy[TokensOrderBy["VOLUME_7D"] = 4] = "VOLUME_7D";
32
+ /**
33
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_30D = 5;
34
+ */
35
+ TokensOrderBy[TokensOrderBy["VOLUME_30D"] = 5] = "VOLUME_30D";
36
+ /**
37
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_1Y = 6;
38
+ */
39
+ TokensOrderBy[TokensOrderBy["VOLUME_1Y"] = 6] = "VOLUME_1Y";
40
+ /**
41
+ * @generated from enum value: TOKENS_ORDER_BY_VOLUME_ALL = 7;
42
+ */
43
+ TokensOrderBy[TokensOrderBy["VOLUME_ALL"] = 7] = "VOLUME_ALL";
44
+ /**
45
+ * @generated from enum value: TOKENS_ORDER_BY_FDV = 8;
46
+ */
47
+ TokensOrderBy[TokensOrderBy["FDV"] = 8] = "FDV";
48
+ /**
49
+ * @generated from enum value: TOKENS_ORDER_BY_PRICE_CHANGE_1H = 9;
50
+ */
51
+ TokensOrderBy[TokensOrderBy["PRICE_CHANGE_1H"] = 9] = "PRICE_CHANGE_1H";
52
+ /**
53
+ * @generated from enum value: TOKENS_ORDER_BY_PRICE_CHANGE_1D = 10;
54
+ */
55
+ TokensOrderBy[TokensOrderBy["PRICE_CHANGE_1D"] = 10] = "PRICE_CHANGE_1D";
56
+ })(TokensOrderBy || (TokensOrderBy = {}));
57
+ // Retrieve enum metadata with: proto3.getEnumType(TokensOrderBy)
58
+ proto3.util.setEnumType(TokensOrderBy, "data.v2.TokensOrderBy", [
59
+ { no: 0, name: "TOKENS_ORDER_BY_UNSPECIFIED" },
60
+ { no: 1, name: "TOKENS_ORDER_BY_TVL" },
61
+ { no: 2, name: "TOKENS_ORDER_BY_VOLUME_1H" },
62
+ { no: 3, name: "TOKENS_ORDER_BY_VOLUME_1D" },
63
+ { no: 4, name: "TOKENS_ORDER_BY_VOLUME_7D" },
64
+ { no: 5, name: "TOKENS_ORDER_BY_VOLUME_30D" },
65
+ { no: 6, name: "TOKENS_ORDER_BY_VOLUME_1Y" },
66
+ { no: 7, name: "TOKENS_ORDER_BY_VOLUME_ALL" },
67
+ { no: 8, name: "TOKENS_ORDER_BY_FDV" },
68
+ { no: 9, name: "TOKENS_ORDER_BY_PRICE_CHANGE_1H" },
69
+ { no: 10, name: "TOKENS_ORDER_BY_PRICE_CHANGE_1D" },
70
+ ]);
71
+ /**
72
+ * Volume, TVL, FDV, and price-change stats for a ranked token. All values are USD-denominated.
73
+ * All fields are populated from Clickhouse aggregations.
74
+ *
75
+ * @generated from message data.v2.TokenRankStats
76
+ */
77
+ export class TokenRankStats extends Message {
78
+ constructor(data) {
79
+ super();
80
+ proto3.util.initPartial(data, this);
81
+ }
82
+ static fromBinary(bytes, options) {
83
+ return new TokenRankStats().fromBinary(bytes, options);
84
+ }
85
+ static fromJson(jsonValue, options) {
86
+ return new TokenRankStats().fromJson(jsonValue, options);
87
+ }
88
+ static fromJsonString(jsonString, options) {
89
+ return new TokenRankStats().fromJsonString(jsonString, options);
90
+ }
91
+ static equals(a, b) {
92
+ return proto3.util.equals(TokenRankStats, a, b);
93
+ }
94
+ }
95
+ TokenRankStats.runtime = proto3;
96
+ TokenRankStats.typeName = "data.v2.TokenRankStats";
97
+ TokenRankStats.fields = proto3.util.newFieldList(() => [
98
+ { no: 1, name: "volume_1h", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
99
+ { no: 2, name: "volume_1d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
100
+ { no: 3, name: "volume_7d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
101
+ { no: 4, name: "volume_30d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
102
+ { no: 5, name: "volume_1y", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
103
+ { no: 6, name: "volume_all", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
104
+ { no: 7, name: "tvl", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
105
+ { no: 8, name: "fdv", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
106
+ { no: 9, name: "price_change_1h", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
107
+ { no: 10, name: "price_change_1d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
108
+ ]);
109
+ /**
110
+ * Sort field and direction for ListTokens.
111
+ *
112
+ * @generated from message data.v2.TokensSort
113
+ */
114
+ export class TokensSort extends Message {
115
+ constructor(data) {
116
+ super();
117
+ proto3.util.initPartial(data, this);
118
+ }
119
+ static fromBinary(bytes, options) {
120
+ return new TokensSort().fromBinary(bytes, options);
121
+ }
122
+ static fromJson(jsonValue, options) {
123
+ return new TokensSort().fromJson(jsonValue, options);
124
+ }
125
+ static fromJsonString(jsonString, options) {
126
+ return new TokensSort().fromJsonString(jsonString, options);
127
+ }
128
+ static equals(a, b) {
129
+ return proto3.util.equals(TokensSort, a, b);
130
+ }
131
+ }
132
+ TokensSort.runtime = proto3;
133
+ TokensSort.typeName = "data.v2.TokensSort";
134
+ TokensSort.fields = proto3.util.newFieldList(() => [
135
+ { no: 1, name: "order_by", kind: "enum", T: proto3.getEnumType(TokensOrderBy), opt: true },
136
+ { no: 2, name: "ascending", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
137
+ ]);
138
+ /**
139
+ * Server-side filters applied before ranking and pagination.
140
+ *
141
+ * @generated from message data.v2.TokenListFilter
142
+ */
143
+ export class TokenListFilter extends Message {
144
+ constructor(data) {
145
+ super();
146
+ proto3.util.initPartial(data, this);
147
+ }
148
+ static fromBinary(bytes, options) {
149
+ return new TokenListFilter().fromBinary(bytes, options);
150
+ }
151
+ static fromJson(jsonValue, options) {
152
+ return new TokenListFilter().fromJson(jsonValue, options);
153
+ }
154
+ static fromJsonString(jsonString, options) {
155
+ return new TokenListFilter().fromJsonString(jsonString, options);
156
+ }
157
+ static equals(a, b) {
158
+ return proto3.util.equals(TokenListFilter, a, b);
159
+ }
160
+ }
161
+ TokenListFilter.runtime = proto3;
162
+ TokenListFilter.typeName = "data.v2.TokenListFilter";
163
+ TokenListFilter.fields = proto3.util.newFieldList(() => [
164
+ { no: 1, name: "include_spam", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
165
+ { no: 2, name: "min_volume_1d_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
166
+ { no: 3, name: "min_tvl_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
167
+ ]);
168
+ /**
169
+ * Per-chain volume breakdown within a RankedMultichainToken.
170
+ *
171
+ * @generated from message data.v2.ChainTokenRankStats
172
+ */
173
+ export class ChainTokenRankStats extends Message {
174
+ constructor(data) {
175
+ super();
176
+ /**
177
+ * @generated from field: uint32 chain_id = 1;
178
+ */
179
+ this.chainId = 0;
180
+ proto3.util.initPartial(data, this);
181
+ }
182
+ static fromBinary(bytes, options) {
183
+ return new ChainTokenRankStats().fromBinary(bytes, options);
184
+ }
185
+ static fromJson(jsonValue, options) {
186
+ return new ChainTokenRankStats().fromJson(jsonValue, options);
187
+ }
188
+ static fromJsonString(jsonString, options) {
189
+ return new ChainTokenRankStats().fromJsonString(jsonString, options);
190
+ }
191
+ static equals(a, b) {
192
+ return proto3.util.equals(ChainTokenRankStats, a, b);
193
+ }
194
+ }
195
+ ChainTokenRankStats.runtime = proto3;
196
+ ChainTokenRankStats.typeName = "data.v2.ChainTokenRankStats";
197
+ ChainTokenRankStats.fields = proto3.util.newFieldList(() => [
198
+ { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
199
+ { no: 2, name: "stats", kind: "message", T: TokenRankStats },
200
+ ]);
201
+ /**
202
+ * Returned by ListTokens — wraps a MultichainToken with its ranking stats.
203
+ *
204
+ * @generated from message data.v2.RankedMultichainToken
205
+ */
206
+ export class RankedMultichainToken extends Message {
207
+ constructor(data) {
208
+ super();
209
+ /**
210
+ * @generated from field: repeated data.v2.ChainTokenRankStats chain_stats = 3;
211
+ */
212
+ this.chainStats = [];
213
+ proto3.util.initPartial(data, this);
214
+ }
215
+ static fromBinary(bytes, options) {
216
+ return new RankedMultichainToken().fromBinary(bytes, options);
217
+ }
218
+ static fromJson(jsonValue, options) {
219
+ return new RankedMultichainToken().fromJson(jsonValue, options);
220
+ }
221
+ static fromJsonString(jsonString, options) {
222
+ return new RankedMultichainToken().fromJsonString(jsonString, options);
223
+ }
224
+ static equals(a, b) {
225
+ return proto3.util.equals(RankedMultichainToken, a, b);
226
+ }
227
+ }
228
+ RankedMultichainToken.runtime = proto3;
229
+ RankedMultichainToken.typeName = "data.v2.RankedMultichainToken";
230
+ RankedMultichainToken.fields = proto3.util.newFieldList(() => [
231
+ { no: 1, name: "multichain_token", kind: "message", T: MultichainToken },
232
+ { no: 2, name: "stats", kind: "message", T: TokenRankStats },
233
+ { no: 3, name: "chain_stats", kind: "message", T: ChainTokenRankStats, repeated: true },
234
+ ]);
7
235
  /**
8
236
  * @generated from message data.v2.TokenPriceData
9
237
  */
@@ -30,6 +258,7 @@ TokenPriceData.typeName = "data.v2.TokenPriceData";
30
258
  TokenPriceData.fields = proto3.util.newFieldList(() => [
31
259
  { no: 1, name: "spot_usd", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
32
260
  { no: 2, name: "percent_change_1d", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
261
+ { no: 3, name: "percent_change_1h", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
33
262
  ]);
34
263
  /**
35
264
  * @generated from message data.v2.TokenSafety
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-data-api",
3
- "version": "0.0.81",
3
+ "version": "0.0.83",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },