Expand description
RPC JSON request/response types for the Fiber Network.
This crate contains the pure data types (request/response structs and enums) used by the Fiber Network’s JSON-RPC API. These types are separated from the RPC server implementations to allow external tools and clients to depend on the type definitions without pulling in the full node implementation.
All domain-specific types (Hash256, Pubkey, MultiAddr, etc.) are represented as plain strings in this crate to avoid dependencies on fiber-types, secp256k1, and tentacle-multiaddr. Conversions between these JSON types and the internal domain types are handled in the RPC server layer.
The types are organized by RPC module:
channel: Channel management typespayment: Payment typesgraph: Network graph typesinvoice: Invoice typesinfo: Node info typespeer: Peer management typescch: Cross-chain hub typesdev: Development/debug typeswatchtower: Watchtower typesprof: Profiling typescontext: RPC context types
Re-exports§
pub use serde_utils::Hash256;pub use serde_utils::Privkey;pub use serde_utils::Pubkey;pub use channel::*;pub use context::*;pub use dev::*;pub use graph::*;pub use info::*;pub use invoice::*;pub use payment::*;pub use peer::*;pub use prof::*;
Modules§
- channel
- Channel management types for the Fiber Network JSON-RPC API.
- context
- RPC context types for the Fiber Network JSON-RPC API.
- dev
- Development/debug types for the Fiber Network JSON-RPC API.
- graph
- Network graph types for the Fiber Network JSON-RPC API.
- info
- Node info types for the Fiber Network JSON-RPC API.
- invoice
- Invoice types for the Fiber Network JSON-RPC API.
- payment
- Payment types for the Fiber Network JSON-RPC API.
- peer
- Peer management types for the Fiber Network JSON-RPC API.
- prof
- Profiling types for the Fiber Network JSON-RPC API.
- schema_
helpers - Schema helper functions for generating JSON Schema descriptions of custom hex types.
- serde_
utils - Serde utilities for hex serialization of types used in JSON RPC.
Macros§
- define_
rpc_ flags - Macro to define flags types that serialize to SCREAMING_SNAKE_CASE strings. For single flag, returns the flag name in SCREAMING_SNAKE_CASE (e.g., “OUR_INIT_SENT”). For multiple flags, returns pipe-separated names (e.g., “OUR_INIT_SENT | THEIR_INIT_SENT”).