Expand description
§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:
- activeledger - The main SDK. (Crate)
- active_sse - To build transactions without worrying about the JSON. (Crate)
§Links
Activeledger Developers portal
§Example usage
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.
Macros§
- Packet data macro
- Signees Macro
Structs§
- Provides build methods
- Stores the data built by PacketBuilder
- Holds an array of Signees
- Transaction builder
Enums§
- Holds the key to use when signing the transaction packet
- Key Type for generating a key and onboarding it
- Holds recursive values for the $i (input), $o (output), and $r (readonly) objects of a transaction packet.
- KeyError data holder
Type Aliases§
- KeyResult definition - Shorthand for: Result<T, TxBuilderError>