@reclaimprotocol/attestor-core 5.0.1-beta.11 → 5.0.1-beta.12
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/browser/utils/zk.js +6 -3
- package/package.json +1 -1
package/lib/browser/utils/zk.js
CHANGED
|
@@ -4,7 +4,10 @@ import {
|
|
|
4
4
|
ceilToBlockSizeMultiple,
|
|
5
5
|
CONFIG as ZK_CONFIG,
|
|
6
6
|
generateProof,
|
|
7
|
-
getBlockSizeBytes,
|
|
7
|
+
getBlockSizeBytes,
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
verifyProof
|
|
8
11
|
} from "@reclaimprotocol/zk-symmetric-crypto";
|
|
9
12
|
import { makeGnarkOPRFOperator, makeGnarkZkOperator } from "../scripts/fallbacks/gnark.js";
|
|
10
13
|
import { makeSnarkJsZKOperator } from "@reclaimprotocol/zk-symmetric-crypto/snarkjs";
|
|
@@ -465,7 +468,7 @@ function makeDefaultZkOperator(algorithm, zkEngine, logger) {
|
|
|
465
468
|
const opType = getOperatorType();
|
|
466
469
|
const zkBaseUrl = opType === "remote" ? getZkResourcesBaseUrl() : void 0;
|
|
467
470
|
logger?.info({ type: opType, algorithm, zkBaseUrl }, "fetching zk operator");
|
|
468
|
-
const fetcher = opType === "local" ?() :({ baseUrl: zkBaseUrl, logger });
|
|
471
|
+
const fetcher = opType === "local" ? makeLocalFileFetch() : makeRemoteFileFetch({ baseUrl: zkBaseUrl, logger });
|
|
469
472
|
const maker = operatorMakers[zkEngine];
|
|
470
473
|
if (!maker) {
|
|
471
474
|
throw new Error(`No ZK operator maker for ${zkEngine}`);
|
|
@@ -491,7 +494,7 @@ function makeDefaultOPRFOperator(algorithm, zkEngine, logger) {
|
|
|
491
494
|
const type = getOperatorType();
|
|
492
495
|
const zkBaseUrl = type === "remote" ? getZkResourcesBaseUrl() : void 0;
|
|
493
496
|
logger?.info({ type, algorithm, zkBaseUrl }, "fetching oprf operator");
|
|
494
|
-
const fetcher = type === "local" ?() :({ baseUrl: zkBaseUrl, logger });
|
|
497
|
+
const fetcher = type === "local" ? makeLocalFileFetch() : makeRemoteFileFetch({ baseUrl: zkBaseUrl, logger });
|
|
495
498
|
const maker = OPRF_OPERATOR_MAKERS[zkEngine];
|
|
496
499
|
if (!maker) {
|
|
497
500
|
throw new Error(`No OPRF operator maker for ${zkEngine}`);
|