@0xpolygonid/js-sdk 1.20.0 → 1.20.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 +8 -11
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +8 -11
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/circuits/atomic-query-sig-v2-on-chain.js +7 -10
- package/dist/node/cjs/storage/blockchain/onchain-zkp-verifier.js +1 -1
- package/dist/node/esm/circuits/atomic-query-sig-v2-on-chain.js +7 -10
- package/dist/node/esm/storage/blockchain/onchain-zkp-verifier.js +1 -1
- package/package.json +1 -1
|
@@ -66,6 +66,9 @@ class AtomicQuerySigV2OnChainInputs extends common_1.BaseConfig {
|
|
|
66
66
|
this.query.valueProof.validate();
|
|
67
67
|
}
|
|
68
68
|
const valueProof = this.query?.valueProof ?? new models_1.ValueProof();
|
|
69
|
+
const treeState = this.skipClaimRevocationCheck
|
|
70
|
+
? this.claim.signatureProof?.issuerAuthNonRevProof.treeState
|
|
71
|
+
: this.claim.nonRevProof?.treeState;
|
|
69
72
|
const s = {
|
|
70
73
|
requestID: this.requestID.toString(),
|
|
71
74
|
userGenesisID: this.id.bigInt().toString(),
|
|
@@ -73,16 +76,10 @@ class AtomicQuerySigV2OnChainInputs extends common_1.BaseConfig {
|
|
|
73
76
|
claimSubjectProfileNonce: this.claimSubjectProfileNonce?.toString(),
|
|
74
77
|
issuerID: this.claim.issuerID?.bigInt().toString(),
|
|
75
78
|
issuerClaim: this.claim.claim?.marshalJson(),
|
|
76
|
-
issuerClaimNonRevClaimsTreeRoot:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
?.bigInt()
|
|
81
|
-
.toString(),
|
|
82
|
-
issuerClaimNonRevRootsTreeRoot: this.claim.nonRevProof?.treeState?.rootOfRoots
|
|
83
|
-
?.bigInt()
|
|
84
|
-
.toString(),
|
|
85
|
-
issuerClaimNonRevState: this.claim.nonRevProof?.treeState?.state?.bigInt().toString(),
|
|
79
|
+
issuerClaimNonRevClaimsTreeRoot: treeState?.claimsRoot?.bigInt().toString(),
|
|
80
|
+
issuerClaimNonRevRevTreeRoot: treeState?.revocationRoot?.bigInt().toString(),
|
|
81
|
+
issuerClaimNonRevRootsTreeRoot: treeState?.rootOfRoots?.bigInt().toString(),
|
|
82
|
+
issuerClaimNonRevState: treeState?.state?.bigInt().toString(),
|
|
86
83
|
issuerClaimNonRevMtp: this.claim.nonRevProof?.proof &&
|
|
87
84
|
(0, common_1.prepareSiblingsStr)(this.claim.nonRevProof.proof, this.getMTLevel()),
|
|
88
85
|
issuerClaimSignatureR8x: this.claim.signatureProof && this.claim.signatureProof.signature.R8[0].toString(),
|
|
@@ -230,7 +230,7 @@ class OnChainZKPVerifier {
|
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
const metadata = this.packMetadatas(metadataArr);
|
|
233
|
+
const metadata = metadataArr.length ? this.packMetadatas(metadataArr) : '0x';
|
|
234
234
|
payload.push({
|
|
235
235
|
requestId: requestID,
|
|
236
236
|
zkProof: zkProofEncoded,
|
|
@@ -63,6 +63,9 @@ export class AtomicQuerySigV2OnChainInputs extends BaseConfig {
|
|
|
63
63
|
this.query.valueProof.validate();
|
|
64
64
|
}
|
|
65
65
|
const valueProof = this.query?.valueProof ?? new ValueProof();
|
|
66
|
+
const treeState = this.skipClaimRevocationCheck
|
|
67
|
+
? this.claim.signatureProof?.issuerAuthNonRevProof.treeState
|
|
68
|
+
: this.claim.nonRevProof?.treeState;
|
|
66
69
|
const s = {
|
|
67
70
|
requestID: this.requestID.toString(),
|
|
68
71
|
userGenesisID: this.id.bigInt().toString(),
|
|
@@ -70,16 +73,10 @@ export class AtomicQuerySigV2OnChainInputs extends BaseConfig {
|
|
|
70
73
|
claimSubjectProfileNonce: this.claimSubjectProfileNonce?.toString(),
|
|
71
74
|
issuerID: this.claim.issuerID?.bigInt().toString(),
|
|
72
75
|
issuerClaim: this.claim.claim?.marshalJson(),
|
|
73
|
-
issuerClaimNonRevClaimsTreeRoot:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
?.bigInt()
|
|
78
|
-
.toString(),
|
|
79
|
-
issuerClaimNonRevRootsTreeRoot: this.claim.nonRevProof?.treeState?.rootOfRoots
|
|
80
|
-
?.bigInt()
|
|
81
|
-
.toString(),
|
|
82
|
-
issuerClaimNonRevState: this.claim.nonRevProof?.treeState?.state?.bigInt().toString(),
|
|
76
|
+
issuerClaimNonRevClaimsTreeRoot: treeState?.claimsRoot?.bigInt().toString(),
|
|
77
|
+
issuerClaimNonRevRevTreeRoot: treeState?.revocationRoot?.bigInt().toString(),
|
|
78
|
+
issuerClaimNonRevRootsTreeRoot: treeState?.rootOfRoots?.bigInt().toString(),
|
|
79
|
+
issuerClaimNonRevState: treeState?.state?.bigInt().toString(),
|
|
83
80
|
issuerClaimNonRevMtp: this.claim.nonRevProof?.proof &&
|
|
84
81
|
prepareSiblingsStr(this.claim.nonRevProof.proof, this.getMTLevel()),
|
|
85
82
|
issuerClaimSignatureR8x: this.claim.signatureProof && this.claim.signatureProof.signature.R8[0].toString(),
|
|
@@ -224,7 +224,7 @@ export class OnChainZKPVerifier {
|
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
const metadata = this.packMetadatas(metadataArr);
|
|
227
|
+
const metadata = metadataArr.length ? this.packMetadatas(metadataArr) : '0x';
|
|
228
228
|
payload.push({
|
|
229
229
|
requestId: requestID,
|
|
230
230
|
zkProof: zkProofEncoded,
|