Expand description
§silent-tweak-sdk
Zero-trust BIP352 Silent Payment client SDK.
The scan key (b_scan) never leaves the client. All cryptographic
derivation happens locally. The remote server is treated as an
untrusted tweak provider: its data is always verified against a
Merkle commitment before use.
§Quick start
use silent_tweak_sdk::{SilentTweakClient, SilentTweakClientConfig, ScanKeys};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let keys = ScanKeys::from_secret_bytes(
&hex::decode("b_scan_hex_here").unwrap(),
&hex::decode("b_spend_hex_here").unwrap(),
)?;
let cfg = SilentTweakClientConfig::new("http://localhost:8080");
let client = SilentTweakClient::new(keys, cfg)?;
let outputs = client.scan_range(840_000, 840_100).await?;
println!("Found {} matching outputs", outputs.len());
Ok(())
}Re-exports§
pub use client::SilentTweakClient;pub use client::SilentTweakClientConfig;pub use crypto::ScanKeys;pub use crypto::SilentPaymentOutput;pub use filters::gcs_encode;pub use memo::ScanMemo;
Modules§
- client
- High-level zero-trust client API.
- crypto
- BIP352 cryptographic primitives — constant-time, audited crates only.
- filters
- BIP158-style compact block filters for pre-filtering.
- memo
- Scan-Memo — a compact bit-vector that records which blocks have been fully scanned so that recovery restarts at the right position.
- proto
- Wire types shared between server and client.
Enums§
- Error
- Library-level error type.
Type Aliases§
- Result
- Library result alias.