Skip to content

v0.53.0 — TypeScript SDK (Phase K)

Latest

Choose a tag to compare

@thaersaidi thaersaidi released this 29 Jun 16:18

TypeScript SDK — @genesismesh/sdk

Genesis Mesh now ships a standalone TypeScript client for the NA HTTP API, decoupled from the Python main repo at sdk-ts/.

Architecture

Layer separation mirrors the main repo:

File Purpose
src/auth.ts canonicalJson, Ed25519/PKCS8-DER signing, buildAdminHeaders
src/client.ts HttpTransport — fetch, timeout, typed error mapping
src/types.ts 30+ protocol interfaces (snake_case matching Pydantic models)
src/errors.ts Typed error classes; fromHttpError handles NA nested format
src/index.ts GenesisMeshClient with 7 sub-clients + full re-exports

Sub-clients

agreement · attestation · boundary · consensus · dataUsage · disclosure · evidence

Admin routes are signed with buildAdminHeaders (Ed25519 over canonical JSON). Public routes are unsigned.

Quality

  • 74 Jest tests — ESM + ts-jest, all pass
  • ESM + CJS dual build (npm run build)
  • Live smoke test at sandbox/sdk-smoke/ — 16/16 checks pass against a real 001-NA instance

Smoke test coverage

treaty → offer → accept → verify · boundary decide/verify · evidence build/verify · attestation issue/revoke · recognition policy · data usage policy/intent/verify

Bug fixes from smoke testing

  • DataSourceDescriptor: added required source_type + owner_sovereign_id fields
  • fromHttpError: handles NA nested {error:{message,code}} format
  • Agreement accept requires a recognition treaty for the responder to be issued first
  • Role validation: must use role: prefix (role:client, role:anchor, etc.)
  • Evidence verdicts: allow | block | escalate | warn (not trusted)

Next

  • v0.54.0 — Go SDK (sdk-go/)
  • v0.55.0 — C# SDK (sdk-cs/)