addSampleCredential

abstract suspend fun addSampleCredential(type: CredentialType, values: Map<String, String>, portrait: ByteArray?): SdkResult<CredentialSummary>

Add a sample credential of one of your own document types (a national ID card, a membership card), signed by the SDK's sample issuer like addSampleMdl.

Parameters

type

the document type, as registered in com.wallet.config.SdkConfig.credentialTypes.

values

the data elements, element id → value as text. Each value is stored as the element's com.wallet.model.AttributeKind: dates as YYYY-MM-DD, date-times in ISO 8601, numbers and sex codes as digits, booleans as true/false. An id the type doesn't declare, or a value that doesn't parse, fails with com.wallet.model.SdkError.Kind.PARSE and nothing is added.

portrait

the holder's photo as JPEG bytes, stored in the type's portrait element (or its first picture element). Null: no photo.