@joclaim/attestor-core 0.2.4 → 0.3.0
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/lib/client/create-claim.js +17 -11
- package/package.json +1 -1
|
@@ -334,17 +334,23 @@ async function _createClaimOnAttestor({ name, params, secretParams, context, onS
|
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
if (provider.getResponseRedactions
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
337
|
+
if (provider.getResponseRedactions) {
|
|
338
|
+
if (redactionMode === 'key-update') {
|
|
339
|
+
// key-update mode: reveal all server blocks via session key
|
|
340
|
+
// (directReveal), skip ZK proof generation for response.
|
|
341
|
+
// The attestor decrypts and verifies the full response,
|
|
342
|
+
// but only extractedParameters are returned in the claim.
|
|
343
|
+
logger.info('key-update mode: revealing all server blocks via directReveal');
|
|
344
|
+
serverPacketsToReveal = 'all';
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
serverPacketsToReveal = await getBlocksToReveal(serverBlocks, total => provider.getResponseRedactions({
|
|
348
|
+
response: total,
|
|
349
|
+
params,
|
|
350
|
+
logger,
|
|
351
|
+
ctx: PROVIDER_CTX
|
|
352
|
+
}), performOprf);
|
|
353
|
+
}
|
|
348
354
|
}
|
|
349
355
|
const revealedPackets = packets
|
|
350
356
|
.filter(p => p.sender === 'client');
|