Struct oasis_runtime_sdk::modules::rofl::app::Client

source ·
pub struct Client<A: App> { /* private fields */ }
Expand description

A runtime client meant for use within runtimes.

Implementations§

source§

impl<A> Client<A>
where A: App,

source

pub async fn latest_round(&self) -> Result<u64>

Retrieve the latest known runtime round.

source

pub async fn account_nonce(&self, round: u64, address: Address) -> Result<u64>

Retrieve the nonce for the given account.

source

pub async fn gas_price(&self, round: u64, denom: &Denomination) -> Result<u128>

Retrieve the gas price in the given denomination.

source

pub async fn query<Rq, Rs>( &self, round: u64, method: &str, args: Rq, ) -> Result<Rs>
where Rq: Encode, Rs: Decode + Send + 'static,

Securely query the on-chain runtime component.

source

pub async fn estimate_gas(&self, req: EstimateGasQuery) -> Result<u64>

Securely perform gas estimation.

source

pub async fn multi_sign_and_submit_tx( &self, signers: &[&dyn Signer], tx: Transaction, ) -> Result<CallResult>

Sign a given transaction and submit it.

This method supports multiple transaction signers.

source

pub async fn sign_and_submit_tx( &self, signer: &dyn Signer, tx: Transaction, ) -> Result<CallResult>

Sign a given transaction and submit it.

source

pub async fn with_store_for_round<F, R>(&self, round: u64, f: F) -> Result<R>
where F: FnOnce() -> Result<R> + Send + 'static, R: Send + 'static,

Run a closure inside a CurrentState context with store for the given round.

source

pub async fn store_for_round(&self, round: u64) -> Result<HostStore>

Return a store corresponding to the given round.

Trait Implementations§

source§

impl<A> Clone for Client<A>
where A: App,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<A> Freeze for Client<A>

§

impl<A> !RefUnwindSafe for Client<A>

§

impl<A> Send for Client<A>

§

impl<A> Sync for Client<A>

§

impl<A> Unpin for Client<A>

§

impl<A> !UnwindSafe for Client<A>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V