@zkpassport/sdk 0.5.4 → 0.5.6

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.
@@ -27,8 +27,8 @@ export type SolidityVerifierParameters = {
27
27
  committedInputs: string;
28
28
  committedInputCounts: number[];
29
29
  validityPeriodInDays: number;
30
+ domain: string;
30
31
  scope: string;
31
- subscope: string;
32
32
  devMode: boolean;
33
33
  };
34
34
  export type EVMChain = "ethereum_sepolia" | "local_anvil";
package/dist/esm/index.js CHANGED
@@ -9,7 +9,7 @@ import { hexToBytes } from "@noble/hashes/utils";
9
9
  import ZKPassportVerifierAbi from "./assets/abi/ZKPassportVerifier.json";
10
10
  import { RegistryClient } from "@zkpassport/registry";
11
11
  import { Bridge } from "@obsidion/bridge";
12
- const VERSION = "0.5.3";
12
+ const VERSION = "0.5.5";
13
13
  const DEFAULT_DATE_VALUE = new Date(1111, 10, 11);
14
14
  // If Buffer is not defined, then we use the Buffer from the buffer package
15
15
  if (typeof globalThis.Buffer === "undefined") {
@@ -746,7 +746,7 @@ export class ZKPassport {
746
746
  if (queryResult.age) {
747
747
  if (queryResult.age.gte &&
748
748
  queryResult.age.gte.result &&
749
- minAge < queryResult.age.gte.expected) {
749
+ minAge !== queryResult.age.gte.expected) {
750
750
  console.warn("Age is not greater than or equal to the expected age");
751
751
  isCorrect = false;
752
752
  queryResultErrors.age.gte = {
@@ -757,7 +757,7 @@ export class ZKPassport {
757
757
  }
758
758
  if (queryResult.age.lt &&
759
759
  queryResult.age.lt.result &&
760
- maxAge >= queryResult.age.lt.expected) {
760
+ maxAge !== queryResult.age.lt.expected) {
761
761
  console.warn("Age is not less than the expected age");
762
762
  isCorrect = false;
763
763
  queryResultErrors.age.lt = {
@@ -768,8 +768,8 @@ export class ZKPassport {
768
768
  }
769
769
  if (queryResult.age.range) {
770
770
  if (queryResult.age.range.result &&
771
- (minAge < queryResult.age.range.expected[0] ||
772
- maxAge >= queryResult.age.range.expected[1])) {
771
+ (minAge !== queryResult.age.range.expected[0] ||
772
+ maxAge !== queryResult.age.range.expected[1])) {
773
773
  console.warn("Age is not in the expected range");
774
774
  isCorrect = false;
775
775
  queryResultErrors.age.range = {
@@ -857,7 +857,7 @@ export class ZKPassport {
857
857
  if (queryResult.birthdate) {
858
858
  if (queryResult.birthdate.gte &&
859
859
  queryResult.birthdate.gte.result &&
860
- minDate < queryResult.birthdate.gte.expected) {
860
+ minDate !== queryResult.birthdate.gte.expected) {
861
861
  console.warn("Birthdate is not greater than or equal to the expected birthdate");
862
862
  isCorrect = false;
863
863
  queryResultErrors.birthdate.gte = {
@@ -868,7 +868,7 @@ export class ZKPassport {
868
868
  }
869
869
  if (queryResult.birthdate.lte &&
870
870
  queryResult.birthdate.lte.result &&
871
- maxDate > queryResult.birthdate.lte.expected) {
871
+ maxDate !== queryResult.birthdate.lte.expected) {
872
872
  console.warn("Birthdate is not less than the expected birthdate");
873
873
  isCorrect = false;
874
874
  queryResultErrors.birthdate.lte = {
@@ -879,8 +879,8 @@ export class ZKPassport {
879
879
  }
880
880
  if (queryResult.birthdate.range) {
881
881
  if (queryResult.birthdate.range.result &&
882
- (minDate < queryResult.birthdate.range.expected[0] ||
883
- maxDate > queryResult.birthdate.range.expected[1])) {
882
+ (minDate !== queryResult.birthdate.range.expected[0] ||
883
+ maxDate !== queryResult.birthdate.range.expected[1])) {
884
884
  console.warn("Birthdate is not in the expected range");
885
885
  isCorrect = false;
886
886
  queryResultErrors.birthdate.range = {
@@ -961,7 +961,7 @@ export class ZKPassport {
961
961
  if (queryResult.expiry_date) {
962
962
  if (queryResult.expiry_date.gte &&
963
963
  queryResult.expiry_date.gte.result &&
964
- minDate < queryResult.expiry_date.gte.expected) {
964
+ minDate !== queryResult.expiry_date.gte.expected) {
965
965
  console.warn("Expiry date is not greater than or equal to the expected expiry date");
966
966
  isCorrect = false;
967
967
  queryResultErrors.expiry_date.gte = {
@@ -972,7 +972,7 @@ export class ZKPassport {
972
972
  }
973
973
  if (queryResult.expiry_date.lte &&
974
974
  queryResult.expiry_date.lte.result &&
975
- maxDate > queryResult.expiry_date.lte.expected) {
975
+ maxDate !== queryResult.expiry_date.lte.expected) {
976
976
  console.warn("Expiry date is not less than the expected expiry date");
977
977
  isCorrect = false;
978
978
  queryResultErrors.expiry_date.lte = {
@@ -983,8 +983,8 @@ export class ZKPassport {
983
983
  }
984
984
  if (queryResult.expiry_date.range) {
985
985
  if (queryResult.expiry_date.range.result &&
986
- (minDate < queryResult.expiry_date.range.expected[0] ||
987
- maxDate > queryResult.expiry_date.range.expected[1])) {
986
+ (minDate !== queryResult.expiry_date.range.expected[0] ||
987
+ maxDate !== queryResult.expiry_date.range.expected[1])) {
988
988
  console.warn("Expiry date is not in the expected range");
989
989
  isCorrect = false;
990
990
  queryResultErrors.expiry_date.range = {
@@ -2135,7 +2135,7 @@ export class ZKPassport {
2135
2135
  if (network === "ethereum_sepolia") {
2136
2136
  return {
2137
2137
  ...baseConfig,
2138
- address: "0xEE9F10f38319eAE2730dBa28fB09081dB806c5E5",
2138
+ address: "0xDDeFf76024052D26B78A7Fac66FFbd6fbc5bd9Ad",
2139
2139
  };
2140
2140
  }
2141
2141
  else if (network === "local_anvil") {
@@ -2280,8 +2280,8 @@ export class ZKPassport {
2280
2280
  committedInputs: `0x${compressedCommittedInputs}`,
2281
2281
  committedInputCounts: committedInputCountsArray,
2282
2282
  validityPeriodInDays,
2283
- scope: domain ?? this.domain,
2284
- subscope: scope ?? "",
2283
+ domain: domain ?? this.domain,
2284
+ scope: scope ?? "",
2285
2285
  devMode,
2286
2286
  };
2287
2287
  return params;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkpassport/sdk",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
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",
@@ -44,7 +44,7 @@
44
44
  "@noble/secp256k1": "^2.2.3",
45
45
  "@obsidion/bridge": "^0.10.2",
46
46
  "@zkpassport/registry": "^0.5.2",
47
- "@zkpassport/utils": "^0.13.1",
47
+ "@zkpassport/utils": "^0.15.3",
48
48
  "buffer": "^6.0.3",
49
49
  "i18n-iso-countries": "^7.12.0",
50
50
  "pako": "^2.1.0",