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
  • Prerequisites
  • Cargo install
  • Manual
  • Container

Was this helpful?

  1. Verifiable Digital Credentials
  2. DIDKit

Installation

Installing DIDKit

PreviousDIDKitNextCore Concepts

Last updated 7 months ago

Was this helpful?

DIDKit can be installed as a package via , from source, or in form.

Prerequisites

  • Any major GNU/Linux distribution, including MacOS or Microsoft's

DIDKit is written in . To get Rust, you can use .

We do not depend on any Rust nightly features, so our installation instructions assume the most recent stable version; be sure to to nightly if the calling application or forked source code does depend on them.

Cargo install

  1. To install the DIDKit command line program on GNU/Linux, MacOS, or Windows+WSL, first install .

  2. Install libssl-dev, as well as pkg-config,build-essential, or equivalent core toolsets if they aren't already installed.

  3. Then simply run cargo install for the given target package: didkit-cli

For example, for DIDKit CLI, run:

cargo install didkit-cli

This will add the binary DIDKit to your Cargo installation (typically ~/.cargo/bin), which can be added to your system's PATH for ease of use.

Manual

git clone https://github.com/spruceid/didkit
cd didkit
cargo build

This will give you the DIDKit CLI executable located at target/debug/didkit

git clone https://github.com/spruceid/didkit-http
cd didkit-http/
cargo run
Listening on 127.0.0.1:3000

You can configure your didkit-http server by editing the defaults.toml file.

Container

Both the CLI and HTTP server are containerised and available under ghcr.io/spruceid/didkit-(cli|http).

docker login ghcr.io -u USERNAME --password-stdin

You can use the images like CLIs:

docker run ghcr.io/spruceid/didkit-cli:latest --help
docker run --init -p 8080 ghcr.io/spruceid/didkit-http:latest --port 8080

Note: You can pass JWKs either by sharing a volume with docker run --volume, or by passing the JWK directly with docker run -e JWK=$MY_JWK or docker run didkit-http --jwk $MY_JWK.

Build Images

After you have made sure ssi is present in the root of didkit, then the images can be built with:

docker build -f Dockerfile-cli . -t didkit-cli
docker build -f Dockerfile-http . -t didkit-http

And to use them, replace ghcr.io/spruceid/didkit-(cli|http):latest with didkit-(cli|http).

Building Interfaces

While many of the DIDKit interfaces can be installed as libraries via each language's dedicated package manager, they can also be built manually. For instructions, see the "Installation" section of each interface's dedicated page in the section to the left.

Build DIDKit using , from root directory of DIDKit project:

DIDKit also offers a didkit-powered HTTP server for internal or external use, depending on your context in a separate crate. For comprehensive documentation of the HTTP commands and configuration options, see , and for a more skimmable overview, see the HTTP server.

You can also build and install DIDKit's components separately. Building the FFI libraries will require additional dependencies. See the for more info.

The image is private for now, so a is required. Once created you can login like so:

The Dockerfiles rely on having in the root of didkit (a symbolic link will not work, unfortunately).

⚙️
cargo
manually
containerized
WSL2
Stable Rust
Rust
Rustup
switch the installation defaults
cargo
Cargo
GitHub
corresponding documentation for each package
Personal Access Token
ssi