Expand description
Rust-native building blocks for the Cardano blockchain ecosystem.
Pallas is a collection of modules that re-implements core Ouroboros / Cardano logic in native Rust. It does not provide any single application; it is a base layer for higher-level use-cases — explorers, indexers, wallets, transaction builders, validators, and (eventually) full nodes.
§Crate layout
The umbrella pallas crate re-exports every building block under a single
module tree, organised by domain:
pallas
├── network — Ouroboros networking stack
├── network2 — P2P-first networking stack (feature `network2`)
├── ledger
│ ├── primitives — multi-era CBOR primitives
│ ├── traverse — multi-era traversal helpers
│ ├── addresses — Cardano address codec
│ └── validate — phase-1 / phase-2 transaction validation
├── crypto — cryptographic primitives
├── codec — CBOR codec (minicbor)
├── interop
│ ├── utxorpc — UTxO RPC interop
│ └── hardano — Haskell-node interop (feature `hardano`)
└── txbuilder — ergonomic transaction builderEach module is a thin re-export of a standalone pallas-* crate published
on crates.io (pallas-network, pallas-primitives, …). If you only
need a subset, depend on the individual crates directly.
§Examples
Runnable demonstrations of common integration patterns live in the
examples/ directory of the repository:
| Example | Description |
|---|---|
block-decode | Decode a Byron-era block from CBOR |
block-download | Download a single block from a remote node by chain point |
crawler | Consume the chain-sync mini-protocol with pluggable block/tx filters |
n2n-miniprotocols | Node-to-node mini-protocols over TCP |
n2c-miniprotocols | Node-to-client mini-protocols over a local Unix socket |
p2p-initiator | Initiate a P2P connection using pallas-network2 |
p2p-responder | Accept incoming P2P connections using pallas-network2 |
p2p-discovery | Peer discovery using pallas-network2 |
wallet | Wallet key generation, BIP-39 mnemonics, address derivation |
§Feature flags
| Feature | Enables |
|---|---|
hardano | Haskell-node interop (pallas::interop::hardano) |
phase2 | Plutus script validation in ledger::validate |
network2 | The P2P-first networking stack (pallas::network2) |
relaxed | Relaxed validation modes across primitives and crypto |
unstable | Aggregates feature gates that are not yet stable |
Features are additive: enabling one never removes APIs exposed by another.
docs.rs builds with all-features.
§Minimum Supported Rust Version
Pallas’s MSRV is Rust 1.88. Bumping it is treated as a breaking change and is called out in the changelog.
§License
Distributed under the terms of the Apache License 2.0. To report a security issue, follow the disclosure process in SECURITY.md rather than opening a public issue.
Modules§
- codec
- Shared CBOR codec for Cardano data structures.
- crypto
- Cryptographic primitives used across Cardano.
- interop
- Adapters for systems built outside Pallas.
- ledger
- Cardano’s on-chain data model.
- network
- Wire-level Ouroboros networking stack.
- network2
- P2P-first rewrite of the Ouroboros networking stack.
- txbuilder
- Ergonomic builder for Cardano transactions.