bitcoin_rs_rpc/lib.rs
1//! Synchronous Bitcoin Core-compatible JSON-RPC surface for `bitcoin-rs`.
2//!
3//! This crate intentionally exposes only watch-only wallet behavior. RPCs that
4//! would reveal, import, create, or use private keys are disabled and return a
5//! JSON-RPC internal-error response with the message
6//! `wallet has no private keys; use external signer`. PSBT construction,
7//! combination, analysis, and finalization stay available because they can be
8//! driven by external signers without this process holding private key material.
9
10#![forbid(unsafe_op_in_unsafe_fn)]
11
12extern crate alloc;
13
14/// HTTP Basic and cookie authentication.
15pub mod auth;
16/// Dependency-injected RPC state.
17pub mod context;
18/// JSON-RPC error mapping.
19pub mod error;
20/// Method dispatch and Core-compatible handlers.
21pub mod handlers;
22/// Synchronous HTTP/1.1 JSON-RPC server.
23pub mod server;
24
25pub use auth::Auth;
26pub use context::{
27 BlockBodySource, BlockRecord, Context, NetworkState, PruneResult, PruneService,
28 PruneServiceError, PruneStatus, ZmqNotification,
29};
30pub use error::RpcError;
31pub use handlers::Handler;
32pub use server::RpcServer;