pub struct SoneiumRpcClient { /* private fields */ }Expand description
Soneium mainnet read-only JSON-RPC namespace.
The deliberately narrow surface has compile-fail coverage for forbidden escape hatches and state-changing operations:
ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.soneium.rpc;
let _ = rpc.raw::<String>("eth_chainId", None);ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.soneium.rpc;
let _ = rpc.request::<String>("eth_chainId", Vec::<serde_json::Value>::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.soneium.rpc;
let _ = rpc.batch(Vec::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.soneium.rpc;
let _ = rpc.subscribe("newHeads", Vec::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.soneium.rpc;
let _ = rpc.eth_send_raw_transaction(["0xdeadbeef"]);Implementations§
Source§impl SoneiumRpcClient
impl SoneiumRpcClient
Sourcepub fn eth_chain_id(&self) -> PendingRpcRequest<String>
pub fn eth_chain_id(&self) -> PendingRpcRequest<String>
Sourcepub fn eth_get_balance<P: Serialize>(
&self,
params: P,
) -> Result<PendingRpcRequest<String>>
pub fn eth_get_balance<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>
Creates a pending positional eth_getBalance read.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SoneiumRpcClient
impl !UnwindSafe for SoneiumRpcClient
impl Freeze for SoneiumRpcClient
impl Send for SoneiumRpcClient
impl Sync for SoneiumRpcClient
impl Unpin for SoneiumRpcClient
impl UnsafeUnpin for SoneiumRpcClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more