bark-wallet 0.6.2

Wallet library and CLI for the bitcoin Ark protocol built by Second
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Source of blockchain tip.

use std::future::Future;

use bark_runtime::{MaybeSend, MaybeSync};
use bitcoin_ext::BlockRef;

/// A backend the tip watcher can fetch the current chain tip from.
///
/// Implementors can use a plain `async fn tip_ref`. The [MaybeSend]
/// bounds require [Send] futures on native platforms only; on WASM the
/// runtime is single-threaded and HTTP client futures aren't [Send].
pub trait TipSource: MaybeSend + MaybeSync {
	fn tip_ref(&self) -> impl Future<Output = anyhow::Result<BlockRef>> + MaybeSend;
}