mirror of
https://github.com/selfxyz/self.git
synced 2026-01-09 14:48:06 -05:00
* Add tree-shakeable exports * Migrate imports for tree-shakeable paths * Document ESM extension requirement * udpates * install new lock * yarn nice * build deps * save working index export no wildcard approach * save wip * fix building * add tree shaking doc and examples * sort package json files * update package.json * fix analyzing web * make sure that web is built * wip tree shaking * building works again. save wip logic * use granular imports * wip test * save wip * Remove hardcoded .d.ts files and setup automatic TypeScript declaration generation - Remove redundant constants.d.ts, types.d.ts, utils.d.ts files - Add build:types script to automatically generate TypeScript declarations - Update tsup config to disable DTS generation (handled separately) - Update .gitignore to prevent future commits of generated .d.ts files - Fixes import resolution errors in app by ensuring declarations are always generated * Add .gitignore rules for generated TypeScript declarations * ignore dts files * Remove redundant index.js re-export files - Remove constants.js, types.js, utils.js as they're redundant with tsup build - These were just re-exports pointing to dist files that tsup generates - package.json exports already point directly to built files - Update .gitignore to prevent future commits of these generated files - tsup handles all the building, no manual re-export files needed * save current wip fixes * add tsup config for web building * common prettier and fix imports * prettier * fix tests * implement level 3 tree shaking * improve splitting * optimize vite web building and prettier * remove comments * sort export params * feedback and fix pipelines * fix circuit-names path * fix test * fix building * sort * fix building * allow cursor to edit scripts * fix loadDocumentCatalog undefined * fix build settings * fix build settings * additional metro tree shaking * improved discovery script for xcode building * pr feedback and fix camelCasing * simplify shim setup * fix xcode building and add command to test building * remove comment * simplify
93 lines
1.9 KiB
TypeScript
93 lines
1.9 KiB
TypeScript
// Constants exports
|
|
export {
|
|
TREE_URL,
|
|
TREE_URL_STAGING,
|
|
API_URL,
|
|
API_URL_STAGING,
|
|
WS_DB_RELAYER,
|
|
WS_DB_RELAYER_STAGING,
|
|
PCR0_MANAGER_ADDRESS,
|
|
RPC_URL,
|
|
PASSPORT_ATTESTATION_ID,
|
|
ID_CARD_ATTESTATION_ID,
|
|
DEFAULT_MAJORITY,
|
|
attributeToPosition,
|
|
attributeToPosition_ID,
|
|
countryCodes,
|
|
commonNames,
|
|
countries,
|
|
CSCA_TREE_URL,
|
|
DSC_TREE_URL,
|
|
CSCA_TREE_URL_STAGING,
|
|
DSC_TREE_URL_STAGING,
|
|
IDENTITY_TREE_URL,
|
|
IDENTITY_TREE_URL_STAGING,
|
|
CSCA_TREE_URL_ID_CARD,
|
|
DSC_TREE_URL_ID_CARD,
|
|
CSCA_TREE_URL_STAGING_ID_CARD,
|
|
DSC_TREE_URL_STAGING_ID_CARD,
|
|
IDENTITY_TREE_URL_ID_CARD,
|
|
IDENTITY_TREE_URL_STAGING_ID_CARD,
|
|
} from './src/constants/index.js';
|
|
|
|
// Type exports from constants
|
|
export type { Country3LetterCode } from './src/constants/index.js';
|
|
|
|
// Utils exports
|
|
export {
|
|
initPassportDataParsing,
|
|
findStartPubKeyIndex,
|
|
generateCommitment,
|
|
generateNullifier,
|
|
genMockIdDoc,
|
|
generateMockDSC,
|
|
genMockIdDocAndInitDataParsing,
|
|
genAndInitMockPassportData,
|
|
parseDscCertificateData,
|
|
brutforceSignatureAlgorithmDsc,
|
|
parseCertificateSimple,
|
|
initElliptic,
|
|
getSKIPEM,
|
|
formatMrz,
|
|
getCircuitNameFromPassportData,
|
|
calculateUserIdentifierHash,
|
|
getSolidityPackedUserContextData,
|
|
getLeafCscaTree,
|
|
getLeafDscTree,
|
|
buildSMT,
|
|
generateCircuitInputsDSC,
|
|
generateCircuitInputsRegister,
|
|
generateCircuitInputsVCandDisclose,
|
|
Mode,
|
|
EndpointType,
|
|
SelfAppBuilder,
|
|
getUniversalLink,
|
|
formatEndpoint,
|
|
hashEndpointWithScope,
|
|
stringToBigInt,
|
|
bigIntToString,
|
|
} from './src/utils/index.js';
|
|
|
|
// Type exports
|
|
export type {
|
|
IdDocInput,
|
|
CertificateData,
|
|
PublicKeyDetailsECDSA,
|
|
PublicKeyDetailsRSA,
|
|
PassportMetadata,
|
|
UserIdType,
|
|
SelfApp,
|
|
SelfAppDisclosureConfig,
|
|
PassportData,
|
|
DocumentCategory,
|
|
} from './src/utils/index.js';
|
|
|
|
// Hash utilities
|
|
export {
|
|
flexiblePoseidon,
|
|
hash,
|
|
getHashLen,
|
|
customHasher,
|
|
packBytesAndPoseidon,
|
|
} from './src/utils/hash.js';
|