Module handshakes::prelude[][src]

Expand description

Common re-exports

Re-exports

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

Modules

address

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

bases

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

Structs

Blake2b256

A Digest implementation that performs Bitcoin style double-sha256

GenericArray

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

Hash160

A Digest implementation that performs Bitcoin style double-sha256

Hash160Digest

A bitcoin-style Hash160

Hash256

A Digest implementation that performs Bitcoin style double-sha256

Hash256Digest

A bitcoin-style Hash256

Ripemd160

Structure representing the state of a Ripemd160 computation

Sha3_256

SHA-3-256 hash function.

Sha256

The SHA-256 hash algorithm with the SHA-256 initial hash value.

Enums

EncodingError

Errors that can be returned by the Bitcoin AddressEncoder.

ReadSeqMode

Operation mode for read_seq_from.

Traits

AddressEncoder

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.

ByteFormat

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

Digest

The Digest trait specifies an interface common for digest functions.

MarkedDigest

A marked digest

MarkedDigestOutput

Convenience interface for hash function outputs, particularly marked digest outputs

Network

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.

Transaction

Basic functionality for a Transaction

TxBuilder

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

decode_base58

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_bech32

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

encode_base58

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

encode_bech32

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

DigestOutput

Output of a Digest function

EncodingResult

A simple result type alias