@0xpolygonid/js-sdk 1.9.1 → 1.9.2
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 +13 -8
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +13 -8
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/proof/common.js +11 -3
- package/dist/node/cjs/proof/proof-service.js +1 -4
- package/dist/node/cjs/storage/filters/jsonQuery.js +1 -1
- package/dist/node/esm/proof/common.js +12 -4
- package/dist/node/esm/proof/proof-service.js +1 -4
- package/dist/node/esm/storage/filters/jsonQuery.js +1 -1
- package/package.json +1 -1
|
@@ -60108,7 +60108,7 @@ var PolygonIdSdk = (function (exports) {
|
|
|
60108
60108
|
}
|
|
60109
60109
|
const credentialPathValue = resolvePath(credential, this.path);
|
|
60110
60110
|
if ((credentialPathValue === null || credentialPathValue === undefined) &&
|
|
60111
|
-
this.operatorFunc !==
|
|
60111
|
+
this.operatorFunc !== comparatorOptions.$exists) {
|
|
60112
60112
|
return false;
|
|
60113
60113
|
}
|
|
60114
60114
|
if (this.isReverseParams) {
|
|
@@ -62532,12 +62532,14 @@ var PolygonIdSdk = (function (exports) {
|
|
|
62532
62532
|
throw new Error(`field does not exist in the schema ${e.message}`);
|
|
62533
62533
|
}
|
|
62534
62534
|
}
|
|
62535
|
-
if (propertyQuery.operatorValue) {
|
|
62535
|
+
if (propertyQuery.operatorValue !== undefined) {
|
|
62536
62536
|
if (!isValidOperation(query.datatype, propertyQuery.operator)) {
|
|
62537
62537
|
throw new Error(`operator ${propertyQuery.operator} is not supported for datatype ${query.datatype}`);
|
|
62538
62538
|
}
|
|
62539
|
-
|
|
62540
|
-
|
|
62539
|
+
query.values =
|
|
62540
|
+
propertyQuery.operator === exports.Operators.EXISTS
|
|
62541
|
+
? transformExistsValue(propertyQuery.operatorValue)
|
|
62542
|
+
: await transformQueryValueToBigInts(propertyQuery.operatorValue, query.datatype);
|
|
62541
62543
|
}
|
|
62542
62544
|
return query;
|
|
62543
62545
|
};
|
|
@@ -62557,6 +62559,12 @@ var PolygonIdSdk = (function (exports) {
|
|
|
62557
62559
|
}
|
|
62558
62560
|
return values;
|
|
62559
62561
|
};
|
|
62562
|
+
const transformExistsValue = (value) => {
|
|
62563
|
+
if (typeof value == 'boolean') {
|
|
62564
|
+
return [BigInt(value)];
|
|
62565
|
+
}
|
|
62566
|
+
throw new Error('exists operator value must be true or false');
|
|
62567
|
+
};
|
|
62560
62568
|
|
|
62561
62569
|
/* eslint-disable require-await */
|
|
62562
62570
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -84788,10 +84796,7 @@ var PolygonIdSdk = (function (exports) {
|
|
|
84788
84796
|
query.valueProof = new ValueProof();
|
|
84789
84797
|
query.valueProof.mtp = proof;
|
|
84790
84798
|
query.valueProof.path = queryMetadata.claimPathKey;
|
|
84791
|
-
const mtEntry = await mtValue?.mtEntry();
|
|
84792
|
-
if (!mtEntry) {
|
|
84793
|
-
throw new Error(`can't merklize credential: no merkle tree entry found`);
|
|
84794
|
-
}
|
|
84799
|
+
const mtEntry = (await mtValue?.mtEntry()) ?? 0n;
|
|
84795
84800
|
query.valueProof.value = mtEntry;
|
|
84796
84801
|
if (!queryMetadata.fieldName) {
|
|
84797
84802
|
query.values = [mtEntry];
|