active_tx 0.1.1

Activeledger Rust SDK Transaction build helper
Documentation

Activeledger Transaction Helper

Activeledger is a powerful distributed ledger technology. Think about it as a single ledger, which is updated simultaneously in multiple locations. As the data is written to a ledger, it is approved and confirmed by all other locations.

This Crate

This crate provides Rust developers an easy way to build up transactions without needing other crates, such as Serde.

This crate provides macros as well as builders that help create a transaction with the correct structure. Additionally it provides two methods of creating a complete onboarding transaction. With and without a provided key.

Additional Activeledger crates

Adhearing to the Rust mentality of keeping things small we have created other crates that can be used in conjunction with this one to add additional functionality.

These crates are:

Links

Activeledger

Activeledger Developers portal

Activeledger on GitHub

Activeledger on NPM

This SDK on GitHub

Report Issues

Example usage

# use active_tx::{PacketBuilder, TransactionBuilder, Key, packet_data, signees};
# use activeledger::key::EllipticCurve;
# fn main() {
let input = packet_data!({"[streamid]": {"input": "data"}});

let input_data = PacketBuilder::new(input).build().unwrap();

let mut tx_builder = TransactionBuilder::new("namespace", "contract");

let streamid = "streamid";
let key = Key::Ec(EllipticCurve::new(streamid).unwrap());

let signees = signees![{streamid => key}];

let tx = tx_builder
.input(input_data)
.unwrap()
.build(signees)
.unwrap();
# }

For more information on the usage of this crate see the [TransactionBuilder] documentation.