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§
- Utxo
- Mimics the Bitcoin Core UTXO typedef (bitcoinconsenus.h)
Enums§
- Error
- Errors returned by
libbitcoinconsensus
.
Constants§
- VERIFY_
ALL_ PRE_ TAPROOT - VERIFY_
CHECKLOCKTIMEVERIFY - Enable CHECKLOCKTIMEVERIFY (BIP65).
- VERIFY_
CHECKSEQUENCEVERIFY - Enable CHECKSEQUENCEVERIFY (BIP112).
- VERIFY_
DERSIG - Enforce strict DER (BIP66) compliance.
- VERIFY_
NONE - Do not enable any verification.
- VERIFY_
NULLDUMMY - Enforce NULLDUMMY (BIP147).
- VERIFY_
P2SH - Evaluate P2SH (BIP16) subscripts.
- VERIFY_
TAPROOT - Enable TAPROOT (BIPs 341 & 342)
- VERIFY_
WITNESS - Enable WITNESS (BIP141).
Functions§
- height_
to_ flags - Computes flags for soft fork activation heights on the Bitcoin network.
- verify
- Verifies a single spend (input) of a Bitcoin transaction.
- verify_
with_ flags - Same as verify but with flags that turn past soft fork features on or off.
- version
- Returns
libbitcoinconsensus
version.