Remote Presentation
High–level helper for handling remote OpenID4VP presentations using the EUDI wallet.
This class takes care of the entire remote presentation flow:
Parse and resolve an OpenID4VP request from a scanned QR code.
Extract the PresentationDefinition and requested claims.
Match requested claims against credentials stored in the wallet.
Ask the user for consent (askConsent) for the exact attributes that will be shared.
Trigger device / biometric authentication (authenticate) using a BiometricPrompt.CryptoObject.
Build an SD-JWT based VerifiablePresentation.
Dispatch the VP back to the verifier and report success or failure.
Design goals:
The public API is SDK-centric: the app only sees WalletHandle, ConsentPromptData, and RemotePresentationError. All
eu.europa.ec.eudi.*types remain internal to the SDK.The class is UI-agnostic: the host app provides lambdas for consent and authentication.
Errors are normalized into RemotePresentationError via RemotePresentationException, so the app can map them to stable UX / error screens.
Typical usage:
val walletHandle = WalletSdk.createWallet(context, options)
val remotePresentation = RemotePresentation(walletHandle, context)
remotePresentation.handle(
qrCodeData = scannedQrString,
askConsent = { consentPrompt ->
// Show your own dialog / screen using consentPrompt
// Return true if user approves, false otherwise
},
authenticate = { cryptoObject, onAuthenticated ->
// Wrap BiometricPrompt usage and call onAuthenticated(cryptoObject) on success
// Return true if auth finished successfully, false if cancelled/failed
},
onSuccess = {
// Called when the verifier accepts the authorization response
}
)Parameters
WalletHandle produced by com.dewa.walletsdk.WalletSdk.createWallet.
Android Context, used for localization and string resources.
VpApiClient, used for handling calls for localized consent text.
Properties
Functions
Main entry point for handling a remote OpenID4VP presentation from a QR code.