Crate bitcoinconsensus
source ·Expand description
This project builds the libbitcoinconsensus
library from Bitcoin’s C++
sources using Cargo and provides Rust bindings to its API.
Quoting from bitcoin/doc/shared-libraries.md
:
The purpose of this library is to make the verification functionality that is critical to Bitcoin’s consensus available to other applications, e.g. to language bindings.
And that is exactly what this library is, the Rust bindings to bitcoinconsensus
.
Modules§
Structs§
- Mimics the Bitcoin Core UTXO typedef (bitcoinconsenus.h)
Enums§
- Errors returned by
libbitcoinconsensus
.
Constants§
- Enable CHECKLOCKTIMEVERIFY (BIP65).
- Enable CHECKSEQUENCEVERIFY (BIP112).
- Enforce strict DER (BIP66) compliance.
- Do not enable any verification.
- Enforce NULLDUMMY (BIP147).
- Evaluate P2SH (BIP16) subscripts.
- Enable TAPROOT (BIPs 341 & 342)
- Enable WITNESS (BIP141).
Functions§
- Computes flags for soft fork activation heights on the Bitcoin network.
- Verifies a single spend (input) of a Bitcoin transaction.
- Same as verify but with flags that turn past soft fork features on or off.
- Returns
libbitcoinconsensus
version.