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

authenticityStatus

Check the authenticity status of a photo by analyzing its C2PA manifest.

Usage

import { authenticityStatus, AuthenticityStatus } from "@succinctlabs/react-native-zcam1";
 
const status = await authenticityStatus(photoUri);
 
if (status === AuthenticityStatus.Proof) {
  console.log("Photo has verified ZK proof");
}

Parameters

uri

  • Type: string

Path or URI to a photo file.

Returns

Promise<AuthenticityStatus>

enum AuthenticityStatus {
  Unknown = 0,          // Unable to determine status
  NoManifest = 1,       // No C2PA manifest found
  InvalidManifest = 2,  // C2PA manifest is invalid
  Bindings = 3,         // Has succinct.bindings assertion
  Proof = 4             // Has succinct.proof assertion
}

Example

import { useState } from "react";
import { Button, Text } from "react-native";
import { authenticityStatus, AuthenticityStatus } from "@succinctlabs/react-native-zcam1";
 
function PhotoStatus({ photoUri }: { photoUri: string }) {
  const [status, setStatus] = useState<AuthenticityStatus>();
 
  const checkStatus = async () => {
    const result = await authenticityStatus(photoUri);
    setStatus(result);
  };
 
  const getStatusText = () => {
    switch (status) {
      case AuthenticityStatus.Proof:
        return "✓ Verified with ZK proof";
      case AuthenticityStatus.Bindings:
        return "📝 Hardware-attested (proof pending)";
      case AuthenticityStatus.NoManifest:
        return "⚠️ No authenticity data";
      case AuthenticityStatus.InvalidManifest:
        return "✗ Invalid manifest";
      default:
        return "Unknown";
    }
  };
 
  return (
    <>
      <Button title="Check Status" onPress={checkStatus} />
      {status !== undefined && <Text>{getStatusText()}</Text>}
    </>
  );
}

Notes

  • Quickly checks for presence of succinct.bindings or succinct.proof
  • Does not perform full cryptographic verification (use verify() for that)
  • Useful for UI indicators and filtering
  • Re-exports from @succinctlabs/react-native-zcam1