autoRegister
suspend fun autoRegister(kms: KeyManagementService? = null, options: DidCreationOptions = DidCreationOptions()): DidMethodRegistryAutoRegisterResult
Creates a registry and auto-registers all methods discovered via SPI.
Scans all DidMethodProvider implementations on the classpath and registers their supported methods. Methods are created with default options and a default KMS (if provided).
Note: Only methods with all required environment variables available will be registered. Methods that require environment variables but don't have them available will be skipped.
Return
Registry plus structured DidMethodRegistryAutoRegisterResult.failures for SPI/discovery issues
Example:
val kms = InMemoryKeyManagementService()
val result = DidMethodRegistry.autoRegister(kms)
val registry = result.registry
// Inspect result.failures if expected methods are missingContent copied to clipboard
Parameters
kms
Optional KMS to use for methods that require it. If null, methods will attempt to discover KMS via SPI or fail if required.
options
Optional creation options to pass to providers