MobileWallet

Android and iOS facade for the walt.id wallet SDK.

Use MobileWalletFactory to create instances with the correct platform storage, key provider, and SQLDelight driver. The facade keeps the public mobile API intentionally small while delegating protocol work to the core wallet handlers.

Properties

Link copied to clipboard

Outcome of the most recent platform registry synchronization, or null before the first one.

Link copied to clipboard

Buffered stream of recent issuance and presentation events emitted by this wallet.

Link copied to clipboard

Signing identity creation, backup and restoration; recovery integrations are explicitly configured.

Functions

Link copied to clipboard

Reads an Annex C request out of a platform-neutral Digital Credentials request.

Link copied to clipboard
fun attachKeyAttestationProvider(provider: KeyAttestationProvider): MobileWallet

Attaches the provider used when an issuer requires key attestation in a credential proof. This runtime dependency must be reattached whenever the wallet is recreated.

Link copied to clipboard
fun attachKeyAttestationProviderResolver(resolver: KeyAttestationProviderResolver): MobileWallet

Attaches issuer-specific key attestation support. Supply it again after wallet recreation.

Link copied to clipboard
suspend fun beginAuthorizationIssuance(sessionId: String, credentials: List<MobileWalletCredentialSelection>? = null): WalletIssuanceAuthorization

Starts the authorization-code browser request for an accepted issuance session.

Link copied to clipboard
suspend fun cancelIssuance(sessionId: String): WalletIssuanceOutcome

Cancels an active issuance session and discards its protocol continuation material.

Link copied to clipboard
suspend fun continueAuthorizationIssuance(sessionId: String, callbackUri: String): WalletIssuanceOutcome

Validates and consumes a browser callback bound to an authorization-code session.

Link copied to clipboard
suspend fun continuePreAuthorizedIssuance(sessionId: String, transactionCode: String? = null, credentials: List<MobileWalletCredentialSelection>? = null): WalletIssuanceOutcome

Continues a pre-authorized session after review and optional transaction-code collection.

Link copied to clipboard
suspend fun createIssuanceHolderKeys(count: Int, keyType: MobileWalletKeyType? = null, didMethod: String = "key", keyUseAuthorizationPolicy: KeyUseAuthorizationPolicy? = null): List<MobileWalletHolderBinding>

Explicitly creates holder keys for a requested issuance batch using the platform key policy. The returned keys remain wallet-owned. For keys scoped to acceptance, use MobileWalletCredentialHolders.NewKeys; preview never generates keys.

Link copied to clipboard

Lists all credentials currently stored in the mobile wallet.

Link copied to clipboard
suspend fun deleteCredential(credentialId: String): Boolean

Removes one credential and re-publishes the native registry to reject stale selections.

Link copied to clipboard
suspend fun deleteWallet()

Deletes local wallet material owned by this mobile wallet instance.

Link copied to clipboard

Returns the native adapter's current runtime capability snapshot.

Link copied to clipboard

Builds the single-field OpenID4VP DC API error object required by Appendix A.

Link copied to clipboard
suspend fun discardDigitalCredentialPreview(requestId: String)

Cancels a retained DC API review, including an in-flight native authorization.

Link copied to clipboard

Discards a reviewed presentation after local dismissal.

Link copied to clipboard
suspend fun keyUseAuthorizationPreflight(keyType: MobileWalletKeyType = MobileWalletKeyType.secp256r1, keyUseAuthorizationPolicy: KeyUseAuthorizationPolicy = defaultKeyUseAuthorizationPolicy): KeyUseAuthorizationSupport

Checks whether a key-use authorization request is supported without creating or persisting a key.

Link copied to clipboard
suspend fun listDeferredIssuance(): List<WalletIssuanceContinuation>

Recovers retained deferred handles after an interrupted flow or wallet recreation.

Link copied to clipboard

Parses a raw Annex C DeviceRequest into the shape a consent screen can render.

Link copied to clipboard
suspend fun prepareDigitalCredentialPaymentConsent(requestId: String, selectedCredentialOptions: List<MobileWalletPresentationCredentialSelection>, selectedDisclosureOptions: List<MobileWalletPresentationDisclosureSelection>? = null, did: String? = null): PreparedPaymentConsent?

