Package-level declarations

The ready-made screens, their branding (WalletBrand, WalletBranding, CardFace) and the shared result screens (WalletResults, PresentmentResultOverlay).

The ready-made screens, their branding (WalletBrand, WalletBranding, CardFace) and the shared result screens (WalletResults, PresentmentResultOverlay).

Types

Link copied to clipboard
class BrandFont(val name: String, val bytes: ByteArray, val weight: FontWeight = FontWeight.Normal)

One face of a brand typeface: TTF/OTF bytes and the weight they represent.

Link copied to clipboard

The drawing surface handed to a CardFace: plain Compose drawing (scope) plus text helpers, so faces can lay out text without platform code. Sizes are in card pixels (1024×646).

Link copied to clipboard
fun interface CardFace

Draws one credential type's card face (1024×646, ID-1 ratio). Apps register faces per doctype in WalletBranding.cardFaces (usually via WalletBrand); doctypes without one get the SDK's neutral face. The stored image is what the wallet, consent sheets and the iOS Digital Credentials sheet show.

Link copied to clipboard
data class CardFaceData(val docType: String, val displayName: String?, val typeDisplayName: String?, val fields: Map<String, String>, val dates: Map<String, LocalDate>, val portrait: ByteArray?)

What a CardFace draws from: the credential's values, already rendered as text.

Link copied to clipboard

The outcome shown on the one shared result surface, used by BOTH the wallet's presentment result and the verifier's verdict so they look like the same product. WARNING is the verifier's amber "authentic, but a check (revocation) could not be completed" state.

Link copied to clipboard
data class ResultView(val outcome: PresentmentOutcome, val title: String, val detail: String? = null)

What a result screen shows: the animated badge, a title and an optional line under it.

Link copied to clipboard
interface WalletBrand

Everything brand-specific about an app built on the SDK, in one place — so re-branding is one switch. Implement it once in your app (one object holding your brand) and call use at startup, before any wallet screen shows. The SDK itself stays brand-neutral.

Link copied to clipboard

The wallet UI's brand settings: the app's name, the brand typeface, each credential's card face and the app's own credential types. Apps normally set all of it at once with WalletBrand.use.

Link copied to clipboard
abstract class WalletDcApiPresentmentActivity : CredentialManagerPresentmentActivity

Presents over the W3C Digital Credentials API on Android: a browser calls navigator.credentials.get({ digital: … }), the user picks this wallet in the system sheet, and Credential Manager launches this activity. The SDK runs the exchange; this wires it to the wallet's store, branding and reader trust.

Link copied to clipboard

The ONE place that decides how every presentment outcome looks and reads — shared, cancelled, no matching card, identity check failed, error — on every path (in person, website, same device) and both platforms. Screens never spell out their own result text; they ask here.

Link copied to clipboard
abstract class WalletUriPresentmentActivity : UriSchemePresentmentActivity

Online presentment for a presentation request link — OpenID4VP by reference (openid4vp://, …) or ISO 18013-7 (mdoc://), e.g. a website's "share with wallet" button or a scanned QR (see com.wallet.ScannedCode). The SDK runs the flow (fetch + verify the request, consent, respond); this wires it to the wallet's store, branding and reader trust.

Properties

Link copied to clipboard

Default card text colours (dark ink, muted label).

Link copied to clipboard

Functions

Link copied to clipboard
fun AppHeader(title: String, modifier: Modifier = Modifier)

The one app title used across every screen and app — the Wallet home, the Verify reader, and any future reader (e.g. the Android NFC reader) — on both Android and iOS. Living in commonMain and being shared is exactly what keeps the top-left title identical everywhere. The connectivity state is a separate full-width ConnectivityBar pinned above this.

Link copied to clipboard
fun ConnectivityBar(modifier: Modifier = Modifier, online: Boolean = rememberOnlineState())

A slim full-width status line pinned at the very top of a screen (above the title), reading Offline (amber) or Online (green) from the device's real network state. Shared across the Wallet, the Verify reader and any future reader, on Android and iOS — so the operator always knows the mode, which matters here because revocation can only be established online (see the verifier's status row). Render it edge-to-edge, outside the content gutter.

Link copied to clipboard
fun CredentialOfferSheet(sdk: WalletSdk, offerUri: String, onDone: (added: Boolean) -> Unit)

Accept a scanned/deep-linked OpenID4VCI credential offer in one sheet over the wallet:

Link copied to clipboard

