pub struct RobinhoodRpcClient { /* private fields */ }Expand description
Robinhood Chain Public Mainnet read-only JSON-RPC namespace.
Native ETH balances and call results remain raw JSON-RPC hex strings. The deliberately narrow surface has compile-fail coverage for forbidden escape hatches and state-changing operations:
ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.robinhood.rpc;
let _ = rpc.raw::<String>("eth_chainId", None);ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.robinhood.rpc;
let _ = rpc.request::<String>("eth_chainId", Vec::<serde_json::Value>::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.robinhood.rpc;
let _ = rpc.batch(Vec::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.robinhood.rpc;
let _ = rpc.subscribe("newHeads", Vec::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.robinhood.rpc;
let _ = rpc.eth_send_raw_transaction(["0xdeadbeef"]);Implementations§
Source§impl RobinhoodRpcClient
impl RobinhoodRpcClient
Sourcepub fn endpoint(&self) -> String
pub fn endpoint(&self) -> String
Returns the credential-free Robinhood Chain Public Mainnet read-only JSON-RPC origin and root.
Sourcepub fn eth_chain_id(&self) -> PendingRpcRequest<String>
pub fn eth_chain_id(&self) -> PendingRpcRequest<String>
Creates a pending Robinhood Chain Public Mainnet read-only JSON-RPC
eth_chainId read.
§Panics
The empty parameter array is infallible to serialize.
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 Robinhood Chain Public Mainnet read-only JSON-RPC positional native ETH balance read.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RobinhoodRpcClient
impl !UnwindSafe for RobinhoodRpcClient
impl Freeze for RobinhoodRpcClient
impl Send for RobinhoodRpcClient
impl Sync for RobinhoodRpcClient
impl Unpin for RobinhoodRpcClient
impl UnsafeUnpin for RobinhoodRpcClient
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