@0xpolygonid/js-sdk 1.10.2 → 1.10.4
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 +9 -6
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +9 -6
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/proof/verifiers/pub-signals-verifier.js +9 -6
- package/dist/node/esm/proof/verifiers/pub-signals-verifier.js +9 -6
- package/package.json +1 -1
|
@@ -65336,10 +65336,7 @@ class PubSignalsVerifier {
|
|
|
65336
65336
|
}
|
|
65337
65337
|
};
|
|
65338
65338
|
this.checkStateExistenceForId = async (userId, userState) => {
|
|
65339
|
-
|
|
65340
|
-
if (!latest) {
|
|
65341
|
-
throw userStateError;
|
|
65342
|
-
}
|
|
65339
|
+
await this.resolve(userId, userState.bigInt());
|
|
65343
65340
|
};
|
|
65344
65341
|
this.checkGlobalState = async (state, id) => {
|
|
65345
65342
|
return this.rootResolve(state.bigInt(), id.bigInt());
|
|
@@ -65432,7 +65429,9 @@ class PubSignalsVerifier {
|
|
|
65432
65429
|
contractState = await this._stateStorage.getStateInfoByIdAndState(idBigInt, state);
|
|
65433
65430
|
}
|
|
65434
65431
|
catch (e) {
|
|
65435
|
-
|
|
65432
|
+
const stateNotExistErr = (e?.errorArgs ?? [])[0];
|
|
65433
|
+
const errMsg = stateNotExistErr || e.message;
|
|
65434
|
+
if (errMsg === 'State does not exist') {
|
|
65436
65435
|
if (isGenesis) {
|
|
65437
65436
|
return {
|
|
65438
65437
|
latest: true,
|
|
@@ -65456,7 +65455,11 @@ class PubSignalsVerifier {
|
|
|
65456
65455
|
transitionTimestamp: contractState.replacedAtTimestamp.toString()
|
|
65457
65456
|
};
|
|
65458
65457
|
}
|
|
65459
|
-
return {
|
|
65458
|
+
return {
|
|
65459
|
+
latest: !contractState.replacedAtTimestamp ||
|
|
65460
|
+
contractState.replacedAtTimestamp.toString() === zeroInt.toString(),
|
|
65461
|
+
transitionTimestamp: contractState.replacedAtTimestamp?.toString() ?? 0
|
|
65462
|
+
};
|
|
65460
65463
|
}
|
|
65461
65464
|
async rootResolve(state, id) {
|
|
65462
65465
|
let globalStateInfo;
|