niebla-158 0.1.1

Compact block filters (BIP158) + light client plumbing (BIP157) for Bitcoin wallets
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use async_trait::async_trait;
use bitcoin::BlockHash;

/// Source of block header information (height ↔ hash).
#[async_trait]
pub trait HeaderSource: Send + Sync {
    /// Current best height.
    async fn tip_height(&self) -> anyhow::Result<u32>;

    /// Block hash at an exact height.
    async fn hash_at_height(&self, height: u32) -> anyhow::Result<BlockHash>;
}