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
| Language | Package | Registry | Install | Requires |
|---|---|---|---|---|
| JavaScript and TypeScript | @alx-protocol/sdk | npm | npm install @alx-protocol/sdk | Node.js 20, 21, or 22 |
| Python | alx-protocol | PyPI | pip install alx-protocol | Python 3.11 or later |
| Rust | alx-protocol | crates.io | cargo add alx-protocol | A Rust toolchain with edition 2021 |
- TypeScript Reference: exports, subpaths, and signing suites
- Python Reference: capabilities and requirements
- Rust Reference: capabilities and the
alxverifier binary
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.
| Capability | TypeScript | Python | Rust | Status |
|---|---|---|---|---|
| Canonicalization | Yes | Yes | Yes | Core |
| Strict raw JSON parsing (duplicate-member rejection) | Yes | Yes | Yes | Core |
| Block creation and validation | Yes | Yes | Yes | Core |
| Content hash and Block hash derivation | Yes | Yes | Yes | Core |
| Parent normalization and lineage validation | Yes | Yes | Yes | Core |
| Canonical Graph verification | Yes | Yes | Yes | Core |
| Trace generation | Yes | Yes | Yes | Core |
| Verification Context | Yes | Yes | Yes | Core |
| Verification receipts | Yes | Yes | Yes | Core-adjacent tooling |
| Merkle extension | Yes | Yes | Yes | Optional extension |
| Ed25519 and P-256 signing | Yes | Yes | Yes | Optional extension |
| EIP-712 attestation suite | Yes | No | No | JavaScript only; outside portable signing conformance |
| EIP-712 Protocol Requests | Yes | No | No | JavaScript 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.