SpruceKit
SpruceID
  • 🌲SpruceKit Introduction
    • Decentralized Identity Overview
    • Glossary
  • ⚡Quickstart
  • SpruceKit Mobile
    • SpruceKit Showcase App
      • Installation
      • Getting Started
      • Issue a Showcase Credential
      • Present a Showcase Credential
    • SpruceKit Mobile SDK
      • Introduction
      • Core Components
        • StorageManager
        • KeyManager
        • CredentialPack
        • Card
        • IsoMdlPresentation
        • mDocReader/IsomDLReader
        • Document Scanner
      • SpruceKit iOS SDK
        • Installation
        • Build a Wallet
          • Accept a W3C VC
          • Present a W3C VC
          • Present mDL in-person/offline
          • Present an mDL over the internet
        • Build a Verifier
          • Verify a W3C VC
          • Verify an mDL in-person/offline
          • Verify an mDL over the internet
      • SpruceKit Android SDK
        • Installation
        • Build a Wallet
          • Accept a W3C VC
          • Present a W3C VC
          • Present an mDL in-person/offline
          • Present an mDL over the internet
        • Build a Verifier
          • Verify a W3C VC
          • Verify an mDL in-person/offline
          • Verify an mDL over the internet
  • Verifiable Digital Credentials
    • ⚙️DIDKit
      • Installation
      • Core Concepts
      • DID Methods
      • Runtime Configuration
      • Specifications and Dependencies
      • Quickstart
      • DIDKit Packages
        • Command Line Interface
        • HTTP Server
        • Rust Crate
        • C Interface
        • Java and Android
        • Python
        • Javascript
      • DIDKit Examples
        • Core Functions (CLI)
        • Core Functions (HTTP)
        • did-web in minutes
        • Batch Generation & Verification
    • 🪪ISO mDL
      • Quickstart
      • Core Concepts
      • User Guide
  • Schema Definition Language
    • 🔗TreeLDR
      • TreeLDR Quickstart
        • First Schema
        • Compilation into JSON Schema
        • Compilation into JSON-LD Context
        • Writing a Layout
        • Simple Rust Integration
      • Types
        • Literal Types
      • Layouts
        • Primitive Layouts
        • Literal Layouts
        • Enumeration
        • Array Layout
        • References
      • Compiling
        • Schema Definition Formats
          • JSON Schema
          • JSON-LD Context
          • Resource Description Framework (RDF)
        • Programming Languages
          • Compiling to Rust
      • RDF Vocabulary
      • 💡TreeLDR Basics
        • Types and Layouts
        • Properties
        • Syntax
  • Witness for Credential Claims
    • 🔭Rebase
      • Core Library
      • Rust Client/Witness SDK
      • WASM Client SDK
      • Simple "Basic Post" Schema
      • DNS Witness Flow Schema
  • References
    • Contributing
    • Code of Conduct
Powered by GitBook
On this page

Was this helpful?

  1. SpruceKit Mobile
  2. SpruceKit Mobile SDK
  3. Core Components

CredentialPack

A CredentialPack is a semantic grouping of Credentials for display in the wallet.

PreviousKeyManagerNextCard

Last updated 4 months ago

Was this helpful?

The CredentialPack (for and ) 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>)
)
import SpruceIDMobileSdk
import SpruceIDMobileSdkRs 

val credentialPack = CredentialPack()
_ = try credentialPack.addJsonVc(
    jsonVc: JsonVc.newFromJson(utf8JsonString: <credential>)
)

iOS
Android