Skip to content

Commit

Permalink
yarn format
Browse files Browse the repository at this point in the history
  • Loading branch information
remicolin committed Oct 16, 2024
1 parent 2d9aed5 commit 34eba4c
Show file tree
Hide file tree
Showing 11 changed files with 341 additions and 318 deletions.
15 changes: 13 additions & 2 deletions circuits/tests/disclose/disclose.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,20 @@ describe('Disclose', function () {
const forbidden_countries_list = ['ALG', 'DZA'];

inputs = generateCircuitInputsDisclose(
secret, PASSPORT_ATTESTATION_ID, passportData, scope, selector_dg1, selector_older_than, tree, majority, smt, selector_ofac, forbidden_countries_list, user_identifier
secret,
PASSPORT_ATTESTATION_ID,
passportData,
scope,
selector_dg1,
selector_older_than,
tree,
majority,
smt,
selector_ofac,
forbidden_countries_list,
user_identifier
);
console.log("inputs", inputs);
console.log('inputs', inputs);
});

it('should compile and load the circuit', async function () {
Expand Down
17 changes: 15 additions & 2 deletions circuits/tests/other_circuits/leaf_hasher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ import {
mock_csca_sha1_rsa_2048,
mock_dsc_sha256_ecdsa,
} from '../../../common/src/constants/mockCertificates';
import { formatDg2Hash, formatMrz, hexToDecimal, packBytes, splitToWords, toUnsignedByte } from '../../../common/src/utils/utils';
import {
formatDg2Hash,
formatMrz,
hexToDecimal,
packBytes,
splitToWords,
toUnsignedByte,
} from '../../../common/src/utils/utils';
import { getLeaf, customHasher, generateCommitment } from '../../../common/src/utils/pubkeyTree';
import {
k_dsc,
Expand Down Expand Up @@ -115,7 +122,13 @@ describe('LeafHasher Light', function () {
const leafValueCircom = (await circuit.getOutput(witness, ['out'])).out;
console.log('\x1b[34m', 'hashValueCircom: ', leafValueCircom, '\x1b[0m');
const mrz_bytes_packed = packBytes(formattedMrz);
const commitment = generateCommitment(BigInt(secret).toString(), BigInt(attestation_id).toString(), BigInt(leaf).toString(), mrz_bytes_packed, dg2HashFormatted);
const commitment = generateCommitment(
BigInt(secret).toString(),
BigInt(attestation_id).toString(),
BigInt(leaf).toString(),
mrz_bytes_packed,
dg2HashFormatted
);
console.log('\x1b[34m', 'commitment in js : ', commitment, '\x1b[0m');
expect(BigInt(leafValueCircom).toString()).to.equal(BigInt(commitment).toString());
});
Expand Down
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@
"react": "^18.0.0",
"react-dom": "^18.0.0"
}
}
}
Loading

0 comments on commit 34eba4c

Please sign in to comment.