DcApiHolder

class DcApiHolder @JvmOverloads constructor(keyMaterial: KeyMaterial = EphemeralKeyWithoutCert(), holder: Holder = HolderAgent(keyMaterial), openId4VpHolder: OpenId4VpHolder = OpenId4VpHolder( keyMaterial = keyMaterial, holder = holder, ), iso180137AnnexCHolder: Iso180137AnnexCHolder = Iso180137AnnexCHolder( keyMaterial = keyMaterial, holder = holder, ))(source)

Handles requests received through the W3C Digital Credentials API, similar to DcApiVerifier on the relying party side.

The browser API may transport OpenID4VP or ISO/IEC 18013-7 Annex C requests. This class provides one wallet-facing entry point and delegates the protocol-specific work to OpenId4VpHolder or Iso180137AnnexCHolder.

Constructors

Link copied to clipboard
constructor(keyMaterial: KeyMaterial = EphemeralKeyWithoutCert(), holder: Holder = HolderAgent(keyMaterial), openId4VpHolder: OpenId4VpHolder = OpenId4VpHolder( keyMaterial = keyMaterial, holder = holder, ), iso180137AnnexCHolder: Iso180137AnnexCHolder = Iso180137AnnexCHolder( keyMaterial = keyMaterial, holder = holder, ))

Functions

Link copied to clipboard
suspend fun finalizeAuthorizationResponse(state: DcApiPreparationState, credentialPresentation: CredentialPresentation? = null): KmmResult<DigitalCredentialInterface>

Creates a protocol-agnostic response to return through the browser's Digital Credentials API.

Link copied to clipboard

Matches wallet credentials using the protocol and platform-selected credential IDs recorded in state.

Link copied to clipboard

Validates the request and prepares credential selection. Clients can inspect the returned state, ask for user consent, and resume with finalizeAuthorizationResponse.