SubjectCredentialStore

Stores all credentials that a subject has received

Inheritors

Types

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

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(credentialSchemes: Collection<ConstantIndex.CredentialScheme>? = null): KmmResult<List<SubjectCredentialStore.StoreEntry>>

Return all stored credentials. Selective Disclosure: Specify list of credential schemes in credentialSchemes.

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(issuerSigned: IssuerSigned, scheme: ConstantIndex.CredentialScheme)
abstract suspend fun storeCredential(vc: VerifiableCredentialJws, vcSerialized: String, scheme: ConstantIndex.CredentialScheme)
abstract suspend fun storeCredential(vc: VerifiableCredentialSdJwt, vcSerialized: String, disclosures: Map<String, SelectiveDisclosureItem?>, scheme: ConstantIndex.CredentialScheme)

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