txpipe/pallas

Rust-native building blocks for the Cardano blockchain ecosystem

Rust

203

761 commits

updated Sep 20, 2026

See the code

README

Pallas Logo

Rust-native building blocks for the Cardano blockchain ecosystem

GitHub Crates.io GitHub Workflow Status

Introduction

Pallas is an expanding collection of modules that re-implements common Ouroboros / Cardano logic in native Rust. This crate doesn't provide any particular application, it is meant to be used as a base layer to facilitate the development of higher-level use-cases, such as explorers, wallets, etc (who knows, maybe even a full node in a far away future).

Getting Started

For most use-cases, depend on the umbrella pallas crate — it re-exports every building block under a single, organized module tree:

cargo add pallas

The hierarchy mirrors the project's domains (network, ledger, crypto, etc.) so you can pull in a single dependency and reach for what you need:

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 builder

Feature Flags

The umbrella crate exposes the following Cargo features:

FeatureEnables
hardanoHaskell-node interop (pallas::interop::hardano)
phase2Plutus script validation in pallas::ledger::validate
network2Opt in to the new P2P networking stack (pallas::network2)
relaxedRelaxed validation modes across primitives and crypto
unstableAggregates feature gates that are not yet stable

Unboxing

If you'd rather depend on a subset, every building block is published as its own crate on crates.io. Pick only what you need:

cargo add pallas-network pallas-traverse

The crates are grouped below by domain.

Core

Foundational primitives with no Cardano-specific semantics. Every higher layer in the workspace depends on them.

CratesDescription
pallas-codecShared CBOR encoding / decoding using minicbor lib
pallas-cryptoShared Cryptographic primitives
pallas-mathShared mathematics functions

Network

Wire-level implementation of the Ouroboros mini-protocols used to communicate with other Cardano nodes.

CratesDescription
pallas-networkNetwork stack providing multiplexer and mini-protocol implementations
pallas-network2P2P-first rewrite of the Ouroboros networking stack

Ledger

Cardano's on-chain data model: how transactions, blocks, addresses, and ledger state are represented, traversed, and validated across eras.

CratesDescription
pallas-primitivesLedger primitives and cbor codec for the different Cardano eras
pallas-traverseUtilities to traverse over multi-era block data
pallas-addressesEncode / decode Cardano addresses of any type
pallas-validatePhase-1 and optional phase-2 (Plutus) transaction validation

Interop

Adapters for systems built outside Pallas — file formats, RPC schemas, etc.

CratesDescription
pallas-hardanoInteroperability with implementation-specific artifacts of the Haskell Cardano node
pallas-configsGenesis config structs matching the Haskell node (Byron / Shelley / Alonzo / Conway)
pallas-utxorpcInteroperability with the UTxO RPC specification

Utils

Optional, self-contained conveniences. Each crate stands alone; pull one in only when you need that specific affordance.

CratesDescription
pallas-bech32Bech32 conventions for Cardano (CIP-5 prefixes, CIP-14 fingerprints)
pallas-txbuilderErgonomic transaction builder

Examples

The examples/ directory contains runnable demonstrations of common integration patterns:

ExampleDescription
block-decodeDecode a Byron-era block from CBOR
block-downloadDownload a single block from a remote node by chain point
crawlerConsume the chain-sync mini-protocol with pluggable block/tx filters
n2n-miniprotocolsNode-to-node mini-protocols over TCP
n2c-miniprotocolsNode-to-client mini-protocols over a local Unix socket
p2p-initiatorInitiate a P2P connection using pallas-network2
p2p-responderAccept incoming P2P connections using pallas-network2
p2p-discoveryPeer discovery using pallas-network2
walletWallet key generation, BIP-39 mnemonics, address derivation

Minimum Supported Rust Version

Pallas's MSRV is Rust 1.88. CI verifies the entire workspace builds with that toolchain on every change. The floor is set by transitive dependencies (currently serde_with / darling); edition 2024, used by pallas-network2, contributes a hard floor of 1.85.

Bumping the MSRV is treated as a breaking change: it happens only in minor version bumps (or in 0.x / 1.0.0-alpha.x while we are pre-stable), is called out in the changelog, and aims to stay roughly within the most recent three stable Rust releases.

Etymology

Pallas: (Greek mythology) goddess of wisdom and useful arts and prudent warfare;

License

Pallas is distributed under the terms of the Apache License 2.0.

Security

If you discover a security vulnerability, please follow the disclosure process described in SECURITY.md. Do not open a public GitHub issue.

blockchain
cardano
ouroboros
rust

Contributors

(top 30 of 64)

scarmuega

511 commits

jmhrpr

29 commits

dependabot[bot]

19 commits

AndrewWestberg

17 commits

Languages

Rust

100.0%

