Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Capture Types

Type definitions used throughout the Capture SDK.

CaptureInfo

Device registration information returned by initCapture().

type CaptureInfo = {
  appId: string;                    // iOS: "TEAM_ID.BUNDLE_ID" — Android: package name
  deviceKeyId: string;              // App Attest device key ID
  contentPublicKey: ECKey;          // Secure Enclave content key
  contentKeyId: Uint8Array;         // Derived content key identifier
  attestation: string;              // App Attest attestation blob
}
Used by:

Settings

Configuration for device initialization.

type Settings = {
  appId?: string;     // iOS only: "TEAM_ID.BUNDLE_ID" — not needed on Android
  production: boolean; // false for dev, true for production App Attest
}
Used by:

ZPhoto

Represents a captured photo with paths to original and C2PA-signed versions.

class ZPhoto {
  originalPath: string;  // Path to raw captured image
  path: string;          // Path to C2PA-signed image with succinct.bindings
}
Used by:

TakePhotoOptions

Options for photo capture.

type TakePhotoOptions = {
  format?: "jpeg" | "dng";           // Capture format (default: "jpeg")
  flash?: FlashMode;                 // Flash mode (default: "off")
  includeDepthData?: boolean;        // Include depth data (default: false)
  aspectRatio?: AspectRatio;         // Photo aspect ratio (default: "4:3")
  orientation?: Orientation;         // Crop orientation (default: "auto")
}
Used by:

CameraFilmStyle

Film style preset for camera. When a non-default film style is applied, the style name, source, and full recipe are embedded in the C2PA metadata (see FilmStyleInfo).

type CameraFilmStyle = "normal" | "mellow" | "nostalgic" | "bw"
Used by:
  • ZCamera - Accepts as filmStyle prop

FilmStyleEffect

Individual film style effect that can be combined into a custom recipe.

type FilmStyleEffect =
  | { type: "whiteBalance"; config: WhiteBalanceConfig }
  | { type: "saturation"; value: number }
  | { type: "contrast"; value: number }
  | { type: "brightness"; value: number }
  | { type: "hue"; value: number }
  | { type: "vibrance"; value: number }
  | { type: "highlightShadow"; config: HighlightShadowConfig }
  | { type: "monochrome"; config: MonochromeConfig }
Used by:

FilmStyleRecipe

An ordered array of film style effects applied sequentially to produce the final look.

type FilmStyleRecipe = FilmStyleEffect[]
Used by:
  • ZCamera - In filmStyleOverrides and customFilmStyles props

WhiteBalanceConfig

Configuration for white balance adjustment.

type WhiteBalanceConfig = {
  temperature: number;  // Color temperature in Kelvin (e.g., 5500 daylight, 6500 cloudy)
  tint?: number;        // Tint adjustment (-100 to 100, green to magenta). Default: 0
}

HighlightShadowConfig

Configuration for highlight and shadow adjustments.

type HighlightShadowConfig = {
  highlights: number;  // Highlight adjustment (0 = no change, negative = reduce, positive = boost)
  shadows: number;     // Shadow adjustment (0 = no change, positive = lift shadows)
}

MonochromeConfig

Configuration for monochrome (black & white) film style.

type MonochromeConfig = {
  intensity: number;                            // 0 = none, 1 = full B&W
  color?: { r: number; g: number; b: number };  // Optional tint color (0-1 range)
}

FlashMode

Flash mode for photo capture.

type FlashMode = "off" | "on" | "auto"
Used by:

AspectRatio

Aspect ratio for captured photos.

type AspectRatio = "4:3" | "16:9" | "1:1"
Used by:

Orientation

Orientation for captured photos and videos. Uses accelerometer-based detection that works even when iOS orientation lock is enabled.

type Orientation = "auto" | "portrait" | "landscape"
  • auto - Automatically determines orientation from the device accelerometer (portrait or landscape depending on how the device is held)
  • portrait - Force portrait orientation
  • landscape - Force landscape orientation (auto-detects left/right from the accelerometer)
Used by:

DeviceOrientation

Physical device orientation reported by the accelerometer. Emitted via the onOrientationChange callback on ZCamera.

type DeviceOrientation = "portrait" | "portraitUpsideDown" | "landscapeLeft" | "landscapeRight"
Used by:
  • ZCamera - onOrientationChange callback parameter

SelfSignedCertChain

Self-signed certificate chain for C2PA manifest signing.

type SelfSignedCertChain = {
  signingAlgorithm?: string;  // Algorithm for signing (default: ES256)
  tsaUrl?: string;            // Timestamp authority URL (optional)
}
Used by:
  • ZCamera - Accepts as certChain prop

ExistingCertChain

Existing certificate chain in PEM format.

type ExistingCertChain = {
  pem: string;  // Certificate chain in PEM format
}
Used by:
  • ZCamera - Accepts as certChain prop

StartNativeVideoRecordingResult

Result from starting video recording.

type StartNativeVideoRecordingResult = {
  status: "recording";           // Indicates recording successfully started
  filePath: string;              // Path to in-progress movie file
  format: "mov";                 // Container format
  hasAudio: boolean;             // Whether audio is included
}
Used by:

StopNativeVideoRecordingResult

Result from stopping video recording with metadata.

type StopNativeVideoRecordingResult = {
  filePath: string;              // Path to finalized movie file
  format: "mov";                 // Container format
  hasAudio: boolean;             // Whether audio is included
  deviceMake: string;            // Device manufacturer
  deviceModel: string;           // Device model
  softwareVersion: string;       // iOS version
  durationSeconds: number;       // Video duration in seconds
  fileSizeBytes: number;         // File size in bytes
  width: number;                 // Video width (pixels)
  height: number;                // Video height (pixels)
  rotationDegrees: number;       // Rotation (0, 90, 180, 270)
  frameRate: number;             // Nominal frame rate (fps)
  videoCodec?: string;           // Video codec FourCC (e.g., "hvc1")
  audioCodec?: string;           // Audio codec FourCC (e.g., "aac ")
  audioSampleRate?: number;      // Audio sample rate (Hz)
  audioChannels?: number;        // Audio channel count
}
Used by:

ECKey

Elliptic curve public key from Secure Enclave.

type ECKey = {
  kty: "EC";        // Key type
  crv: string;      // Curve name (e.g., "P-256")
  x: string;        // X coordinate (base64url)
  y: string;        // Y coordinate (base64url)
}
Used by: