Skip to main content

SDK Reference

ALX Protocol is published as three implementations, one per language. Each creates, validates, and traces Blocks from the same protocol rules, and each is checked against the same conformance vectors before release, so a Block created in one validates in the others.

Published Implementations​

LanguagePackageRegistryInstallRequires
JavaScript and TypeScript@alx-protocol/sdknpmnpm install @alx-protocol/sdkNode.js 20, 21, or 22
Pythonalx-protocolPyPIpip install alx-protocolPython 3.11 or later
Rustalx-protocolcrates.iocargo add alx-protocolA Rust toolchain with edition 2021

Implementation Parity​

Strict parsing uses parseStrictJson() and parseStrictJsonBytes() in TypeScript and decode_strict_json_bytes() in Python and Rust. Use these functions, not the language's default JSON parser, for Block JSON received from another system.

CapabilityTypeScriptPythonRustStatus
CanonicalizationYesYesYesCore
Strict raw JSON parsing (duplicate-member rejection)YesYesYesCore
Block creation and validationYesYesYesCore
Content hash and Block hash derivationYesYesYesCore
Parent normalization and lineage validationYesYesYesCore
Canonical Graph verificationYesYesYesCore
Trace generationYesYesYesCore
Verification ContextYesYesYesCore
Verification receiptsYesYesYesCore-adjacent tooling
Merkle extensionYesYesYesOptional extension
Ed25519 and P-256 signingYesYesYesOptional extension
EIP-712 attestation suiteYesNoNoJavaScript only; outside portable signing conformance
EIP-712 Protocol RequestsYesNoNoJavaScript only; no conformance vectors

When to Choose an Implementation​

Choose by runtime: every core operation is present in all three. All three bundle the optional Merkle helpers and the Ed25519 and P-256 signing suites. Only the JavaScript package includes the EIP-712 attestation suite and Protocol Requests. The Normative Sources define protocol behavior, not any one package.