@uniswap/client-data-api 0.0.79 → 0.0.80

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,7 +1,6 @@
1
1
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
2
  import { Message, proto3 } from "@bufbuild/protobuf";
3
- import { Token } from "./types_pb.js";
4
- import { MultichainToken } from "../v1/types_pb.js";
3
+ import { MultichainToken, Token } from "./types_pb.js";
5
4
  import { EarnPosition, EarnVault } from "./earn_pb.js";
6
5
  /**
7
6
  * @generated from message data.v2.GetTokenRequest
@@ -106,9 +105,28 @@ export declare class GetTokensResponse extends Message<GetTokensResponse> {
106
105
  */
107
106
  export declare class GetTokensMultiChainRequest extends Message<GetTokensMultiChainRequest> {
108
107
  /**
109
- * @generated from field: repeated data.v2.TokenIdentifier tokens = 1;
108
+ * @generated from oneof data.v2.GetTokensMultiChainRequest.identifier
110
109
  */
111
- tokens: TokenIdentifier[];
110
+ identifier: {
111
+ /**
112
+ * @generated from field: data.v2.MultichainIdList multichain_ids = 1;
113
+ */
114
+ value: MultichainIdList;
115
+ case: "multichainIds";
116
+ } | {
117
+ /**
118
+ * @generated from field: data.v2.TokenIdentifierList tokens = 2;
119
+ */
120
+ value: TokenIdentifierList;
121
+ case: "tokens";
122
+ } | {
123
+ case: undefined;
124
+ value?: undefined;
125
+ };
126
+ /**
127
+ * @generated from field: optional uint32 canonical_chain_id = 3;
128
+ */
129
+ canonicalChainId?: number;
112
130
  constructor(data?: PartialMessage<GetTokensMultiChainRequest>);
113
131
  static readonly runtime: typeof proto3;
114
132
  static readonly typeName = "data.v2.GetTokensMultiChainRequest";
@@ -119,15 +137,52 @@ export declare class GetTokensMultiChainRequest extends Message<GetTokensMultiCh
119
137
  static equals(a: GetTokensMultiChainRequest | PlainMessage<GetTokensMultiChainRequest> | undefined, b: GetTokensMultiChainRequest | PlainMessage<GetTokensMultiChainRequest> | undefined): boolean;
120
138
  }
121
139
  /**
122
- * Best-effort response: tokens are returned for each requested identifier that
123
- * was resolved to a canonical multichain identity. Callers should match
124
- * response tokens to requests via (chain_id, address) in chain_tokens.
140
+ * @generated from message data.v2.MultichainIdList
141
+ */
142
+ export declare class MultichainIdList extends Message<MultichainIdList> {
143
+ /**
144
+ * max 100
145
+ *
146
+ * @generated from field: repeated string ids = 1;
147
+ */
148
+ ids: string[];
149
+ constructor(data?: PartialMessage<MultichainIdList>);
150
+ static readonly runtime: typeof proto3;
151
+ static readonly typeName = "data.v2.MultichainIdList";
152
+ static readonly fields: FieldList;
153
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MultichainIdList;
154
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MultichainIdList;
155
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MultichainIdList;
156
+ static equals(a: MultichainIdList | PlainMessage<MultichainIdList> | undefined, b: MultichainIdList | PlainMessage<MultichainIdList> | undefined): boolean;
157
+ }
158
+ /**
159
+ * @generated from message data.v2.TokenIdentifierList
160
+ */
161
+ export declare class TokenIdentifierList extends Message<TokenIdentifierList> {
162
+ /**
163
+ * max 100
164
+ *
165
+ * @generated from field: repeated data.v2.TokenIdentifier tokens = 1;
166
+ */
167
+ tokens: TokenIdentifier[];
168
+ constructor(data?: PartialMessage<TokenIdentifierList>);
169
+ static readonly runtime: typeof proto3;
170
+ static readonly typeName = "data.v2.TokenIdentifierList";
171
+ static readonly fields: FieldList;
172
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TokenIdentifierList;
173
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TokenIdentifierList;
174
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TokenIdentifierList;
175
+ static equals(a: TokenIdentifierList | PlainMessage<TokenIdentifierList> | undefined, b: TokenIdentifierList | PlainMessage<TokenIdentifierList> | undefined): boolean;
176
+ }
177
+ /**
178
+ * Best-effort response: one MultichainToken per distinct multichain identity.
179
+ * addresses is always populated. Tokens not found are silently omitted.
125
180
  *
126
181
  * @generated from message data.v2.GetTokensMultiChainResponse
127
182
  */
