Expand description
§Rust Elements Library
Extensions to rust-bitcoin
to support deserialization and serialization
of Elements transactions and blocks.
Re-exports§
pub extern crate bitcoin;
pub extern crate secp256k1_zkp;
pub use crate::address::Address;
pub use crate::address::AddressParams;
pub use crate::address::AddressError;
pub use crate::issuance::AssetId;
pub use crate::issuance::ContractHash;
pub use crate::locktime::LockTime;
pub use crate::script::Script;
pub use crate::sighash::SchnorrSighashType;
pub use crate::schnorr::SchnorrSig;
pub use crate::schnorr::SchnorrSigError;
pub use bitcoin::bech32;
pub use bitcoin::hashes;
pub use crate::hash_types::*;
Modules§
- Addresses
- Blech32-Encoding (Elements Segwit) Support
- Confidential Commitments
- Dynamic Federations
- Consensus-encodable 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).
- Hex Encoding and Decoding
- Asset Issuance
- Provides type
LockTime
that implements the logic around nLockTime/OP_CHECKLOCKTIMEVERIFY. - Opcodes
- Partially Signed Elements Transactions (PSET)
- Schnorr Bitcoin keys.
- Script
- BIP143 Implementation
- Taproot
Structs§
- Description of an asset issuance in a transaction input
- Elements block
- Elements block header
- A reference to a transaction output
- Parsed data from a transaction input’s pegin witness
- Information about a pegout
- The Rangeproof message
- Bitcoin transaction input sequence number.
- Elements transaction
- A transaction input, which defines old coins to be consumed
- Transaction input witness
- Transaction output
- Information about Transaction Input Asset
- Transaction output witness
- A variable-length unsigned integer.
Enums§
- Errors encountered when blinding transaction outputs.
- Data related to block signatures
- Errors encountered when constructing confidential transaction outputs.
- Hashtype of a transaction, encoded in the last byte of a signature Fixed values so they can be casted as integer types for encoding
- Data structure used to provide inputs to
SurjectionProof
methods. Inputs for which we don’t know the secrets can beSurjectionInput::Unknown
, while inputs from user’s wallet should beSurjectionInput::Known
- Transaction Output related errors
- Errors encountered when unblinding
TxOut
s. - Transaction Verification Errors
Traits§
- A trait to create and verify explicit surjection proofs
- A trait to create and verify explicit rangeproofs
Functions§
- 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.