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)
}ProverProvider- Accepts assettingsprop
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>;
}useProver- ReturnsprovingClientinstance- 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
}useProver- Returns this type
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)
}useProofRequestStatus- Returns this type
ProvingTask
Information about an active proof request.
type ProvingTask = {
photoPath: string; // Path to the photo being proven
createdAtMs: number; // Timestamp when proof was requested
}ProvingTasksState- Values in the tasks record
ProvingTasksState
Record of active proof requests keyed by request ID.
type ProvingTasksState = Record<string, ProvingTask>ProverContextValue- Tracks active tasks
ProofRequestStatus
Status of a proof generation request returned from the backend.
type ProofRequestStatus = {
fulfillmentStatus: FulfillmentStatus; // Current status
proof?: ArrayBuffer; // Proof bytes (when fulfilled)
}getProofStatus()- Returns this typeuseProofRequestStatus- Polls for this status
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
}- [
ProofRequestStatus](#proofre queststatus) - Indicates current status ProofRequestContextValue- Exposed via hookwaitAndEmbedProof- Polls untilFulfilledorUnfulfillable
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
}Settings-proverNetworkModefield (defaults toMainnet)
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)
}Settings- Certificate chain option
ExistingCertChain
Existing certificate chain in PEM format (re-exported from C2PA package).
type ExistingCertChain = {
pem: string; // Certificate chain in PEM format
}Settings- Certificate chain option
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
}- Checking if a photo needs proof generation (status
Bindingsmeans ready to prove)