feat: modernize circuits build pipeline (#876)

* Add tsup build for circuits

* sort package.json

* cr feedback

* circuits fixes

* fixes
This commit is contained in:
Justin Hernandez
2025-08-10 22:26:29 -07:00
committed by GitHub
parent 2ed8bcfe53
commit ab1f229161
11 changed files with 241 additions and 4 deletions

24
circuits/src/index.ts Normal file
View File

@@ -0,0 +1,24 @@
// Main circuits package runtime API
// This package provides circuit definitions and related utilities
// Circuit metadata and constants
export const CIRCUITS_VERSION = '0.0.1';
// Supported signature algorithms
export const SUPPORTED_SIGNATURE_ALGORITHMS = [
'rsa_sha256_65537_2048',
'rsa_sha256_65537_3072',
'rsa_sha256_65537_4096',
'rsa_sha1_65537_2048',
'rsa_sha512_65537_4096',
'rsapss_sha256_65537_32_3072',
'rsapss_sha256_65537_32_4096',
'rsapss_sha256_3_32_3072',
'rsapss_sha384_65537_48_3072',
'rsapss_sha512_65537_64_4096',
] as const;
export type SupportedSignatureAlgorithm = (typeof SUPPORTED_SIGNATURE_ALGORITHMS)[number];
// Note: Test utilities have been moved to a dedicated './testing' export
// Import test utilities via: import { ... } from '@selfxyz/circuits/testing'

View File

@@ -0,0 +1,25 @@
// Re-export utility functions for generating mock inputs in circuit tests
export { generateMockRsaPkcs1v1_5Inputs } from '../../tests/utils/generateMockInputsInCircuits.js';
export {
generateMockRsaPssInputs,
generateMalleableRsaPssInputs,
} from '../../tests/utils/generateMockInputsRsaPss.js';
// Re-export test case configurations
export {
sigAlgs as registerSigAlgs,
fullSigAlgs as registerFullSigAlgs,
} from '../../tests/register/test_cases.js';
export {
sigAlgs as registerIdSigAlgs,
fullSigAlgs as registerIdFullSigAlgs,
} from '../../tests/register_id/test_cases.js';
export {
sigAlgs as dscSigAlgs,
fullSigAlgs as dscFullSigAlgs,
} from '../../tests/dsc/test_cases.js';
export {
fullAlgorithms as rsaPssFullAlgorithms,
sigAlgs as rsaPssSigAlgs,
AdditionalCases as rsaPssAdditionalCases,
} from '../../tests/utils/testcase/rsapss.js';