Highly extensible data-types of the p2panda protocol for secure, distributed and efficient exchange of data, supporting networks from the internet to packet radio, LoRa or BLE.
The primary data structure is an append-only implementation which supports history deletion, multi-writer ordering, fork-tolerance, efficient partial sync, compatibility with any CRDT and is extensible depending on your application requirements.
Features
- Cryptographic signatures for authorship verification and tamper-proof messages
- Authors can maintain one or many logs
- Single-writer logs which can be combined to support multi-writer collaboration
- Compatible with any application data and CRDT
- Various ordering algorithms
- Supports efficient, partial sync
- Compatible with any networking scenario (even broadcast-only, for example for packet radio)
- Fork-tolerant
- Pruning of outdated messages
- Highly extensible with custom features, for example prefix-deletion, ephemeral "self-destructing" messages, etc.
Examples
Create and sign operation
use ;
let private_key = new;
let body = new;
let mut header = Header ;
header.sign;
Custom extensions
Custom functionality can be added using extensions, for example, access-control tokens, self-destructing messages, or encryption schemas.
use ;
use ;
// Extend our operations with an "expiry" field we can use to implement
// "ephemeral messages" in our application, which get automatically deleted
// after the expiration timestamp is due.
;
// Multiple extensions can be combined in a custom type.
// Implement `Extension<T>` for each extension we want to add to our
// header.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in p2panda by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
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, NGI-ASSURE No 957073 and NGI0-ENTRUST No 101069594.