CredentialPack
A CredentialPack is a semantic grouping of Credentials for display in the wallet.
The CredentialPack (for iOS and Android) could represent:
Multiple copies of the same credential (for one-time use)
Different encodings of the same credential (e.g. JwtVC & JsonVC)
Multiple instances of the same credential type (vehicle title credentials for more than 1 vehicle).
The CredentialPack has an API that allows you to add and remove credentials from the CredentialPack, get credentials from the CredentialPack and search for claims within a CredentialPack among others. You can use the CredentialPack to group credentials in a manner fitting to your use case.
import SpruceIDMobileSdk
import SpruceIDMobileSdkRs
// Add a credential to a credentialpack
let credentialPack = CredentialPack()
_ = try credentialPack.addJsonVc(
jsonVc: JsonVc.newFromJson(utf8JsonString: <credential>)
)
Last updated
Was this helpful?