128
183
  export declare class GetTokensMultiChainResponse extends Message<GetTokensMultiChainResponse> {
129
184
  /**
130
- * @generated from field: repeated data.v1.MultichainToken tokens = 1;
185
+ * @generated from field: repeated data.v2.MultichainToken tokens = 1;
131
186
  */
132
187
  tokens: MultichainToken[];
133
188
  constructor(data?: PartialMessage<GetTokensMultiChainResponse>);
@@ -3,8 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { Message, proto3 } from "@bufbuild/protobuf";
6
- import { Token } from "./types_pb.js";
7
- import { MultichainToken } from "../v1/types_pb.js";
6
+ import { MultichainToken, Token } from "./types_pb.js";
8
7
  import { EarnPosition, EarnVault } from "./earn_pb.js";
9
8
  /**
10
9
  * @generated from message data.v2.GetTokenRequest
@@ -174,9 +173,9 @@ export class GetTokensMultiChainRequest extends Message {
174
173
  constructor(data) {
175
174
  super();
176
175
  /**
177
- * @generated from field: repeated data.v2.TokenIdentifier tokens = 1;
176
+ * @generated from oneof data.v2.GetTokensMultiChainRequest.identifier
178
177
  */
179
- this.tokens = [];
178
+ this.identifier = { case: undefined };
180
179
  proto3.util.initPartial(data, this);
181
180
  }
