AnonCredential

data class AnonCredential(val schemaID: String, val credentialDefinitionID: String, val values: Map<String, AnonCredential.Attribute>, val signatureJson: String, val signatureCorrectnessProofJson: String, val revocationRegistryId: String?, val revocationRegistryJson: String?, val witnessJson: String?, json: String) : Credential, ProvableCredential(source)

Represents an anonymous verifiable credential that contains information about an entity or identity.

This class implements the Credential interface and provides methods for converting the credential to a storable format and restoring it from a storable format.

Parameters

schemaID

The ID of the credential's schema.

credentialDefinitionID

The ID of the credential's definition.

values

The values of the attributes in the credential.

signatureJson

The JSON representation of the credential's signature.

signatureCorrectnessProofJson

The JSON representation of the credential's signature correctness proof.

revocationRegistryId

The ID of the credential's revocation registry (optional).

revocationRegistryJson

The JSON representation of the credential's revocation registry (optional).

witnessJson

The JSON representation of the credential's witness.

json

The JSON representation of the credential.

Constructors

Link copied to clipboard
constructor(schemaID: String, credentialDefinitionID: String, values: Map<String, AnonCredential.Attribute>, signatureJson: String, signatureCorrectnessProofJson: String, revocationRegistryId: String?, revocationRegistryJson: String?, witnessJson: String?, json: String)

Types

Link copied to clipboard
data class Attribute(val raw: String, val encoded: String)

Represents an attribute in a verifiable credential.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val claims: Array<Claim>
Link copied to clipboard
@SerialName(value = "cred_def_id")
val credentialDefinitionID: String
Link copied to clipboard
open override val id: String
Link copied to clipboard
open override val issuer: String
Link copied to clipboard
open override val properties: Map<String, Any>
Link copied to clipboard
@SerialName(value = "rev_reg_id")
val revocationRegistryId: String?
Link copied to clipboard
@SerialName(value = "rev_reg")
val revocationRegistryJson: String?
Link copied to clipboard
open override var revoked: Boolean?
Link copied to clipboard
@SerialName(value = "schema_id")
val schemaID: String
Link copied to clipboard
@SerialName(value = "signature_correctness_proof")
val signatureCorrectnessProofJson: String
Link copied to clipboard
@SerialName(value = "signature")
val signatureJson: String
Link copied to clipboard
open override val subject: String?
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "witness")
val witnessJson: String?

Functions

Link copied to clipboard
open suspend override fun presentation(request: ByteArray, options: List<CredentialOperationsOptions>): String
Link copied to clipboard

Converts the current credential object into a storable credential object.