SDK reference · Verifiers

@provenanceauth/sdk

@provenanceauth/sdk in the Verifiers: 7 methods. Offline verifiers in the Node SDK: intent tokens, attested images, attribution traces and webhook signatures.

Methods

fetchJwks

fetchJwks(baseUrl: string): Promise<Jwks>

Fetch the issuer's JWKS document.

verifyIntentTokenOffline

verifyIntentTokenOffline(token: string, jwks: Jwks): Promise<OfflineVerifyResult>

Verify an ES256 intent token against a JWKS (authenticity + expiry only).

extractAttestationBundle

extractAttestationBundle(jpeg: Uint8Array): Record<string, unknown> | null

Extract the embedded attestation bundle from a JPEG's provenance XMP APP1 segment, or null if the file carries none.

verifyAttestedImageOffline

verifyAttestedImageOffline(jpeg: Uint8Array): Promise<MediaVerifyResult>

Verify an attested JPEG entirely offline in the browser: extract the bundle and check its ECDSA-P256 signature against the public key in its embedded device certificate.

verifyTraceManifest

verifyTraceManifest(token: string, jwks: Jwks, graph?: unknown): Promise<TraceManifestResult>

Verify a trace manifest against a JWKS (no network); optionally check a graph against it.

verifyTraceDiffManifest

verifyTraceDiffManifest(token: string, jwks: Jwks, report?: unknown): Promise<TraceDiffManifestResult>

Verify a Neuron-CI diff manifest against a JWKS (no network) and, optionally, that a report is the one it binds.

verifyWebhookSignature

verifyWebhookSignature(rawBody: string, header: string | undefined | null, secret: string, opts?: WebhookVerifyOptions): Promise<WebhookVerifyResult>

Verify a Provenance-Signature header against the raw delivery body and your endpoint secret.

Was this page helpful? Send us feedback

LLM? Read llms.txt.