handshakes
This crate provides an interface for interacting with the Handshake network. Build, serialize and deserialize transactions with full covenant support. The coins-bip32 crate can be used with this crate to sign transactions.
This crate is under active development, and the API may change.
Usage
Typically, you'll want to use a network as an entry point. It will ensure that
the correct network specific constants are used.
The tx_builder
is useful for creating and serializing transactions.
use ;
use TryFrom;
use ;
// Create a covenant
let covenant = Covenant ;
// Create an address
let address = string_to_address.unwrap;
// Build a transaction
let tx = tx_builder
.spend
.pay_covenant
.build
.unwrap;
let hex = tx.serialize_hex;
let serialized = deserialize_hex.unwrap;
assert_eq!;
See the documentation for more details.
Building & Running Tests
cargo build
cargo test
- build the docs:
$ cargo rustdoc