@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/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") {
@@ -2054,8 +2054,10 @@ export class ZKPassport {
2054
2054
  uniqueIdentifier = uniqueIdentifierFromPublicInputs;
2055
2055
  verified = isCorrect;
2056
2056
  queryResultErrors = isCorrect ? undefined : queryResultErrorsFromPublicInputs;
2057
- if (uniqueIdentifier && BigInt(uniqueIdentifier) === BigInt(0) && !devMode) {
2058
- // If the unique identifier is 0 and it is not in dev mode,
2057
+ if (uniqueIdentifier &&
2058
+ (BigInt(uniqueIdentifier) === BigInt(1) || BigInt(uniqueIdentifier) === BigInt(0)) &&
2059
+ !devMode) {
2060
+ // If the unique identifier is 0 (old ZKR proofs) or 1 (new ZKR proofs) and it is not in dev mode,
2059
2061
  // the proofs are considered invalid as these are mock proofs only meant
2060
2062
  // for testing purposes
2061
2063
  verified = false;
@@ -2133,7 +2135,7 @@ export class ZKPassport {
2133
2135
  if (network === "ethereum_sepolia") {
2134
2136
  return {
2135
2137
  ...baseConfig,
2136
- address: "0xEE9F10f38319eAE2730dBa28fB09081dB806c5E5",
2138
+ address: "0xDDeFf76024052D26B78A7Fac66FFbd6fbc5bd9Ad",
2137
2139
  };
2138
2140
  }
2139
2141
  else if (network === "local_anvil") {
@@ -2278,8 +2280,8 @@ export class ZKPassport {
2278
2280
  committedInputs: `0x${compressedCommittedInputs}`,
2279
2281
  committedInputCounts: committedInputCountsArray,
2280
2282
  validityPeriodInDays,
2281
- scope: domain ?? this.domain,
2282
- subscope: scope ?? "",
2283
+ domain: domain ?? this.domain,
2284
+ scope: scope ?? "",
2283
2285
  devMode,
2284
2286
  };
2285
2287
  return params;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkpassport/sdk",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
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",
@@ -43,8 +43,8 @@
43
43
  "@noble/hashes": "^1.7.2",
44
44
  "@noble/secp256k1": "^2.2.3",
45
45
  "@obsidion/bridge": "^0.10.2",
46
- "@zkpassport/registry": "^0.5.1",
47
- "@zkpassport/utils": "^0.13.1",
46
+ "@zkpassport/registry": "^0.5.2",
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",