AbstractDidMethodProvider

Abstract base for DidMethodProvider implementations that require a KMS.

Eliminates the copy-pasted KMS resolution boilerplate found in every DID method provider. The resolveKms helper first checks options.additionalProperties["kms"] for a directly injected instance; if absent it auto-discovers a provider via Java ServiceLoader.

Usage:

class KeyDidMethodProvider : AbstractDidMethodProvider() {
override val name = "key"
override val supportedMethods = listOf("key")

override fun create(methodName: String, options: DidCreationOptions) =
if (methodName != "key") null
else KeyDidMethod(resolveKms(options))
}

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val name: String
Link copied to clipboard
open val priority: Int
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun create(methodName: String, options: DidCreationOptions): DidMethod?