Skip to main content

bsv/
lib.rs

1//! # BSV SDK
2//!
3//! A pure-Rust implementation of the BSV Blockchain SDK, translated from the
4//! official TypeScript and Go reference implementations. The crate provides
5//! everything needed to build BRC-100 compliant applications: key management,
6//! transaction construction, script evaluation, wallet operations, mutual
7//! authentication, and overlay-service integration.
8//!
9//! ## Modules
10//!
11//! - [`primitives`] -- Cryptographic building blocks: private/public keys,
12//!   big-number arithmetic, hashing, symmetric encryption, signatures, and
13//!   Shamir secret sharing.
14//! - [`script`] -- Bitcoin script types (`Script`, `LockingScript`,
15//!   `UnlockingScript`), opcodes, the script interpreter, address encoding,
16//!   and standard templates (P2PKH, PushDrop, RPuzzle).
17//! - [`transaction`] -- Transaction construction, serialization (binary, EF,
18//!   BEEF/Atomic BEEF), Merkle proofs, and fee models.
19//! - [`wallet`] -- The `WalletInterface` trait (29 BRC-compliant methods),
20//!   `ProtoWallet` (offline key/crypto operations), `KeyDeriver` (Type-42
21//!   key derivation), and wire-protocol serialization.
22//! - [`auth`] -- Mutual authentication via `Peer` handshake (BRC-31),
23//!   certificates, and `AuthFetch` for authenticated HTTP.
24//! - [`compat`] -- Compatibility helpers: BIP-32 HD keys, BIP-39 mnemonics,
25//!   BSM (Bitcoin Signed Message), and ECIES encryption.
26//! - [`services`] -- Overlay network services: lookup resolution, topic
27//!   broadcasting, identity management, and admin token templates.
28
29pub mod auth;
30pub mod compat;
31pub mod primitives;
32pub mod script;
33pub mod services;
34pub mod transaction;
35pub mod wallet;