@0xpolygonid/js-sdk 1.17.5 → 1.17.6
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/browser/esm/index.js +24 -39
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +24 -39
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/circuits/models.js +23 -39
- package/dist/node/cjs/verifiable/constants.js +1 -0
- package/dist/node/esm/circuits/models.js +23 -39
- package/dist/node/esm/verifiable/constants.js +1 -0
- package/dist/types/iden3comm/types/protocol/payment.d.ts +2 -2
- package/dist/types/verifiable/constants.d.ts +2 -1
- package/package.json +1 -1
|
@@ -7568,6 +7568,7 @@ var PaymentType;
|
|
|
7568
7568
|
var SupportedCurrencies;
|
|
7569
7569
|
(function (SupportedCurrencies) {
|
|
7570
7570
|
SupportedCurrencies["ETH"] = "ETH";
|
|
7571
|
+
SupportedCurrencies["MATIC"] = "MATIC";
|
|
7571
7572
|
})(SupportedCurrencies || (SupportedCurrencies = {}));
|
|
7572
7573
|
/**
|
|
7573
7574
|
* DisplayMethodType type for display method
|
|
@@ -49270,45 +49271,29 @@ class Query {
|
|
|
49270
49271
|
throw new Error(CircuitError.EmptyQueryValue);
|
|
49271
49272
|
}
|
|
49272
49273
|
validateValueArraySize(maxArrSize) {
|
|
49273
|
-
|
|
49274
|
-
|
|
49275
|
-
|
|
49276
|
-
|
|
49277
|
-
|
|
49278
|
-
|
|
49279
|
-
|
|
49280
|
-
|
|
49281
|
-
|
|
49282
|
-
|
|
49283
|
-
|
|
49284
|
-
|
|
49285
|
-
|
|
49286
|
-
|
|
49287
|
-
|
|
49288
|
-
|
|
49289
|
-
|
|
49290
|
-
|
|
49291
|
-
|
|
49292
|
-
|
|
49293
|
-
|
|
49294
|
-
|
|
49295
|
-
|
|
49296
|
-
case 2: {
|
|
49297
|
-
const twoArrSizeOps = [Operators.BETWEEN, Operators.NONBETWEEN];
|
|
49298
|
-
if (!twoArrSizeOps.includes(this.operator)) {
|
|
49299
|
-
throw new Error(CircuitError.InvalidValuesArrSize);
|
|
49300
|
-
}
|
|
49301
|
-
return;
|
|
49302
|
-
}
|
|
49303
|
-
default: {
|
|
49304
|
-
const maxArrSizeOps = [Operators.IN, Operators.NIN];
|
|
49305
|
-
if (!maxArrSizeOps.includes(this.operator)) {
|
|
49306
|
-
throw new Error(CircuitError.InvalidOperationType);
|
|
49307
|
-
}
|
|
49308
|
-
if (!this.values.length || this.values.length > maxArrSize) {
|
|
49309
|
-
throw new Error(CircuitError.InvalidValuesArrSize);
|
|
49310
|
-
}
|
|
49311
|
-
}
|
|
49274
|
+
if ([Operators.NOOP, Operators.SD, Operators.NULLIFY].includes(this.operator) &&
|
|
49275
|
+
this.values.length !== 0) {
|
|
49276
|
+
throw new Error(CircuitError.InvalidValuesArrSize);
|
|
49277
|
+
}
|
|
49278
|
+
else if ([
|
|
49279
|
+
Operators.EQ,
|
|
49280
|
+
Operators.LT,
|
|
49281
|
+
Operators.GT,
|
|
49282
|
+
Operators.NE,
|
|
49283
|
+
Operators.LTE,
|
|
49284
|
+
Operators.GTE,
|
|
49285
|
+
Operators.EXISTS
|
|
49286
|
+
].includes(this.operator) &&
|
|
49287
|
+
this.values.length !== 1) {
|
|
49288
|
+
throw new Error(CircuitError.InvalidValuesArrSize);
|
|
49289
|
+
}
|
|
49290
|
+
else if ([Operators.BETWEEN, Operators.NONBETWEEN].includes(this.operator) &&
|
|
49291
|
+
this.values.length !== 2) {
|
|
49292
|
+
throw new Error(CircuitError.InvalidValuesArrSize);
|
|
49293
|
+
}
|
|
49294
|
+
else if ([Operators.IN, Operators.NIN].includes(this.operator) &&
|
|
49295
|
+
this.values.length > maxArrSize) {
|
|
49296
|
+
throw new Error(CircuitError.InvalidValuesArrSize);
|
|
49312
49297
|
}
|
|
49313
49298
|
}
|
|
49314
49299
|
}
|