NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #2502 most downloaded on crates.io
General purpose library for using and interoperating with Bitcoin.
Latest stable
0.32.102
Last release 4 months ago
22 Jul 2026
Release timing varies
gaps range from 8 days to 6 months
Most releases are documented
notes for 45 of the last 60 stable releases
4 versions withdrawn
withdrawn after publishing
11 years old
115 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Deprecate unchecked amount ops #3759
This series of beta releases is meant for two things:
To allow testing of the upcoming bitcoin v0.33.0. It's been a long
time since we released and there is a lot in this.
To allow testing of the 1.0.0 RC releases of:
bitcoin-primitivesbitcoin-unitsbitcoin-consensus-encodingcargo can be surprising when there is a - in the version number
(see discussion on #5229).
We do not intend on ever releasing 0.33.0. The next release will be
0.34.0-beta (excluding possible 0.33.x-beta point releases). We
will remove the -beta suffix from release versions once units,
primitives, and consensus_encoding v1.0.0 are done.
For changes to our dependencies included in this release see:
bitcoin-primitives: 0.102: changelogbitcoin-units 0.3: changelogbitcoin-consensus-encoding 0.1 changelogbitcoin_hashes 0.20: changelogbase58ck 0.4: changelogbitcoin-io 0.5: changeloghex-conservative 1.0.0: changeloghex-conservative 0.3: changelogThis release introduces an upper limit on the Amount type.
Amount::MAX and replace it with the value in MAX_MONEY #3691MAX_MONEY invariant #4164MAX_MONEY invariant in amount types #4157MAX_MONEY in serde regression test #3950The serde serialization for Psbt has changed.
Psbt serde implementations #4496amount ops #3759Weight::to_kwu_ceil #3740Weight::from_wu_usize function #3738primitives #3734Integer trait #37240.2.0 #3717Ord for NodeInfo #3699Amount::MAX from u64::MAX to Amount::MAX_MONEY #3693from_next_work_required to take an i64 for timespan #3660is_standard_op_return #3643Address::into_unchecked #3640checked_ functions as const #3636fee_rate #3627FeeRate #3604checked_div_by_weight into floor and ceiling version #3587unsafe marker from slice-to-script conversions #35690.1.3 #3566block::Header as BlockHeader #3562hex-conservative to 0.3.0 #3543amount module #3541amount module #3539Subtype consensus_encode #3519units::amount::ParseError #3496Amount::to_sat and SignedAmount::to_sat const #3493ENABLE_RBF_NO_LOCKTIME with ENABLE_LOCKTIME_AND_RBF #3459FINAL #3439Midstate::into_parts to Midstate::to_parts since it derives Copy #3429push_int #3392Default implementations #3386FeeRate addition and subtraction traits #3381Xpriv::to_xpub and improve related method names #3358impl AsRef<[u8]> in signed_msg_hash #3357GetKey for sets (plus some related changes) #3356miri checks #3328ArrayVec::extend_from_slice #3272T::from_str(s) to s.parse::<T>() in examples, docs and tests #3262Arbitrary to Weight #3257units version #3248base58 on small inputs #3002TxIdentifier trait #2987Amount decimals handling #2951OP_RETURN standardness check #2949VarInt and use ReadExt and WriteExt trait methods instead #2931From<&'a [#u32]> for DerivationPath #2909UnprefixedHexError in the bitcoin crate root #2895blockdata from paths #2885PushBytes::read_scriptint(x) to x.read_scriptint() #2872Denomination::MilliSatoshi #2870Height & Time based locktime #2858RawNetworkMessage #2839bitcoinconsensus version to 0.106.0+26 #2833difficulty_float general to all networks #2816Magic::from_bytes #2815AddressData type #2808Address:p2sh_from_hash public #2795to_vec in favour of to_bytes #2768base58 encoding and remove SmallVec to improve perf #2759base64 dependency #2721Script and Witness #2646MAX_SCRIPT_ELEMENT_SIZE was removed in #2794
you may want to use MAX_REDEEM_SCRIPT_SIZE or perhaps MAX_STACK_ELEMENT_SIZE (see bitcoin/src/blockdata/constants).ecdsa::Error was replaced by ecdsa::DecodeError and ecdsa::ParseSignatureError
(returned by ecdsa::Signature::from_slice and from_str respectively).script::read_scriptint was moved to be a method on PushBytes.hashes::Hash trait import.OutPoint::default() to OutPoint::COINBASE_PREVOUT if appropriate.TxIn::default() to TxIn::EMPTY_COINBASE if appropriate.to_raw_hash() to to_byte_array().bitcoin::error::UnprefixedHexError moved to bitcoin::parse::UnprefixedHexError.Your coding agent can read these notes before it upgrades. Set up the MCP server →
Backport: Make SendCmpct idempotent #6525
SendCmpct idempotent #6525consensus_encoding to block/compact-block p2p message types #6457consensus_encoding support to types in bitcoin-primitives #6333consensus_encoding support to core p2p message types #6443consensus_encoding support to BIP157/158 filter message types #6444write! in ParseNetwork and UnknownAddressType error displays #6386Exposes the new stabilized encoding library through the optional encoding feature. Note that enabling it bumps the MSRV to 1.74.0.
Bump the MSRV to Rust 1.60.0
Exposes the new stabilized encoding library through the optional encoding feature. Note that enabling it bumps the MSRV to 1.74.0.
Note the version number jump. We jumped to v0.32.100 when doing the MSRV bump so as to leave room for a bunch of security releases up to this number i…
This release was yanked because the MSRV bump to 1.74.0 was too aggressive for some users. See version 0.32.101 for a smaller upgrade to 1.60.0.
Bump the MSRV to Rust 1.74.0
Note the version number jump. We jumped to v0.32.100 when doing the MSRV bump so as to
leave room for a bunch of security releases up to this number if needed.
1.74.consensus_encoding crate in a point release.bitcoin-units, and
and bitcoin-primitives) without forcing the whole ecosystem to upgrade.Backport: Make SendCmpct idempotent #6527
SendCmpct idempotent #6527Fix bug in LeafVerison::Future's Display output #6208
LeafVerison::Future's Display output #6208VarInt range check #6182Inventory's Error variant #6147RawNetworkMessage decode if payload partly consumed #6140FeeRate in FeeFilter decode #6142CommandString parsing #6136internals dependency #6200Backport - Fix Unknown NetworkMessage encoding #6106
Backport - bip158: Return no match for empty query #4972
doc_auto_cfgBackport - Use _u32 in FeeRate constructor instead of _unchecked #4552
Backport - Fix is_invalid_use_of_sighash_single() incompatibility with Bitcoin Core #4122
is_invalid_use_of_sighash_single() incompatibility with Bitcoin Core #4122XOnlyPublicKey support for PSBT key retrieval and improve Taproot signing #4443Backport - Re-export bech32 crate #3662
Bound decode methods on Read, rather than BufRead #3173
Backport BIP-0032 alias' without typo #3252
Fix a bug when parsing 256-bit numeric types #2837
Fix things we broke/removed from the Address API in the last release.
Fix things we broke/removed from the Address API in the last release.
Address:p2sh_from_hash public #2806AddressData type #2810If you are looking for the address::Payload type we removed in v0.32.0 then the AddressData type
might be what you are after.
Enforce displaying Amount with trailing zeros #2604
Amount with trailing zeros #2604Signature field names #2338
sig becomes signaturehash_ty becomes sighash_typetxid to compute_txid #2366m/ prefix requirement #2451This release we continued our effort to split up the library into smaller crates AKA crate smashing.
bitcoin-units crate docsbase58ck crate docsbitcoin-io crate docsFeeRate::checked_mul_by_weight #2182InputWeightPrediction::P2WPKH_MAX constant DER sig length #2213Network typeIn release 0.31.0 we managed to annoy a lot of people by the addition of non_exhaustive to the
Network type. After much discussion, and in an effort to cater to multiple camps, we did a bunch
of changes this release. To sum up, "network" is ill defined and it means different things to
different devs/software. Your software should probably have some custom handling of whatever
"network" means to you.
In particular consider having some type that implements AsRef<Params>, we have attempted to
replace Network in much of the API (#2541).
NetworkKind #2232Network in the public API #2541Network from AddressInner #1832Params for individual networks #2396params() method to Network #2172KnownHrp instead of Network #2387CompressedPublicKey #2277consensus::deserialize_hex function #2039Witness::p2tr_key_spend function #2097taproot::SerializedSignature #2156Weight::from_vb_weight function function (added in #2206,
renamed in #2228LowerHex and UpperHex for CompactTarget #2221transaction::effective_value() function #2230LockTimes and related types:
ArrayVec
Display for transaction::Version #2309Amount and SignedAmount (add, sum etc.) #2436p2wpkh_script_code to Script and ScriptBuf #2445TapNodeHash getter method on TapTree and NodeInfo #2467From<core::convert::Infallible> for errors #2516io::BufRead instead of io::Read in consensus decode trait #2240Payload and AddressEncoding private #1979bech32 from the public API #2381Prevouts errors out into specific error types #2042sighash module #2329amount module errors #2487FromScriptError for handling errors in address #2497NetworkValidationError #2508 but don't return it #2610Nothing published for this version
Nothing published for this version
Nothing published for this version
Add BIP-0032 types remove in 0.31 back in and mark as deprecated #2258
Bump MSRV to Rust 1.48.0 #1729
Add new example code for signature verification #1776
Manually implement Debug on Witness #1913
Upgrade to secp256k1 v0.28.0 #2098
Upgrade to base64 v0.21.3 #2032
API Improvements:
ChainHash::from_genesis_block_hash#1753PartialEq trait for Address<NetworkUnchecked> #1757Inventory::network_hash() method #515serde::Serialize for Address #1785PrivateKey #1837InputWeightPrediction #1835FeeRate::checked_mul_by_weight #1864Amount type for the TxOut value field #1811Amount::from_int_btc #1870ckd_priv function private and impl AsRef for ChildNumber #1882hex_lit::hex in benches (also backported to v0.30.1) #1941PublicKey #1911Script::count_sigops #1890From<PublicKey> for XOnlyPublicKey #1901From<secp256k1::PublicKey> for bitcoin::PublicKey #1949DerivationPath::to_u32_vec #1946Target as type for pow_limit #2107Witness::p2wpkh constructor #2084Instruction be able to read the script number #2081Script::is_mulitsig #2078Transaction #2073Psbt fee checks #2064transaction::Version data type #2006Moves, Removes, and renames:
psbt::Prevouts #1872Transaction::is_coin_base to is_coinbase #1796TaprootSpendInfo::as_script_map to script_map #1897Script::empty to Script::new #1925PartiallySignedTransaction to Psbt #1938XpubIdenifier to XKeyIdentifier #2021ExtendedPubKey to Xpub #2019ExtendedPrivKey to Xpriv #2019_v0 from various function names (eg, new_v0_p2wpkh) #1994SighashCache::segwit_signature_hash (add p2wpkh_signiture_hash and p2wsh_signature_hash) #1995opcodes::All to Opcode #1995TxOut::default(), the same logic now exists as TxOut::NULL #1811 and #1838Error handling improvements:
Add new example code for signature verification #1776
Bump MSRV to Rust 1.48.0 #1729
Add new example code for signature verification #1776
Manually implement Debug on Witness #1913
Upgrade to secp256k1 v0.28.0 #2098
Upgrade to base64 v0.21.3 #2032
API Improvements:
ChainHash::from_genesis_block_hash#1753PartialEq trait for Address<NetworkUnchecked> #1757Inventory::network_hash() method #515serde::Serialize for Address #1785PrivateKey #1837InputWeightPrediction #1835FeeRate::checked_mul_by_weight #1864Amount type for the TxOut value field #1811Amount::from_int_btc #1870ckd_priv function private and impl AsRef for ChildNumber #1882hex_lit::hex in benches (also backported to v0.30.1) #1941PublicKey #1911Script::count_sigops #1890From<PublicKey> for XOnlyPublicKey #1901From<secp256k1::PublicKey> for bitcoin::PublicKey #1949DerivationPath::to_u32_vec #1946Target as type for pow_limit #2107Witness::p2wpkh constructor #2084Instruction be able to read the script number #2081Script::is_mulitsig #2078Transaction #2073Psbt fee checks #2064transaction::Version data type #2006Moves, Removes, and renames:
psbt::Prevouts #1872Transaction::is_coin_base to is_coinbase #1796TaprootSpendInfo::as_script_map to script_map #1897Script::empty to Script::new #1925PartiallySignedTransaction to Psbt #1938XpubIdentifier to XKeyIdentifier #2021ExtendedPubKey to Xpub #2019ExtendedPrivKey to Xpriv #2019_v0 from various function names (eg, new_v0_p2wpkh) #1994SighashCache::segwit_signature_hash (add p2wpkh_signature_hash and p2wsh_signature_hash) #1995opcodes::All to Opcode #1995TxOut::default(), the same logic now exists as TxOut::NULL #1811 and #1838Error handling improvements:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Expose valid (min, max) difficulty transition thresholds #1820 difficulty transition thresholds)
Fix compilation when `RUSTFLAGS=--cfg=bench` is set
RUSTFLAGS=--cfg=bench is setThere are numerous breaking changes in this release related to the new language features but also other improvements such as more newtypes added. Note…
We now have a website for crates that live under the rust-bitcoin GitHub organization: https://rust-bitcoin.org/
This release is big, to help users upgrade we wrote a blog post, please see https://rust-bitcoin.org/blog/release-0.30.0/
Import bitcoin_hashes into this repository.
Update dependencies we control
bitcoin-privatebitcoin_hashes v0.12secp256k1 v0.27We moved a lot of modules around, specifically we move basically everything out of util.
API improvements:
Address's networkWitness featuresWitness API improvementsScript to ScriptBuf and added a new unsized type Scripttapscript_leaf_hash() to ScriptTapLeafHash and TapBranchHash into TapNodeHash while tree constructionScript::builder convenience functionPartiallySignedTransaction::feeScript::p2pk_public_key(&self) -> Option<PublicKey>log2 to WorkTxIn and TxOutTweakedKeyPair -> TweakedPublicKeyFrom<Address> for ScriptBuffrom_slice methods to decodeabsolute::LockTime::is_satisfied_by_lockFromHexStr for parsing strings with and without 0x prefixdifficulty_float method for block::HeaderVarious sighash code moves, and type improvements:
New types:
Removed types/traits:
ToHexPackedLockTime, replace with richer LockTime everywhere
Be aware that LockTime does not have an Ord implementation, so users who need a
total ordering on locktimes will be forced to wrap this type. In Transaction, which
contains a LockTime but is Ord, we have manually sorted the locktimes based on
their consensus encoding. This ordering is somewhat arbitrary -- there is no total
ordering on locktimes since they may be measured in either blocks or seconds.FromHex implementation from
all types except Vec and arrays, replace where appropriate with FromStr.Performance improvements:
Testing improvements:
As promised, this is our quick release to bring on edition 2018 by increasing our MSRV to Rust 1.41.1 #983
This work saw a bunch of new language features become available to us. At the
same time we were able to start using rustfmt. We also started linting as part
of CI.
There are numerous breaking changes in this release related to the new language features but also
other improvements such as more newtypes added. Note that not all changes cause compilation failure!
For example, Witness serialization was changed
to support human-readable formats.
Detailed list of breaking changes
TryFrom #1007non_exhaustive to all error enums #1026clippy on CI #1061rustfmt #1040Writer/Reader by &mut in consensus en/decoding #1035self in conversion methods named to_* instead of borrowing #1161Nothing published for this version
Nothing published for this version
There are numerous breaking changes in this release related to the new language features but also other improvements such as more newtypes added. Note…
As promised, this is our quick release to bring on edition 2018 by increasing our MSRV to Rust 1.41.1 #983
This work saw a bunch of new language features become available to us. At the
same time we were able to start using rustfmt. We also started linting as part
of CI.
There are numerous breaking changes in this release related to the new language features but also
other improvements such as more newtypes added. Note that not all changes cause compilation failure!
For example, Witness serialization was changed
to support human-readable formats.
Detailed list of breaking changes
TryFrom #1007non_exhaustive to all error enums #1026clippy on CI #1061rustfmt #1040Writer/Reader by &mut in consensus en/decoding #1035self in conversion methods named to_* instead of borrowing #1161Backported a set of changes from 0.29 which may cause some specific transactions and/or blocks to fail to deserialize. No known such transactions exis
Backported a set of changes from 0.29 which may cause some specific transactions and/or blocks to fail to deserialize. No known such transactions exist on any public blockchain.
Nothing published for this version
Delete the deprecated contracthash module #871; this functionality will migrate to ElementsProject/rust-elements
At nearly nine months, this is our longest release cycle ever, and thanks to a huge increase in the number of active contributors this year and last, it is also by far our largest release ever, at 148 PRs merged from 23 different contributors. Our primary goal in this release was to introduce support for Taproot and its associated data structures: addresses, taptrees, sighashes, PSBT fields, and more. As it turned out, these changes required (or at least, incentivized) changing a lot of our APIs, causing a significant increase in scope.
We have more big changes coming down the pike. 2022 is going to be a big
year for rust-bitcoin, which we know is exciting for us but disruptive to
downstream users who ultimately want the library to just work. Our hope is
that by 2023 we will have eliminated large amounts of technical debt,
modernized our APIs to meet current Rust conventions, and clarified the scope
of the individual crates in this ecosystem while still providing the essential
functionality needed by our downstream users, especially wallet projects.
We will also develop a plan to make our releases more predictable and manageable, likely by having scheduled releases with limited scope. We would like to reach a point where we no longer have frequent breaking releases, but right now we are nowhere close.
Upcoming changes will include
With so many changes since 0.27, we cannot list every PR. Here are the highlights:
fuzztarget cargo feature #634Script #596WitnessVersion type #617Block.get_strippedsize() and Transaction.get_vsize() #626PrivateKey and PublicKey #762SIGHASH_SINGLE bug #860 #897contracthash module #871; this functionality will migrate to ElementsProject/rust-elementsAdditionally we made several minor API changes (renaming methods, etc.) to improve compliance with modern Rust conventions. Where possible we left the existing methods in place, marked as deprecated.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Use Amount type for dust value calculation
Fix `Display` impl of `ChildNumber`
The previous release changed the behavior of Display for ChildNumber, assuming that any correct usage would not be
affected. Issue 608 goes into the details of why this isn't
the case and how we broke both rust-miniscript and BDK.
Change Amount Debug impl to BTC with 8 decimals
Add wtxidrelay message and `WTx` inv type for BIP 339
WTx inv type for BIP 339FilterHeader and FilterHashPublicKey::write_intoOrd and PartialOrd for Inventorymessage::MAX_INV_SIZE constantToSocketAddrs for network addressesInventory and NetworkMessage enums exhaustivePublicKey::read_from method symmetric with write_torecovery feature by defaultconsensus_encode to io::ErrorNothing published for this version
Remove an incorrect debug_assert that can cause a panic when running using the dev profile.
debug_assert that can cause a panic when running using
the dev profile.- Bump MSRV to 1.29.0
Deprecate util::contracthash module
BitcoinHash traitSigHashCache structure to replace SighashComponents and support all sighash modesTransaction::get_size methodutil::amount::DenominationBlock::get_size and Block::get_weight methodsMerkleBlock::from_header_txidsBlockHeader::u256_from_compact_targetfeefilter network messageScript::Instructions iterator APIutil::contracthash moduleUint128 and Uint256slice_to_u64_be endian conversion methodUpdate secp256k1 dependency to 0.17.1.
secp256k1 dependency to 0.17.1.bitcoinconsensus dependency to 0.19.0-1.bech32 dependency to 0.7.2.Add newtypes for specific hashes:
ServiceFlags type.NetworkMessage::command.key::Error.TxidWtxidBlockHashSigHashPubkeyHashScriptHashWPubkeyHashWScriptHashTxMerkleNodeWitnessMerkleNodeWitnessCommitmentXpubIdentifierFilterHashCommandString.Reject message.RejectReason enum variants.encode::Error.Default for TxIn.std::hash::Hash for Inventory.Copy for InvType enum.psbt::Error in PartiallySignedTransaction::from_unsigned_tx.hex and byteorder dependencies.Clean up `StreamReader` API (breaking change)
BlockHeader and BlockStreamReader API (breaking change)Update secp256k1 0.15 and bitcoinconsensus 0.17
secp256k1 0.15 and bitcoinconsensus 0.17Nothing published for this version
Nothing published for this version
Add Amount and SignedAmount types.
Amount and SignedAmount types.BlockFilter and related types.util::misc::signed_msg_hash() for signing messages.MerkleBlock and PartialMerkleTree types.ChildNumber::incrementDerivationPath::children_fromDerivationPath::normal_childrenDerivationPath::hardened_childrenblockdata::script::Builder::push_verify to verify-ify an opcode.sendheaders network message.OutPoint::new() method and JSON-serialize as <txid>:<vout>.Address type:
Address::from_script constructor.Address::address_type inspector.address::Error instead of encode::Error.bitcoin_bech32 dependency for bech32 payloads.witness_script to script_codeBlockHeader::spv_validate to validate_powOP_NOP2 and OP_NOP3 to OP_CLTV and OP_CSVBTreeMap instead of HashMap to ensure serialization roundtrips.Decimal type.LoneHeaders type.strason dependency with (optional) serde_json.bitcoin_hashes and secp256k1 dependent crates.bitcoin_hashes dependency to v0.7.rand and serde_test dependencies.Nothing published for this version
Nothing published for this version
Update bitcoin-bech32 version to 0.9
bitcoin-bech32 version to 0.9to_bytes method for util::key typesutil::key typesutil::key types instead of secp256k1 typesAdd some trait impls to PublicKey for miniscript interoperability
PublicKey for miniscript interoperabilityUpdate minimum rustc version to 1.22.
rust-crypto with bitcoin_hashes; refactor hash typesAddress::p2pkMerkleRoot implementation; it is now only defined for Blocksecp256k1 onesOption serialization codeReorganize opcode types to eliminate unsafe code
util::iter::Pair type which does not belong in this libraryDetect p2pk addresses with compressed keys
Remove nu_select macro and low-level networking support
nu_select macro and low-level networking supportnetwork::consensus_params to consensus::paramsconsensus::paramsBitcoinHash from network::serialize to util::hash; remove impl for Vec<u8>Consensus{De,En}coder to consensus::{De,En}coderRaw{De,En}coder with blanket impls of consensus::{De,En}coder on io::Read and io::Writeserialize and serialize_hex infallibleFromStr and Display for many more typesOne column per quarter.