CredentialServices

Factory object for creating CredentialService instances with custom configurations.

Functions

Link copied to clipboard
fun createCredentialService(kms: KeyManagementService, didResolver: DidResolver, formats: List<ProofSuiteId> = listOf(ProofSuiteId.VC_LD, ProofSuiteId.SD_JWT_VC), schemaRegistry: SchemaRegistry? = null, revocationManager: CredentialRevocationManager? = null): CredentialService

Creates a credential service with specified proof formats and KMS.

Link copied to clipboard
fun vcLdProofEngine(didResolver: DidResolver, signer: suspend (ByteArray, String) -> ByteArray): ProofEngine

Public factory for the production VC-LD proof engine (Ed25519Signature2020 by default), for callers (e.g. the status-list manager) that need a bare org.trustweave.credential.spi.proof.ProofEngine rather than a full CredentialService. signer signs (data, keyId) -> signature, typically via a KMS.