@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.
- package/dist/cjs/assets/abi/ZKPassportVerifier.json +17 -17
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +8 -6
- package/dist/esm/assets/abi/ZKPassportVerifier.json +17 -17
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +8 -6
- package/package.json +3 -3
- package/src/assets/abi/ZKPassportVerifier.json +17 -17
- package/src/index.ts +11 -7
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.
|
|
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
|
|
|
@@ -2850,8 +2850,12 @@ export class ZKPassport {
|
|
|
2850
2850
|
uniqueIdentifier = uniqueIdentifierFromPublicInputs
|
|
2851
2851
|
verified = isCorrect
|
|
2852
2852
|
queryResultErrors = isCorrect ? undefined : queryResultErrorsFromPublicInputs
|
|
2853
|
-
if (
|
|
2854
|
-
|
|
2853
|
+
if (
|
|
2854
|
+
uniqueIdentifier &&
|
|
2855
|
+
(BigInt(uniqueIdentifier) === BigInt(1) || BigInt(uniqueIdentifier) === BigInt(0)) &&
|
|
2856
|
+
!devMode
|
|
2857
|
+
) {
|
|
2858
|
+
// If the unique identifier is 0 (old ZKR proofs) or 1 (new ZKR proofs) and it is not in dev mode,
|
|
2855
2859
|
// the proofs are considered invalid as these are mock proofs only meant
|
|
2856
2860
|
// for testing purposes
|
|
2857
2861
|
verified = false
|
|
@@ -2945,7 +2949,7 @@ export class ZKPassport {
|
|
|
2945
2949
|
if (network === "ethereum_sepolia") {
|
|
2946
2950
|
return {
|
|
2947
2951
|
...baseConfig,
|
|
2948
|
-
address: "
|
|
2952
|
+
address: "0xDDeFf76024052D26B78A7Fac66FFbd6fbc5bd9Ad",
|
|
2949
2953
|
}
|
|
2950
2954
|
} else if (network === "local_anvil") {
|
|
2951
2955
|
return {
|
|
@@ -3108,8 +3112,8 @@ export class ZKPassport {
|
|
|
3108
3112
|
committedInputs: `0x${compressedCommittedInputs}`,
|
|
3109
3113
|
committedInputCounts: committedInputCountsArray,
|
|
3110
3114
|
validityPeriodInDays,
|
|
3111
|
-
|
|
3112
|
-
|
|
3115
|
+
domain: domain ?? this.domain,
|
|
3116
|
+
scope: scope ?? "",
|
|
3113
3117
|
devMode,
|
|
3114
3118
|
}
|
|
3115
3119
|
return params
|