11 releases (7 breaking)

0.8.1 Nov 19, 2023
0.7.1 Jul 27, 2023
0.7.0 Mar 6, 2023
0.6.0 Sep 7, 2022
0.1.0 Jan 28, 2021

#297 in Web programming

Download history 63/week @ 2023-10-26 46/week @ 2023-11-02 46/week @ 2023-11-09 252/week @ 2023-11-16 76/week @ 2023-11-23 73/week @ 2023-11-30 35/week @ 2023-12-07 33/week @ 2023-12-14 47/week @ 2023-12-21 28/week @ 2023-12-28 28/week @ 2024-01-04 40/week @ 2024-01-11 47/week @ 2024-01-18 60/week @ 2024-01-25 36/week @ 2024-02-01 38/week @ 2024-02-08

187 downloads per month
Used in 2 crates


16K SLoC


All the things a panda needs (for Rust)

This library provides all tools required to write a client, node or even your own protocol implementation for the p2panda network. It is shipped both as a Rust crate p2panda-rs with WebAssembly bindings and a NPM package p2panda-js with TypeScript definitions running in NodeJS or any modern web browser.

The core p2panda specification is fully functional but still under review so please be prepared for breaking API changes until we reach v1.0. Currently no p2panda implementation has recieved a security audit.


cargo add p2panda-rs


use p2panda_rs::entry::encode::encode_entry;
use p2panda_rs::entry::EntryBuilder;
use p2panda_rs::identity::KeyPair;
use p2panda_rs::operation::encode::encode_operation;
use p2panda_rs::operation::OperationBuilder;

// Id of the schema which describes the data we want to publish. This should
// already be known to the node we are publishing to.
pub const SCHEMA_ID: &str =

// Generate new Ed25519 key pair.
let key_pair = KeyPair::new();

// Add field data to "create" operation.
let operation = OperationBuilder::new(&SCHEMA_ID.parse()?)
    .fields(&[("username", "panda".into())])

// Encode operation into bytes.
let encoded_operation = encode_operation(&operation)?;

// Create Bamboo entry (append-only log data type) with operation as payload.
let entry = EntryBuilder::new().sign(&encoded_operation, &key_pair)?;

// Encode entry into bytes.
let encoded_entry = encode_entry(&entry)?;

println!("{} {}", encoded_entry, encoded_operation);

Run this code from the examples folder:

cargo run --example=create_operation


You will need the following tools to start development:

# Run tests
cargo test

# Run WebAssembly tests
wasm-pack test --headless --firefox


GNU Affero General Public License v3.0 AGPL-3.0-or-later

Supported by

This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER Project funded under grant agreement No 871528 and NGI-ASSURE No 957073


~242K SLoC