This commit is contained in:
ashpect
2024-08-01 12:05:24 +05:30
parent 63db509d57
commit 07804923ef
2 changed files with 13 additions and 28 deletions

View File

@@ -2,12 +2,19 @@ import { MAX_DATAHASHES_LEN, PUBKEY_TREE_DEPTH, DEVELOPMENT_MODE } from '../cons
import { assert, shaPad } from './shaPad';
import { PassportData } from './types';
import {
<<<<<<< HEAD
arraysAreEqual, bytesToBigDecimal, formatMrz, hash, splitToWords,
toUnsignedByte, getHashLen, getCurrentDateYYMMDD,
generateMerkleProof, generateSMTProof,
findSubarrayIndex
} from "./utils";
arraysAreEqual,
bytesToBigDecimal,
formatMrz,
hash,
splitToWords,
toUnsignedByte,
getHashLen,
getCurrentDateYYMMDD,
generateMerkleProof,
generateSMTProof,
findSubarrayIndex,
hexToDecimal,
} from './utils';
import { LeanIMT } from "@zk-kit/lean-imt";
import { getLeaf } from "./pubkeyTree";
import { getNameLeaf, getNameDobLeaf, getPassportNumberLeaf } from "./ofacTree";
@@ -18,26 +25,6 @@ import {
mockPassportDatas,
} from "../constants/mockPassportData";
import { SMT } from "@ashpect/smt"
=======
arraysAreEqual,
bytesToBigDecimal,
formatMrz,
hash,
splitToWords,
toUnsignedByte,
getHashLen,
getCurrentDateYYMMDD,
generateMerkleProof,
findSubarrayIndex,
hexToDecimal,
} from './utils';
import { LeanIMT } from '@zk-kit/lean-imt';
import { getLeaf } from './pubkeyTree';
import { poseidon6 } from 'poseidon-lite';
import { packBytes } from '../utils/utils';
import { getCSCAModulusMerkleTree } from './csca';
import { mockPassportDatas } from '../constants/mockPassportData';
>>>>>>> ce89661e8145b933ceb235af66f0c12cee7c0242
export function generateCircuitInputsRegister(
secret: string,

View File

@@ -405,7 +405,6 @@ export function BigintToArray(n: number, k: number, x: bigint) {
return ret;
}
export function stringToAsciiBigIntArray(str: string): bigint[] {
let asciiBigIntArray = [];
for (let i = 0; i < str.length; i++) {
@@ -442,6 +441,5 @@ export function num2Bits(n: number, inValue: bigint): bigint[] {
if (lc1 !== inValue) {
throw new Error("Reconstructed value does not match the input.");
}
return out;
}