@0xpolygonid/js-sdk 1.29.3 → 1.29.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 +1 -15
- package/dist/browser/esm/index.js.map +1 -1
- package/dist/browser/umd/index.js +1 -15
- package/dist/browser/umd/index.js.map +1 -1
- package/dist/node/cjs/iden3comm/handlers/common.js +1 -15
- package/dist/node/esm/iden3comm/handlers/common.js +3 -17
- package/package.json +1 -1
|
@@ -154,21 +154,7 @@ const processProofResponse = (zkProof) => {
|
|
|
154
154
|
}
|
|
155
155
|
const preparedZkpProof = (0, common_1.prepareZkpProof)(zkProof.proof);
|
|
156
156
|
const zkProofEncoded = (0, common_1.packZkpProof)(inputs, preparedZkpProof.a, preparedZkpProof.b, preparedZkpProof.c);
|
|
157
|
-
const
|
|
158
|
-
if (zkProof.vp) {
|
|
159
|
-
for (const key in zkProof.vp.verifiableCredential.credentialSubject) {
|
|
160
|
-
if (key === '@type') {
|
|
161
|
-
continue;
|
|
162
|
-
}
|
|
163
|
-
const metadataValue = js_crypto_1.poseidon.hashBytes(utils_1.byteEncoder.encode(JSON.stringify(zkProof.vp.verifiableCredential.credentialSubject[key])));
|
|
164
|
-
const bytesValue = utils_1.byteEncoder.encode(metadataValue.toString());
|
|
165
|
-
metadataArr.push({
|
|
166
|
-
key,
|
|
167
|
-
value: bytesValue
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
const metadata = metadataArr.length ? (0, exports.packMetadatas)(metadataArr) : emptyBytes;
|
|
157
|
+
const metadata = emptyBytes;
|
|
172
158
|
return { requestId, zkProofEncoded, metadata };
|
|
173
159
|
};
|
|
174
160
|
exports.processProofResponse = processProofResponse;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getRandomBytes
|
|
1
|
+
import { getRandomBytes } from '@iden3/js-crypto';
|
|
2
2
|
import { AuthMethod } from '../types';
|
|
3
|
-
import {
|
|
3
|
+
import { mergeObjects } from '../../utils';
|
|
4
4
|
import { getUnixTimestamp } from '@iden3/js-iden3-core';
|
|
5
5
|
import { AcceptJwsAlgorithms, defaultAcceptProfile, MediaType } from '../constants';
|
|
6
6
|
import { ethers } from 'ethers';
|
|
@@ -149,21 +149,7 @@ export const processProofResponse = (zkProof) => {
|
|
|
149
149
|
}
|
|
150
150
|
const preparedZkpProof = prepareZkpProof(zkProof.proof);
|
|
151
151
|
const zkProofEncoded = packZkpProof(inputs, preparedZkpProof.a, preparedZkpProof.b, preparedZkpProof.c);
|
|
152
|
-
const
|
|
153
|
-
if (zkProof.vp) {
|
|
154
|
-
for (const key in zkProof.vp.verifiableCredential.credentialSubject) {
|
|
155
|
-
if (key === '@type') {
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
const metadataValue = poseidon.hashBytes(byteEncoder.encode(JSON.stringify(zkProof.vp.verifiableCredential.credentialSubject[key])));
|
|
159
|
-
const bytesValue = byteEncoder.encode(metadataValue.toString());
|
|
160
|
-
metadataArr.push({
|
|
161
|
-
key,
|
|
162
|
-
value: bytesValue
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
const metadata = metadataArr.length ? packMetadatas(metadataArr) : emptyBytes;
|
|
152
|
+
const metadata = emptyBytes;
|
|
167
153
|
return { requestId, zkProofEncoded, metadata };
|
|
168
154
|
};
|
|
169
155
|
/**
|