SubjectCredentialStore

Stores all credentials that a subject has received

Types

Link copied to clipboard
data class AttachmentEntry(val name: String, val data: ByteArray, val vcId: String)
Link copied to clipboard
data class StoreEntry(val vcSerialized: String, val vc: VerifiableCredentialJws)

Functions

Link copied to clipboard
abstract suspend fun getAttachment(name: String): KmmResult<ByteArray>

Return attachments filtered by name

abstract suspend fun getAttachment(name: String, vcId: String): KmmResult<ByteArray>

Return attachments filtered by name and vcId

Link copied to clipboard
abstract suspend fun getCredentials(requiredAttributeTypes: List<String>? = null, requiredAttributeNames: List<String>? = null): KmmResult<List<SubjectCredentialStore.StoreEntry>>

Return all stored credentials. Selective Disclosure: Specify list of attribute names in requiredAttributeNames.

Link copied to clipboard
abstract suspend fun storeAttachment(name: String, data: ByteArray, vcId: String)

Implementation should store the attachment in a secure way. Note that the data has not been validated since it may not be signed.

Link copied to clipboard
abstract suspend fun storeCredential(vc: VerifiableCredentialJws, vcSerialized: String)

Implementations should store the passed credential in a secure way. Passed credentials have been validated before.

Inheritors

Link copied to clipboard