@superid-chain/didcomm-client
v0.1.2
Published
Browser and Node.js DIDComm client for the SuperID Gateway
Readme
@superid-chain/didcomm-client
Browser and Node.js DIDComm transport for the SuperID Gateway.
The client creates encrypted DIDComm envelopes locally. Private keys and authority key handles must be supplied by a wallet or protected signing bridge; they are not stored by this package.
Install
npm install @superid-chain/didcomm-clientAuthority provisioning
import {
AuthorityDidCommClient,
HttpDidCommTransport
} from "@superid-chain/didcomm-client";
const client = new AuthorityDidCommClient({
transport: new HttpDidCommTransport(),
gateway: {
endpoint: "https://didcomm.superid.in/didcomm",
gatewayDid: "did:superid:...",
gatewayX25519PublicB64u: "..."
},
resolveAuthoritySender: async ({ authorityDid }) => {
// Resolve a process-local/WASM key handle from a protected wallet.
return wallet.resolveX25519Handle(authorityDid);
}
});
const response = await client.createOrganization({
env: "india-dev",
appId: "superid-console",
platformDid: "did:superid:...",
tenantDid: "did:superid:...",
sessionId: crypto.randomUUID(),
msgId: `msg-${crypto.randomUUID()}`,
body: {
idempotencyKey: crypto.randomUUID(),
businessType: "healthcare"
}
});Successful provisioning responses use PENDING, ACTIVE, or FAILED.
PENDING means the canonical DID_CREATE transaction has been accepted and
the dashboard should poll the corresponding authenticated status operation.
Security boundary
- Organization creation requires Tenant authcrypt.
- Application creation requires Organization authcrypt.
- Status reads require the same authority scope.
- The browser never sends a private key or reusable key handle to the Gateway.
