WalletDocumentManager

High-level document manager API exposed by the SDK.

This facade hides all EUDI wallet internals and exposes a stable, app-friendly interface for:

  • listing stored credentials

  • retrieving specific documents

  • deleting documents

  • creating unsigned SD-JWT VC documents (during OpenID4VCI issuance)

  • storing issued SD-JWT VCs into the wallet

  • enriching issued documents with optional VCT metadata and rendering bundles

All returned values are wrapped in stable SDK types (IssuedDocumentHandle, UnsignedDocumentHandle).

Applications never interact with EUDI types directly.

Functions

Link copied to clipboard
abstract suspend fun createSdJwtDocument(vct: String, settings: WalletCreateDocumentSettings = WalletCreateDocumentSettings()): UnsignedDocumentHandle

Creates a new unsigned SD-JWT VC document, ready to be issued to.

Link copied to clipboard
abstract suspend fun createSdJwtPackDocument(vct: String, settings: WalletCreateDocumentSettings = WalletCreateDocumentSettings(), numberOfCredentials: Int = 30): UnsignedDocumentHandle
Link copied to clipboard
abstract suspend fun deleteAllTransactionLogs()

Removes all persisted transaction events.

Link copied to clipboard
abstract suspend fun deleteDocument(id: String): Boolean

Deletes a document from the wallet.

Link copied to clipboard
abstract suspend fun deleteTransactionLog(id: String): Boolean

Removes a single persisted event by WalletTransactionEvent.id.

Link copied to clipboard
abstract suspend fun getDocument(id: String): IssuedDocumentHandle?

Retrieves a specific document by its internal wallet id.

Link copied to clipboard
abstract suspend fun listDocuments(): List<IssuedDocumentHandle>

Returns all documents currently stored in the wallet.

Link copied to clipboard

Returns all persisted transaction events (issuance, presentation, signing, deletion), newest-first.

Link copied to clipboard
abstract suspend fun purgeSpentOneTimeUseCredentials(): Int

Deletes OneTimeUse credentials that were already consumed (usageCount > 0) but never finalized — e.g. when the app was killed before PresentationCredential.finalizeSession() could run. Safe to call on startup; it never touches unused credentials or RotateUse documents.

Link copied to clipboard
abstract suspend fun sendAndStore(accessToken: String, requests: List<CredentialIssuanceRequest>, authenticate: suspend () -> Boolean): List<IssuedDocumentHandle>

Issues multiple credential types in a single operation under one user-verification prompt.

abstract suspend fun sendAndStore(accessToken: String, vct: String, batchSize: Int = 1, settings: WalletCreateDocumentSettings = WalletCreateDocumentSettings()): IssuedDocumentHandle

Runs issuance end-to-end and stores the resulting credential in the wallet.

Link copied to clipboard
abstract suspend fun storeIssuedDocument(unsignedDocument: UnsignedDocumentHandle, rawSdJwtVcs: List<String>): IssuedDocumentHandle

Stores a newly issued SD-JWT VC into a previously created unsigned document.