v0.1.0-pre.024
This commit is contained in:
22
kb-onchain-transport/src/client.rs
Normal file
22
kb-onchain-transport/src/client.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
// 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>>;
|
||||
}
|
||||
Reference in New Issue
Block a user