@zkpassport/sdk 0.2.3 → 0.2.4

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/cjs/index.js CHANGED
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.ZKPassport = exports.MERCOSUR_COUNTRIES = exports.ASEAN_COUNTRIES = exports.SCHENGEN_COUNTRIES = exports.EEA_COUNTRIES = exports.EU_COUNTRIES = exports.SANCTIONED_COUNTRIES = void 0;
4
+ const tslib_1 = require("tslib");
27
5
  const crypto_1 = require("crypto");
28
6
  const i18n_iso_countries_1 = require("i18n-iso-countries");
29
7
  const utils_1 = require("@zkpassport/utils");
@@ -35,7 +13,8 @@ const logger_1 = require("./logger");
35
13
  const node_gzip_1 = require("node-gzip");
36
14
  //import initNoirC from '@noir-lang/noirc_abi'
37
15
  //import initACVM from '@noir-lang/acvm_js'
38
- (0, i18n_iso_countries_1.registerLocale)(require("i18n-iso-countries/langs/en.json"));
16
+ const en_json_1 = tslib_1.__importDefault(require("i18n-iso-countries/langs/en.json"));
17
+ (0, i18n_iso_countries_1.registerLocale)(en_json_1.default);
39
18
  function normalizeCountry(country) {
40
19
  let normalizedCountry;
41
20
  const alpha3 = (0, i18n_iso_countries_1.getAlpha3Code)(country, "en");
@@ -815,7 +794,7 @@ class ZKPassport {
815
794
  return { uniqueIdentifier: undefined, verified: false };
816
795
  }
817
796
  }
818
- const { BarretenbergVerifier } = await Promise.resolve().then(() => __importStar(require("@aztec/bb.js")));
797
+ const { BarretenbergVerifier } = await Promise.resolve().then(() => tslib_1.__importStar(require("@aztec/bb.js")));
819
798
  const verifier = new BarretenbergVerifier();
820
799
  /*if (!this.wasmVerifierInit) {
821
800
  await this.initWasmVerifier()
package/dist/esm/index.js CHANGED
@@ -9,7 +9,8 @@ import { noLogger as logger } from "./logger";
9
9
  import { ungzip } from "node-gzip";
10
10
  //import initNoirC from '@noir-lang/noirc_abi'
11
11
  //import initACVM from '@noir-lang/acvm_js'
12
- registerLocale(require("i18n-iso-countries/langs/en.json"));
12
+ import i18en from "i18n-iso-countries/langs/en.json";
13
+ registerLocale(i18en);
13
14
  function normalizeCountry(country) {
14
15
  let normalizedCountry;
15
16
  const alpha3 = getAlpha3Code(country, "en");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkpassport/sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Privacy-preserving identity verification using passports and ID cards",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
package/src/index.ts CHANGED
@@ -39,8 +39,9 @@ import { noLogger as logger } from "./logger"
39
39
  import { ungzip } from "node-gzip"
40
40
  //import initNoirC from '@noir-lang/noirc_abi'
41
41
  //import initACVM from '@noir-lang/acvm_js'
42
+ import i18en from "i18n-iso-countries/langs/en.json"
42
43
 
43
- registerLocale(require("i18n-iso-countries/langs/en.json"))
44
+ registerLocale(i18en)
44
45
 
45
46
  function normalizeCountry(country: CountryName | Alpha3Code) {
46
47
  let normalizedCountry: Alpha3Code | undefined