Skip to main content

TypeScript SDK

The TypeScript SDK mirrors the Python SDK exactly. Same hash chain algorithm, same canonical JSON, same test vectors. The only differences are language conventions.

Installation

Requires Node.js 18+. Zero runtime dependencies — uses only Node.js built-in modules (crypto, fs, path).

Import

TypeScript

API Naming Convention

TypeScript uses camelCase where Python uses snake_case:

Full Example

TypeScript

Options Object Pattern

TypeScript uses options objects instead of keyword arguments:
TypeScript

Error Handling

TypeScript

Cross-SDK Parity

Both SDKs produce identical hashes for the same input data. This is enforced by shared test vectors in fixtures/test-vectors.json.
You can emit events in a Python service and verify them in a TypeScript service (or vice versa) as long as both read from the same store.

Next Steps

API Reference

Full API documentation for both SDKs.

Configuration

All constructor options.