Zenode
What is this project
This project is an abstraction layer between the client and the p2panda node by providing tools to easily perform operations on a p2panda node.
Before you start
In order to run this you first need to install aquadoggo
RUST_LOG=aquadoggo=info
The Operator struct is the main wrapper around the p2panda library and the graphql layer.
To create a new Operator use Operator::default() or Operator::new().
Operator::default() reads the ENDPOINT environment variable, if is not present it uses http://localhost:2020/graphql as default endpoint.
Run the following to test Zenode (aquadoggo must be running in the background):
Quick start
use ;
// create an Operator
let op = default;
// create a schema
let mut fields = vec!;
let id = op.create_schema.await?;
// generate schema_id
let schema_id = format!;
// create an instance
let mut fields = vec!;
let instance_id = op.create_instance.await?;
// update the instance
let mut fields = vec!;
let update_id = op.update_instance.await?;
// finally delete the instance
let _delete_id = op.delete_instance.await?;
Features
- Create schemas
- Crate fields
- Crate instance
- Update instance
- Delete instance
- Read endpoint from env
- Better field to json
- Save schema_id
- Link schema name with schema_id
- Serializable query string