WalletClient

interface WalletClient

Holder role. Obtains, holds, and presents credentials.

Works without any UI: every step is a call and an observable state. The ready-made screens are optional (the Compose library on Android, the view controllers in the iOS framework).

Functions

Link copied to clipboard
abstract fun credentials(): Flow<List<CredentialSummary>>

Credentials currently held, updated as they are added/refreshed/removed.

Link copied to clipboard
abstract suspend fun details(credentialId: String): CredentialDetail?

Full claims of a held credential (portrait + ISO data elements) for display, or null.

Link copied to clipboard
abstract suspend fun issueFromIssuer(credentialConfigurationId: String): SdkResult<CredentialSummary>

Obtain a credential directly from the configured issuer for a named credential config.

Link copied to clipboard
abstract suspend fun issueFromOffer(offerUri: String): SdkResult<CredentialSummary>

Obtain a credential from a scanned/deep-linked OpenID4VCI credential offer (openid-credential-offer://...). Supports the pre-authorized code flow (no tx_code).

Link copied to clipboard
abstract suspend fun prepareForSharing(credentialId: String): SdkResult<Unit>

Ask the configured com.wallet.config.ShareGuard whether this credential can ever pass its check (for a face check: does the credential's photo contain a usable face?). Call it right after the credential arrives so the holder can be warned early. Succeeds when no guard applies.

Link copied to clipboard
abstract suspend fun previewOffer(offerUri: String): SdkResult<OfferPreview>

Describe a scanned OpenID4VCI credential offer (issuer + credential display names) so the holder can confirm before accepting. Read-only: the offer's one-time code is NOT redeemed.

Link copied to clipboard
abstract fun startPresentment(credentialId: String? = null): PresentmentSession

Begin presenting over proximity. The returned session drives engagement (QR; NFC tap on Android), the reader's request, consent/selective disclosure, and the BLE transfer.