Merge branch 'dev' of https://github.com/zk-passport/openpassport into frontend-optimization

This commit is contained in:
turnoffthiscomputer
2024-10-30 15:01:31 +01:00
66 changed files with 3462 additions and 1226 deletions

View File

@@ -3,7 +3,7 @@ import * as forge from "node-forge";
import { bytesToBigDecimal, extractRSFromSignature, getNAndK, getNAndKCSCA, hexToDecimal, splitToWords } from "./utils";
import { CSCA_TREE_DEPTH, MODAL_SERVER_ADDRESS } from "../constants/constants";
import { poseidon2 } from "poseidon-lite";
import { IMT } from "@zk-kit/imt";
import { IMT } from "@openpassport/zk-kit-imt";
import serialized_csca_tree from "../../pubkeys/serialized_csca_tree.json"
import axios from "axios";
import { parseCertificate } from "./certificates/handleCertificate";

View File

@@ -21,10 +21,10 @@ import {
formatCountriesList,
} from './utils';
import { generateCommitment, getLeaf } from "./pubkeyTree";
import { LeanIMT } from "@zk-kit/imt";
import { LeanIMT } from "@openpassport/zk-kit-lean-imt";
import { getCountryLeaf, getNameLeaf, getNameDobLeaf, getPassportNumberLeaf } from "./smtTree";
import { packBytes } from "../utils/utils";
import { SMT } from "@ashpect/smt"
import { SMT } from "@openpassport/zk-kit-smt"
import { parseCertificate } from './certificates/handleCertificate';
export function generateCircuitInputsDisclose(

View File

@@ -1,5 +1,5 @@
import { PUBKEY_TREE_DEPTH, COMMITMENT_TREE_TRACKER_URL, SignatureAlgorithmIndex } from "../constants/constants";
import { LeanIMT } from '@zk-kit/imt'
import { LeanIMT } from '@openpassport/zk-kit-lean-imt'
import axios from "axios";
import { poseidon16, poseidon2, poseidon6, poseidon7 } from 'poseidon-lite';
import { formatDg2Hash, getNAndK, getNAndKCSCA, hexToDecimal, splitToWords } from './utils';

View File

@@ -1,6 +1,6 @@
import { poseidon9, poseidon3, poseidon2, poseidon6, poseidon13 } from "poseidon-lite"
import { stringToAsciiBigIntArray } from "./utils";
import { ChildNodes, SMT } from "@ashpect/smt"
import { ChildNodes, SMT } from "@openpassport/zk-kit-smt"
// SMT trees for 3 levels :
// 1. Passport tree : level 3 (Absolute Match)

View File

@@ -1,8 +1,8 @@
import { LeanIMT } from '@zk-kit/imt';
import { LeanIMT } from '@openpassport/zk-kit-lean-imt';
import { sha256 } from 'js-sha256';
import { sha1 } from 'js-sha1';
import { sha384, sha512_256 } from 'js-sha512';
import { SMT } from '@ashpect/smt';
import { SMT } from '@openpassport/zk-kit-smt';
import forge from 'node-forge';
import { n_dsc, k_dsc, n_dsc_ecdsa, k_dsc_ecdsa, n_csca, k_csca, attributeToPosition } from '../constants/constants';
import { unpackReveal } from './revealBitmap';