Resolves payment instructions for the chosen DC API credentials without signing.

Link copied to clipboard
suspend fun preparePaymentConsent(previewHandle: MobileWalletPresentationPreviewHandle, selectedCredentialOptions: List<MobileWalletPresentationCredentialSelection>, selectedDisclosureOptions: List<MobileWalletPresentationDisclosureSelection>? = null, did: String? = null): PreparedPaymentConsent?

Resolves authoritative payment instructions for the current credential/disclosure selection.

Link copied to clipboard
suspend fun present(requestUrl: String, did: String? = null, runPolicies: Boolean? = null): MobileWalletPresentationResult

Presents matching wallet credentials to an OpenID4VP verifier request.

Link copied to clipboard

Previews an ISO 18013-7 Annex C request without signing or releasing credentials.

Link copied to clipboard

Resolves an OS-mediated OpenID4VP request and returns consent metadata without releasing a credential. The caller-provided origin must already have been asserted by the platform adapter. For an unsigned request, the returned MobileWalletDigitalCredentialPreview.verifiedOrigin is the authenticated requester identity and MobileWalletDigitalCredentialRequestInfo.clientId remains null because the untrusted request-supplied client_id is ignored. For a signed request, MobileWalletDigitalCredentialRequestInfo.clientId is the authenticated Request Object client identifier after signature verification against clientIdTrustConfiguration. Unsigned (openid4vp-v1-unsigned) and signed (openid4vp-v1-signed) Digital Credentials requests are accepted. Multisigned is not.

Link copied to clipboard

Resolves and previews an OpenID4VP presentation request without submitting credentials. Protocol failures with a validated response destination are returned as MobileWalletPresentationPreviewResult.Invalid. Validation errors that cannot be answered safely throw id.waltid.openid4vp.wallet.UnsafePresentationErrorResponseException, preserving the protocol error and the separate response-safety failure. Resolution failures remain local exceptions.

Link copied to clipboard
suspend fun proximityPresentationCapabilities(configuration: ProximityConfiguration = ProximityConfiguration()): ProximityCapabilities

Checks the exact BLE roles selected by configuration without creating keys, UUIDs, listeners, scanners, or advertisers.

Link copied to clipboard

Synchronizes platform credential metadata to a minimal view of the current wallet state.

Link copied to clipboard

Rejects a reviewed presentation request and consumes its preview handle.

Link copied to clipboard
suspend fun resumeDeferredIssuance(deferredCredentialId: String): WalletIssuanceOutcome

Polls a typed deferred credential result returned by a previous issuance continuation.

Link copied to clipboard
suspend fun startIssuance(request: MobileWalletIssuanceRequest): WalletIssuanceBatchSession

Resolves an offer and starts a bound OpenID4VCI 1.0 issuance session.

Link copied to clipboard
suspend fun startProximityPresentation(configuration: ProximityConfiguration = ProximityConfiguration()): ProximitySession

Starts one single-use in-person presentation session.

Link copied to clipboard

Verifies the raw post-consent request, builds device authentication in KMP, and HPKE-encrypts the response.

Link copied to clipboard
suspend fun submitDigitalCredentialPresentation(requestId: String, selectedCredentialOptions: List<MobileWalletPresentationCredentialSelection>, selectedDisclosureOptions: List<MobileWalletPresentationDisclosureSelection>? = null, did: String? = null, paymentConsentRevision: String? = null): MobileWalletDigitalCredentialResponse

Builds a response for a retained Digital Credentials preview. No network transport is performed. Without paymentConsentRevision, the host is responsible for platform-confirmed payment consent. A supplied revision is checked against the prepared app review. Native SCA authorization applies to both paths.

Link copied to clipboard
suspend fun submitPresentation(previewHandle: MobileWalletPresentationPreviewHandle, selectedCredentialOptions: List<MobileWalletPresentationCredentialSelection>, selectedDisclosureOptions: List<MobileWalletPresentationDisclosureSelection>? = null, did: String? = null, runPolicies: Boolean? = null, paymentConsentRevision: String? = null): MobileWalletPresentationResult

Submits a presentation using the credential options selected by the user from previewPresentation.