coldstar_network/lib.rs
1//! Solana and Base RPC communication.
2//!
3//! Maps to the Python `src/network.py` + `src/transaction.py` modules.
4//! TODO: Balance queries, transaction construction, broadcast, and
5//! Jupiter/Pyth integration.
6
7pub struct SolanaClient {
8 rpc_url: String,
9}
10
11impl SolanaClient {
12 pub fn new(rpc_url: &str) -> Self {
13 Self {
14 rpc_url: rpc_url.to_string(),
15 }
16 }
17
18 pub fn rpc_url(&self) -> &str {
19 &self.rpc_url
20 }
21}
22
23pub struct BaseClient {
24 rpc_url: String,
25}
26
27impl BaseClient {
28 pub fn new(rpc_url: &str) -> Self {
29 Self {
30 rpc_url: rpc_url.to_string(),
31 }
32 }
33
34 pub fn rpc_url(&self) -> &str {
35 &self.rpc_url
36 }
37}