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

Prove Types

Type definitions used throughout the Prove SDK.

Settings

Configuration for the proving client.

type Settings = {
  production: boolean;                                   // false for dev, true for production
  privateKey?: string;                                   // SP1 prover network private key (optional)
  certChain?: SelfSignedCertChain | ExistingCertChain;  // Certificate chain (optional)
  proverNetworkMode?: ProverNetworkMode;                 // Prover network mode (optional, defaults to Mainnet)
}
Used by:

ProvingClient

Client for generating and embedding zero-knowledge proofs.

class ProvingClient {
  // Request proof generation
  requestProof(originalPath: string): Promise<string>;
  
  // Check proof status
  getProofStatus(requestId: string): Promise<ProofRequestStatus>;
  
  // Embed proof into photo
  embedProof(originalPath: string, proof: ArrayBuffer): Promise<string>;
  
  // Convenience: request, wait, and embed in one step
  waitAndEmbedProof(originalPath: string): Promise<string>;
}
Used by:
  • useProver - Returns provingClient instance
  • All proof generation methods are called on this client

ProverContextValue

Context value returned by useProver().

type ProverContextValue = {
  provingClient: ProvingClient | null;     // The proving client instance
  provingTasks: ProvingTasksState;         // Active proof requests
  provingTasksCount: number;               // Number of active requests
  isInitializing: boolean;                 // Whether proving client is initializing
  error: unknown;                          // Any initialization error
}
Used by:

ProofRequestContextValue

Context value returned by useProofRequestStatus().

type ProofRequestContextValue = {
  isInitializing: boolean;            // Whether proving client is initializing
  error: unknown;                     // Any initialization error
  fulfillementStatus: FulfillmentStatus; // Current proof status
  proof: ArrayBuffer | undefined;     // Generated proof bytes (when fulfilled)
}
Used by:

ProvingTask

Information about an active proof request.

type ProvingTask = {
  photoPath: string;      // Path to the photo being proven
  createdAtMs: number;    // Timestamp when proof was requested
}
Used by:

ProvingTasksState

Record of active proof requests keyed by request ID.

type ProvingTasksState = Record<string, ProvingTask>
Used by:

ProofRequestStatus

Status of a proof generation request returned from the backend.

type ProofRequestStatus = {
  fulfillmentStatus: FulfillmentStatus;  // Current status
  proof?: ArrayBuffer;                   // Proof bytes (when fulfilled)
}
Used by:

FulfillmentStatus

Enum representing the current status of a proof generation request.

enum FulfillmentStatus {
  UnspecifiedFulfillmentStatus = 0,  // Initial/unknown state
  Requested = 1,                     // Request received by backend
  Assigned = 2,                      // Request assigned to a prover
  Fulfilled = 3,                     // Proof generated successfully
  Unfulfillable = 4,                 // Proof generation failed
}
Used by:

ProverNetworkMode

Enum selecting which prover network to connect to.

enum ProverNetworkMode {
  Mainnet,   // Auction-based proving on the mainnet network
  Reserved,  // Reserved capacity network for hosted/reserved proving
}
Used by:
  • Settings - proverNetworkMode field (defaults to Mainnet)

SelfSignedCertChain

Self-signed certificate chain configuration (re-exported from C2PA package).

type SelfSignedCertChain = {
  signingAlgorithm?: string;  // Algorithm for signing (default: ES256)
  tsaUrl?: string;            // Timestamp authority URL (optional)
}
Used by:

ExistingCertChain

Existing certificate chain in PEM format (re-exported from C2PA package).

type ExistingCertChain = {
  pem: string;  // Certificate chain in PEM format
}
Used by:

AuthenticityStatus

Enum for quick photo authenticity checks (re-exported from C2PA package).

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
}
Used by:
  • Checking if a photo needs proof generation (status Bindings means ready to prove)