Secret

@Serializable
data class Secret(val keys: List<KeyMaterial>? = null, val recoveryKey: String? = null, val updateKey: String? = null, val methodSpecificSecrets: Map<String, String>? = null)

Represents secret/key material returned by a DID Registrar.

According to the DID Registration specification, secrets are returned when:

  • Registrar operates in Internal Secret Mode

  • returnSecrets option is set to true

Secrets contain sensitive cryptographic material that should be handled securely:

  • Private keys for controller authentication

  • Recovery keys for DID recovery

  • Method-specific secret fields

See also

https

://identity.foundation/did-registration/

Constructors

Link copied to clipboard
constructor(keys: List<KeyMaterial>? = null, recoveryKey: String? = null, updateKey: String? = null, methodSpecificSecrets: Map<String, String>? = null)

Properties

Link copied to clipboard

List of key material (private keys, recovery keys, etc.).

Link copied to clipboard

Method-specific secret fields. Allows DID methods to include additional secret material.

Link copied to clipboard

Recovery key for DID recovery operations. Format depends on the DID method.

Link copied to clipboard

Update key for DID update operations. Format depends on the DID method.

Functions

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

Never prints key material: only which secrets are present.