Summary
LDP needs a TypeScript/JavaScript SDK for the web and Node.js ecosystem. This is the second most important SDK after Python.
What to do
- Create
sdk/typescript/ with a proper npm package structure
- Implement TypeScript types for all protocol types (matching Python SDK 1:1):
LdpIdentityCard, LdpCapability, QualityMetrics
PayloadMode, TrustDomain, Provenance
LdpEnvelope, LdpMessageBody
SessionConfig, LdpSession
- Implement
LdpClient with fetch-based HTTP client
- Implement
LdpRouter with quality/cost/latency/balanced strategies
- Add tests with vitest or jest
Package structure
sdk/typescript/
├── package.json
├── tsconfig.json
├── src/
│ ├── index.ts
│ ├── types/
│ │ ├── identity.ts
│ │ ├── capability.ts
│ │ ├── messages.ts
│ │ ├── payload.ts
│ │ ├── provenance.ts
│ │ ├── session.ts
│ │ └── trust.ts
│ ├── client.ts
│ └── router.ts
└── tests/
Why this matters
The web/Node.js ecosystem is huge. A TypeScript SDK unlocks: browser-based LDP clients, Next.js/Express server delegates, Cloudflare Worker delegates, and Deno/Bun compatibility.
References
Acceptance criteria
Summary
LDP needs a TypeScript/JavaScript SDK for the web and Node.js ecosystem. This is the second most important SDK after Python.
What to do
sdk/typescript/with a proper npm package structureLdpIdentityCard,LdpCapability,QualityMetricsPayloadMode,TrustDomain,ProvenanceLdpEnvelope,LdpMessageBodySessionConfig,LdpSessionLdpClientwith fetch-based HTTP clientLdpRouterwith quality/cost/latency/balanced strategiesPackage structure
Why this matters
The web/Node.js ecosystem is huge. A TypeScript SDK unlocks: browser-based LDP clients, Next.js/Express server delegates, Cloudflare Worker delegates, and Deno/Bun compatibility.
References
sdk/python/src/ldp_protocol/Acceptance criteria
LdpClientwith discover, session management, submit_taskLdpRouterwith 4 routing strategiesldp-protocol