What is LRX?
The License and Right eXchange (LRX) is a protocol framework for defining, transferring, and verifying digital rights across distributed systems. It provides a standardized vocabulary and transaction model for intellectual property operations.
LRX::Protocol.define(:license, scope: :global, version: "2.0")
Rights Topology
Rights in LRX are modeled as directed acyclic graphs (DAGs) where each node represents a permission boundary. Edges define inheritance and delegation paths. This topological structure enables complex multi-party licensing without ambiguity.
topology.add_node(:read, inherits: [:view, :cache])
Exchange Primitives
Four primitives form the foundation of every LRX transaction: Grant, Revoke, Transfer, and Query. Each primitive is atomic and produces a cryptographically signed receipt that can be independently verified.
Exchange.execute(:grant, from: issuer, to: licensee, rights: [:use, :modify])
Verification Layer
The verification layer operates as an independent subsystem. It receives signed receipts and validates them against the current rights topology. Verification is stateless — each check references only the receipt and the published topology snapshot.
Verifier.check(receipt, against: topology.snapshot(:latest))
Storage Model
LRX employs content-addressed storage for all rights definitions. Each rights document is hashed and stored immutably. Mutations create new versions linked to predecessors, forming an append-only chain of rights evolution.
Store.put(rights_doc, content_hash: SHA256(rights_doc.canonical))
Federation Protocol
Multiple LRX nodes form a federation through a gossip-based sync protocol. Each node maintains a local rights index and periodically reconciles with peers. Conflict resolution follows a last-writer-wins strategy with vector clocks.
Federation.sync(peers: [:node_a, :node_b], strategy: :crdt_merge)
SDK Overview
The LRX SDK provides client libraries for major platforms. Core functionality includes rights creation, exchange execution, and verification. The SDK handles all cryptographic operations internally.
npm install @lrx/sdk
from lrx import Client, Rights, Exchange
Configuration
LRX nodes are configured through a declarative TOML manifest. The manifest defines the node's identity, federation peers, storage backend, and verification policies.
[node]
id = "lrx-primary-01"
federation = ["peer-a.lrx.wiki", "peer-b.lrx.wiki"]
storage = { backend = "content-addressed", path = "/var/lrx/store" }
API Reference
The REST API exposes all LRX primitives through a consistent endpoint structure. Authentication uses Ed25519 signed tokens. Rate limiting is per-identity, not per-IP.
POST /v2/exchange/grant
Authorization: LRX-Ed25519 {signed_token}
Content-Type: application/lrx+json