getCredential

suspend fun getCredential(credentialId: String): StoredCredential?

Retrieves a credential by its ID.

Return

The stored credential, or null if not found

Parameters

credentialId

The credential ID to look up

Throws

if reading fails

Example:

val credential = manager.getCredential(credentialId = "abc123")
if (credential != null) {
println("Found credential for contract: ${credential.contractId ?: "unknown"}")
} else {
println("Credential not found")
}