Crate elements

Source
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::AddressError;
pub use crate::address::AddressParams;
pub use crate::issuance::AssetId;
pub use crate::issuance::ContractHash;
pub use crate::locktime::LockTime;
pub use crate::schnorr::SchnorrSig;
pub use crate::schnorr::SchnorrSigError;
pub use crate::script::Script;
pub use crate::sighash::SchnorrSighashType;
pub use bitcoin::hashes;
pub use crate::hash_types::*;

Modules§

address
Addresses
blech32
Blech32-Encoding (Elements Segwit) Support
confidential
Confidential Commitments
dynafed
Dynamic Federations
encode
Consensus-encodable types
hash_types
File defines types for hashes used throughout the library.
hex
Hex Encoding and Decoding
issuance
Asset Issuance
locktime
Provides type LockTime that implements the logic around nLockTime/OP_CHECKLOCKTIMEVERIFY.
opcodes
Opcodes
pset
Partially Signed Elements Transactions (PSET)
schnorr
Schnorr Bitcoin keys.
script
Script
sighash
BIP143 Implementation
taproot
Taproot

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
RangeProofMessage
The Rangeproof message
Sequence
Bitcoin transaction input sequence number.
Transaction
Elements transaction
TxIn
A transaction input, which defines old coins to be consumed
TxInWitness
Transaction input witness
TxOut
Transaction output
TxOutSecrets
Information about Transaction Input Asset
TxOutWitness
Transaction output witness

Enums§

BlindError
Errors encountered when blinding transaction outputs.
BlockExtData
Data related to block signatures
ConfidentialTxOutError
Errors encountered when constructing confidential transaction outputs.
EcdsaSighashType
Hashtype of a transaction, encoded in the last byte of a signature Fixed values so they can be casted as integer types for encoding
SurjectionInput
Data structure used to provide inputs to SurjectionProof methods.
TxOutError
Transaction Output related errors
UnblindError
Errors encountered when unblinding TxOuts.
VerificationError
Transaction Verification Errors

Traits§

BlindAssetProofs
A trait to create and verify explicit surjection proofs
BlindValueProofs
A trait to create and verify explicit rangeproofs
ReadExt
Extensions of Read to decode data as per Bitcoin consensus.
WriteExt
Extensions of Write to encode data as per Bitcoin consensus.

Functions§

fast_merkle_root
Compute the Merkle root of the give hashes using mid-state only.