Holder Agent
class HolderAgent(validator: Validator = Validator.newDefaultInstance(), subjectCredentialStore: SubjectCredentialStore = InMemorySubjectCredentialStore(), jwsService: JwsService, keyId: String) : Holder
An agent that only implements Holder, i.e. it can receive credentials form other agents and present credentials to other agents.
Constructors
Link copied to clipboard
fun HolderAgent(validator: Validator = Validator.newDefaultInstance(), subjectCredentialStore: SubjectCredentialStore = InMemorySubjectCredentialStore(), jwsService: JwsService, keyId: String)
Types
Functions
Link copied to clipboard
open suspend override fun createPresentation(validCredentials: List<String>, challenge: String, audienceId: String): Holder.CreatePresentationResult?
Creates a VerifiablePresentation with the given validCredentials.
open suspend override fun createPresentation(challenge: String, audienceId: String, attributeNames: List<String>?, attributeTypes: List<String>?): 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
open suspend override fun getCredentials(attributeNames: List<String>?, attributeTypes: List<String>?): 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
open suspend override 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
open suspend override fun storeValidatedCredentials(credentialList: List<Holder.ValidatedVerifiableCredentialJws>): Boolean
Stores all verifiable credentials from credentialList. Does not validate the credentials!