Skip to main content

fiber_json_types/
lib.rs

1//! RPC JSON request/response types for the Fiber Network.
2//!
3//! This crate contains the pure data types (request/response structs and enums)
4//! used by the Fiber Network's JSON-RPC API. These types are separated from the
5//! RPC server implementations to allow external tools and clients to depend on
6//! the type definitions without pulling in the full node implementation.
7//!
8//! All domain-specific types (Hash256, Pubkey, MultiAddr, etc.) are represented
9//! as plain strings in this crate to avoid dependencies on fiber-types, secp256k1,
10//! and tentacle-multiaddr. Conversions between these JSON types and the internal
11//! domain types are handled in the RPC server layer.
12//!
13//! The types are organized by RPC module:
14//! - `channel`: Channel management types
15//! - `payment`: Payment types
16//! - `graph`: Network graph types
17//! - `invoice`: Invoice types
18//! - `info`: Node info types
19//! - `peer`: Peer management types
20//! - `cch`: Cross-chain hub types
21//! - `dev`: Development/debug types
22//! - `watchtower`: Watchtower types
23//! - `prof`: Profiling types
24//! - `context`: RPC context types
25
26pub mod schema_helpers;
27pub mod serde_utils;
28
29#[cfg(test)]
30mod tests;
31
32#[cfg(feature = "conversion")]
33pub mod convert;
34
35#[cfg(feature = "cch")]
36pub mod cch;
37pub mod channel;
38pub mod context;
39pub mod dev;
40pub mod graph;
41pub mod info;
42pub mod invoice;
43pub mod payment;
44pub mod peer;
45pub mod prof;
46#[cfg(feature = "watchtower")]
47pub mod watchtower;
48
49#[cfg(feature = "cch")]
50pub use cch::*;
51pub use channel::*;
52pub use context::*;
53pub use dev::*;
54pub use graph::*;
55pub use info::*;
56pub use invoice::*;
57pub use payment::*;
58pub use peer::*;
59pub use prof::*;
60pub use serde_utils::Hash256;
61pub use serde_utils::Privkey;
62pub use serde_utils::Pubkey;
63#[cfg(feature = "watchtower")]
64pub use watchtower::*;