1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! # chia-peer — DIG Chia light-client connectivity (dig-node seam 1)
//!
//! A thin wrapper that CONFIGURES and DRIVES [`chia_wallet_sdk`]'s light-client `Peer` so a DIG node
//! can act as a Chia wallet-protocol client: connect to full nodes, subscribe to coin/puzzle-hash
//! state, track the peak, handle reorgs, and submit spend bundles.
//!
//! The heavy lifting — the wallet-protocol wire, TLS, DNS-introducer discovery, coin-state
//! subscription, and transaction submission — lives in the SDK. This crate adds only DIG glue:
//! IPv6-first dialing (§5.2), a reorg-aware subscription cache, reconnect-with-re-arm, and a
//! [`ChainSource`] read facade.
//!
//! ## Shape
//!
//! - [`ChiaLightClient`] — connect, [`subscribe_coins`](ChiaLightClient::subscribe_coins),
//! [`subscribe_puzzle_hashes`](ChiaLightClient::subscribe_puzzle_hashes),
//! [`submit_spend`](ChiaLightClient::submit_spend), [`peak`](ChiaLightClient::peak),
//! [`unsubscribe_coins`](ChiaLightClient::unsubscribe_coins),
//! [`reconnect`](ChiaLightClient::reconnect), and
//! [`as_chain_source_provider`](ChiaLightClient::as_chain_source_provider).
//! - [`ChiaPeerProvider`] — the synchronous, fail-closed [`ChainSource`] provider dig-node registers.
//!
//! ## Reads are fail-closed
//!
//! Through the provider, `Ok(None)`/empty means the peer reliably reported absence; any
//! transport/subscription-gap failure is an `Err`, never a false `Ok(None)` — the crux of the
//! [`dig_chainsource_interface`] contract.
//!
//! ## The SDK version pairing
//!
//! This crate pins `chia-wallet-sdk = 0.34`, which shares `chia-protocol = 0.36.1` with
//! `dig-chainsource-interface = 0.3`. That single `chia-protocol` version is REQUIRED: an SDK on a
//! different `chia-protocol` line yields `Coin`/`CoinSpend`/`Bytes32` types that would not unify
//! with the interface the provider implements. The SDK version is chosen to MATCH the interface's
//! `chia-protocol`, never the other way around.
pub use ;
pub use ;
pub use ChiaPeerError;
pub use ;
pub use ChiaPeerProvider;
// Re-export the canonical interface types a consumer needs to register the provider, so it need not
// depend on `dig-chainsource-interface` separately just to name them.
pub use ;
/// The crate version, sourced from `Cargo.toml` at build time.
pub const VERSION: &str = env!;