SubjectBuilder

Subject Builder DSL.

Provides a fluent API for building credential subject JSON.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun build(): JsonObject

Build the credential subject JSON.

Link copied to clipboard
fun id(did: Did)

Set subject ID from a Did type.

Link copied to clipboard
operator fun String.invoke(block: JsonObjectBuilder.() -> Unit)

Set a property value.

Link copied to clipboard
infix fun String.to(value: Any?)

Set a simple property value.

infix fun String.to(block: JsonObjectBuilder.() -> Unit)

Add a nested object using 'to' syntax.