Crate bitcoinconsensus
Expand description
This project builds the libbitcoinconsensus
library from Bitcoin’s C++
sources using Cargo and provides Rust bindings to its API.
Enums§
- Error
- Errors returned by
libbitcoinconsensus
(see github.com/bitcoin/bitcoin/doc/shared-libraries.md).
Constants§
- VERIFY_
ALL - 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_
WITNESS - Enable WITNESS (BIP141).
Functions§
- bitcoinconsensus_
verify_ ⚠script_ with_ amount - Verifies that the transaction input correctly spends the previous output, considering any additional constraints specified by flags.
- bitcoinconsensus_
version ⚠ - Returns
libbitcoinconsensus
version. - 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.