@uniswap/client-data-api 0.0.78 → 0.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-data-api",
3
- "version": "0.0.78",
3
+ "version": "0.0.79",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },