Installation
Credo is distributed as multiple npm packages. This guide covers how to install and configure Credo for your platform.Package overview
Credo consists of a core package, platform-specific packages, and optional module packages:Core packages
@credo-ts/core
The main framework package (required)
@credo-ts/node
Node.js platform dependencies
@credo-ts/react-native
React Native platform dependencies
@credo-ts/askar
Secure storage implementation (required)
Module packages
@credo-ts/openid4vc
OpenID for Verifiable Credentials
@credo-ts/anoncreds
AnonCreds credential format
@credo-ts/didcomm
DIDComm messaging protocol
@credo-ts/indy-vdr
Indy ledger integration
@credo-ts/cheqd
Cheqd DID method and AnonCreds
@credo-ts/hedera
Hedera DID method and AnonCreds
@credo-ts/tenants
Multi-tenant support
@credo-ts/action-menu
Action menu protocol
@credo-ts/question-answer
Question-answer protocol
@credo-ts/drpc
Distributed RPC
Node.js installation
Prerequisites
Node.js 20.19 or higher is required
Basic installation
Install the core packages for a basic Node.js agent:With DIDComm support
To enable DIDComm messaging, add the DIDComm module:With AnonCreds support
To work with AnonCreds credentials:With OpenID4VC support
To use OpenID for Verifiable Credentials:React Native installation
Prerequisites
React Native 0.71.4 or higher is required
Required dependencies
Install the core packages for React Native:Platform-specific Askar
For React Native, you need the platform-specific Askar package:Setup polyfills
Add this to the top of your app entry file (e.g.,index.js):
index.js
The
react-native-get-random-values polyfill must be imported before any Credo imports.Storage options
Credo requires a storage module for secure key and data management. The recommended option is Askar:Askar (recommended)
Askar (recommended)
Askar provides secure, encrypted storage for keys and data.For Node.js:For React Native:Configure in your agent:
Drizzle Storage (alternative)
Drizzle Storage (alternative)
An alternative storage implementation using Drizzle ORM.
Peer dependencies
Some packages have peer dependencies that must be installed:AnonCreds
When using@credo-ts/anoncreds:
Askar
When using@credo-ts/askar:
Indy VDR
When using@credo-ts/indy-vdr:
TypeScript configuration
Credo requires the following TypeScript compiler options:tsconfig.json
The
experimentalDecorators and emitDecoratorMetadata options are required for dependency injection to work correctly.Version compatibility
All Credo packages should use the same version. For example:package.json
Next steps
Now that you have Credo installed, follow the quickstart guide to create your first agent:Quickstart
Build your first Credo agent