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 suspend fun addSampleCredential(type: CredentialType, values: Map<String, String>, portrait: ByteArray?): SdkResult<CredentialSummary>

Add a sample credential of one of your own document types (a national ID card, a membership card), signed by the SDK's sample issuer like addSampleMdl.

Link copied to clipboard
abstract suspend fun addSampleMdl(): SdkResult<CredentialSummary>

Add a sample mobile driving licence (ISO 18013-5 mDL) with a fictional holder, so the wallet has a card to show and share before your issuer is live.

abstract suspend fun addSampleMdl(sample: SampleMdl): SdkResult<CredentialSummary>

Add a sample mobile driving licence with your own holder: names, date of birth, licence number, issuer and photo (see SampleMdl); anything left null keeps the built-in sample value.

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 suspend fun removeAllCredentials(): SdkResult<Unit>

Remove every held credential (a sign-out, a demo reset). credentials then emits an empty list.

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

Remove a held credential: it leaves credentials and can no longer be presented. Fails with com.wallet.model.SdkError.Kind.UNKNOWN when no credential has this id.

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.