The Decentralized Identity Cloud Agent SDK provides a set of Typescript APIs enabling applications to implement decentralized identity functionality. Decentralized Identity Cloud Agent SDK is based around Anonyomes fork of Hyperledger Aries Cloud Agent Python.
Typescript SDK wrappers to access all the functionality provided by Anonyomes fork of Hyperledger Aries Cloud Agent Python.
Quickly setup and takedown a local Decentralized Identity development environment using docker-compose (currently only MacOS). There are currently two playground modes supported :
This mode creates the following local docker environment
This mode is intended to allow local controller development of more complex scenarios. In this scenario, ledger transactions are created by an Author agent which are automatically forwarded to an Endorser for signing before being written to a Ledger (ie. Authors and Endorsers have different Ledger permissions through their DID). This playground mode allows development of both Author and Endorser controllers by creating the following local docker environment
To use the Decentralized Identity Cloud Agent SDK in a Web or Node.js project you
@sudoplatform-labs/sudo-di-cloud-agent as a dependency to your project.
yarn add '@sudoplatform-labs/sudo-di-cloud-agent'
npm install --save '@sudoplatform-labs/sudo-di-cloud-agent'
You will need to have docker desktop installed on your machine to run the ledger, agent, mockserver and tails file server, images.
NOTE: Make sure
Use Docker Compose V2 is set in the Docker Desktop preferences since the container naming scheme is different between Docker Compose V1 and V2.
To create and destroy a local standalone agent development environment (currently MacOS only), run the di-env utility.
yarn di-env up -s <your 32 character standalone agent secret wallet seed>
yarn di-env down
Other options can be seen with
You must specify the 32 byte secret seed used to create the wallet on the
up command or in a
acapy.conf configuration file. Since the seed should never be exposed to the public, a default is never provided by
yarn global add create-react-app
yarn add @sudoplatform-labs/sudo-di-cloud-agent
cp node_modules/@sudoplatform-labs/sudo-di-cloud-agent/bin/acapy.json <your apps root location>
"endorserSeed": “<32 byte seed>”,
yarn di-env up -c <absolute path to acapy.json>
yarn di-env up command has completed :
endorserAcapyAdminUrifield location specified in the
acapy.jsonconfig file (e.g. http://localhost:8201)
yarn di-env logs
yarn di-env up command has completed :
di-env upcommand. The absolute path for a custom initialisation file can be specifed either using the
acapy.jsonor via the
-mswitch to the
di-env upcommand. If neither is specified a default initialisation is used.
ngrok http <acapy.json "endorserAcapyInboundPort" value >
yarn di-env up -e <ngrok provided public endpoint> -c <absolute path to acapy.json>
IMPORTANT : When using a public test ledger, information written is persistent and immutable. Personally Identifiable Information (PII) MUST NOT be written and is a major reason why the Transaction Authors Agreement (TAA) must be signed in the acceptance/setup process. It is recommended that as much development activity as possible is performed with the local VON Ledger before using a Public ledger.
di-env up -l -c <absolute path to acapy.json> -g <url to genesis file for ledger>
textfield from the output returned by the following command
curl -X GET "http://localhost:8201/ledger/taa" -H "accept: application/json"
mechanismvalue returned from step 4 in the
taa_record-> textfield EXACTLY as returned in step 4 (i.e. this will have a
\ufeffvalue at the beginning which is not captured if you use the swagger ui in step 4 and will fail later when you try and write something to the ledger)
taa_record->versionfield returned in step 4 (e.g. currently 2.0)
The Decentralized Identity Cloud Agent SDK installs local typedoc
generated, HTML documentation. This will be located in the
@sudoplatform-labs/sudo-di-cloud-agent/docs directory under the
node_modules install location. The latest version of
documentation can also be found online at Github
File any issues you find on the project's GitHub repository. Be careful not to share any Personally Identifiable Information (PII) or sensitive account information (API keys, credentials, etc.) when reporting an issue.
For general inquiries related to the Sudo Platform, please contact email@example.com
Generated using TypeDoc