#cosmos #celestia #blockchain #rpc-client

bin+lib celestia-core-rpc

celestia-core-rpc contains the core types returned by a Celestia Core node's RPC endpoint. All networking related features are feature guarded to keep the dependencies small in cases where only the core types are needed

1 unstable release

0.34.0 Apr 17, 2024

#8 in #celestia

Apache-2.0

435KB
10K SLoC

Crate Docs

celestia-core-rpc-rs

A Rust implementation of the core types returned by a Celestia Core node's RPC endpoint. These can be used to deserialize JSON-RPC responses.

All networking related features will be feature guarded to keep the dependencies small in cases where only the core types are needed.


lib.rs:

Tendermint RPC definitions and types.

Client

This crate optionally provides access to different types of RPC client functionality and different client transports based on which features you select when using it.

Several client-related features are provided at present:

  • http-client - Provides HttpClient, which is a basic RPC client that interacts with remote Tendermint nodes via JSON-RPC over HTTP or HTTPS. This client does not provide event::Event subscription functionality. See the Tendermint RPC for more details.
  • websocket-client - Provides WebSocketClient, which provides full client functionality, including general RPC functionality as well as event::Event subscription functionality. Can be used over secure (wss://) and unsecure (ws://) connections.

Mock Clients

Mock clients are included when either of the http-client or websocket-client features are enabled to aid in testing. This includes MockClient, which implements both Client and SubscriptionClient traits.

Dependencies

~10–24MB
~382K SLoC