@zkpassport/ui 0.16.2 → 0.17.0-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.
@@ -1,7 +1,8 @@
1
1
  import { ReactElement } from 'react';
2
- import { Z as ZKPassportQRCodeOptions } from './types-DV8w93iS.cjs';
3
- export { Q as QRCardHandle, a as ZKPassportQRCodeDisplayOptions } from './types-DV8w93iS.cjs';
4
- export { ASEAN_COUNTRIES, BoundData, CountryName, DisclosableIDCredential, EEA_COUNTRIES, EU_COUNTRIES, FacematchMode, IDCredential, IDCredentialValue, MERCOSUR_COUNTRIES, NullifierType, NumericalIDCredential, ProofMode, ProofResult, ProofType, ProofTypeLength, Query, QueryBuilder, QueryBuilderResult, QueryResult, QueryResultError, QueryResultErrors, SANCTIONED_COUNTRIES, SCHENGEN_COUNTRIES, SanctionsCountries, SanctionsLists, Service, SupportedChain, ZKPassport } from '@zkpassport/sdk';
2
+ import { Z as ZKPassportQRCodeOptions } from './types-BpU_Si5b.cjs';
3
+ export { A as ASEAN_COUNTRIES, E as EEA_COUNTRIES, a as EU_COUNTRIES, M as MERCOSUR_COUNTRIES, P as ProofType, b as ProofTypeLength, Q as QRCardHandle, S as SANCTIONED_COUNTRIES, c as SCHENGEN_COUNTRIES, d as ZKPassportQRCodeDisplayOptions } from './types-BpU_Si5b.cjs';
4
+ export { VerifyWithZKPassportButton, VerifyWithZKPassportButtonProps, ZKPassportVerification } from './react-button.cjs';
5
+ export { B as BoundData, C as CountryName, D as DisclosableIDCredential, F as FacematchMode, I as IDCredential, a as IDCredentialValue, N as NullifierType, b as NumericalIDCredential, P as ProofMode, c as ProofResult, Q as Query, d as QueryBuilder, e as QueryBuilderResult, f as QueryResult, g as QueryResultError, h as QueryResultErrors, S as SanctionsCountries, i as SanctionsLists, j as Service, k as SupportedChain, V as VerificationOptions, l as VerificationState, m as VerificationStatus, n as VerifyButtonSize, o as VerifyWithZKPassportButtonOptions, Z as ZKPassport } from './verify-button-BTuf-26F.cjs';
5
6
 
6
7
  /** @jsxImportSource react */
7
8
 
