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
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
data class ValidatedVerifiableCredentialJws(val serialized: String, val vc: VerifiableCredentialJws)
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
Sets the revocation list ot use for further processing of Verifiable Credentials
Link copied to clipboard
abstract suspend fun storeCredentials(credentialList: List<Holder.StoreCredentialInput>): Holder.StoredCredentialsResult
Stores all verifiable credentials from credentialList that parse and validate, and returns them for future reference.
Link copied to clipboard
abstract suspend fun storeValidatedCredentials(credentialList: List<Holder.ValidatedVerifiableCredentialJws>): Boolean
Stores all verifiable credentials from credentialList. Does not validate the credentials!