@zkpassport/sdk 0.5.7-beta.1 → 0.5.7-beta.10
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/esm/chunk-AFLQN3AC.js +22 -0
- package/dist/esm/index.d.ts +14 -10
- package/dist/esm/index.js +3070 -2236
- package/dist/esm/logger.d.ts +4 -2
- package/dist/esm/logger.js +7 -11
- package/package.json +4 -4
- package/dist/esm/assets/abi/ZKPassportVerifier.json +0 -744
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/logger.ts
|
|
2
|
+
var customLogger = {
|
|
3
|
+
debug: (message, ...args) => console.debug(message, ...args),
|
|
4
|
+
info: (message, ...args) => console.info(message, ...args),
|
|
5
|
+
warn: (message, ...args) => console.warn(message, ...args),
|
|
6
|
+
error: (message, ...args) => console.error(message, ...args)
|
|
7
|
+
};
|
|
8
|
+
var noLogger = {
|
|
9
|
+
debug: (..._) => {
|
|
10
|
+
},
|
|
11
|
+
info: (..._) => {
|
|
12
|
+
},
|
|
13
|
+
warn: (..._) => {
|
|
14
|
+
},
|
|
15
|
+
error: (..._) => {
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
customLogger,
|
|
21
|
+
noLogger
|
|
22
|
+
};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { IDCredential, ProofResult, QueryResult, IDCredentialValue, NumericalIDCredential, DisclosableIDCredential, BoundData, ProofMode } from '@zkpassport/utils';
|
|
2
|
+
export * from '@zkpassport/utils';
|
|
3
|
+
export { ASEAN_COUNTRIES, EEA_COUNTRIES, EU_COUNTRIES, MERCOSUR_COUNTRIES, SANCTIONED_COUNTRIES, SCHENGEN_COUNTRIES } from '@zkpassport/utils';
|
|
4
|
+
|
|
5
|
+
type QueryResultError<T> = {
|
|
3
6
|
expected?: T;
|
|
4
7
|
received?: T;
|
|
5
8
|
message: string;
|
|
6
9
|
};
|
|
7
|
-
|
|
10
|
+
type QueryResultErrors = {
|
|
8
11
|
[key in IDCredential | "sig_check_dsc" | "sig_check_id_data" | "data_check_integrity" | "outer" | "disclose" | "bind"]: {
|
|
9
12
|
disclose?: QueryResultError<string | number | Date>;
|
|
10
13
|
gte?: QueryResultError<number | Date>;
|
|
@@ -20,7 +23,7 @@ export type QueryResultErrors = {
|
|
|
20
23
|
scope?: QueryResultError<string>;
|
|
21
24
|
};
|
|
22
25
|
};
|
|
23
|
-
|
|
26
|
+
type SolidityVerifierParameters = {
|
|
24
27
|
vkeyHash: string;
|
|
25
28
|
proof: string;
|
|
26
29
|
publicInputs: string[];
|
|
@@ -31,10 +34,9 @@ export type SolidityVerifierParameters = {
|
|
|
31
34
|
scope: string;
|
|
32
35
|
devMode: boolean;
|
|
33
36
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export type QueryBuilderResult = {
|
|
37
|
+
type EVMChain = "ethereum_sepolia" | "local_anvil";
|
|
38
|
+
|
|
39
|
+
type QueryBuilderResult = {
|
|
38
40
|
/**
|
|
39
41
|
* The URL of the request.
|
|
40
42
|
*
|
|
@@ -101,7 +103,7 @@ export type QueryBuilderResult = {
|
|
|
101
103
|
*/
|
|
102
104
|
requestReceived: () => boolean;
|
|
103
105
|
};
|
|
104
|
-
|
|
106
|
+
type QueryBuilder = {
|
|
105
107
|
/**
|
|
106
108
|
* Requires this attribute to be equal to the provided value.
|
|
107
109
|
* @param key The attribute to compare.
|
|
@@ -165,7 +167,7 @@ export type QueryBuilder = {
|
|
|
165
167
|
*/
|
|
166
168
|
done: () => QueryBuilderResult;
|
|
167
169
|
};
|
|
168
|
-
|
|
170
|
+
declare class ZKPassport {
|
|
169
171
|
private domain;
|
|
170
172
|
private topicToConfig;
|
|
171
173
|
private topicToLocalConfig;
|
|
@@ -303,3 +305,5 @@ export declare class ZKPassport {
|
|
|
303
305
|
*/
|
|
304
306
|
clearAllRequests(): void;
|
|
305
307
|
}
|
|
308
|
+
|
|
309
|
+
export { type EVMChain, type QueryBuilder, type QueryBuilderResult, type QueryResultError, type QueryResultErrors, type SolidityVerifierParameters, ZKPassport };
|