Skip to main content

SDKs

p2panda

p2panda provides all tools required to write a client, node or even your own protocol implementation. We call these "core" libraries as they are the starting point for writing more "high-level" libraries or applications.

The core library 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.

Documentation

You can find the API documentations with more examples for both languages under the following links:

Installation

cargo add p2panda-rs

Usage

use p2panda_rs::identity::KeyPair;
let key_pair = KeyPair::new();
println!("{}", key_pair.public_key());

aquadoggo

aquadoggo is the reference node server implementation for the p2panda network running as a command line application. It can also be embedded via the library inside your Rust program which allows you to write offline-first applications where both the client and the node live inside the same binary.

Documentation

You can find the API documentations under the following links:

Installation

cargo add aquadoggo

Usage

use aquadoggo::{Configuration, Node};
use p2panda_rs::identity::KeyPair;

let config = Configuration::default();
let key_pair = KeyPair::new();
let node = Node::start(key_pair, config).await;

Run local node

# Run local node at http://localhost:2020
cargo run

# Turn on some logging for debugging
cargo run -- --log-level INFO
🐻‍❄️There is a tutorial!

Psst. Maybe you're interested in reading the tutorial on how to use aquadoggo?