@swimmingkiim/trust-sdk 0.1.4 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @swimmingkiim/trust-sdk
|
|
2
|
+
|
|
3
|
+
A2A Trust SDK for Identity (DID), Verifiable Credentials (VC), and Reputation Management.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Identity Management**: Create and manage DIDs (did:key, did:ethr).
|
|
8
|
+
- **Verifiable Credentials**: Issue and verify W3C-compliant VCs.
|
|
9
|
+
- **Reputation**: Interact with the A2A reputation system.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @swimmingkiim/trust-sdk @veramo/core
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### Identity Management
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { IdentityManager } from '@swimmingkiim/trust-sdk';
|
|
23
|
+
|
|
24
|
+
const idManager = new IdentityManager();
|
|
25
|
+
const did = await idManager.createEphemeralDID();
|
|
26
|
+
console.log('Created DID:', did);
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Verifiable Credentials
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// Assuming an initialized agent context
|
|
33
|
+
const credential = await agent.createVerifiableCredential({
|
|
34
|
+
credential: {
|
|
35
|
+
issuer: { id: myDID },
|
|
36
|
+
credentialSubject: {
|
|
37
|
+
id: targetDID,
|
|
38
|
+
trustScore: 42
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
proofFormat: 'jwt'
|
|
42
|
+
});
|
|
43
|
+
```
|