@superid-chain/shared-sdk
v1.0.14
Published
SuperID Shared SDK – DID, DIDDoc, DIDComm, Crypto, Schemas, Utils for FriloWallet Mirchi B2B Portal
Maintainers
Readme
SuperID Shared SDK
A unified JavaScript SDK that powers:
- SuperID Identity Layer
- DID + DIDDoc generation
- DIDComm anoncrypt & authcrypt
- FriloWallet Mirchi Supply Chain messaging
- Zod-based schema validations
- Browser + Node support via WASM loader
Features
| Feature | Status | |--------|--------| | DID creation | ✅ | | DIDDoc generation | ✅ | | Anoncrypt packing | ✅ | | Authcrypt packing | ✅ | | WASM crypto (Ed25519/X25519) | ✅ | | Zod validators | ✅ | | Domain-specific message types | ✅ | | Node + Browser compatible | ✅ |
Install
npm install @superid/shared-sdk
Usage
DID
import { did, diddoc } from "@superid/shared-sdk";
const ed = await crypto.keys.generateEd25519();
const x = await crypto.keys.generateX25519();
const myDid = await did.createDID(ed);
const myDoc = diddoc.createDIDDoc(myDid, ed, x);
DIDComm
js
Copy code
import { didcomm } from "@superid/shared-sdk";
const msg = didcomm.messageFactory.createMessage(
didcomm.MessageTypes.FARMER_CREATE,
{ name: "Ramesh" }
);
Validation
js
Copy code
import { schemas } from "@superid/shared-sdk";
schemas.FarmerSchema.parse({...})