pub struct EssentialNodeClient { /* private fields */ }
Expand description
Client that binds to an Essential node address.
Implementations§
Source§impl EssentialNodeClient
impl EssentialNodeClient
Sourcepub async fn list_blocks(&self, range: Range<Word>) -> Result<Vec<Block>>
pub async fn list_blocks(&self, range: Range<Word>) -> Result<Vec<Block>>
List blocks in the given L2 block number range.
Blocks are only created if there are valid solutions. Blocks are created on a regular interval.
Sourcepub async fn query_state(
&self,
contract_ca: ContentAddress,
key: Key,
) -> Result<Option<Value>>
pub async fn query_state( &self, contract_ca: ContentAddress, key: Key, ) -> Result<Option<Value>>
Query state in the given contract address and key.
This is the main way the front end application will interact with state. It only really makes sense to query state where you know what the ABI of the contract is. The state that’s returned is a list of words of variable size. The keys are also variable sized lists of words. To make use of this API you need to know what type of contract you are querying.
Trait Implementations§
Source§impl Clone for EssentialNodeClient
impl Clone for EssentialNodeClient
Source§fn clone(&self) -> EssentialNodeClient
fn clone(&self) -> EssentialNodeClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for EssentialNodeClient
impl !RefUnwindSafe for EssentialNodeClient
impl Send for EssentialNodeClient
impl Sync for EssentialNodeClient
impl Unpin for EssentialNodeClient
impl !UnwindSafe for EssentialNodeClient
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