@zkpassport/sdk 0.11.0-beta.2 → 0.12.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkpassport/sdk",
3
- "version": "0.11.0-beta.2",
3
+ "version": "0.12.0",
4
4
  "description": "Privacy-preserving identity verification using passports and ID cards",
5
5
  "author": "ZKPassport",
6
6
  "license": "Apache-2.0",
@@ -14,16 +14,21 @@
14
14
  }
15
15
  },
16
16
  "scripts": {
17
+ "build": "bun run build:types && tsup --config tsup.config.ts",
18
+ "build:types": "tsc -b && tsc-alias -v -p tsconfig.json -f",
19
+ "dev:build": "DEV_BUILD=true bun run build",
20
+ "clean": "rimraf dist tsconfig.tsbuildinfo",
17
21
  "test": "bun test",
18
22
  "coverage": "bun test --coverage",
19
- "check": "tsc --noEmit && prettier -c src tests",
23
+ "check": "prettier -c src tests && eslint src tests --ext .ts",
20
24
  "format": "prettier -c -w src tests",
21
- "build": "tsup",
22
- "prepublishOnly": "./scripts/prepublish.sh"
25
+ "validate-package": "../../scripts/validate-package.sh",
26
+ "prepublishOnly": "../../scripts/prepublish.sh"
23
27
  },
24
28
  "files": [
25
29
  "dist/esm",
26
- "dist/cjs"
30
+ "dist/cjs",
31
+ "dist/types"
27
32
  ],
28
33
  "keywords": [
29
34
  "zkpassport",
@@ -36,11 +41,12 @@
36
41
  "@noble/hashes": "^1.7.2",
37
42
  "@noble/secp256k1": "^2.2.3",
38
43
  "@obsidion/bridge": "^0.11.1",
39
- "@zkpassport/registry": "0.11.1",
40
- "@zkpassport/utils": "0.29.2",
44
+ "@zkpassport/registry": "0.12.0",
45
+ "@zkpassport/utils": "0.31.1",
41
46
  "buffer": "^6.0.3",
42
47
  "i18n-iso-countries": "^7.12.0",
43
48
  "pako": "^2.1.0",
49
+ "tslib": "^2.8.1",
44
50
  "viem": "^2.27.2",
45
51
  "ws": "^8.18.0"
46
52
  },
@@ -48,5 +54,8 @@
48
54
  "@types/pako": "^2.0.3",
49
55
  "@types/ws": "^8.5.12"
50
56
  },
51
- "packageManager": "bun@1.2.13"
57
+ "peerDependencies": {
58
+ "typescript": "^5.0.0"
59
+ },
60
+ "packageManager": "bun@1.3.1"
52
61
  }
@@ -1,48 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/constants.ts
21
- var constants_exports = {};
22
- __export(constants_exports, {
23
- APPLE_APP_ATTEST_ROOT_KEY_HASH: () => APPLE_APP_ATTEST_ROOT_KEY_HASH,
24
- DEFAULT_DATE_VALUE: () => DEFAULT_DATE_VALUE,
25
- DEFAULT_VALIDITY: () => DEFAULT_VALIDITY,
26
- GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH: () => GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH,
27
- VERSION: () => VERSION,
28
- ZKPASSPORT_ANDROID_APP_ID_HASH: () => ZKPASSPORT_ANDROID_APP_ID_HASH,
29
- ZKPASSPORT_IOS_APP_ID_HASH: () => ZKPASSPORT_IOS_APP_ID_HASH
30
- });
31
- module.exports = __toCommonJS(constants_exports);
32
- var VERSION = "0.10.0";
33
- var DEFAULT_VALIDITY = 7 * 24 * 60 * 60;
34
- var DEFAULT_DATE_VALUE = /* @__PURE__ */ new Date(0);
35
- var ZKPASSPORT_IOS_APP_ID_HASH = "0x1fa73686cf510f8f85757b0602de0dd72a13e68ae2092462be8b72662e7f179b";
36
- var ZKPASSPORT_ANDROID_APP_ID_HASH = "0x24d9929b248be7eeecaa98e105c034a50539610f3fdd4cb9c8983ef4100d615d";
37
- var APPLE_APP_ATTEST_ROOT_KEY_HASH = "0x2532418a107c5306fa8308c22255792cf77e4a290cbce8a840a642a3e591340b";
38
- var GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH = "0x16700a2d9168a194fc85f237af5829b5a2be05b8ae8ac4879ada34cf54a9c211";
39
- // Annotate the CommonJS export names for ESM import in node:
40
- 0 && (module.exports = {
41
- APPLE_APP_ATTEST_ROOT_KEY_HASH,
42
- DEFAULT_DATE_VALUE,
43
- DEFAULT_VALIDITY,
44
- GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH,
45
- VERSION,
46
- ZKPASSPORT_ANDROID_APP_ID_HASH,
47
- ZKPASSPORT_IOS_APP_ID_HASH
48
- });
@@ -1,9 +0,0 @@
1
- declare const VERSION = "0.10.0";
2
- declare const DEFAULT_VALIDITY: number;
3
- declare const DEFAULT_DATE_VALUE: Date;
4
- declare const ZKPASSPORT_IOS_APP_ID_HASH = "0x1fa73686cf510f8f85757b0602de0dd72a13e68ae2092462be8b72662e7f179b";
5
- declare const ZKPASSPORT_ANDROID_APP_ID_HASH = "0x24d9929b248be7eeecaa98e105c034a50539610f3fdd4cb9c8983ef4100d615d";
6
- declare const APPLE_APP_ATTEST_ROOT_KEY_HASH = "0x2532418a107c5306fa8308c22255792cf77e4a290cbce8a840a642a3e591340b";
7
- declare const GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH = "0x16700a2d9168a194fc85f237af5829b5a2be05b8ae8ac4879ada34cf54a9c211";
8
-
9
- export { APPLE_APP_ATTEST_ROOT_KEY_HASH, DEFAULT_DATE_VALUE, DEFAULT_VALIDITY, GOOGLE_APP_ATTEST_RSA_ROOT_KEY_HASH, VERSION, ZKPASSPORT_ANDROID_APP_ID_HASH, ZKPASSPORT_IOS_APP_ID_HASH };
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/logger.ts
21
- var logger_exports = {};
22
- __export(logger_exports, {
23
- customLogger: () => customLogger,
24
- noLogger: () => noLogger
25
- });
26
- module.exports = __toCommonJS(logger_exports);
27
- var customLogger = {
28
- debug: (message, ...args) => console.debug(message, ...args),
29
- info: (message, ...args) => console.info(message, ...args),
30
- warn: (message, ...args) => console.warn(message, ...args),
31
- error: (message, ...args) => console.error(message, ...args)
32
- };
33
- var noLogger = {
34
- debug: (..._) => {
35
- },
36
- info: (..._) => {
37
- },
38
- warn: (..._) => {
39
- },
40
- error: (..._) => {
41
- }
42
- };
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- customLogger,
46
- noLogger
47
- });
@@ -1,14 +0,0 @@
1
- declare const customLogger: {
2
- debug: (message: string, ...args: any[]) => void;
3
- info: (message: string, ...args: any[]) => void;
4
- warn: (message: string, ...args: any[]) => void;
5
- error: (message: string, ...args: any[]) => void;
6
- };
7
- declare const noLogger: {
8
- debug: (..._: any[]) => void;
9
- info: (..._: any[]) => void;
10
- warn: (..._: any[]) => void;
11
- error: (..._: any[]) => void;
12
- };
13
-
14
- export { customLogger, noLogger };