Search…
⌃K

Integrate the Cloud Agent SDK

Integrate the Decentralized Identity Cloud Agent SDK into your application

Integrate the JS SDK

Add @sudoplatform-labs/sudo-di-cloud-agent as a dependency to your project.
yarn add '@sudoplatform-labs/sudo-di-cloud-agent'
# or
npm install --save '@sudoplatform-labs/sudo-di-cloud-agent'
To instantiate a client in your application, add the following:
TypeScript
import {
WalletApi,
LedgerApi,
ConnectionApi,
CredentialDefinitionApi,
CredentialsApi,
IntroductionApi,
IssueCredentialApi,
SchemaApi,
PresentProofApi,
TrustpingApi,
RevocationApi,
Configuration,
} from '@sudoplatform-labs/sudo-di-cloud-agent';
// See Cloud Agent SDK docs
const cloudAgentAPIs: CloudAgentAPI = {
wallet: new WalletApi(cloudAgentConfiguration),
ledger: new LedgerApi(cloudAgentConfiguration),
introductions: new IntroductionApi(cloudAgentConfiguration),
connections: new ConnectionApi(cloudAgentConfiguration),
ping: new TrustpingApi(cloudAgentConfiguration),
defineSchemas: new SchemaApi(cloudAgentConfiguration),
defineCredentials: new CredentialDefinitionApi(cloudAgentConfiguration),
issueCredentials: new IssueCredentialApi(cloudAgentConfiguration),
revocations: new RevocationApi(cloudAgentConfiguration),
credentials: new CredentialsApi(cloudAgentConfiguration),
proofs: new PresentProofApi(cloudAgentConfiguration),
};