@uniswap/client-data-api 0.0.78 → 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.
- package/dist/data/v1/featureGating_pb.d.ts +65 -0
- package/dist/data/v1/featureGating_pb.js +92 -0
- package/dist/data/v1/searchTypes_pb.d.ts +15 -0
- package/dist/data/v1/searchTypes_pb.js +17 -0
- package/dist/data/v2/api_pb.d.ts +63 -8
- package/dist/data/v2/api_pb.js +72 -8
- package/dist/data/v2/earn_pb.d.ts +8 -0
- package/dist/data/v2/earn_pb.js +9 -0
- package/dist/data/v2/types_pb.d.ts +55 -0
- package/dist/data/v2/types_pb.js +59 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
2
|
+
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* RestrictionCategory enumerates the kinds of restrictions a token can carry.
|
|
5
|
+
* Ordered from least to most legally sensitive, matching the upstream
|
|
6
|
+
* compliancev2service.v1.GatedFeature enum.
|
|
7
|
+
*
|
|
8
|
+
* @generated from enum data.v1.RestrictionCategory
|
|
9
|
+
*/
|
|
10
|
+
export declare enum RestrictionCategory {
|
|
11
|
+
/**
|
|
12
|
+
* @generated from enum value: RESTRICTION_CATEGORY_UNSPECIFIED = 0;
|
|
13
|
+
*/
|
|
14
|
+
UNSPECIFIED = 0,
|
|
15
|
+
/**
|
|
16
|
+
* @generated from enum value: RESTRICTION_CATEGORY_IP_INFRINGEMENT = 1;
|
|
17
|
+
*/
|
|
18
|
+
IP_INFRINGEMENT = 1,
|
|
19
|
+
/**
|
|
20
|
+
* @generated from enum value: RESTRICTION_CATEGORY_SANCTIONED = 2;
|
|
21
|
+
*/
|
|
22
|
+
SANCTIONED = 2,
|
|
23
|
+
/**
|
|
24
|
+
* @generated from enum value: RESTRICTION_CATEGORY_DERIVATIVE = 3;
|
|
25
|
+
*/
|
|
26
|
+
DERIVATIVE = 3,
|
|
27
|
+
/**
|
|
28
|
+
* @generated from enum value: RESTRICTION_CATEGORY_TOKENIZED_COMMODITY = 4;
|
|
29
|
+
*/
|
|
30
|
+
TOKENIZED_COMMODITY = 4,
|
|
31
|
+
/**
|
|
32
|
+
* @generated from enum value: RESTRICTION_CATEGORY_SECURITY_PERMISSIONED = 5;
|
|
33
|
+
*/
|
|
34
|
+
SECURITY_PERMISSIONED = 5,
|
|
35
|
+
/**
|
|
36
|
+
* @generated from enum value: RESTRICTION_CATEGORY_SECURITY_PERMISSIONLESS = 6;
|
|
37
|
+
*/
|
|
38
|
+
SECURITY_PERMISSIONLESS = 6
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* TokenRestriction is the metadata-side signal that a token is restricted
|
|
42
|
+
* in the caller's region. Country/subdivision is resolved server-side from
|
|
43
|
+
* ctx.auth — never the request body. Empty list = no restrictions.
|
|
44
|
+
*
|
|
45
|
+
* Categories mirror compliancev2service.v1.GatedFeature 1:1; the mapping
|
|
46
|
+
* lives server-side in the BL layer. data.v1 owns this contract so consumers
|
|
47
|
+
* of @uniswap/client-data-api don't pull in @uniswap/client-compliancev2 as
|
|
48
|
+
* a transitive dependency.
|
|
49
|
+
*
|
|
50
|
+
* @generated from message data.v1.TokenRestriction
|
|
51
|
+
*/
|
|
52
|
+
export declare class TokenRestriction extends Message<TokenRestriction> {
|
|
53
|
+
/**
|
|
54
|
+
* @generated from field: data.v1.RestrictionCategory category = 1;
|
|
55
|
+
*/
|
|
56
|
+
category: RestrictionCategory;
|
|
57
|
+
constructor(data?: PartialMessage<TokenRestriction>);
|
|
58
|
+
static readonly runtime: typeof proto3;
|
|
59
|
+
static readonly typeName = "data.v1.TokenRestriction";
|
|
60
|
+
static readonly fields: FieldList;
|
|
61
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TokenRestriction;
|
|
62
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TokenRestriction;
|
|
63
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TokenRestriction;
|
|
64
|
+
static equals(a: TokenRestriction | PlainMessage<TokenRestriction> | undefined, b: TokenRestriction | PlainMessage<TokenRestriction> | undefined): boolean;
|
|
65
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.10.1 with parameter "target=ts"
|
|
2
|
+
// @generated from file data/v1/featureGating.proto (package data.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
6
|
+
/**
|
|
7
|
+
* RestrictionCategory enumerates the kinds of restrictions a token can carry.
|
|
8
|
+
* Ordered from least to most legally sensitive, matching the upstream
|
|
9
|
+
* compliancev2service.v1.GatedFeature enum.
|
|
10
|
+
*
|
|
11
|
+
* @generated from enum data.v1.RestrictionCategory
|
|
12
|
+
*/
|
|
13
|
+
export var RestrictionCategory;
|
|
14
|
+
(function (RestrictionCategory) {
|
|
15
|
+
/**
|
|
16
|
+
* @generated from enum value: RESTRICTION_CATEGORY_UNSPECIFIED = 0;
|
|
17
|
+
*/
|
|
18
|
+
RestrictionCategory[RestrictionCategory["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
19
|
+
/**
|
|
20
|
+
* @generated from enum value: RESTRICTION_CATEGORY_IP_INFRINGEMENT = 1;
|
|
21
|
+
*/
|
|
22
|
+
RestrictionCategory[RestrictionCategory["IP_INFRINGEMENT"] = 1] = "IP_INFRINGEMENT";
|
|
23
|
+
/**
|
|
24
|
+
* @generated from enum value: RESTRICTION_CATEGORY_SANCTIONED = 2;
|
|
25
|
+
*/
|
|
26
|
+
RestrictionCategory[RestrictionCategory["SANCTIONED"] = 2] = "SANCTIONED";
|
|
27
|
+
/**
|
|
28
|
+
* @generated from enum value: RESTRICTION_CATEGORY_DERIVATIVE = 3;
|
|
29
|
+
*/
|
|
30
|
+
RestrictionCategory[RestrictionCategory["DERIVATIVE"] = 3] = "DERIVATIVE";
|
|
31
|
+
/**
|
|
32
|
+
* @generated from enum value: RESTRICTION_CATEGORY_TOKENIZED_COMMODITY = 4;
|
|
33
|
+
*/
|
|
34
|
+
RestrictionCategory[RestrictionCategory["TOKENIZED_COMMODITY"] = 4] = "TOKENIZED_COMMODITY";
|
|
35
|
+
/**
|
|
36
|
+
* @generated from enum value: RESTRICTION_CATEGORY_SECURITY_PERMISSIONED = 5;
|
|
37
|
+
*/
|
|
38
|
+
RestrictionCategory[RestrictionCategory["SECURITY_PERMISSIONED"] = 5] = "SECURITY_PERMISSIONED";
|
|
39
|
+
/**
|
|
40
|
+
* @generated from enum value: RESTRICTION_CATEGORY_SECURITY_PERMISSIONLESS = 6;
|
|
41
|
+
*/
|
|
42
|
+
RestrictionCategory[RestrictionCategory["SECURITY_PERMISSIONLESS"] = 6] = "SECURITY_PERMISSIONLESS";
|
|
43
|
+
})(RestrictionCategory || (RestrictionCategory = {}));
|
|
44
|
+
// Retrieve enum metadata with: proto3.getEnumType(RestrictionCategory)
|
|
45
|
+
proto3.util.setEnumType(RestrictionCategory, "data.v1.RestrictionCategory", [
|
|
46
|
+
{ no: 0, name: "RESTRICTION_CATEGORY_UNSPECIFIED" },
|
|
47
|
+
{ no: 1, name: "RESTRICTION_CATEGORY_IP_INFRINGEMENT" },
|
|
48
|
+
{ no: 2, name: "RESTRICTION_CATEGORY_SANCTIONED" },
|
|
49
|
+
{ no: 3, name: "RESTRICTION_CATEGORY_DERIVATIVE" },
|
|
50
|
+
{ no: 4, name: "RESTRICTION_CATEGORY_TOKENIZED_COMMODITY" },
|
|
51
|
+
{ no: 5, name: "RESTRICTION_CATEGORY_SECURITY_PERMISSIONED" },
|
|
52
|
+
{ no: 6, name: "RESTRICTION_CATEGORY_SECURITY_PERMISSIONLESS" },
|
|
53
|
+
]);
|
|
54
|
+
/**
|
|
55
|
+
* TokenRestriction is the metadata-side signal that a token is restricted
|
|
56
|
+
* in the caller's region. Country/subdivision is resolved server-side from
|
|
57
|
+
* ctx.auth — never the request body. Empty list = no restrictions.
|
|
58
|
+
*
|
|
59
|
+
* Categories mirror compliancev2service.v1.GatedFeature 1:1; the mapping
|
|
60
|
+
* lives server-side in the BL layer. data.v1 owns this contract so consumers
|
|
61
|
+
* of @uniswap/client-data-api don't pull in @uniswap/client-compliancev2 as
|
|
62
|
+
* a transitive dependency.
|
|
63
|
+
*
|
|
64
|
+
* @generated from message data.v1.TokenRestriction
|
|
65
|
+
*/
|
|
66
|
+
export class TokenRestriction extends Message {
|
|
67
|
+
constructor(data) {
|
|
68
|
+
super();
|
|
69
|
+
/**
|
|
70
|
+
* @generated from field: data.v1.RestrictionCategory category = 1;
|
|
71
|
+
*/
|
|
72
|
+
this.category = RestrictionCategory.UNSPECIFIED;
|
|
73
|
+
proto3.util.initPartial(data, this);
|
|
74
|
+
}
|
|
75
|
+
static fromBinary(bytes, options) {
|
|
76
|
+
return new TokenRestriction().fromBinary(bytes, options);
|
|
77
|
+
}
|
|
78
|
+
static fromJson(jsonValue, options) {
|
|
79
|
+
return new TokenRestriction().fromJson(jsonValue, options);
|
|
80
|
+
}
|
|
81
|
+
static fromJsonString(jsonString, options) {
|
|
82
|
+
return new TokenRestriction().fromJsonString(jsonString, options);
|
|
83
|
+
}
|
|
84
|
+
static equals(a, b) {
|
|
85
|
+
return proto3.util.equals(TokenRestriction, a, b);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
TokenRestriction.runtime = proto3;
|
|
89
|
+
TokenRestriction.typeName = "data.v1.TokenRestriction";
|
|
90
|
+
TokenRestriction.fields = proto3.util.newFieldList(() => [
|
|
91
|
+
{ no: 1, name: "category", kind: "enum", T: proto3.getEnumType(RestrictionCategory) },
|
|
92
|
+
]);
|
|
@@ -1,5 +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 { TokenRestriction } from "./featureGating_pb.js";
|
|
3
4
|
/**
|
|
4
5
|
* @generated from enum search.v1.SearchType
|
|
5
6
|
*/
|
|
@@ -147,6 +148,13 @@ export declare class Token extends Message<Token> {
|
|
|
147
148
|
* @generated from field: search.v1.TokenProtectionInfo protection_info = 14;
|
|
148
149
|
*/
|
|
149
150
|
protectionInfo?: TokenProtectionInfo;
|
|
151
|
+
/**
|
|
152
|
+
* Compliance restrictions evaluated server-side from ctx.auth. Empty =
|
|
153
|
+
* no restrictions.
|
|
154
|
+
*
|
|
155
|
+
* @generated from field: repeated data.v1.TokenRestriction restrictions = 15;
|
|
156
|
+
*/
|
|
157
|
+
restrictions: TokenRestriction[];
|
|
150
158
|
constructor(data?: PartialMessage<Token>);
|
|
151
159
|
static readonly runtime: typeof proto3;
|
|
152
160
|
static readonly typeName = "search.v1.Token";
|
|
@@ -253,6 +261,13 @@ export declare class MultichainToken extends Message<MultichainToken> {
|
|
|
253
261
|
* @generated from field: repeated search.v1.ChainToken chain_tokens = 12;
|
|
254
262
|
*/
|
|
255
263
|
chainTokens: ChainToken[];
|
|
264
|
+
/**
|
|
265
|
+
* Compliance restrictions evaluated server-side from ctx.auth. Empty =
|
|
266
|
+
* no restrictions.
|
|
267
|
+
*
|
|
268
|
+
* @generated from field: repeated data.v1.TokenRestriction restrictions = 13;
|
|
269
|
+
*/
|
|
270
|
+
restrictions: TokenRestriction[];
|
|
256
271
|
constructor(data?: PartialMessage<MultichainToken>);
|
|
257
272
|
static readonly runtime: typeof proto3;
|
|
258
273
|
static readonly typeName = "search.v1.MultichainToken";
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
6
|
+
import { TokenRestriction } from "./featureGating_pb.js";
|
|
6
7
|
/**
|
|
7
8
|
* @generated from enum search.v1.SearchType
|
|
8
9
|
*/
|
|
@@ -174,6 +175,13 @@ export class Token extends Message {
|
|
|
174
175
|
* @generated from field: search.v1.SpamCode spam_code = 12;
|
|
175
176
|
*/
|
|
176
177
|
this.spamCode = SpamCode.NOT_SPAM;
|
|
178
|
+
/**
|
|
179
|
+
* Compliance restrictions evaluated server-side from ctx.auth. Empty =
|
|
180
|
+
* no restrictions.
|
|
181
|
+
*
|
|
182
|
+
* @generated from field: repeated data.v1.TokenRestriction restrictions = 15;
|
|
183
|
+
*/
|
|
184
|
+
this.restrictions = [];
|
|
177
185
|
proto3.util.initPartial(data, this);
|
|
178
186
|
}
|
|
179
187
|
static fromBinary(bytes, options) {
|
|
@@ -206,6 +214,7 @@ Token.fields = proto3.util.newFieldList(() => [
|
|
|
206
214
|
{ no: 12, name: "spam_code", kind: "enum", T: proto3.getEnumType(SpamCode) },
|
|
207
215
|
{ no: 13, name: "fee_data", kind: "message", T: FeeData },
|
|
208
216
|
{ no: 14, name: "protection_info", kind: "message", T: TokenProtectionInfo },
|
|
217
|
+
{ no: 15, name: "restrictions", kind: "message", T: TokenRestriction, repeated: true },
|
|
209
218
|
]);
|
|
210
219
|
/**
|
|
211
220
|
* @generated from message search.v1.ChainToken
|
|
@@ -310,6 +319,13 @@ export class MultichainToken extends Message {
|
|
|
310
319
|
* @generated from field: repeated search.v1.ChainToken chain_tokens = 12;
|
|
311
320
|
*/
|
|
312
321
|
this.chainTokens = [];
|
|
322
|
+
/**
|
|
323
|
+
* Compliance restrictions evaluated server-side from ctx.auth. Empty =
|
|
324
|
+
* no restrictions.
|
|
325
|
+
*
|
|
326
|
+
* @generated from field: repeated data.v1.TokenRestriction restrictions = 13;
|
|
327
|
+
*/
|
|
328
|
+
this.restrictions = [];
|
|
313
329
|
proto3.util.initPartial(data, this);
|
|
314
330
|
}
|
|
315
331
|
static fromBinary(bytes, options) {
|
|
@@ -340,6 +356,7 @@ MultichainToken.fields = proto3.util.newFieldList(() => [
|
|
|
340
356
|
{ no: 10, name: "fee_data", kind: "message", T: FeeData },
|
|
341
357
|
{ no: 11, name: "protection_info", kind: "message", T: TokenProtectionInfo },
|
|
342
358
|
{ no: 12, name: "chain_tokens", kind: "message", T: ChainToken, repeated: true },
|
|
359
|
+
{ no: 13, name: "restrictions", kind: "message", T: TokenRestriction, repeated: true },
|
|
343
360
|
]);
|
|
344
361
|
/**
|
|
345
362
|
* @generated from message search.v1.FeeData
|
package/dist/data/v2/api_pb.d.ts
CHANGED
|
@@ -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
|
|
108
|
+
* @generated from oneof data.v2.GetTokensMultiChainRequest.identifier
|
|
110
109
|
*/
|
|
111
|
-
|
|
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
|
-
*
|
|
123
|
-
|
|
124
|
-
|
|
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.
|
|
185
|
+
* @generated from field: repeated data.v2.MultichainToken tokens = 1;
|
|
131
186
|
*/
|
|
132
187
|
tokens: MultichainToken[];
|
|
133
188
|
constructor(data?: PartialMessage<GetTokensMultiChainResponse>);
|
package/dist/data/v2/api_pb.js
CHANGED
|
@@ -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
|
|
176
|
+
* @generated from oneof data.v2.GetTokensMultiChainRequest.identifier
|
|
178
177
|
*/
|
|
179
|
-
this.
|
|
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:
|
|
202
|
-
*
|
|
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.
|
|
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";
|
package/dist/data/v2/earn_pb.js
CHANGED
|
@@ -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
|
*/
|
package/dist/data/v2/types_pb.js
CHANGED
|
@@ -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
|
*/
|