Skip to main content

TypeScript Reference

The JavaScript and TypeScript implementation is @alx-protocol/sdk, published on npm. The package exposes deterministic Block creation and validation alongside canonicalization, graph validation, attribution tracing, signing, replay checks, and Merkle helpers, with TypeScript types included.

Implementation

ResourceLocation
Package@alx-protocol/sdk
Registrynpm
Installnpm i @alx-protocol/sdk
RequirementsNode.js 20 or later; ESM
Current exportsJavaScript Reference Surface

Capability Scope

The root export covers canonicalization, Block creation and validation, parent normalization, graph validation, attribution tracing, signed Blocks, replay windows, and error codes. Merkle helpers and the Ed25519, P-256, and EIP-712 signing suites are also available through package subpaths; EIP-712 requires the ethers peer dependency.

When to Use TypeScript

Choose this package for Node.js, browser, serverless, and JavaScript-based agent workflows. Run the shared conformance material after changing canonicalization, hashing, lineage, signing, or Merkle behavior in an integration that wraps the package.