True if scanned is an OpenID4VCI credential offer (openid-credential-offer://…).

Link copied to clipboard

Full screen brightness (and no auto-lock) while in composition, restored on dispose — so a verifier's camera reads the engagement QR reliably.

Link copied to clipboard
fun PermissionSetup(camera: Boolean, bluetooth: Boolean, required: Boolean = false, onShowing: (Boolean) -> Unit = {}, content: @Composable () -> Unit)

First-run permissions without an extra step: on first open the system dialogs appear straight away, one after another (rememberSetupPermissionRequest: one combined request on Android, chained on iOS), over the app's own first screen — which doesn't change behind them. Most people just allow and carry on.

Link copied to clipboard
actual fun PlatformBackHandler(enabled: Boolean, onBack: () -> Unit)
expect fun PlatformBackHandler(enabled: Boolean, onBack: () -> Unit)

System back (Android back gesture/button) while enabled; a no-op on iOS, which has no system back.

Link copied to clipboard

The result glyph. APPROVED uses the exact Lottie "info was shared" success animation the SDK plays in the online presentment (so proximity and online look identical); CANCELLED = neutral slate ✕, ERROR = red ✕.

Link copied to clipboard
fun PresentmentResultContent(view: ResultView, modifier: Modifier = Modifier, action: @Composable () -> Unit? = null)
fun PresentmentResultContent(outcome: PresentmentOutcome, title: String, detail: String, modifier: Modifier = Modifier, action: @Composable () -> Unit? = null)

The ONE result surface used across ALL presentment flows — offline proximity present and the online openid4vp:// share — so "shared", "cancelled" and "error" look identical everywhere. Renders a badge + title + detail and an optional action (e.g. a Done button). The caller supplies the container (a full-screen column, or a modal card over a scrim).

Link copied to clipboard
fun PresentmentResultOverlay(view: ResultView, detail: String? = view.detail, autoDismissMillis: Long? = 2200, onDismiss: () -> Unit)
fun PresentmentResultOverlay(outcome: PresentmentOutcome, title: String, detail: String? = null, autoDismissMillis: Long? = 2200, onDismiss: () -> Unit)

The presentment result shown as a full-screen overlay (a dimmed scrim + a centred white card with the badge/animation), the same modal the wallet uses for "The info was shared". Tap anywhere to dismiss. Used by the verifier when a verification completes and by the wallet after a share, so the success animation pops as an overlay everywhere instead of being embedded in a page.

Link copied to clipboard
fun ProximityPresentScreen(sdk: WalletSdk, credentialId: String? = null, onClose: () -> Unit)

In-person (ISO 18013-5 QR + BLE) presentment, driven headlessly by the SDK's com.wallet.clients.WalletClient.startPresentment: Bluetooth gates → engagement QR for the verifier to scan → consent (the SDK's consent sheet, hosted by the app) → the shared result overlay: the same wording as the Android presentment screen: green "The info was shared", grey "Cancelled" (holder declined), red "Something went wrong" (or "None of your cards match this request").

Link copied to clipboard

Live connectivity via ConnectivityManager. Requires ACCESS_NETWORK_STATE (declared in each app's manifest). Reports online only when the active network has validated internet, so captive portals / "connected but no internet" read as offline.

Whether the device currently has usable internet, tracked live. Platform actuals use ConnectivityManager (Android) and NWPathMonitor (iOS). Defaults toward "offline" when the state can't be determined — honest for an offline-first proximity flow.

Link copied to clipboard
fun WalletActionPill(onScan: () -> Unit, onPresent: () -> Unit, modifier: Modifier = Modifier)

The wallet home's single action pill, split in two: SCAN (read a QR — credential offer or a verifier's request) and PRESENT (show an in-person engagement QR; the verifier's request picks which card is shared). Presenting isn't tied to a card, so it lives here rather than on each card.

Link copied to clipboard
fun WalletPresentScreen(sdk: WalletSdk, credentialId: String? = null, modifier: Modifier = Modifier, onClose: () -> Unit = {})

Holder "Present in person" screen — offline ISO 18013-5 proximity over BLE.

Link copied to clipboard

Hosts the SDK's consent sheet (and passphrase prompt) for the wallet. Place it once, last, at the root of the wallet UI so it draws over every screen. The SDK's own screens (WalletViewController, WalletScreen) already host it.

Link copied to clipboard
fun WalletScanScreen(onScanned: (String) -> Unit, onClose: () -> Unit, modifier: Modifier = Modifier)

Holder-side scan screen. The user scans either a verifier's request QR (e.g. a website's "share with wallet" code → presentment) or an issuer's credential offer QR (openid-credential-offer://… → add to wallet); onScanned fires once with the decoded string and the host routes it (see isCredentialOffer). Camera permission is asked for inside.

Link copied to clipboard
fun WalletScreen(sdk: WalletSdk, modifier: Modifier = Modifier, onCardOpen: (Boolean) -> Unit = {}, bottomPadding: Dp = 96.dp)

The wallet home: every credential the holder has, as a stack of cards. Tap a card to open it (it rises to the top and its fields are listed below it); tap it again to go back. Cards can be long-pressed and dragged to reorder, and the order is saved. Expired and revoked cards carry a badge.

Link copied to clipboard
fun WalletVerifyScreen(sdk: WalletSdk, modifier: Modifier = Modifier, presets: List<RequestPreset> = RequestPresets.mdl, title: String = "Verify")

The in-person verifier: pick a check, scan the holder's QR, read and verify the credential over Bluetooth (com.wallet.clients.VerifierClient), show the result. Built for staff checking IDs at a counter or a door: a clear valid / not valid banner, a large photo to compare with the person, the fields shared and the security checks. Works offline: issuers are checked against the trusted issuers your app configured (TrustedIssuers). Camera and Bluetooth permissions are handled inside.