bitcoinkernel 0.2.1

Safe Rust bindings to libbitcoinkernel
Documentation
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.1] 2026-05-20

### Added
- Added `BlockTreeEntry::ancestor` to look up an ancestor block at a given height. Returns `None` if the height is out of range. This operation is O(log N).
- Added `Transaction::locktime()` to retrieve a transaction's `nLockTime` value as a `u32`.
- Added `TxIn::sequence()` to retrieve an input's `nSequence` value as a `u32`.
- Added `TryFrom<&[u8]>` for `BlockHeader` to align with the exisitng `TryFrom<&[u8]>` implementation for `Block`.
- Added `BlockHeaderExt::consensus_encode` to serialize a block header to its Bitcoin wire format, returning a fixed `[u8; 80]` array.
- Added `From<BlockHeader>` and `From<&BlockHeader>` for `[u8; 80]` to align with existing block conversions.

### Dependencies

- The sys crate no longer uses auto-generated bindings from bindgen. This removes some build-time dependencies for this crate.

## [0.2.0] 2026-01-26

### Added
- Added a `PrecomputedTransactionData` struct for holding transaction hashes required for script verification. It may be initialized with and without an array of outputs spent by the transaction. If no outputs are passed, no taproot verification is possible.
- Added a `BlockHeader` struct for holding block header data. This may be used to retrieve block header struct internals, and to process block headers for the purpose of "headers-first" synchronization. Also add a `ChainstateManager` method to process block headers, i.e. validate and add them to its internal block tree data structure.

### Changed
- Updated to latest libbitcoinkernel-sys with btck_PrecomputedTransactionData` changes.
- The `verify` function now takes a `PrecomputedTransactionData` instead of an array of outputs spent by the transaction. The user is now always required to pass this struct to the function. This is done to encourage its use and protect against quadratic hashing costs.

## [0.1.1] - 2025-24-11

### Fixed
- Updated to latest libbitcoinkernel-sys with cmake packaging include fix.