@zkpassport/sdk 0.5.3 → 0.5.5

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") {
@@ -2064,8 +2064,10 @@ class ZKPassport {
2064
2064
  uniqueIdentifier = uniqueIdentifierFromPublicInputs;
2065
2065
  verified = isCorrect;
2066
2066
  queryResultErrors = isCorrect ? undefined : queryResultErrorsFromPublicInputs;
2067
- if (uniqueIdentifier && BigInt(uniqueIdentifier) === BigInt(0) && !devMode) {
2068
- // If the unique identifier is 0 and it is not in dev mode,
2067
+ if (uniqueIdentifier &&
2068
+ (BigInt(uniqueIdentifier) === BigInt(1) || BigInt(uniqueIdentifier) === BigInt(0)) &&
2069
+ !devMode) {
2070
+ // If the unique identifier is 0 (old ZKR proofs) or 1 (new ZKR proofs) and it is not in dev mode,
2069
2071
  // the proofs are considered invalid as these are mock proofs only meant
2070
2072
  // for testing purposes
2071
2073
  verified = false;
@@ -2143,7 +2145,7 @@ class ZKPassport {
2143
2145
  if (network === "ethereum_sepolia") {
2144
2146
  return {
2145
2147
  ...baseConfig,
2146
- address: "0xEE9F10f38319eAE2730dBa28fB09081dB806c5E5",
2148
+ address: "0xDDeFf76024052D26B78A7Fac66FFbd6fbc5bd9Ad",
2147
2149
  };
2148
2150
  }
2149
2151
  else if (network === "local_anvil") {
@@ -2288,8 +2290,8 @@ class ZKPassport {
2288
2290
  committedInputs: `0x${compressedCommittedInputs}`,
2289
2291
  committedInputCounts: committedInputCountsArray,
2290
2292
  validityPeriodInDays,
2291
- scope: domain ?? this.domain,
2292
- subscope: scope ?? "",
2293
+ domain: domain ?? this.domain,
2294
+ scope: scope ?? "",
2293
2295
  devMode,
2294
2296
  };
2295
2297
  return params;