@zkpassport/sdk 0.17.0-beta.1 → 0.17.0-beta.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.
- package/dist/cjs/{index-B37sVnqT.d.cts → index-PPMt5JWF.d.cts} +7 -3
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +1 -1
- package/dist/cjs/popup.d.cts +1 -1
- package/dist/cjs/query.d.cts +1 -1
- package/dist/esm/{index-B37sVnqT.d.ts → index-PPMt5JWF.d.ts} +7 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/popup.d.ts +1 -1
- package/dist/esm/query.d.ts +1 -1
- package/package.json +2 -2
|
@@ -24,6 +24,7 @@ type QueryResultErrors = {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
type VerifierMode = "auto" | "local" | "api";
|
|
27
|
+
type RequestedNullifierType = NullifierType.NON_SALTED | NullifierType.SALTED | NullifierType.NONE;
|
|
27
28
|
type VerificationResult = {
|
|
28
29
|
uniqueIdentifier: string | undefined;
|
|
29
30
|
uniqueIdentifierType: NullifierType | undefined;
|
|
@@ -338,7 +339,7 @@ declare class ZKPassport {
|
|
|
338
339
|
projectID?: string;
|
|
339
340
|
validity?: number;
|
|
340
341
|
devMode?: boolean;
|
|
341
|
-
uniqueIdentifierType?:
|
|
342
|
+
uniqueIdentifierType?: RequestedNullifierType;
|
|
342
343
|
oprfKeyId?: string;
|
|
343
344
|
topicOverride?: string;
|
|
344
345
|
keyPairOverride?: {
|
|
@@ -370,13 +371,15 @@ declare class ZKPassport {
|
|
|
370
371
|
* @param writingDirectory The directory (e.g. `./tmp`) where the necessary temporary artifacts for verification are written to.
|
|
371
372
|
* It should only be needed when running the `verify` function on a server with restricted write access (e.g. Vercel)
|
|
372
373
|
* @param oprfKeyId The OPRF key id used in the original request, if any.
|
|
374
|
+
* @param uniqueIdentifierType The unique identifier type requested in the original request, if any.
|
|
375
|
+
* Proofs using a different type fail verification.
|
|
373
376
|
* @param verifierMode "local" verifies with the verifier bundled in this SDK, "api" with the
|
|
374
377
|
* ZKPassport verifier API, and "auto" (default) verifies locally but defers to the API when
|
|
375
378
|
* the local result is not verified — e.g. proofs from a newer bb version than this SDK supports.
|
|
376
379
|
* @returns An object containing the unique identifier associated to the user
|
|
377
380
|
* and a boolean indicating whether the proofs were successfully verified.
|
|
378
381
|
*/
|
|
379
|
-
verify({ proofs, originalQuery, queryResult, validity, scope, devMode, writingDirectory, oprfKeyId, verifierMode, }: {
|
|
382
|
+
verify({ proofs, originalQuery, queryResult, validity, scope, devMode, writingDirectory, oprfKeyId, uniqueIdentifierType, verifierMode, }: {
|
|
380
383
|
proofs: Array<ProofResult>;
|
|
381
384
|
originalQuery: Query;
|
|
382
385
|
queryResult: QueryResult;
|
|
@@ -385,6 +388,7 @@ declare class ZKPassport {
|
|
|
385
388
|
devMode?: boolean;
|
|
386
389
|
writingDirectory?: string;
|
|
387
390
|
oprfKeyId?: string;
|
|
391
|
+
uniqueIdentifierType?: RequestedNullifierType;
|
|
388
392
|
verifierMode?: VerifierMode;
|
|
389
393
|
}): Promise<VerificationResult>;
|
|
390
394
|
private verifyLocally;
|
|
@@ -437,4 +441,4 @@ declare class ZKPassport {
|
|
|
437
441
|
clearAllRequests(): void;
|
|
438
442
|
}
|
|
439
443
|
|
|
440
|
-
export { type DashboardConfig as D, type OnSuccessVerdict as O, type Policy as P, type QueryBuilder as Q, type RequestSuccess as R, type SolidityProofVerificationData as S, type VerificationResult as V, ZKPassport as Z, type QueryBuilderResult as a, numericalCompare as b, createOfflineQuery as c, type OfflineQueryBuilderResult as d, type QueryResultError as e, type QueryResultErrors as f, generalCompare as g, type
|
|
444
|
+
export { type DashboardConfig as D, type OnSuccessVerdict as O, type Policy as P, type QueryBuilder as Q, type RequestSuccess as R, type SolidityProofVerificationData as S, type VerificationResult as V, ZKPassport as Z, type QueryBuilderResult as a, numericalCompare as b, createOfflineQuery as c, type OfflineQueryBuilderResult as d, type QueryResultError as e, type QueryResultErrors as f, generalCompare as g, type RequestedNullifierType as h, type SolidityServiceConfig as i, type SolidityVerifierParameters as j, type VerifierMode as k, normalizeCountry as n, rangeCompare as r };
|