PresentationCredential

A single credential pinned for the lifetime of a presentation session via IssuedDocumentHandle.pinPresentationCredential.

Both sdJwt (the issuer body, whose cnf is bound to this credential's key) and sign (the key-binding signature) come from the same credential, so a verifier's key-binding check always lines up.

Properties

Link copied to clipboard

This credential's raw issuer-provided bytes. For mdoc credentials this is the IssuerSigned CBOR (binary), needed to build an mdoc SignedQR presentation from the same pinned credential whose key sign uses.

Link copied to clipboard

This credential's issuer-provided SD-JWT VC. Its cnf matches sign's key.

Link copied to clipboard

How many times this specific credential has been used so far.

Functions

Link copied to clipboard
suspend fun consume()

Marks this specific credential as used (increments its usage count).

Link copied to clipboard
suspend fun finalizeSession()

Applies the document's end-of-session credential policy to this exact credential, mirroring EUDI's own policy:

Link copied to clipboard
suspend fun sign(input: ByteArray, unlockReason: Reason = Reason.Unspecified): EcSignature

Signs input with this credential's key. Does not consume the credential, so it can be called repeatedly within a session (e.g. when the user toggles which claims to disclose).