@0xpolygonid/js-sdk 1.29.0 → 1.29.1

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.
@@ -61349,7 +61349,7 @@ class AuthHandler extends AbstractMessageHandler {
61349
61349
  // group requests by query group id
61350
61350
  for (const proofRequest of requestScope) {
61351
61351
  const groupId = proofRequest.query.groupId;
61352
- const proofResp = responseScope.find((resp) => resp.id === proofRequest.id);
61352
+ const proofResp = responseScope.find((resp) => resp.id.toString() === proofRequest.id.toString());
61353
61353
  if (!proofResp) {
61354
61354
  throw new Error(`proof is not given for requestId ${proofRequest.id}`);
61355
61355
  }
@@ -63132,6 +63132,7 @@ class InputGenerator {
63132
63132
  return circuitInputs.inputsMarshal();
63133
63133
  };
63134
63134
  this.credentialAtomicQueryV3OnChainPrepareInputs = async ({ preparedCredential, identifier, proofReq, params, circuitQueries }) => {
63135
+ const id = DID.idFromDID(identifier);
63135
63136
  const circuitClaimData = await this.newCircuitClaimData(preparedCredential);
63136
63137
  circuitClaimData.nonRevProof = toClaimNonRevStatus(preparedCredential.revStatus);
63137
63138
  let proofType;
@@ -63181,20 +63182,17 @@ class InputGenerator {
63181
63182
  const isEthIdentity = isEthereumIdentity(identifier);
63182
63183
  circuitInputs.isBJJAuthEnabled = isEthIdentity ? 0 : 1;
63183
63184
  circuitInputs.challenge = BigInt(params.challenge ?? 0);
63184
- const { nonce: authProfileNonce, genesisDID } = await this._identityWallet.getGenesisDIDMetadata(identifier);
63185
- const id = DID.idFromDID(genesisDID);
63186
63185
  const stateProof = await this._stateStorage.getGISTProof(id.bigInt());
63187
63186
  const gistProof = toGISTProof(stateProof);
63188
63187
  circuitInputs.gistProof = gistProof;
63189
63188
  // auth inputs
63190
63189
  if (circuitInputs.isBJJAuthEnabled === 1) {
63191
- const authPrepared = await this.prepareAuthBJJCredential(genesisDID);
63190
+ const authPrepared = await this.prepareAuthBJJCredential(identifier);
63192
63191
  const authClaimData = await this.newCircuitClaimData({
63193
63192
  credential: authPrepared.credential,
63194
63193
  credentialCoreClaim: authPrepared.coreClaim
63195
63194
  });
63196
63195
  const signature = await this._identityWallet.signChallenge(circuitInputs.challenge, authPrepared.credential);
63197
- circuitInputs.profileNonce = BigInt(authProfileNonce);
63198
63196
  circuitInputs.authClaim = authClaimData.claim;
63199
63197
  circuitInputs.authClaimIncMtp = authClaimData.proof;
63200
63198
  circuitInputs.authClaimNonRevMtp = authPrepared.nonRevProof.proof;