@@ -0,0 +1,123 @@
1
+ import { C as CountryName, Z as ZKPassport, d as QueryBuilder, e as QueryBuilderResult } from './verify-button-BTuf-26F.cjs';
2
+
3
+ declare enum ProofType {
4
+ DISCLOSE = 0,
5
+ AGE = 1,
6
+ BIRTHDATE = 2,
7
+ EXPIRY_DATE = 3,
8
+ NATIONALITY_INCLUSION = 4,
9
+ NATIONALITY_EXCLUSION = 5,
10
+ ISSUING_COUNTRY_INCLUSION = 6,
11
+ ISSUING_COUNTRY_EXCLUSION = 7,
12
+ BIND = 8,
13
+ SANCTIONS_EXCLUSION = 9,
14
+ FACEMATCH = 10
15
+ }
16
+ declare const ProofTypeLength: {
17
+ 0: {
18
+ evm: number;
19
+ standard: number;
20
+ };
21
+ 1: {
22
+ evm: number;
23
+ standard: number;
24
+ };
25
+ 2: {
26
+ evm: number;
27
+ standard: number;
28
+ };
29
+ 3: {
30
+ evm: number;
31
+ standard: number;
32
+ };
33
+ 4: {
34
+ evm: number;
35
+ standard: number;
36
+ };
37
+ 5: {
38
+ evm: number;
39
+ standard: number;
40
+ };
41
+ 6: {
42
+ evm: number;
43
+ standard: number;
44
+ };
45
+ 7: {
46
+ evm: number;
47
+ standard: number;
48
+ };
49
+ 8: {
50
+ evm: number;
51
+ standard: number;
52
+ };
53
+ 9: {
54
+ evm: number;
55
+ standard: number;
56
+ };
57
+ 10: {
58
+ evm: number;
59
+ standard: number;
60
+ };
61
+ };
62
+
63
+ /**
64
+ * List of countries that are sanctioned by the US government.
65
+ */
66
+ declare const SANCTIONED_COUNTRIES: CountryName[];
67
+ /**
68
+ * List of countries that are part of the European Union.
69
+ */
70
+ declare const EU_COUNTRIES: CountryName[];
71
+ /**
72
+ * List of countries that are part of the European Economic Area.
73
+ */
74
+ declare const EEA_COUNTRIES: CountryName[];
75
+ /**
76
+ * List of countries that are part of the Schengen Area.
77
+ */
78
+ declare const SCHENGEN_COUNTRIES: CountryName[];
79
+ /**
80
+ * List of countries that are part of the Association of Southeast Asian Nations.
81
+ */
82
+ declare const ASEAN_COUNTRIES: CountryName[];
83
+ /**
84
+ * List of countries that are part of the Mercosur.
85
+ */
86
+ declare const MERCOSUR_COUNTRIES: CountryName[];
87
+
88
+ type SdkCallback<K extends keyof QueryBuilderResult> = QueryBuilderResult[K] extends (cb: infer C) => void ? C : never;
89
+ type SdkRequestProps = Omit<Parameters<ZKPassport["request"]>[0], "projectID" | "topicOverride" | "keyPairOverride" | "cloudProverUrl" | "bridgeUrl" | "verifierMode">;
90
+ type ZKPassportQRCodeDisplayOptions = {
91
+ header?: boolean;
92
+ steps?: boolean;
93
+ appLinks?: boolean;
94
+ };
95
+ type ZKPassportQRCodeOptions = SdkRequestProps & {
96
+ domain?: string;
97
+ theme?: "light" | "dark" | "auto";
98
+ display?: ZKPassportQRCodeDisplayOptions;
99
+ showIntroScreen?: boolean;
100
+ query: (queryBuilder: QueryBuilder) => QueryBuilderResult;
101
+ onReady?: () => void;
102
+ onRetryClicked?: () => void;
103
+ onBridgeConnect?: SdkCallback<"onBridgeConnect">;
104
+ onRequestReceived?: SdkCallback<"onRequestReceived">;
105
+ onGeneratingProof?: SdkCallback<"onGeneratingProof">;
106
+ onProofGenerated?: SdkCallback<"onProofGenerated">;
107
+ /**
108
+ * All proofs arrived (not verified yet — verify them on your backend).
109
+ * The component waits for this callback: return `false` (or throw) to show the error state.
110
+ */
111
+ onSuccess?: SdkCallback<"onSuccess">;
112
+ /** @deprecated Use `onSuccess` and verify the proofs on your backend. */
113
+ onResult?: SdkCallback<"onResult">;
114
+ onReject?: SdkCallback<"onReject">;
115
+ onError?: SdkCallback<"onError">;
116
+ };
117
+ type QRCardHandle = {
118
+ update(next: ZKPassportQRCodeOptions): void;
119
+ retry(): void;
120
+ unmount(): void;
121
+ };
122
+
123
+ export { ASEAN_COUNTRIES as A, EEA_COUNTRIES as E, MERCOSUR_COUNTRIES as M, ProofType as P, type QRCardHandle as Q, SANCTIONED_COUNTRIES as S, type ZKPassportQRCodeOptions as Z, EU_COUNTRIES as a, ProofTypeLength as b, SCHENGEN_COUNTRIES as c, type ZKPassportQRCodeDisplayOptions as d };