# ALX Protocol ## Docs - [artifactHashFromPayload() — artifact integrity](https://docs.xandrlabs.ai/api/artifact-hash.md): Compute a keccak256 commitment to off-chain artifact bytes so verifiers can confirm retrieved content matches what was published on-chain. - [canonicalize() — deterministic JSON serialization](https://docs.xandrlabs.ai/api/canonicalize.md): Serialize any JSON-compatible value to a canonical RFC 8785 JCS string — the foundation for all ALX Protocol identity derivation. - [Derive a CIDv1 for IPFS content addressing](https://docs.xandrlabs.ai/api/cid.md): Use cidV1FromCanonicalSync or cidV1FromCanonical to derive a CIDv1 from canonical JSON bytes — the IPFS address for any Knowledge Block envelope. - [kbHashFromEnvelope() — Knowledge Block identity](https://docs.xandrlabs.ai/api/kb-hash.md): Derive the canonical on-chain kbId by normalizing, canonicalizing, and hashing a KB envelope under the KB_V1 domain tag using Keccak-256. - [AlexandrianRegistryV2 — on-chain KB registry](https://docs.xandrlabs.ai/api/registry.md): Publish Knowledge Blocks, settle query fees, and verify artifact integrity using the ALX Protocol registry contract on Base mainnet (chain ID 8453). - [Reputation scoring and freshness functions](https://docs.xandrlabs.ai/api/reputation.md): Normalize on-chain scores, compute exponential freshness decay, check tier access, and integrate reputation into payout computation for ALX Protocol KBs. - [Settlement economics functions reference](https://docs.xandrlabs.ai/api/settlement.md): Pure TypeScript functions for computing payouts, clamping reputation scores, and generating SHA-256 ledger leaf hashes in the ALX Protocol economics layer. - [EIP-712 signed protocol requests reference](https://docs.xandrlabs.ai/api/signed-requests.md): Sign and verify typed protocol requests using EIP-712 structured data, with domain binding, expiry enforcement, and nonce replay protection. - [Run events and session timeline event types](https://docs.xandrlabs.ai/api/types/events.md): Reference for RunEvent, RunEventType, RunState, SessionTimelineEvent, and the closed vocabularies and wire guarantees governing ALX Protocol event streams. - [Session status and timeline protocol types](https://docs.xandrlabs.ai/api/types/sessions.md): Reference for SessionSummary, SessionStatus, SessionTimeline, and all session envelope types for inspecting and resuming ALX Protocol sessions. - [Solve request and response protocol types](https://docs.xandrlabs.ai/api/types/solve.md): Complete reference for SolveCallInput, SolveCallOptions, SolveResult, and SolveResponseEnvelope — the canonical wire shapes for ALX Protocol solve flows. - [Canonicalization and deterministic hashing](https://docs.xandrlabs.ai/concepts/canonicalization.md): ALX Protocol uses RFC 8785 JSON canonicalization (JCS) to produce byte-identical output for identical inputs, enabling reproducible kbHash derivation. - [How ALX Protocol derives Knowledge Block identity](https://docs.xandrlabs.ai/concepts/identity.md): kbHash is derived from the canonical envelope using Keccak-256 and KB_V1 domain tag. The same inputs always produce the same hash, verifiable without trust. - [Knowledge Blocks: the core protocol unit](https://docs.xandrlabs.ai/concepts/knowledge-blocks.md): A Knowledge Block is an immutable, typed artifact with a content-addressed identity and explicit lineage — the foundational unit of ALX Protocol. - [Knowledge Block lineage and DAG composition](https://docs.xandrlabs.ai/concepts/lineage.md): The sources array links KBs into a directed acyclic graph, making derivation history fully verifiable and attribution deterministic across implementations. - [Compute a Knowledge Block identity with kbHash](https://docs.xandrlabs.ai/guides/compute-identity.md): Derive a deterministic, domain-separated identifier for a Knowledge Block by canonicalizing its envelope and applying the KB_V1 domain tag. - [Publish a Knowledge Block on Base mainnet](https://docs.xandrlabs.ai/guides/publish-on-chain.md): Stake and register a Knowledge Block in the ALX Protocol registry on Base mainnet, including IPFS upload, hash computation, and the publishKB call. - [Settle query fees across the attribution graph](https://docs.xandrlabs.ai/guides/settlement.md): Distribute query fees through the ALX Protocol attribution DAG, understand the settlement formula, and use economics primitives for reputation-weighted payouts. - [Authenticate ALX Protocol requests with EIP-712](https://docs.xandrlabs.ai/guides/signed-requests.md): Build, sign, and verify ALX Protocol requests using EIP-712 typed data, with replay protection via NonceTracker and expiry-based time bounds. - [Verify a Knowledge Block artifact on-chain](https://docs.xandrlabs.ai/guides/verify-artifact.md): Retrieve a Knowledge Block artifact from IPFS, recompute its identity and integrity hashes, and compare them against the on-chain registry record. - [ALX Protocol Python conformance implementation](https://docs.xandrlabs.ai/implementations/python.md): Install and run the Python alx-protocol package to verify kb_hash_from_envelope conformance against the canonical TypeScript reference test vectors. - [ALX Protocol Rust conformance implementation](https://docs.xandrlabs.ai/implementations/rust.md): Add the alx_protocol_v1 Rust crate to verify kb_hash_from_envelope conformance against the canonical test vectors used by the TypeScript reference. - [ALX Protocol TypeScript reference implementation](https://docs.xandrlabs.ai/implementations/typescript.md): Install and use @alx/protocol, the canonical TypeScript SDK for computing kbHash, artifactHash, and integrating with the ALX on-chain registry. - [Install and set up the @alx/protocol TypeScript SDK](https://docs.xandrlabs.ai/installation.md): Add @alx/protocol to your Node.js project, import the core functions, and verify your setup with a canonicalize call before you start building. - [What is ALX Protocol? Deterministic Knowledge Blocks](https://docs.xandrlabs.ai/introduction.md): ALX Protocol is open infrastructure for content-addressed Knowledge Block identity, verifiable lineage DAGs, and on-chain attribution and settlement. - [ALX Protocol quickstart: from install to on-chain](https://docs.xandrlabs.ai/quickstart.md): Install @alx/protocol, compute a Knowledge Block identity, derive its CID, publish on Base mainnet, and verify the result — end to end in six steps. - [Conformance requirements for ALX Protocol](https://docs.xandrlabs.ai/reference/conformance.md): What conformance means for ALX Protocol, how to verify it, the canonical test vectors, and the full proof surface across TypeScript, Python, and Rust. - [ALX Protocol error codes and retry guidance](https://docs.xandrlabs.ai/reference/error-codes.md): The ProtocolErrorEnvelope shape, all canonical ALX Protocol error codes, their meanings, and the correct client retry behavior for each code. - [ALX Protocol v1 specification reference guide](https://docs.xandrlabs.ai/reference/protocol-spec.md): Key guarantees, wire-level rules, canonical field tables, determinism boundaries, and versioning rules defined by the ALX Protocol v1 specification. - [ALX Protocol security model and trust assumptions](https://docs.xandrlabs.ai/reference/security.md): The ALX Protocol trust model, EIP-712 request signing, replay protection, artifactHash validation, and the threat model boundaries for v1. - [Versioning and compatibility in ALX Protocol](https://docs.xandrlabs.ai/reference/versioning.md): The ALX Protocol versioning scheme, compatibility rules for clients and servers, ergonomic alias vs canonical wire fields, and the KB_V1 domain tag.