@zkpassport/sdk 0.6.0-beta.3 → 0.7.0
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/index.cjs +8 -11
- package/dist/esm/index.js +8 -11
- package/package.json +4 -4
package/dist/cjs/index.cjs
CHANGED
|
@@ -813,7 +813,7 @@ var ZKPassportVerifier_default = {
|
|
|
813
813
|
var import_registry = require("@zkpassport/registry");
|
|
814
814
|
var import_bridge = require("@obsidion/bridge");
|
|
815
815
|
var import_utils4 = require("@zkpassport/utils");
|
|
816
|
-
var VERSION = "0.
|
|
816
|
+
var VERSION = "0.7.0";
|
|
817
817
|
var DEFAULT_DATE_VALUE = new Date(1111, 10, 11);
|
|
818
818
|
if (typeof globalThis.Buffer === "undefined") {
|
|
819
819
|
globalThis.Buffer = import_buffer.Buffer;
|
|
@@ -2907,12 +2907,14 @@ var ZKPassport = class {
|
|
|
2907
2907
|
version: proofs[0].version
|
|
2908
2908
|
});
|
|
2909
2909
|
for (const proof of proofs) {
|
|
2910
|
-
const
|
|
2910
|
+
const isOuterEVM = proof.name?.startsWith("outer_evm_");
|
|
2911
|
+
const proofName = isOuterEVM ? proof.name.replace("outer_evm_", "outer_") : proof.name;
|
|
2912
|
+
const proofData = (0, import_utils.getProofData)(proof.proof, (0, import_utils.getNumberOfPublicInputs)(proofName));
|
|
2911
2913
|
const hostedPackagedCircuit = await registryClient.getPackagedCircuit(
|
|
2912
|
-
|
|
2914
|
+
proofName,
|
|
2913
2915
|
circuitManifest
|
|
2914
2916
|
);
|
|
2915
|
-
if (
|
|
2917
|
+
if (isOuterEVM) {
|
|
2916
2918
|
try {
|
|
2917
2919
|
const { createPublicClient, http } = await import("viem");
|
|
2918
2920
|
const { sepolia } = await import("viem/chains");
|
|
@@ -2923,7 +2925,6 @@ var ZKPassport = class {
|
|
|
2923
2925
|
});
|
|
2924
2926
|
const params = this.getSolidityVerifierParameters({
|
|
2925
2927
|
proof,
|
|
2926
|
-
validityPeriodInDays: validity,
|
|
2927
2928
|
domain: this.domain,
|
|
2928
2929
|
scope,
|
|
2929
2930
|
devMode
|
|
@@ -2994,10 +2995,6 @@ var ZKPassport = class {
|
|
|
2994
2995
|
);
|
|
2995
2996
|
}
|
|
2996
2997
|
const proofData = (0, import_utils.getProofData)(proof.proof, (0, import_utils.getNumberOfPublicInputs)(proof.name));
|
|
2997
|
-
const actualProof = proofData.proof.slice(16);
|
|
2998
|
-
const actualPublicInputs = proofData.publicInputs.concat(
|
|
2999
|
-
proofData.proof.slice(0, 16).map((x) => `0x${x}`)
|
|
3000
|
-
);
|
|
3001
2998
|
let committedInputCounts = [];
|
|
3002
2999
|
let committedInputs = [];
|
|
3003
3000
|
for (const key in proof.committedInputs) {
|
|
@@ -3084,8 +3081,8 @@ var ZKPassport = class {
|
|
|
3084
3081
|
const params = {
|
|
3085
3082
|
// Make sure the vkeyHash is 32 bytes
|
|
3086
3083
|
vkeyHash: `0x${proof.vkeyHash.replace("0x", "").padStart(64, "0")}`,
|
|
3087
|
-
proof: `0x${
|
|
3088
|
-
publicInputs:
|
|
3084
|
+
proof: `0x${proofData.proof.join("")}`,
|
|
3085
|
+
publicInputs: proofData.publicInputs,
|
|
3089
3086
|
committedInputs: `0x${compressedCommittedInputs}`,
|
|
3090
3087
|
committedInputCounts: committedInputCountsArray,
|
|
3091
3088
|
validityPeriodInDays,
|
package/dist/esm/index.js
CHANGED
|
@@ -813,7 +813,7 @@ import {
|
|
|
813
813
|
ASEAN_COUNTRIES,
|
|
814
814
|
MERCOSUR_COUNTRIES
|
|
815
815
|
} from "@zkpassport/utils";
|
|
816
|
-
var VERSION = "0.
|
|
816
|
+
var VERSION = "0.7.0";
|
|
817
817
|
var DEFAULT_DATE_VALUE = new Date(1111, 10, 11);
|
|
818
818
|
if (typeof globalThis.Buffer === "undefined") {
|
|
819
819
|
globalThis.Buffer = Buffer;
|
|
@@ -2907,12 +2907,14 @@ var ZKPassport = class {
|
|
|
2907
2907
|
version: proofs[0].version
|
|
2908
2908
|
});
|
|
2909
2909
|
for (const proof of proofs) {
|
|
2910
|
-
const
|
|
2910
|
+
const isOuterEVM = proof.name?.startsWith("outer_evm_");
|
|
2911
|
+
const proofName = isOuterEVM ? proof.name.replace("outer_evm_", "outer_") : proof.name;
|
|
2912
|
+
const proofData = getProofData(proof.proof, getNumberOfPublicInputs(proofName));
|
|
2911
2913
|
const hostedPackagedCircuit = await registryClient.getPackagedCircuit(
|
|
2912
|
-
|
|
2914
|
+
proofName,
|
|
2913
2915
|
circuitManifest
|
|
2914
2916
|
);
|
|
2915
|
-
if (
|
|
2917
|
+
if (isOuterEVM) {
|
|
2916
2918
|
try {
|
|
2917
2919
|
const { createPublicClient, http } = await import("viem");
|
|
2918
2920
|
const { sepolia } = await import("viem/chains");
|
|
@@ -2923,7 +2925,6 @@ var ZKPassport = class {
|
|
|
2923
2925
|
});
|
|
2924
2926
|
const params = this.getSolidityVerifierParameters({
|
|
2925
2927
|
proof,
|
|
2926
|
-
validityPeriodInDays: validity,
|
|
2927
2928
|
domain: this.domain,
|
|
2928
2929
|
scope,
|
|
2929
2930
|
devMode
|
|
@@ -2994,10 +2995,6 @@ var ZKPassport = class {
|
|
|
2994
2995
|
);
|
|
2995
2996
|
}
|
|
2996
2997
|
const proofData = getProofData(proof.proof, getNumberOfPublicInputs(proof.name));
|
|
2997
|
-
const actualProof = proofData.proof.slice(16);
|
|
2998
|
-
const actualPublicInputs = proofData.publicInputs.concat(
|
|
2999
|
-
proofData.proof.slice(0, 16).map((x) => `0x${x}`)
|
|
3000
|
-
);
|
|
3001
2998
|
let committedInputCounts = [];
|
|
3002
2999
|
let committedInputs = [];
|
|
3003
3000
|
for (const key in proof.committedInputs) {
|
|
@@ -3084,8 +3081,8 @@ var ZKPassport = class {
|
|
|
3084
3081
|
const params = {
|
|
3085
3082
|
// Make sure the vkeyHash is 32 bytes
|
|
3086
3083
|
vkeyHash: `0x${proof.vkeyHash.replace("0x", "").padStart(64, "0")}`,
|
|
3087
|
-
proof: `0x${
|
|
3088
|
-
publicInputs:
|
|
3084
|
+
proof: `0x${proofData.proof.join("")}`,
|
|
3085
|
+
publicInputs: proofData.publicInputs,
|
|
3089
3086
|
committedInputs: `0x${compressedCommittedInputs}`,
|
|
3090
3087
|
committedInputCounts: committedInputCountsArray,
|
|
3091
3088
|
validityPeriodInDays,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zkpassport/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Privacy-preserving identity verification using passports and ID cards",
|
|
5
5
|
"author": "ZKPassport",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"sdk"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@aztec/bb.js": "1.0.0-nightly.
|
|
34
|
+
"@aztec/bb.js": "1.0.0-nightly.20250723",
|
|
35
35
|
"@noble/ciphers": "^1.2.1",
|
|
36
36
|
"@noble/hashes": "^1.7.2",
|
|
37
37
|
"@noble/secp256k1": "^2.2.3",
|
|
38
38
|
"@obsidion/bridge": "^0.10.4",
|
|
39
|
-
"@zkpassport/registry": "0.
|
|
40
|
-
"@zkpassport/utils": "0.
|
|
39
|
+
"@zkpassport/registry": "0.8.0",
|
|
40
|
+
"@zkpassport/utils": "0.19.0",
|
|
41
41
|
"buffer": "^6.0.3",
|
|
42
42
|
"i18n-iso-countries": "^7.12.0",
|
|
43
43
|
"pako": "^2.1.0",
|