getKeyId

suspend fun getKeyId(did: Did): Result<String>

Deprecated

Returns kotlin.Result instead of a sealed TrustWeave result; use getKeyIdResult(did).

Replace with

getKeyIdResult(did)

The ID of the key did issues with: its first assertionMethod, else its first authentication method, else its first verification method not reserved for keyAgreement.

Result contract: returns kotlin.Result (not a TrustWeave sealed result) and never throws for domain failures — an unresolvable DID or a document without a usable key is Result.failure carrying an IllegalStateException with the reason. Coroutine cancellation is rethrown, never captured. Unwrap with getOrElse / fold.