@zkpassport/sdk 0.18.0 → 0.18.3-beta.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.
- package/README.md +11 -0
- package/dist/cjs/{index-J_WoAigp.d.cts → index-CAudQvTm.d.cts} +18 -3
- package/dist/cjs/index.cjs +2 -2
- 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-J_WoAigp.d.ts → index-CAudQvTm.d.ts} +18 -3
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- 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 +3 -3
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DashboardConfig, d as OfflineQueryBuilderResult, O as OnSuccessVerdict, P as Policy, Q as QueryBuilder, a as QueryBuilderResult, e as QueryResultError, f as QueryResultErrors, h as RequestSuccess, R as RequestedNullifierType, S as SolidityProofVerificationData, i as SolidityServiceConfig, j as SolidityVerifierParameters, V as VERSION, k as
|
|
1
|
+
export { D as DashboardConfig, d as OfflineQueryBuilderResult, O as OnSuccessVerdict, P as Policy, Q as QueryBuilder, a as QueryBuilderResult, e as QueryResultError, f as QueryResultErrors, h as RequestSuccess, R as RequestedNullifierType, S as SolidityProofVerificationData, i as SolidityServiceConfig, j as SolidityVerifierParameters, V as VERSION, k as VerificationConfig, l as VerificationResult, m as VerifierMode, Z as ZKPassport, c as createOfflineQuery, n as normalizeCountry } from './index-CAudQvTm.cjs';
|
|
2
2
|
export { ASEAN_COUNTRIES, BoundData, CountryName, DisclosableIDCredential, EEA_COUNTRIES, EU_COUNTRIES, FacematchMode, IDCredential, IDCredentialValue, JsonRpcRequest, MERCOSUR_COUNTRIES, NullifierType, NumericalIDCredential, ProofMode, ProofResult, ProofType, ProofTypeLength, Query, QueryResult, SANCTIONED_COUNTRIES, SCHENGEN_COUNTRIES, SanctionsCountries, SanctionsLists, Service, SupportedChain, getChainFromId, getIdFromChain } from '@zkpassport/utils';
|
|
3
3
|
import 'i18n-iso-countries';
|
package/dist/cjs/popup.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProofMode, SupportedChain, ProofResult, QueryResult, Query } from '@zkpassport/utils';
|
|
2
|
-
import { R as RequestedNullifierType, O as OnSuccessVerdict, Q as QueryBuilder, a as QueryBuilderResult } from './index-
|
|
2
|
+
import { R as RequestedNullifierType, O as OnSuccessVerdict, Q as QueryBuilder, a as QueryBuilderResult } from './index-CAudQvTm.cjs';
|
|
3
3
|
import 'i18n-iso-countries';
|
|
4
4
|
|
|
5
5
|
declare const DEFAULT_POPUP_URL = "https://verify.zkpassport.id";
|
package/dist/cjs/query.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'i18n-iso-countries';
|
|
2
2
|
import '@zkpassport/utils';
|
|
3
|
-
export { c as createOfflineQuery, g as generalCompare, n as normalizeCountry, b as numericalCompare, r as rangeCompare } from './index-
|
|
3
|
+
export { c as createOfflineQuery, g as generalCompare, n as normalizeCountry, b as numericalCompare, r as rangeCompare } from './index-CAudQvTm.cjs';
|
|
@@ -24,6 +24,14 @@ type QueryResultErrors = {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
type VerifierMode = "auto" | "local" | "api";
|
|
27
|
+
type VerificationConfig = {
|
|
28
|
+
/**
|
|
29
|
+
* Ethereum RPC used for the on-chain reads during local verification: the registry root checks
|
|
30
|
+
* and the Solidity verifier. It must serve the chain the query binds to, or Sepolia in dev mode
|
|
31
|
+
* and Ethereum otherwise. Defaults to the built-in endpoint for that chain.
|
|
32
|
+
*/
|
|
33
|
+
rpcUrl?: string;
|
|
34
|
+
};
|
|
27
35
|
type RequestedNullifierType = NullifierType.NON_SALTED | NullifierType.SALTED | NullifierType.NONE;
|
|
28
36
|
type VerificationResult = {
|
|
29
37
|
uniqueIdentifier: string | undefined;
|
|
@@ -336,9 +344,10 @@ declare class ZKPassport {
|
|
|
336
344
|
* @param mode The proof mode (e.g. "fast" / "compressed").
|
|
337
345
|
* @param devMode Whether to enable dev mode. This will allow you to verify mock proofs (i.e. from ZKR)
|
|
338
346
|
* @param verifierMode How the received proofs are verified: "local", "api" or "auto" (default).
|
|
347
|
+
* @param config Settings for verifying the received proofs, see {@link VerificationConfig}.
|
|
339
348
|
* @returns The query builder object.
|
|
340
349
|
*/
|
|
341
|
-
request({ name, logo, purpose, scope, projectID, mode, validity, devMode, uniqueIdentifierType, oprfKeyId, topicOverride, keyPairOverride, cloudProverUrl, bridgeUrl, returnDeepLink, verifierMode, }: {
|
|
350
|
+
request({ name, logo, purpose, scope, projectID, mode, validity, devMode, uniqueIdentifierType, oprfKeyId, topicOverride, keyPairOverride, cloudProverUrl, bridgeUrl, returnDeepLink, verifierMode, config, overrides, }: {
|
|
342
351
|
name?: string;
|
|
343
352
|
logo?: string;
|
|
344
353
|
purpose?: string;
|
|
@@ -358,6 +367,10 @@ declare class ZKPassport {
|
|
|
358
367
|
bridgeUrl?: string;
|
|
359
368
|
returnDeepLink?: string;
|
|
360
369
|
verifierMode?: VerifierMode;
|
|
370
|
+
config?: VerificationConfig;
|
|
371
|
+
overrides?: {
|
|
372
|
+
appClip?: boolean;
|
|
373
|
+
};
|
|
361
374
|
}): Promise<QueryBuilder>;
|
|
362
375
|
/**
|
|
363
376
|
* @notice Create a new offline query
|
|
@@ -384,10 +397,11 @@ declare class ZKPassport {
|
|
|
384
397
|
* @param verifierMode "local" verifies with the verifier bundled in this SDK, "api" with the
|
|
385
398
|
* ZKPassport verifier API, and "auto" (default) verifies locally but defers to the API when
|
|
386
399
|
* the local result is not verified — e.g. proofs from a newer bb version than this SDK supports.
|
|
400
|
+
* @param config Verification settings such as the RPC URL, see {@link VerificationConfig}.
|
|
387
401
|
* @returns An object containing the unique identifier associated to the user
|
|
388
402
|
* and a boolean indicating whether the proofs were successfully verified.
|
|
389
403
|
*/
|
|
390
|
-
verify({ proofs, originalQuery, queryResult, validity, scope, devMode, writingDirectory, oprfKeyId, uniqueIdentifierType, verifierMode, }: {
|
|
404
|
+
verify({ proofs, originalQuery, queryResult, validity, scope, devMode, writingDirectory, oprfKeyId, uniqueIdentifierType, verifierMode, config, }: {
|
|
391
405
|
proofs: Array<ProofResult>;
|
|
392
406
|
originalQuery: Query;
|
|
393
407
|
queryResult: QueryResult;
|
|
@@ -398,6 +412,7 @@ declare class ZKPassport {
|
|
|
398
412
|
oprfKeyId?: string;
|
|
399
413
|
uniqueIdentifierType?: RequestedNullifierType;
|
|
400
414
|
verifierMode?: VerifierMode;
|
|
415
|
+
config?: VerificationConfig;
|
|
401
416
|
}): Promise<VerificationResult>;
|
|
402
417
|
private verifyLocally;
|
|
403
418
|
getSolidityVerifierDetails(): {
|
|
@@ -449,4 +464,4 @@ declare class ZKPassport {
|
|
|
449
464
|
clearAllRequests(): void;
|
|
450
465
|
}
|
|
451
466
|
|
|
452
|
-
export { type DashboardConfig as D, type OnSuccessVerdict as O, type Policy as P, type QueryBuilder as Q, type RequestedNullifierType as R, type SolidityProofVerificationData as S, VERSION 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 RequestSuccess as h, type SolidityServiceConfig as i, type SolidityVerifierParameters as j, type
|
|
467
|
+
export { type DashboardConfig as D, type OnSuccessVerdict as O, type Policy as P, type QueryBuilder as Q, type RequestedNullifierType as R, type SolidityProofVerificationData as S, VERSION 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 RequestSuccess as h, type SolidityServiceConfig as i, type SolidityVerifierParameters as j, type VerificationConfig as k, type VerificationResult as l, type VerifierMode as m, normalizeCountry as n, rangeCompare as r };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DashboardConfig, d as OfflineQueryBuilderResult, O as OnSuccessVerdict, P as Policy, Q as QueryBuilder, a as QueryBuilderResult, e as QueryResultError, f as QueryResultErrors, h as RequestSuccess, R as RequestedNullifierType, S as SolidityProofVerificationData, i as SolidityServiceConfig, j as SolidityVerifierParameters, V as VERSION, k as
|
|
1
|
+
export { D as DashboardConfig, d as OfflineQueryBuilderResult, O as OnSuccessVerdict, P as Policy, Q as QueryBuilder, a as QueryBuilderResult, e as QueryResultError, f as QueryResultErrors, h as RequestSuccess, R as RequestedNullifierType, S as SolidityProofVerificationData, i as SolidityServiceConfig, j as SolidityVerifierParameters, V as VERSION, k as VerificationConfig, l as VerificationResult, m as VerifierMode, Z as ZKPassport, c as createOfflineQuery, n as normalizeCountry } from './index-CAudQvTm.js';
|
|
2
2
|
export { ASEAN_COUNTRIES, BoundData, CountryName, DisclosableIDCredential, EEA_COUNTRIES, EU_COUNTRIES, FacematchMode, IDCredential, IDCredentialValue, JsonRpcRequest, MERCOSUR_COUNTRIES, NullifierType, NumericalIDCredential, ProofMode, ProofResult, ProofType, ProofTypeLength, Query, QueryResult, SANCTIONED_COUNTRIES, SCHENGEN_COUNTRIES, SanctionsCountries, SanctionsLists, Service, SupportedChain, getChainFromId, getIdFromChain } from '@zkpassport/utils';
|
|
3
3
|
import 'i18n-iso-countries';
|