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
data class PresentationResponseParameters(val presentationSubmission: PresentationSubmission, val presentationResults: List<Holder.CreatePresentationResult>)
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(challenge: String, audienceId: String, presentationDefinition: PresentationDefinition, fallbackFormatHolder: FormatHolder? = null, pathAuthorizationValidator: (SubjectCredentialStore.StoreEntry, NormalizedJsonPath) -> Boolean = defaultPathAuthorizationValidator): KmmResult<Holder.PresentationResponseParameters>
Link copied to clipboard

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

abstract suspend fun matchInputDescriptorsAgainstCredentialStore(presentationDefinition: PresentationDefinition, fallbackFormatHolder: FormatHolder? = null, pathAuthorizationValidator: (SubjectCredentialStore.StoreEntry, NormalizedJsonPath) -> Boolean = { _, _ -> true }): KmmResult<Map<InputDescriptor, HolderAgent.CandidateInputMatchContainer?>>

Creates a mapping from the input descriptors of the presentation definition to matching credentials and the fields that would need to be disclosed.

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.