Files
self/common/index.ts
Justin Hernandez c55112d1e0 chore: add polish to the mobile demo app (#1135)
* Improve demo app safe area handling

* refactor: centralize mobile demo screen navigation

* update lock

* update podfile lock

* fix pipelines

* fix tests

* save wip polish

* polish app

* simplify and standardize screens

* small fixes

* fix tests

* Use SDK SelfClientProvider in demo (#1162)

* fix types

* Fix mobile SDK demo Jest mock

* force react-native-svg to 15.12.1

* fix tests

* add types script

* fix document list

* fix types and metro config

* add ignore files to speed up watchman and eslint

* save wip tweaks

* save mock doc screen wip

* use persistant document store

* save polish work in progress

* add polish to screens

* save wip secure storage

* allow cursor to examine react configs

* convert tests to vitest and fix

* fix tests

* prettier

* cr feedback

* fix tests and remove skipped
2025-10-01 00:16:34 -07:00

130 lines
2.8 KiB
TypeScript

// Type exports from constants
export type {
AadhaarData,
CertificateData,
DeployedCircuits,
DocumentCatalog,
DocumentCategory,
DocumentMetadata,
IDDocument,
IdDocInput,
OfacTree,
PassportData,
PassportMetadata,
PublicKeyDetailsECDSA,
PublicKeyDetailsRSA,
SelfApp,
SelfAppDisclosureConfig,
UserIdType,
} from './src/utils/index.js';
// Additional type exports
export type { Environment } from './src/utils/types.js';
// Constants exports
export type { Country3LetterCode } from './src/constants/index.js';
// Utils exports
export {
API_URL,
API_URL_STAGING,
CSCA_TREE_URL,
CSCA_TREE_URL_ID_CARD,
CSCA_TREE_URL_STAGING,
CSCA_TREE_URL_STAGING_ID_CARD,
DEFAULT_MAJORITY,
DSC_TREE_URL,
DSC_TREE_URL_ID_CARD,
DSC_TREE_URL_STAGING,
DSC_TREE_URL_STAGING_ID_CARD,
IDENTITY_TREE_URL,
IDENTITY_TREE_URL_ID_CARD,
IDENTITY_TREE_URL_STAGING,
IDENTITY_TREE_URL_STAGING_ID_CARD,
ID_CARD_ATTESTATION_ID,
PASSPORT_ATTESTATION_ID,
PCR0_MANAGER_ADDRESS,
REDIRECT_URL,
RPC_URL,
TREE_URL,
TREE_URL_STAGING,
WS_DB_RELAYER,
WS_DB_RELAYER_STAGING,
attributeToPosition,
attributeToPosition_ID,
commonNames,
countries,
countryCodes,
} from './src/constants/index.js';
// Type exports
export {
EndpointType,
Mode,
SelfAppBuilder,
bigIntToString,
brutforceSignatureAlgorithmDsc,
buildSMT,
calculateContentHash,
calculateUserIdentifierHash,
findStartPubKeyIndex,
formatEndpoint,
formatMrz,
genAndInitMockPassportData,
genMockIdDoc,
genMockIdDocAndInitDataParsing,
generateCircuitInputsDSC,
generateCircuitInputsRegister,
generateCircuitInputsRegisterForTests,
generateCircuitInputsVCandDisclose,
generateCommitment,
generateMockDSC,
generateNullifier,
getCircuitNameFromPassportData,
getLeafCscaTree,
getLeafDscTree,
fetchOfacTrees,
getSKIPEM,
generateTEEInputsDiscloseStateless,
getSolidityPackedUserContextData,
getUniversalLink,
hashEndpointWithScope,
inferDocumentCategory,
initElliptic,
initPassportDataParsing,
parseCertificateSimple,
parseDscCertificateData,
stringToBigInt,
} from './src/utils/index.js';
// Crypto polyfill for cross-platform compatibility
export {
createHash,
createHmac,
default as cryptoPolyfill,
pbkdf2Sync,
randomBytes,
} from './src/polyfills/crypto.js';
export { createSelector } from './src/utils/aadhaar/constants.js';
// Hash utilities
export {
customHasher,
flexiblePoseidon,
getHashLen,
hash,
packBytesAndPoseidon,
} from './src/utils/hash.js';
export { generateTestData, testCustomData } from './src/utils/aadhaar/utils.js';
export { isAadhaarDocument, isMRZDocument } from './src/utils/index.js';
export {
prepareAadhaarDiscloseData,
prepareAadhaarDiscloseTestData,
prepareAadhaarRegisterData,
prepareAadhaarRegisterTestData,
} from './src/utils/aadhaar/mockData.js';