Search…
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.
1
yarn add '@sudoplatform-labs/sudo-di-cloud-agent'
2
# or
3
npm install --save '@sudoplatform-labs/sudo-di-cloud-agent'
Copied!
To instantiate a client in your application, add the following:
TypeScript
1
import {
2
WalletApi,
3
LedgerApi,
4
ConnectionApi,
5
CredentialDefinitionApi,
6
CredentialsApi,
7
IntroductionApi,
8
IssueCredentialApi,
9
SchemaApi,
10
PresentProofApi,
11
TrustpingApi,
12
RevocationApi,
13
Configuration,
14
} from '@sudoplatform-labs/sudo-di-cloud-agent';
15
16
// See Cloud Agent SDK docs
17
const cloudAgentAPIs: CloudAgentAPI = {
18
wallet: new WalletApi(cloudAgentConfiguration),
19
ledger: new LedgerApi(cloudAgentConfiguration),
20
introductions: new IntroductionApi(cloudAgentConfiguration),
21
connections: new ConnectionApi(cloudAgentConfiguration),
22
ping: new TrustpingApi(cloudAgentConfiguration),
23
defineSchemas: new SchemaApi(cloudAgentConfiguration),
24
defineCredentials: new CredentialDefinitionApi(cloudAgentConfiguration),
25
issueCredentials: new IssueCredentialApi(cloudAgentConfiguration),
26
revocations: new RevocationApi(cloudAgentConfiguration),
27
credentials: new CredentialsApi(cloudAgentConfiguration),
28
proofs: new PresentProofApi(cloudAgentConfiguration),
29
};
Copied!
Last modified 1mo ago
Copy link