@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/cjs/index.js CHANGED
@@ -13,7 +13,7 @@ const utils_3 = require("@noble/hashes/utils");
13
13
  const ZKPassportVerifier_json_1 = tslib_1.__importDefault(require("./assets/abi/ZKPassportVerifier.json"));
14
14
  const registry_1 = require("@zkpassport/registry");
15
15
  const bridge_1 = require("@obsidion/bridge");
16
- const VERSION = "0.5.3";
16
+ const VERSION = "0.5.5";
17
17
  const DEFAULT_DATE_VALUE = new Date(1111, 10, 11);
18
18
  // If Buffer is not defined, then we use the Buffer from the buffer package
19
19
  if (typeof globalThis.Buffer === "undefined") {
@@ -756,7 +756,7 @@ class ZKPassport {
756
756
  if (queryResult.age) {
757
757
  if (queryResult.age.gte &&
758
758
  queryResult.age.gte.result &&
759
- minAge < queryResult.age.gte.expected) {
759
+ minAge !== queryResult.age.gte.expected) {
760
760
  console.warn("Age is not greater than or equal to the expected age");
761
761
  isCorrect = false;
762
762
  queryResultErrors.age.gte = {
@@ -767,7 +767,7 @@ class ZKPassport {
767
767
  }
768
768
  if (queryResult.age.lt &&
769
769
  queryResult.age.lt.result &&
770
- maxAge >= queryResult.age.lt.expected) {
770
+ maxAge !== queryResult.age.lt.expected) {
771
771
  console.warn("Age is not less than the expected age");
772
772
  isCorrect = false;
773
773
  queryResultErrors.age.lt = {
@@ -778,8 +778,8 @@ class ZKPassport {
778
778
  }
779
779
  if (queryResult.age.range) {
780
780
  if (queryResult.age.range.result &&
781
- (minAge < queryResult.age.range.expected[0] ||
782
- maxAge >= queryResult.age.range.expected[1])) {
781
+ (minAge !== queryResult.age.range.expected[0] ||
782
+ maxAge !== queryResult.age.range.expected[1])) {
783
783
  console.warn("Age is not in the expected range");
784
784
  isCorrect = false;
785
785
  queryResultErrors.age.range = {
@@ -867,7 +867,7 @@ class ZKPassport {
867
867
  if (queryResult.birthdate) {
868
868
  if (queryResult.birthdate.gte &&
869
869
  queryResult.birthdate.gte.result &&
870
- minDate < queryResult.birthdate.gte.expected) {
870
+ minDate !== queryResult.birthdate.gte.expected) {
871
871
  console.warn("Birthdate is not greater than or equal to the expected birthdate");
872
872
  isCorrect = false;
873
873
  queryResultErrors.birthdate.gte = {
@@ -878,7 +878,7 @@ class ZKPassport {
878
878
  }
879
879
  if (queryResult.birthdate.lte &&
880
880
  queryResult.birthdate.lte.result &&
881
- maxDate > queryResult.birthdate.lte.expected) {
881
+ maxDate !== queryResult.birthdate.lte.expected) {
882
882
  console.warn("Birthdate is not less than the expected birthdate");
883
883
  isCorrect = false;
884
884
  queryResultErrors.birthdate.lte = {
@@ -889,8 +889,8 @@ class ZKPassport {
889
889
  }
890
890
  if (queryResult.birthdate.range) {
891
891
  if (queryResult.birthdate.range.result &&
892
- (minDate < queryResult.birthdate.range.expected[0] ||
893
- maxDate > queryResult.birthdate.range.expected[1])) {
892
+ (minDate !== queryResult.birthdate.range.expected[0] ||
893
+ maxDate !== queryResult.birthdate.range.expected[1])) {
894
894
  console.warn("Birthdate is not in the expected range");
895
895
  isCorrect = false;
896
896
  queryResultErrors.birthdate.range = {
@@ -971,7 +971,7 @@ class ZKPassport {
971
971
  if (queryResult.expiry_date) {
972
972
  if (queryResult.expiry_date.gte &&
973
973
  queryResult.expiry_date.gte.result &&
974
- minDate < queryResult.expiry_date.gte.expected) {
974
+ minDate !== queryResult.expiry_date.gte.expected) {
975
975
  console.warn("Expiry date is not greater than or equal to the expected expiry date");
976
976
  isCorrect = false;
977
977
  queryResultErrors.expiry_date.gte = {
@@ -982,7 +982,7 @@ class ZKPassport {
982
982
  }
983
983
  if (queryResult.expiry_date.lte &&
984
984
  queryResult.expiry_date.lte.result &&
985
- maxDate > queryResult.expiry_date.lte.expected) {
985
+ maxDate !== queryResult.expiry_date.lte.expected) {
986
986
  console.warn("Expiry date is not less than the expected expiry date");
987
987
  isCorrect = false;
988
988
  queryResultErrors.expiry_date.lte = {
@@ -993,8 +993,8 @@ class ZKPassport {
993
993
  }
994
994
  if (queryResult.expiry_date.range) {
995
995
  if (queryResult.expiry_date.range.result &&
996
- (minDate < queryResult.expiry_date.range.expected[0] ||
997
- maxDate > queryResult.expiry_date.range.expected[1])) {
996
+ (minDate !== queryResult.expiry_date.range.expected[0] ||
997
+ maxDate !== queryResult.expiry_date.range.expected[1])) {
998
998
  console.warn("Expiry date is not in the expected range");
999
999
  isCorrect = false;
1000
1000
  queryResultErrors.expiry_date.range = {
@@ -2145,7 +2145,7 @@ class ZKPassport {
2145
2145
  if (network === "ethereum_sepolia") {
2146
2146
  return {
2147
2147
  ...baseConfig,
2148
- address: "0xEE9F10f38319eAE2730dBa28fB09081dB806c5E5",
2148
+ address: "0xDDeFf76024052D26B78A7Fac66FFbd6fbc5bd9Ad",
2149
2149
  };
2150
2150
  }
2151
2151
  else if (network === "local_anvil") {
@@ -2290,8 +2290,8 @@ class ZKPassport {
2290
2290
  committedInputs: `0x${compressedCommittedInputs}`,
2291
2291
  committedInputCounts: committedInputCountsArray,
2292
2292
  validityPeriodInDays,
2293
- scope: domain ?? this.domain,
2294
- subscope: scope ?? "",
2293
+ domain: domain ?? this.domain,
2294
+ scope: scope ?? "",
2295
2295
  devMode,
2296
2296
  };
2297
2297
  return params;