1#![deny(
29 non_upper_case_globals,
30 non_camel_case_types,
31 non_snake_case,
32 unused_mut,
33 unused_imports,
34 dead_code,
35 )]
37#![cfg_attr(docsrs, feature(doc_auto_cfg))]
38
39#[macro_use]
40extern crate amplify;
41#[macro_use]
43extern crate strict_encoding;
44extern crate commit_verify;
45#[cfg(feature = "serde")]
46#[macro_use]
47extern crate serde_crate as serde;
48
49extern crate core;
50pub extern crate secp256k1;
52
53mod block;
54pub mod opcodes;
55mod script;
56mod pubkeys;
57mod segwit;
58mod taproot;
59mod tx;
60mod hashtypes;
61mod sigtypes;
62mod timelocks;
63mod util;
64mod weights;
65#[cfg(feature = "stl")]
66pub mod stl;
67mod coding;
68mod sigcache;
69
70pub use block::{BlockHash, BlockHeader, BlockMerkleRoot};
71pub use coding::{
72 ByteStr, ConsensusDataError, ConsensusDecode, ConsensusDecodeError, ConsensusEncode, LenVarInt,
73 VarInt, VarIntArray, VarIntBytes,
74};
75pub use hashtypes::{PubkeyHash, ScriptHash, WPubkeyHash, WScriptHash};
76pub use opcodes::OpCode;
77pub use pubkeys::{CompressedPk, InvalidPubkey, LegacyPk, PubkeyParseError, UncompressedPk};
78pub use script::{RedeemScript, ScriptBytes, ScriptPubkey, SigScript};
79pub use segwit::{SegwitError, Witness, WitnessProgram, WitnessScript, WitnessVer, Wtxid};
80pub use sigcache::{PrevoutMismatch, SighashCache, SighashError};
81pub use sigtypes::{Bip340Sig, LegacySig, ScriptCode, SigError, Sighash, SighashFlag, SighashType};
82pub use taproot::{
83 Annex, AnnexError, ControlBlock, FutureLeafVer, InternalKeypair, InternalPk, IntoTapHash,
84 InvalidLeafVer, InvalidParityValue, LeafScript, LeafVer, OutputPk, Parity, TapBranchHash,
85 TapCode, TapLeafHash, TapMerklePath, TapNodeHash, TapScript, TapSighash, XOnlyPk,
86 MIDSTATE_TAPSIGHASH, TAPROOT_ANNEX_PREFIX, TAPROOT_LEAF_MASK, TAPROOT_LEAF_TAPSCRIPT,
87};
88pub use timelocks::{
89 InvalidTimelock, LockHeight, LockTime, LockTimestamp, SeqNo, TimelockParseError,
90 LOCKTIME_THRESHOLD, SEQ_NO_CSV_DISABLE_MASK, SEQ_NO_CSV_TYPE_MASK,
91};
92pub use tx::{
93 BlockDataParseError, Outpoint, OutpointParseError, Sats, Tx, TxIn, TxOut, TxVer, Txid, Vout,
94};
95pub use util::NonStandardValue;
96pub use weights::{VBytes, Weight, WeightUnits};
97
98pub const LIB_NAME_BITCOIN: &str = "Bitcoin";