panda-playground
An interactive shell environment for exploring the p2panda protocol. Uses a mock node and clients to simulate network logic.
NB: This is not a "real world" application of the p2panda library, it exists as a way to explore p2panda functionality in a mocked environment because this is a fun and educational thing to do.
Development
You will need the following tools to start development:
# Generate test data json output (from `main.rs`)
cargo run
Use
The interactive shell is intended as a playground area for exploring the p2panda library. It utilizes current (and some future) p2panda features and runs a mock node and client (there is no networking involved).
Available commands:
├── author
│ ├── new
│ ├── list
│ ├── set
│ └── whoami
├── create
│ └── chat
├── update
│ └── chat
├── delete
│ └── chat
├── instances
│ ├── list
│ └── find
└── entries
└── list
Builtins
├── help
├── helptree
├── exit
└── history
Examples
# create a new author called panda
author new panda
# list all authors
author list
# become a different author (author must already exist)
author set penguin
# check who you are
author whoami
# publish a create message following the 'chat' schema, all trailing arguments make up chat message value
create chat Hello my name is panda!
# publish an update message
update chat 0040a8cec28dea11a4ba299cc1b0f246dfe8a5f71af61281085beff90b8564b9e4d9f07cd6f048399a2b73a8dc499a9b5d647f32223b190832cdeed087b1a074f698 Hello my name is Hungry Panda!
# publish a delete message
delete chat 0040a8cec28dea11a4ba299cc1b0f246dfe8a5f71af61281085beff90b8564b9e4d9f07cd6f048399a2b73a8dc499a9b5d647f32223b190832cdeed087b1a074f698
# list all entries
entries list
# list all instances
instances list
# retrieve a full instance id from a sub string (needed for publishing UPDATE and DELETE messages)
instances find 087b1a074f698
License
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