23 lines
646 B
Rust
23 lines
646 B
Rust
// file: kb-onchain-transport/src/client.rs
|
|
// version: 3
|
|
|
|
//! RPC client scaffold for Solana ingestion.
|
|
|
|
/// RPC endpoint configuration.
|
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
|
pub struct RpcEndpoint {
|
|
/// HTTP RPC URL.
|
|
pub http_url: std::string::String,
|
|
/// Optional WebSocket RPC URL.
|
|
pub ws_url: std::option::Option<std::string::String>,
|
|
}
|
|
|
|
/// Minimal Solana RPC client abstraction.
|
|
pub trait SolanaRpcClient {
|
|
/// Fetches a raw transaction payload by signature.
|
|
fn get_transaction_raw_json(
|
|
&self,
|
|
signature: &kb_lib::MdSignature,
|
|
) -> kb_core::Result<std::option::Option<std::string::String>>;
|
|
}
|