@0xpolygonid/js-sdk 1.20.1 → 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.
@@ -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: this.claim.nonRevProof?.treeState?.claimsRoot
77
- ?.bigInt()
78
- .toString(),
79
- issuerClaimNonRevRevTreeRoot: this.claim.nonRevProof?.treeState?.revocationRoot
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(),
@@ -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: this.claim.nonRevProof?.treeState?.claimsRoot
74
- ?.bigInt()
75
- .toString(),
76
- issuerClaimNonRevRevTreeRoot: this.claim.nonRevProof?.treeState?.revocationRoot
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(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xpolygonid/js-sdk",
3
- "version": "1.20.1",
3
+ "version": "1.20.2",
4
4
  "description": "SDK to work with Polygon ID",
5
5
  "main": "dist/node/cjs/index.js",
6
6
  "module": "dist/node/esm/index.js",