Crate elements[][src]

Rust Elements Library

Extensions to rust-bitcoin to support deserialization and serialization of Elements transactions and blocks.

Re-exports

pub extern crate bitcoin;
pub use bitcoin::bech32;
pub use bitcoin::hashes;
pub use bitcoin::secp256k1;
pub use address::Address;
pub use address::AddressParams;
pub use address::AddressError;
pub use hash_types::*;
pub use issuance::AssetId;
pub use issuance::ContractHash;
pub use script::Script;

Modules

address

Addresses

blech32

Blech32

confidential

Confidential Commitments

dynafed

Dynamic Federations

encode

Consensus-encodable types

hash_types

File defines types for hashes used throughout the library. These types are needed in order to avoid mixing data of the same hash format (like SHA256d) but of different meaning (transaction id, block hash etc).

issuance

Asset Issuance

opcodes

Opcodes

script

Script

sighash

BIP143 Implementation

slip77

Implemenation of SLIP-0077: Deterministic blinding key derivation for Confidential Transactions

Structs

AssetIssuance

Description of an asset issuance in a transaction input

Block

Elements block

BlockHeader

Elements block header

OutPoint

A reference to a transaction output

PeginData

Parsed data from a transaction input's pegin witness

PegoutData

Information about a pegout

Transaction

Elements transaction

TxIn

A transaction input, which defines old coins to be consumed

TxInWitness

Transaction input witness

TxOut

Transaction output

TxOutWitness

Transaction output witness

VarInt

A variable-length unsigned integer

Enums

BlockExtData

Data related to block signatures

SigHashType

Hashtype of a transaction, encoded in the last byte of a signature Fixed values so they can be casted as integer types for encoding

Functions

fast_merkle_root

Compute the Merkle root of the give hashes using mid-state only. The inputs must be byte slices of length 32. Note that the merkle root calculated with this method is not the same as the one computed by a normal SHA256(d) merkle root.