Package-level declarations

Types

Link copied to clipboard

Factory object for creating CredentialService instances with custom configurations.

Functions

Link copied to clipboard

Convert string to Issuer.

fun Iri.asIssuer(): Issuer

Convenience extensions for creating VC types from DIDs and IRIs.

Link copied to clipboard

Convert string to Iri and then to Issuer.

Link copied to clipboard
fun credentialService(didResolver: DidResolver, schemaRegistry: SchemaRegistry? = null, revocationManager: CredentialRevocationManager? = null): CredentialService

Creates a credential service with all built-in proof formats.

fun credentialService(didResolver: DidResolver, signer: suspend (ByteArray, String) -> ByteArray, schemaRegistry: SchemaRegistry? = null, revocationManager: CredentialRevocationManager? = null): CredentialService

Creates a credential service with all built-in proof formats and a custom signer.

Link copied to clipboard

Convert CBOR to credential.

Link copied to clipboard
suspend fun CredentialService.fromJsonLd(json: JsonObject): VerifiableCredential

Convert JSON-LD to credential.

Link copied to clipboard

Convert JWT to credential.

suspend fun CredentialService.fromJwt(jwt: String, allowUnsecured: Boolean): VerifiableCredential

Convert JWT to credential, accepting unsecured (alg: none) JWTs — such as the output of toJwt — only when allowUnsecured is true. The signature is never verified here.

Link copied to clipboard
suspend fun CredentialService.issue(format: ProofSuiteId, issuerDid: Did, subjectDid: Did, type: String, claims: Map<String, Any> = emptyMap(), expiresIn: Duration? = null): IssuanceResult

Convenience overloads for common issuance patterns.

suspend fun CredentialService.issue(format: ProofSuiteId, issuerDid: Did, subjectDid: Did, types: List<String>, claims: Map<String, Any> = emptyMap(), expiresIn: Duration? = null): IssuanceResult

Issue a credential with multiple types.

Link copied to clipboard

Convert credential to CBOR format.

Link copied to clipboard
fun String.toCredentialType(): CredentialType

String extension functions for ergonomic API usage.

Link copied to clipboard
fun List<String>.toCredentialTypes(): List<CredentialType>

Convert list of strings to CredentialTypes.

Link copied to clipboard
suspend fun CredentialService.toJsonLd(credential: VerifiableCredential): JsonObject

Convert credential to JSON-LD format.

Link copied to clipboard

Convert credential to JWT format.