Expand description

Common re-exports

Re-exports

pub use crate::builder::*;
pub use crate::enc::*;
pub use crate::hashes::BlockHash;
pub use crate::hashes::TXID;
pub use crate::hashes::WTXID;
pub use crate::types::*;
pub use crate::defaults::*;

Modules

Specifies an abstract AddressEncoder that is used to convert Address to/from the in-memory representation of the associated spending constraint.

Contains simplified access to bech32 and base58check encoder/decoder for Bitcoin addresses. Also defines common encoder errors.

Structs

A Digest implementation that performs Bitcoin style double-sha256

Struct representing a generic array - GenericArray<T, N> works like [T; N]

A Digest implementation that performs Bitcoin style double-sha256

A bitcoin-style Hash160

A Digest implementation that performs Bitcoin style double-sha256

A bitcoin-style Hash256

Enums

Errors that can be returned by the Bitcoin AddressEncoder.

Operation mode for read_seq_from.

Traits

An AddressEncoder encodes and decodes addresses. This struct is used by the Builder to decode addresses, and is associated with a Network object. It handles converting addresses to recipients and vice versa. It also contains a function that wraps a string in the appropriate address type.

A simple trait for deserializing from std::io::Read and serializing to std::io::Write.

Convinience wrapper trait covering functionality of cryptographic hash functions with fixed output size.

A marked digest

Convenience interface for hash function outputs, particularly marked digest outputs

A Network describes a possible UTXO network. It is primarily a collection of types with enforced relationships, but also provides convenient access the the transaction builder, the address encoder, and other network-associated functionality.

Basic functionality for a Transaction

A builder-pattern interface for constructing transactions. Implementations should accumulate inputs, outputs, witnesses, and other TX data, and then build() a Transaction object from the accumulated data.

Functions

Decodes base58check into a byte string. Returns a FromBase58CheckError if the checksum or encoding is wrong. Returns a WrongVersion if it decodes an unexpected version.

Decode a witness program from a bech32 string. Caller specifies an expected HRP. If a different HRP is found, returns WrongHrp.

Encodes a byte slice to base58check with the specified version byte.

Encode a byte vector to bech32. This function expects v to be a witness program, and will return an UnknownScriptType if it does not meet the witness program format.

Type Definitions

Output of a Digest function

The default encoder, selected by feature flag

A simple result type alias

The default network, selected by feature flag

RIPEMD-160 hasher.

SHA-3-256 hasher state.

SHA-256 hasher.