@kashscript/identity
v0.1.0
Published
DID + PDS protocol — zero-dependency type definitions.
Readme
@kashscript/identity
DID + PDS protocol type definitions for the KashScript Foundry. Zero runtime — just types and JSON-schema shapes.
bun add @kashscript/identity
# or
npm install @kashscript/identityThis package is the type-level anchor for the Kash Identity Platform. It holds:
- The W3C-compatible
did:kash:DID Document shape. - The Personal Data Store (PDS) record envelope.
- Constants + branded type aliases shared by
identity-core,identity-sdk,identity-zkp, and any consumer that needs to assert "this is a Kash identity payload" without pulling in crypto primitives.
There is no runtime code here. It's a pure-types package — safe to import from server bundles, edge functions, durable objects, and lambda cold-paths.
What's in the box
| Subpath | Purpose |
|----------------------------|------------------------------------------|
| @kashscript/identity | Re-exports did + pds |
| @kashscript/identity/did | KashDid, KashDidDocument types |
| @kashscript/identity/pds | PdsRecord, PdsEnvelope types |
Quickstart
import type { KashDid, KashDidDocument } from "@kashscript/identity/did";
import type { PdsRecord } from "@kashscript/identity/pds";
function isKashIdentity(record: PdsRecord): record is PdsRecord<KashDidDocument> {
return record.subject.startsWith("did:kash:") as boolean;
}For creating DIDs / signing payloads, reach for @kashscript/identity-core.
For React-side WebAuthn ceremonies, reach for @kashscript/identity-sdk.
License
Apache-2.0. Also covered by SSLA v1.0 Schedule A (Permissive). See LICENSE.
