silent_payments_descriptor/lib.rs
1//! [BIP 392](https://github.com/bitcoin/bips/blob/master/bip-0392.mediawiki) Silent Payments
2//! descriptor parsing, generation, and annotations.
3//!
4//! This crate provides [`SpDescriptor`] for representing SP wallet configurations
5//! as portable descriptor strings with scanning metadata (BIP 393 annotations).
6//!
7//! # Supported Forms
8//!
9//! - Two-key hex: `sp(02<scan_hex>,03<spend_hex>)#checksum`
10//! - Single-key spscan: `sp(spscan1q...)#checksum` (scan secret derived to pubkey, then discarded)
11//! - Single-key spspend: Rejected (incomplete -- no scan key available)
12//!
13//! # Annotations (BIP 393)
14//!
15//! Annotations appear after the closing paren and before the checksum:
16//! `sp(...)?bh=850000&gl=20&ml=100#checksum`
17
18pub mod checksum;
19pub mod descriptor;
20pub mod error;
21pub mod parser;
22
23pub use checksum::{descriptor_checksum, verify_checksum};
24pub use descriptor::SpDescriptor;
25pub use error::DescriptorError;