#cryptocurrency #table #install #library #contents

yanked liyobicash

The Yobicash cryptocurrency library

Uses old Rust 2015

0.1.0 Feb 8, 2018

MIT/Apache and LGPL-3.0+

2.5K SLoC



The Yobicash cryptocurrency library.

Table of Contents


To install libyobicash add in your Cargo.toml:

# Cargo.toml

libyobicash = "^0.1"

and in the root of your crate:


extern crate libyobicash;


Look at the documentation or at the tests for guidance.

// main.rs

// Bob wants to send some data to Alice through Yobicash and has found
// a node offering a good price for broadcasting the data.

// let plain = some super important secret.
// let alice_pk = Alice public key;
let bob_sk = SecretKey::random();
let bob_data = Data::new(bob_sk, alice_pk, &plain)?;

// let bob_coins = some spendable coins Bob owns that pay the fee
// required by the node;
// let bob = the output to the node that will broadcast Bob writes operation;

// One secret instance from Bob. Bob will use it to permit the network to
// delete his data.
let bob_instance = Scalar::random();

// The write operation containing the encrypted data that only
// Bob and Alice can read. After confirmation, it will be broadcasted
// to the network.
let bob_write = WriteOp::new(&bob_coins, &bob_data, bob_instance, &bob_fee)?;


// Now that the secret is not needed anymore, Bob and Alice agree that it
// can be erased from the dagchain. Bob finds a node with making a good offer
// to get rid of that data and broadcast the operation to the network.

// let node_coins = some spendable coins the node owns that pay Bob's fee;
// let node_fee = the fee promised to Bob by the node;

// Bob generates the proof of the bob_write witness instance to send to the node
// using the fee that the node will use and bob_write itself.
let bob_proof = DeleteOp::proof(&bob_write, &bob_instance, &node_fee)?;

// The node creates a delete operation with Bob's witness.
// The node will delete bob_writes' Data after node_delete get confirmed.
// The other nodes of the network will do the same.
let node_delete = DeleteOp::new(&node_coins, &bob_write, &bob_proof, &node_fee)?;





This project is license under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in libyobicash by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~205K SLoC