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

Types

Link copied to clipboard
Link copied to clipboard
data class StoreCredentialInput(val vcJws: String, val attachments: List<Issuer.Attachment>? = null)
Link copied to clipboard
data class StoredAttachmentResult(val name: String, val data: ByteArray)
Link copied to clipboard
data class StoredCredential(val vcSerialized: String, val vc: VerifiableCredentialJws, val status: Validator.RevocationStatus)
Link copied to clipboard
data class StoredCredentialsResult(val accepted: List<VerifiableCredentialJws> = listOf(), val rejected: List<String> = listOf(), val notVerified: List<String> = listOf(), val attachments: List<Holder.StoredAttachmentResult> = listOf())
Link copied to clipboard

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, attributeNames: List<String>? = null, attributeTypes: List<String>? = null): Holder.CreatePresentationResult?

Creates a VerifiablePresentation serialized as a JWT for all the credentials we have stored, that match the attributeNames or attributeTypes (if specified).

Link copied to clipboard
abstract suspend fun getCredentials(attributeNames: List<String>? = null, attributeTypes: List<String>? = null): List<Holder.StoredCredential>?

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.

Link copied to clipboard

Stores all verifiable credentials from credentialList. Does not validate the credentials!

Inheritors

Link copied to clipboard