@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.
package/src/index.ts CHANGED
@@ -76,7 +76,7 @@ import ZKPassportVerifierAbi from "./assets/abi/ZKPassportVerifier.json"
76
76
  import { RegistryClient } from "@zkpassport/registry"
77
77
  import { Bridge, BridgeInterface } from "@obsidion/bridge"
78
78
 
79
- const VERSION = "0.5.3"
79
+ const VERSION = "0.5.5"
80
80
 
81
81
  const DEFAULT_DATE_VALUE = new Date(1111, 10, 11)
82
82
 
@@ -125,8 +125,8 @@ export type SolidityVerifierParameters = {
125
125
  committedInputs: string
126
126
  committedInputCounts: number[]
127
127
  validityPeriodInDays: number
128
+ domain: string
128
129
  scope: string
129
- subscope: string
130
130
  devMode: boolean
131
131
  }
132
132
 
@@ -1188,7 +1188,7 @@ export class ZKPassport {
1188
1188
  if (
1189
1189
  queryResult.age.gte &&
1190
1190
  queryResult.age.gte.result &&
1191
- minAge < (queryResult.age.gte.expected as number)
1191
+ minAge !== (queryResult.age.gte.expected as number)
1192
1192
  ) {
1193
1193
  console.warn("Age is not greater than or equal to the expected age")
1194
1194
  isCorrect = false
@@ -1201,7 +1201,7 @@ export class ZKPassport {
1201
1201
  if (
1202
1202
  queryResult.age.lt &&
1203
1203
  queryResult.age.lt.result &&
1204
- maxAge >= (queryResult.age.lt.expected as number)
1204
+ maxAge !== (queryResult.age.lt.expected as number)
1205
1205
  ) {
1206
1206
  console.warn("Age is not less than the expected age")
1207
1207
  isCorrect = false
@@ -1214,8 +1214,8 @@ export class ZKPassport {
1214
1214
  if (queryResult.age.range) {
1215
1215
  if (
1216
1216
  queryResult.age.range.result &&
1217
- (minAge < (queryResult.age.range.expected[0] as number) ||
1218
- maxAge >= (queryResult.age.range.expected[1] as number))
1217
+ (minAge !== (queryResult.age.range.expected[0] as number) ||
1218
+ maxAge !== (queryResult.age.range.expected[1] as number))
1219
1219
  ) {
1220
1220
  console.warn("Age is not in the expected range")
1221
1221
  isCorrect = false
@@ -1324,7 +1324,7 @@ export class ZKPassport {
1324
1324
  if (
1325
1325
  queryResult.birthdate.gte &&
1326
1326
  queryResult.birthdate.gte.result &&
1327
- minDate < queryResult.birthdate.gte.expected
1327
+ minDate !== queryResult.birthdate.gte.expected
1328
1328
  ) {
1329
1329
  console.warn("Birthdate is not greater than or equal to the expected birthdate")
1330
1330
  isCorrect = false
@@ -1337,7 +1337,7 @@ export class ZKPassport {
1337
1337
  if (
1338
1338
  queryResult.birthdate.lte &&
1339
1339
  queryResult.birthdate.lte.result &&
1340
- maxDate > queryResult.birthdate.lte.expected
1340
+ maxDate !== queryResult.birthdate.lte.expected
1341
1341
  ) {
1342
1342
  console.warn("Birthdate is not less than the expected birthdate")
1343
1343
  isCorrect = false
@@ -1350,8 +1350,8 @@ export class ZKPassport {
1350
1350
  if (queryResult.birthdate.range) {
1351
1351
  if (
1352
1352
  queryResult.birthdate.range.result &&
1353
- (minDate < queryResult.birthdate.range.expected[0] ||
1354
- maxDate > queryResult.birthdate.range.expected[1])
1353
+ (minDate !== queryResult.birthdate.range.expected[0] ||
1354
+ maxDate !== queryResult.birthdate.range.expected[1])
1355
1355
  ) {
1356
1356
  console.warn("Birthdate is not in the expected range")
1357
1357
  isCorrect = false
@@ -1453,7 +1453,7 @@ export class ZKPassport {
1453
1453
  if (
1454
1454
  queryResult.expiry_date.gte &&
1455
1455
  queryResult.expiry_date.gte.result &&
1456
- minDate < queryResult.expiry_date.gte.expected
1456
+ minDate !== queryResult.expiry_date.gte.expected
1457
1457
  ) {
1458
1458
  console.warn("Expiry date is not greater than or equal to the expected expiry date")
1459
1459
  isCorrect = false
@@ -1466,7 +1466,7 @@ export class ZKPassport {
1466
1466
  if (
1467
1467
  queryResult.expiry_date.lte &&
1468
1468
  queryResult.expiry_date.lte.result &&
1469
- maxDate > queryResult.expiry_date.lte.expected
1469
+ maxDate !== queryResult.expiry_date.lte.expected
1470
1470
  ) {
1471
1471
  console.warn("Expiry date is not less than the expected expiry date")
1472
1472
  isCorrect = false
@@ -1479,8 +1479,8 @@ export class ZKPassport {
1479
1479
  if (queryResult.expiry_date.range) {
1480
1480
  if (
1481
1481
  queryResult.expiry_date.range.result &&
1482
- (minDate < queryResult.expiry_date.range.expected[0] ||
1483
- maxDate > queryResult.expiry_date.range.expected[1])
1482
+ (minDate !== queryResult.expiry_date.range.expected[0] ||
1483
+ maxDate !== queryResult.expiry_date.range.expected[1])
1484
1484
  ) {
1485
1485
  console.warn("Expiry date is not in the expected range")
1486
1486
  isCorrect = false
@@ -2949,7 +2949,7 @@ export class ZKPassport {
2949
2949
  if (network === "ethereum_sepolia") {
2950
2950
  return {
2951
2951
  ...baseConfig,
2952
- address: "0xEE9F10f38319eAE2730dBa28fB09081dB806c5E5",
2952
+ address: "0xDDeFf76024052D26B78A7Fac66FFbd6fbc5bd9Ad",
2953
2953
  }
2954
2954
  } else if (network === "local_anvil") {
2955
2955
  return {
@@ -3112,8 +3112,8 @@ export class ZKPassport {
3112
3112
  committedInputs: `0x${compressedCommittedInputs}`,
3113
3113
  committedInputCounts: committedInputCountsArray,
3114
3114
  validityPeriodInDays,
3115
- scope: domain ?? this.domain,
3116
- subscope: scope ?? "",
3115
+ domain: domain ?? this.domain,
3116
+ scope: scope ?? "",
3117
3117
  devMode,
3118
3118
  }
3119
3119
  return params