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.

Functions

Link copied to clipboard

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

Link copied to clipboard
suspend fun beginAuthorizationIssuance(sessionId: String): WalletIssuanceAuthorization

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

Link copied to clipboard
suspend fun bootstrap(keyType: MobileWalletKeyType? = null, didMethod: String = "key", keyUseAuthorizationPolicy: KeyUseAuthorizationPolicy? = null): MobileWalletBootstrapResult

Initializes the wallet by creating or reusing wallet signing key material and a DID.

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): WalletIssuanceOutcome

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

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

Discards a reviewed presentation after local dismissal.

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

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

Link copied to clipboard

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

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.

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. Resolution or validation failures that cannot be answered safely remain local exceptions.

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): WalletIssuanceSession

Resolves an offer and starts a bound OpenID4VCI 1.0 issuance 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

Builds a response for a retained Digital Credentials preview. No network transport is performed.

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

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