Skip to main content
Version: v0.4.x

Indy SDK

Indy SDK provides a distributed ledger based foundation for self-sovereign identity. It can provide the Wallet and StorageService implementations for the agent, as well as a way to interact with Indy ledgers and an implementation of the legacy (v0.1) AnonCreds Specification

caution

The Indy SDK integration in Aries Framework JavaScript is currently in maintenance mode. We recommend new projects to use Aries Askar from the start, and also to migrate existing projects to Aries Askar.

caution

The AnonCreds implementation from the Indy SDK only supports the Hyperledger Indy Legacy AnonCreds Method (the pre-standardized implementation), and doesn't support the new Ledger Agnostic AnonCreds Specification (v1.0). Use the new AnonCreds Rust implementation, which is also supported by Aries Framework JavaScript, in combination with Aries Askar and Indy VDR to replace the bevhaviour of the Indy SDK, and support the new features these libraries have to offer.

Installing the Indy SDK

When using Aries Framework JavaScript with the Indy SDK, there's a few extra dependencies that need to be installed. We need to install the @aries-framework/indy-sdk package, which implements the needed interfaces for the agent. Secondly, we need to install the native Indy SDK library and the bindings for our specific platform. Currently there are bindings for Node.JS and React Native.

To start off, install the native Indy SDK library. The setup for this depends on the platform you are using. Follow the instructions for your platform below.

After the native Indy SDK library is installed, we can add the Indy SDK libraries.

yarn add @aries-framework/indy-sdk@^0.4.0 indy-sdk

And install the needed types

yarn add --dev @types/indy-sdk

Adding the Indy SDK to the Agent

After installing the dependencies, we can register the Indy SDK Module on the agent.

import { Agent } from '@aries-framework/core'
import { agentDependencies } from '@aries-framework/node'
import { IndySdkModule } from '@aries-framework/indy-sdk'
import indySdk from 'indy-sdk'

const agent = new Agent({
config,
dependencies: agentDependencies,
modules: {
// Register the Indy SDK module on the agent
indySdk: new IndySdkModule({
indySdk,
}),
},
})