mirror of
https://github.com/selfxyz/self.git
synced 2026-04-27 03:01:15 -04:00
* feat: store KYC document in keychain after receiving TEE attestation Build a KycData document from the attestation (signature, applicantInfo, pubkey) and persist it via storePassportData → keychain-backed adapter. This makes the document available for the proving machine. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: KYC document mock is always false Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * provingmachine flow with mock passport * add yarn.lock * Fix coderabbit comments * lint * update coderabbit comments * coderabbit comments * Merge branch 'dev' into feat/didit-keychain-storage * fix: reorder KYC constants declarations and fix formatting Constants were declared out of order causing "used before declaration" TS errors. Reordered to match the 295-byte layout sequentially. Also ran prettier on common package. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix proving phase handling and add delete catalog debug button - TunnelProvingScreen: use `phase !== 'disclose'` to handle completion for both passport (dsc→register→disclose) and kyc/aadhaar (register→disclose) - KeychainDebugScreen: add Delete Catalog button to clear all documents Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * coderabbit comments --------- Co-authored-by: ayman <aymanshaik1015@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
153 lines
3.4 KiB
TypeScript
153 lines
3.4 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';
|
|
|
|
// Constants exports
|
|
export type { Country3LetterCode } from './src/constants/index.js';
|
|
|
|
// Additional type exports
|
|
export type { Environment } from './src/utils/types.js';
|
|
|
|
// Utils exports
|
|
export type { KycData } from './src/utils/kyc/types.js';
|
|
|
|
// Type exports
|
|
export {
|
|
AADHAAR_ATTESTATION_ID,
|
|
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,
|
|
KYC_ATTESTATION_ID,
|
|
PASSPORT_ATTESTATION_ID,
|
|
PCR0_MANAGER_ADDRESS,
|
|
REDIRECT_URL,
|
|
RPC_URL,
|
|
TREE_URL,
|
|
TREE_URL_STAGING,
|
|
WS_DB_RELAYER,
|
|
WS_DB_RELAYER_STAGING,
|
|
alpha2ToAlpha3,
|
|
alpha3ToAlpha2,
|
|
attributeToPosition,
|
|
attributeToPosition_ID,
|
|
commonNames,
|
|
countries,
|
|
countryCodes,
|
|
getCountryISO2,
|
|
} from './src/constants/index.js';
|
|
|
|
export {
|
|
EndpointType,
|
|
Mode,
|
|
SelfAppBuilder,
|
|
bigIntToString,
|
|
brutforceSignatureAlgorithmDsc,
|
|
buildSMT,
|
|
calculateContentHash,
|
|
calculateUserIdentifierHash,
|
|
fetchOfacTrees,
|
|
findStartPubKeyIndex,
|
|
formatEndpoint,
|
|
formatMrz,
|
|
genAndInitMockPassportData,
|
|
genMockIdDoc,
|
|
genMockIdDocAndInitDataParsing,
|
|
generateCircuitInputsDSC,
|
|
generateCircuitInputsRegister,
|
|
generateCircuitInputsRegisterForTests,
|
|
generateCircuitInputsVCandDisclose,
|
|
generateCommitment,
|
|
generateMockDSC,
|
|
generateNullifier,
|
|
generateTEEInputsDiscloseStateless,
|
|
getCircuitNameFromPassportData,
|
|
getLeafCscaTree,
|
|
getLeafDscTree,
|
|
getSKIPEM,
|
|
getSolidityPackedUserContextData,
|
|
getUniversalLink,
|
|
hashEndpointWithScope,
|
|
inferDocumentCategory,
|
|
initElliptic,
|
|
initPassportDataParsing,
|
|
parseCertificateSimple,
|
|
parseDscCertificateData,
|
|
stringToBigInt,
|
|
} from './src/utils/index.js';
|
|
|
|
export {
|
|
KYC_ID_NUMBER_INDEX,
|
|
KYC_ID_NUMBER_LENGTH,
|
|
KYC_MAX_LENGTH,
|
|
} from './src/utils/kyc/constants.js';
|
|
export {
|
|
NON_OFAC_DUMMY_INPUT,
|
|
OFAC_DUMMY_INPUT,
|
|
generateKycDiscloseInput,
|
|
generateKycRegisterInput,
|
|
generateMockKycRegisterInput,
|
|
} from './src/utils/kyc/generateInputs.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 { deserializeApplicantInfo } from './src/utils/kyc/api.js';
|
|
export { generateTestData, testCustomData } from './src/utils/aadhaar/utils.js';
|
|
|
|
export { isAadhaarDocument, isKycDocument, isMRZDocument } from './src/utils/index.js';
|
|
|
|
export {
|
|
prepareAadhaarDiscloseData,
|
|
prepareAadhaarDiscloseTestData,
|
|
prepareAadhaarRegisterData,
|
|
prepareAadhaarRegisterTestData,
|
|
} from './src/utils/aadhaar/mockData.js';
|
|
|
|
export { serializeKycData } from './src/utils/kyc/types.js';
|