Holder

interface Holder

Summarizes operations for a Holder in the sense of the W3C VC Data Model.

It can store Verifiable Credentials, and create a Verifiable Presentation out of the stored credentials

Inheritors

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class StoredAttachmentResult(val name: String, val data: ByteArray)
Link copied to clipboard
sealed class StoredCredential
Link copied to clipboard
data class StoredCredentialsResult(val acceptedVcJwt: List<VerifiableCredentialJws> = listOf(), val acceptedSdJwt: List<VerifiableCredentialSdJwt> = listOf(), val acceptedIso: List<IssuerSigned> = listOf(), val rejected: List<String> = listOf(), val notVerified: List<String> = listOf(), val attachments: List<Holder.StoredAttachmentResult> = listOf())

Properties

Link copied to clipboard
abstract val identifier: String

The identifier for this agent, typically the keyId from the cryptographic key, e.g. did:key:mAB... or urn:ietf:params:oauth:jwk-thumbprint:sha256:...

Functions

Link copied to clipboard
abstract suspend fun createPresentation(validCredentials: List<String>, challenge: String, audienceId: String): Holder.CreatePresentationResult?

Creates a VerifiablePresentation with the given validCredentials.

abstract suspend fun createPresentation(challenge: String, audienceId: String, credentialSchemes: Collection<ConstantIndex.CredentialScheme>? = null, requestedClaims: Collection<String>? = null): Holder.CreatePresentationResult?

Creates a VerifiablePresentation serialized as a JWT for all the credentials we have stored, that match the credentialSchemes (if specified). Optionally filters by requestedClaims (e.g. in ISO case).

Link copied to clipboard

Gets a list of all stored credentials, with a revocation status.

Link copied to clipboard
abstract fun setRevocationList(it: String): Boolean

Sets the revocation list ot use for further processing of Verifiable Credentials

Link copied to clipboard

Stores all verifiable credentials from credentialList that parse and validate, and returns them for future reference.