txpipe/pallas

Rust-native building blocks for the Cardano blockchain ecosystem

Rust

203

761 commits

updated Sep 20, 2026

See the code

README

Pallas Logo

Rust-native building blocks for the Cardano blockchain ecosystem

GitHub Crates.io GitHub Workflow Status

Introduction

Pallas is an expanding collection of modules that re-implements common Ouroboros / Cardano logic in native Rust. This crate doesn't provide any particular application, it is meant to be used as a base layer to facilitate the development of higher-level use-cases, such as explorers, wallets, etc (who knows, maybe even a full node in a far away future).

Getting Started

For most use-cases, depend on the umbrella pallas crate — it re-exports every building block under a single, organized module tree:

cargo add pallas

The hierarchy mirrors the project's domains (network, ledger, crypto, etc.) so you can pull in a single dependency and reach for what you need:

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 builder

Feature Flags

The umbrella crate exposes the following Cargo features:

FeatureEnables
hardanoHaskell-node interop (pallas::interop::hardano)
phase2Plutus script validation in pallas::ledger::validate
network2Opt in to the new P2P networking stack (pallas::network2)
relaxedRelaxed validation modes across primitives and crypto
unstableAggregates feature gates that are not yet stable

Unboxing

If you'd rather depend on a subset, every building block is published as its own crate on crates.io. Pick only what you need:

cargo add pallas-network pallas-traverse

The crates are grouped below by domain.

Core

Foundational primitives with no Cardano-specific semantics. Every higher layer in the workspace depends on them.

CratesDescription
pallas-codecShared CBOR encoding / decoding using minicbor lib
pallas-cryptoShared Cryptographic primitives
pallas-mathShared mathematics functions

Network

Wire-level implementation of the Ouroboros mini-protocols used to communicate with other Cardano nodes.

CratesDescription
pallas-networkNetwork stack providing multiplexer and mini-protocol implementations
pallas-network2P2P-first rewrite of the Ouroboros networking stack

Ledger

Cardano's on-chain data model: how transactions, blocks, addresses, and ledger state are represented, traversed, and validated across eras.

CratesDescription
pallas-primitivesLedger primitives and cbor codec for the different Cardano eras
pallas-traverseUtilities to traverse over multi-era block data
pallas-addressesEncode / decode Cardano addresses of any type
pallas-validatePhase-1 and optional phase-2 (Plutus) transaction validation

Interop

Adapters for systems built outside Pallas — file formats, RPC schemas, etc.

CratesDescription
pallas-hardanoInteroperability with implementation-specific artifacts of the Haskell Cardano node
pallas-configsGenesis config structs matching the Haskell node (Byron / Shelley / Alonzo / Conway)
pallas-utxorpcInteroperability with the UTxO RPC specification

Utils

Optional, self-contained conveniences. Each crate stands alone; pull one in only when you need that specific affordance.

CratesDescription
pallas-bech32Bech32 conventions for Cardano (CIP-5 prefixes, CIP-14 fingerprints)
pallas-txbuilderErgonomic transaction builder

Examples

The examples/ directory contains runnable demonstrations of common integration patterns:

ExampleDescription
block-decodeDecode a Byron-era block from CBOR
block-downloadDownload a single block from a remote node by chain point
crawlerConsume the chain-sync mini-protocol with pluggable block/tx filters
n2n-miniprotocolsNode-to-node mini-protocols over TCP
n2c-miniprotocolsNode-to-client mini-protocols over a local Unix socket
p2p-initiatorInitiate a P2P connection using pallas-network2
p2p-responderAccept incoming P2P connections using pallas-network2
p2p-discoveryPeer discovery using pallas-network2
walletWallet key generation, BIP-39 mnemonics, address derivation

Minimum Supported Rust Version

Pallas's MSRV is Rust 1.88. CI verifies the entire workspace builds with that toolchain on every change. The floor is set by transitive dependencies (currently serde_with / darling); edition 2024, used by pallas-network2, contributes a hard floor of 1.85.

Bumping the MSRV is treated as a breaking change: it happens only in minor version bumps (or in 0.x / 1.0.0-alpha.x while we are pre-stable), is called out in the changelog, and aims to stay roughly within the most recent three stable Rust releases.

Etymology

Pallas: (Greek mythology) goddess of wisdom and useful arts and prudent warfare;

License

Pallas is distributed under the terms of the Apache License 2.0.

Security

If you discover a security vulnerability, please follow the disclosure process described in SECURITY.md. Do not open a public GitHub issue.

blockchain
cardano
ouroboros
rust

Contributors

(top 30 of 64)

scarmuega

511 commits

jmhrpr

29 commits

dependabot[bot]

19 commits

AndrewWestberg

17 commits

Languages

Rust

100.0%