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
sealed class StoredCredential

Properties

Link copied to clipboard
abstract val keyPair: KeyPairAdapter

The public key for this agent, i.e. the "holder key" that the credentials get bound to.

Functions

Link copied to clipboard
abstract suspend fun createPresentation(challenge: String, audienceId: String, presentationDefinitionId: String?, presentationSubmissionSelection: Map<String, CredentialSubmission>): KmmResult<Holder.PresentationResponseParameters>

Creates an array of VerifiablePresentation and a PresentationSubmission from already preselected presentationSubmissionSelection.

abstract suspend fun createPresentation(challenge: String, audienceId: String, presentationDefinition: PresentationDefinition, fallbackFormatHolder: FormatHolder? = null, pathAuthorizationValidator: PathAuthorizationValidator? = null): KmmResult<Holder.PresentationResponseParameters>
Link copied to clipboard
abstract fun evaluateInputDescriptorAgainstCredential(inputDescriptor: InputDescriptor, credential: SubjectCredentialStore.StoreEntry, fallbackFormatHolder: FormatHolder?, pathAuthorizationValidator: (NormalizedJsonPath) -> Boolean): KmmResult<Map<ConstraintField, NodeList>>

Evaluates a given input descriptor against a store enctry.

Link copied to clipboard

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

abstract suspend fun matchInputDescriptorsAgainstCredentialStore(inputDescriptors: Collection<InputDescriptor>, fallbackFormatHolder: FormatHolder? = null, pathAuthorizationValidator: PathAuthorizationValidator? = null): KmmResult<Map<String, InputDescriptorMatches>>

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
abstract suspend fun storeCredential(credential: Holder.StoreCredentialInput): KmmResult<Holder.StoredCredential>

Stores the verifiable credential in credential if it parses and validates, and returns it for future reference.