DidCreationOptions

data class DidCreationOptions(val algorithm: KeyAlgorithm = KeyAlgorithm.ED25519, val purposes: List<KeyPurpose> = listOf(KeyPurpose.AUTHENTICATION), val additionalProperties: Map<String, Any?> = emptyMap())

Type-safe options for DID creation.

Replaces the error-prone Map<String, Any?> pattern with compile-time type safety.

Example Usage:

// Using defaults
val options = DidCreationOptions()

// Custom configuration
val options = DidCreationOptions(
algorithm = KeyAlgorithm.SECP256K1,
purposes = listOf(KeyPurpose.AUTHENTICATION, KeyPurpose.ASSERTION)
)

val document = didMethod.createDid(options)

Constructors

Link copied to clipboard
constructor(algorithm: KeyAlgorithm = KeyAlgorithm.ED25519, purposes: List<KeyPurpose> = listOf(KeyPurpose.AUTHENTICATION), additionalProperties: Map<String, Any?> = emptyMap())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Additional method-specific properties

Link copied to clipboard

Cryptographic algorithm for key generation

Link copied to clipboard

Key purposes (authentication, assertion, etc.)

Functions

Link copied to clipboard

Extension function to convert DidCreationOptions to Map for backward compatibility.

Link copied to clipboard
fun toMap(): Map<String, Any?>

Converts to Map format for backward compatibility with existing DID methods.

Link copied to clipboard
open override fun toString(): String

Method-specific properties routinely carry secrets (private keys, API keys): print keys only.