@zkpassport/sdk 0.18.0 → 0.18.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.
@@ -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 VerificationResult, l as VerifierMode, Z as ZKPassport, c as createOfflineQuery, n as normalizeCountry } from './index-J_WoAigp.cjs';
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-DTcwcq9Z.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';
@@ -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-J_WoAigp.cjs';
2
+ import { R as RequestedNullifierType, O as OnSuccessVerdict, Q as QueryBuilder, a as QueryBuilderResult } from './index-DTcwcq9Z.cjs';
3
3
  import 'i18n-iso-countries';
4
4
 
5
5
  declare const DEFAULT_POPUP_URL = "https://verify.zkpassport.id";
@@ -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-J_WoAigp.cjs';
3
+ export { c as createOfflineQuery, g as generalCompare, n as normalizeCountry, b as numericalCompare, r as rangeCompare } from './index-DTcwcq9Z.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, }: {
342
351
  name?: string;
343
352
  logo?: string;
344
353
  purpose?: string;
@@ -358,6 +367,7 @@ declare class ZKPassport {
358
367
  bridgeUrl?: string;
359
368
  returnDeepLink?: string;
360
369
  verifierMode?: VerifierMode;
370
+ config?: VerificationConfig;
361
371
  }): Promise<QueryBuilder>;
362
372
  /**
363
373
  * @notice Create a new offline query
@@ -384,10 +394,11 @@ declare class ZKPassport {
384
394
  * @param verifierMode "local" verifies with the verifier bundled in this SDK, "api" with the
385
395
  * ZKPassport verifier API, and "auto" (default) verifies locally but defers to the API when
386
396
  * the local result is not verified — e.g. proofs from a newer bb version than this SDK supports.
397
+ * @param config Verification settings such as the RPC URL, see {@link VerificationConfig}.
387
398
  * @returns An object containing the unique identifier associated to the user
388
399
  * and a boolean indicating whether the proofs were successfully verified.
389
400
  */
390
- verify({ proofs, originalQuery, queryResult, validity, scope, devMode, writingDirectory, oprfKeyId, uniqueIdentifierType, verifierMode, }: {
401
+ verify({ proofs, originalQuery, queryResult, validity, scope, devMode, writingDirectory, oprfKeyId, uniqueIdentifierType, verifierMode, config, }: {
391
402
  proofs: Array<ProofResult>;
392
403
  originalQuery: Query;
393
404
  queryResult: QueryResult;
@@ -398,6 +409,7 @@ declare class ZKPassport {
398
409
  oprfKeyId?: string;
399
410
  uniqueIdentifierType?: RequestedNullifierType;
400
411
  verifierMode?: VerifierMode;
412
+ config?: VerificationConfig;
401
413
  }): Promise<VerificationResult>;
402
414
  private verifyLocally;
403
415
  getSolidityVerifierDetails(): {
@@ -449,4 +461,4 @@ declare class ZKPassport {
449
461
  clearAllRequests(): void;
450
462
  }
451
463
 
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 VerificationResult as k, type VerifierMode as l, normalizeCountry as n, rangeCompare as r };
464
+ 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 };
@@ -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 VerificationResult, l as VerifierMode, Z as ZKPassport, c as createOfflineQuery, n as normalizeCountry } from './index-J_WoAigp.js';
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-DTcwcq9Z.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';