CredentialPresentation

Credential presentation capabilities.

Optional interface for wallets that can create presentations from stored credentials.

Example Usage:

val wallet: Wallet = createWallet()

if (wallet is CredentialPresentation) {
// Create presentation
val presentation = wallet.createPresentation(
credentialIds = listOf("cred1", "cred2"),
holderDid = "did:key:holder",
options = proofOptions {
challenge = "random-nonce"
}
)

// Create selective disclosure
val selective = wallet.createSelectiveDisclosure(
credentialIds = listOf("cred1"),
disclosedFields = listOf("name", "email"),
holderDid = "did:key:holder",
options = proofOptions { ... }
)
}

Functions

Link copied to clipboard
abstract suspend fun createPresentation(credentialIds: List<String>, holderDid: String, options: ProofOptions): VerifiablePresentation

Create a verifiable presentation from stored credentials.

Link copied to clipboard
abstract suspend fun createSelectiveDisclosure(credentialIds: List<String>, disclosedFields: List<String>, holderDid: String, options: ProofOptions): VerifiablePresentation

Create a selective disclosure presentation.