Package-level declarations

What goes in and comes out: requests and presets, results, credential summaries and details, document types, and SdkResult / SdkError.

Types

Link copied to clipboard
data class AcceptanceResult(val decision: AcceptanceDecision, val signatureValid: Boolean, val issuerTrusted: Boolean, val withinValidityWindow: Boolean, val revocation: RevocationState, val revocationDataStale: Boolean, val disclosedClaims: Map<String, String>, val portrait: ByteArray? = null, val reason: String? = null, val revocationCheckedAt: Instant? = null, val issuerName: String? = null, val revocationPublished: Boolean = true)

The single composed verdict a verifier acts on.

Link copied to clipboard

The value type of a CredentialAttribute. Sex is an ISO/IEC 5218 code (0 unknown, 1 male, 2 female, 9 not applicable) rendered as words.

Link copied to clipboard
data class Capabilities(val walletPresentQr: Boolean, val walletPresentNfc: Boolean, val verifierScanQr: Boolean, val verifierScanNfc: Boolean, val bleTransfer: Boolean)

What this platform/build supports. iOS asymmetry lives here (wallet cannot present over NFC).

Link copied to clipboard
data class ClaimView(val elementId: String, val label: String, val value: String)

One displayable claim: the ISO data-element id, its label, and a rendered value.

Link copied to clipboard
data class CredentialAttribute(val id: String, val label: String, val kind: AttributeKind, val description: String = label, val mandatory: Boolean = false, val icon: String? = null, val expiredBadge: String? = null)

A data element of a CredentialType.

Link copied to clipboard
class CredentialDetail(val id: String, val displayName: String, val docType: String, val portrait: ByteArray?, val claims: List<ClaimView>)

A held credential's claims, for display in the wallet (holder side).

Link copied to clipboard

Credential formats supported in v1.

Link copied to clipboard
data class CredentialNamespace(val id: String, val attributes: List<CredentialAttribute>)

One mdoc namespace of a CredentialType and the data elements in it.

Link copied to clipboard
data class CredentialSummary(val id: String, val format: CredentialFormat, val docType: String, val displayName: String, val validFrom: Long?, val validUntil: Long?)

A held credential, summarized for listing (no sensitive claim values).

Link copied to clipboard
data class CredentialType(val docType: String, val displayName: String, val namespaces: List<CredentialNamespace>)

An app-supplied mdoc credential type, so the SDK can label, render and request documents it doesn't ship with (the ISO 18013-5 mDL is built in). Register via com.wallet.config.SdkConfig.credentialTypes.

Link copied to clipboard
object DocTypes

Document types the SDK knows out of the box. Apps add their own via CredentialType.

Link copied to clipboard
data class OfferPreview(val issuerName: String, val issuerUrl: String, val credentialName: String, val docType: String?)

What a scanned credential offer is for, shown before the holder accepts it (nothing is redeemed).

Link copied to clipboard
data class PresentationRequest(val docType: String, val attributes: Set<String> = emptySet(), val namespaces: Map<String, Set<String>> = emptyMap())

What a verifier asks for.

Link copied to clipboard
sealed interface PresentmentState
Link copied to clipboard
sealed interface PresetAnswer

How a verifier shows a RequestPreset's result.

Link copied to clipboard
data class RequestPreset(val id: String, val section: String, val title: String, val subtitle: String, val request: PresentationRequest, val answer: PresetAnswer = PresetAnswer.Details, val symbol: String = "ID")

A fixed, named request a verifier operator can pick (e.g. "Age over 18").

Link copied to clipboard

The built-in verifier presets for the ISO 18013-5 mDL: an age check and a licence check. Apps add their own (for their own CredentialTypes) and pass the list to the verifier screen. Every element is requested with intent-to-retain = false (data minimisation).

Link copied to clipboard

Revocation status of a presented credential. Suspension applies to SD-JWT VC only (mDL is 1-bit).

Link copied to clipboard
data class SdkError(val kind: SdkError.Kind, val message: String, val cause: Throwable? = null)

Typed error surface.

Link copied to clipboard
sealed interface SdkResult<out T>

Result wrapper for suspend calls that can fail without throwing.

Link copied to clipboard

Proximity engagement/transport the user can pick to start a session.

Link copied to clipboard
sealed interface VerificationState