182
181
  static fromBinary(bytes, options) {
@@ -195,12 +194,77 @@ export class GetTokensMultiChainRequest extends Message {
195
194
  GetTokensMultiChainRequest.runtime = proto3;
196
195
  GetTokensMultiChainRequest.typeName = "data.v2.GetTokensMultiChainRequest";
197
196
  GetTokensMultiChainRequest.fields = proto3.util.newFieldList(() => [
197
+ { no: 1, name: "multichain_ids", kind: "message", T: MultichainIdList, oneof: "identifier" },
198
+ { no: 2, name: "tokens", kind: "message", T: TokenIdentifierList, oneof: "identifier" },
199
+ { no: 3, name: "canonical_chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
200
+ ]);
201
+ /**
202
+ * @generated from message data.v2.MultichainIdList
203
+ */
204
+ export class MultichainIdList extends Message {
205
+ constructor(data) {
206
+ super();
207
+ /**
208
+ * max 100
209
+ *
210
+ * @generated from field: repeated string ids = 1;
211
+ */
212
+ this.ids = [];
213
+ proto3.util.initPartial(data, this);
214
+ }
215
+ static fromBinary(bytes, options) {
216
+ return new MultichainIdList().fromBinary(bytes, options);
217
+ }
218
+ static fromJson(jsonValue, options) {
219
+ return new MultichainIdList().fromJson(jsonValue, options);
220
+ }
221
+ static fromJsonString(jsonString, options) {
222
+ return new MultichainIdList().fromJsonString(jsonString, options);
223
+ }
224
+ static equals(a, b) {
225
+ return proto3.util.equals(MultichainIdList, a, b);
226
+ }
227
+ }
228
+ MultichainIdList.runtime = proto3;
229
+ MultichainIdList.typeName = "data.v2.MultichainIdList";
230
+ MultichainIdList.fields = proto3.util.newFieldList(() => [
231
+ { no: 1, name: "ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
232
+ ]);
233
+ /**
234
+ * @generated from message data.v2.TokenIdentifierList
235
+ */
236
+ export class TokenIdentifierList extends Message {
237
+ constructor(data) {
238
+ super();
239
+ /**
240
+ * max 100
241
+ *
242
+ * @generated from field: repeated data.v2.TokenIdentifier tokens = 1;
243
+ */
244
+ this.tokens = [];
245
+ proto3.util.initPartial(data, this);
246
+ }
247
+ static fromBinary(bytes, options) {
248
+ return new TokenIdentifierList().fromBinary(bytes, options);
249
+ }
250
+ static fromJson(jsonValue, options) {
251
+ return new TokenIdentifierList().fromJson(jsonValue, options);
252
+ }
253
+ static fromJsonString(jsonString, options) {
254
+ return new TokenIdentifierList().fromJsonString(jsonString, options);
255
+ }
256
+ static equals(a, b) {
257
+ return proto3.util.equals(TokenIdentifierList, a, b);
258
+ }
259
+ }
260
+ TokenIdentifierList.runtime = proto3;
261
+ TokenIdentifierList.typeName = "data.v2.TokenIdentifierList";
262
+ TokenIdentifierList.fields = proto3.util.newFieldList(() => [
198
263
  { no: 1, name: "tokens", kind: "message", T: TokenIdentifier, repeated: true },
199
264
  ]);
200
265
  /**
201
- * Best-effort response: tokens are returned for each requested identifier that
202
- * was resolved to a canonical multichain identity. Callers should match
203
- * response tokens to requests via (chain_id, address) in chain_tokens.
266
+ * Best-effort response: one MultichainToken per distinct multichain identity.
267
+ * addresses is always populated. Tokens not found are silently omitted.
204
268
  *
205
269
  * @generated from message data.v2.GetTokensMultiChainResponse
206
270
  */
@@ -208,7 +272,7 @@ export class GetTokensMultiChainResponse extends Message {
208
272
  constructor(data) {
209
273
  super();
210
274
  /**
211
- * @generated from field: repeated data.v1.MultichainToken tokens = 1;
275
+ * @generated from field: repeated data.v2.MultichainToken tokens = 1;
212
276
  */
213
277
  this.tokens = [];
214
278
  proto3.util.initPartial(data, this);
@@ -111,6 +111,14 @@ export declare class EarnVault extends Message<EarnVault> {
111
111
  * @generated from field: repeated data.v2.EarnVaultWarning warnings = 18;
112
112
  */
113
113
  warnings: EarnVaultWarning[];
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
+ * @generated from field: repeated data.v1.Token exposure_tokens = 19;
120
+ */
121
+ exposureTokens: Token[];
114
122
  constructor(data?: PartialMessage<EarnVault>);
115
123
  static readonly runtime: typeof proto3;
116
124
  static readonly typeName = "data.v2.EarnVault";
@@ -98,6 +98,14 @@ export class EarnVault extends Message {
98
98
  * @generated from field: repeated data.v2.EarnVaultWarning warnings = 18;
99
99
  */
100
100
  this.warnings = [];
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
+ * @generated from field: repeated data.v1.Token exposure_tokens = 19;
107
+ */
108
+ this.exposureTokens = [];
101
109
  proto3.util.initPartial(data, this);
102
110
  }
103
111
  static fromBinary(bytes, options) {
@@ -134,6 +142,7 @@ EarnVault.fields = proto3.util.newFieldList(() => [
134
142
  { no: 16, name: "performance_fee", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
135
143
  { no: 17, name: "management_fee", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
136
144
  { no: 18, name: "warnings", kind: "message", T: EarnVaultWarning, repeated: true },
145
+ { no: 19, name: "exposure_tokens", kind: "message", T: Token, repeated: true },
137
146
  ]);
138
147
  /**
139
148
  * @generated from message data.v2.EarnVaultWarning
@@ -138,6 +138,61 @@ export declare class TokenMultichain extends Message<TokenMultichain> {
138
138
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TokenMultichain;
139
139
  static equals(a: TokenMultichain | PlainMessage<TokenMultichain> | undefined, b: TokenMultichain | PlainMessage<TokenMultichain> | undefined): boolean;
140
140
  }
141
+ /**
142
+ * @generated from message data.v2.MultichainToken
143
+ */
144
+ export declare class MultichainToken extends Message<MultichainToken> {
145
+ /**
146
+ * @generated from field: string multichain_id = 1;
147
+ */
148
+ multichainId: string;
149
+ /**
150
+ * @generated from field: map<string, string> addresses = 2;
151
+ */
152
+ addresses: {
153
+ [key: string]: string;
154
+ };
155
+ /**
156
+ * @generated from field: string symbol = 3;
157
+ */
158
+ symbol: string;
159
+ /**
160
+ * @generated from field: uint32 decimals = 4;
161
+ */
162
+ decimals: number;
163
+ /**
164
+ * @generated from field: string name = 5;
165
+ */
166
+ name: string;
167
+ /**
168
+ * @generated from field: data.v1.TokenType type = 6;
169
+ */
170
+ type: TokenType;
171
+ /**
172
+ * @generated from field: data.v2.TokenPriceData price = 7;
173
+ */
174
+ price?: TokenPriceData;
175
+ /**
176
+ * @generated from field: data.v2.TokenSafety safety = 8;
177
+ */
178
+ safety?: TokenSafety;
179
+ /**
180
+ * @generated from field: data.v2.TokenFees fees = 9;
181
+ */
182
+ fees?: TokenFees;
183
+ /**
184
+ * @generated from field: data.v2.TokenProject project = 10;
185
+ */
186
+ project?: TokenProject;
187
+ constructor(data?: PartialMessage<MultichainToken>);
188
+ static readonly runtime: typeof proto3;
189
+ static readonly typeName = "data.v2.MultichainToken";
190
+ static readonly fields: FieldList;
191
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MultichainToken;
192
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MultichainToken;
193
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MultichainToken;
194
+ static equals(a: MultichainToken | PlainMessage<MultichainToken> | undefined, b: MultichainToken | PlainMessage<MultichainToken> | undefined): boolean;
195
+ }
141
196
  /**
142
197
  * @generated from message data.v2.Token
143
198
  */
@@ -174,6 +174,65 @@ TokenMultichain.fields = proto3.util.newFieldList(() => [
174
174
  { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
175
175
  { no: 2, name: "addresses", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "scalar", T: 9 /* ScalarType.STRING */ } },
176
176
  ]);
177
+ /**
178
+ * @generated from message data.v2.MultichainToken
179
+ */
180
+ export class MultichainToken extends Message {
181
+ constructor(data) {
182
+ super();
183
+ /**
184
+ * @generated from field: string multichain_id = 1;
185
+ */
186
+ this.multichainId = "";
187
+ /**
188
+ * @generated from field: map<string, string> addresses = 2;
189
+ */
190
+ this.addresses = {};
191
+ /**
192
+ * @generated from field: string symbol = 3;
193
+ */
194
+ this.symbol = "";
195
+ /**
196
+ * @generated from field: uint32 decimals = 4;
197
+ */
198
+ this.decimals = 0;
199
+ /**
200
+ * @generated from field: string name = 5;
201
+ */
202
+ this.name = "";
203
+ /**
204
+ * @generated from field: data.v1.TokenType type = 6;
205
+ */
206
+ this.type = TokenType.UNKNOWN;
207
+ proto3.util.initPartial(data, this);
208
+ }
209
+ static fromBinary(bytes, options) {
210
+ return new MultichainToken().fromBinary(bytes, options);
211
+ }
212
+ static fromJson(jsonValue, options) {
213
+ return new MultichainToken().fromJson(jsonValue, options);
214
+ }
215
+ static fromJsonString(jsonString, options) {
216
+ return new MultichainToken().fromJsonString(jsonString, options);
217
+ }
218
+ static equals(a, b) {
219
+ return proto3.util.equals(MultichainToken, a, b);
220
+ }
221
+ }
222
+ MultichainToken.runtime = proto3;
223
+ MultichainToken.typeName = "data.v2.MultichainToken";
224
+ MultichainToken.fields = proto3.util.newFieldList(() => [
225
+ { no: 1, name: "multichain_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
226
+ { no: 2, name: "addresses", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "scalar", T: 9 /* ScalarType.STRING */ } },
227
+ { no: 3, name: "symbol", kind: "scalar", T: 9 /* ScalarType.STRING */ },
228
+ { no: 4, name: "decimals", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
229
+ { no: 5, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
230
+ { no: 6, name: "type", kind: "enum", T: proto3.getEnumType(TokenType) },
231
+ { no: 7, name: "price", kind: "message", T: TokenPriceData },
232
+ { no: 8, name: "safety", kind: "message", T: TokenSafety },
233
+ { no: 9, name: "fees", kind: "message", T: TokenFees },
234
+ { no: 10, name: "project", kind: "message", T: TokenProject },
235
+ ]);
177
236
  /**
178
237
  * @generated from message data.v2.Token
179
238
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-data-api",
3
- "version": "0.0.79",
3
+ "version": "0.0.80",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },