SDK reference · Node SDK

prov.attest.captureSessions.finalize

prov.attest.captureSessions.finalize in Node SDK.

Signature

prov.attest.captureSessions.finalize(sessionId: string, params: FinalizeParams): Promise<VerificationResult>

Parameters

sessionIdstringRequired
paramsFinalizeParamsRequired

Request fields

Idempotency-Keystringheader
Retry a create safely: the same key + request returns the stored response (24 h, per caller).
idstringpathRequired
The session's ID.
bundleobjectRequired
The signed attestation bundle.
Show child attributes
schemastringRequired
The bundle schema's URL.
capture_typestringRequired
image or video.
session_noncestringRequired
The server's nonce that seeds the chunk hash chain.
signaturestringRequired
The base64url signature from the passkey assertion.

Returns

Promise<VerificationResult> The verification result for the finished video.

HTTP operation

POST /v1/attest/capture_sessions/{id}/finalize: Finalize a capture session

Errors

Example

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/capture_sessions/cs_01M5Q1VJHMGX8E4RVWQ6Y2B9TN/finalize`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "bundle": {
      "schema": "https://provenanceauth.com/claims/v2",
      "capture_type": "video",
      "session_nonce": "9f2b1c4d6e8a0b2c4d6e8f0a1b3c5d7e9f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9c",
      "signature": "MEUCIQDx5n0q4sSPVd3a2Wbl0L8kQ0YwGg"
    }
  }),
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.