Overview
The ZCAM1 SDK provides React Native components and hooks for capturing, proving, and verifying authenticated photos using hardware-backed cryptography and zero-knowledge proofs.
Installation
npm install @succinctlabs/react-native-zcam1Actions
| Action | Description |
|---|---|
| Capture Actions | |
| initCapture | Initialize device keys and attestation for photo capture |
| ZCamera | React component for capturing C2PA-signed photos |
| takePhoto | Capture a photo with hardware-backed signatures |
| previewFile | Preview any file using iOS native viewer |
| startVideoRecording | Start recording a video with C2PA signing |
| stopVideoRecording | Stop recording and get finalized file with metadata |
| getSwitchOverZoomFactors | Get zoom factors where physical lenses switch |
| Prove Actions | |
| ProverProvider | React context provider for proof generation |
| useProver | Hook to access the proving client |
| requestProof | Request ZK proof generation for a photo |
| getProofStatus | Check the status of a proof request |
| useProofRequestStatus | Hook to poll proof request status |
| embedProof | Embed a generated proof into a photo |
| waitAndEmbedProof | Request, wait for, and embed proof in one step |
| Verify Actions | |
| VerifiableFile | Class for verifying C2PA manifests and ZK proofs |
| verifyBindings | Verify hardware-backed bindings in a C2PA manifest |
| verifyProof | Verify zero-knowledge proof in a C2PA manifest |
| dataHash | Get the content hash from a C2PA manifest |
| captureMetadata | Get capture metadata from a C2PA manifest |
| Picker Actions | |
| ZImagePicker | React component for picking photos with authenticity badges |
| privateDirectory | Get the path to the app's private document directory |
| authenticityStatus | Check the authenticity status of a photo |
Type References
- Capture Types - Types for the Capture SDK
- Prove Types - Types for the Prove SDK
- Verify Types - Types for the Verify SDK