pub struct BlockingClient { /* private fields */ }

Implementations§

§

impl BlockingClient

pub fn new<T>(url: T) -> BlockingClientwhere T: Into<String>,

pub fn last_known_state(&self) -> Option<State>

pub fn wait_for_signed_transaction( &self, txn: &SignedTransaction, timeout: Option<Duration>, delay: Option<Duration> ) -> Result<Response<TransactionView>, WaitForTransactionError>

pub fn wait_for_transaction( &self, address: AccountAddress, seq: u64, expiration_time_secs: u64, txn_hash: HashValue, timeout: Option<Duration>, delay: Option<Duration> ) -> Result<Response<TransactionView>, WaitForTransactionError>

pub fn batch( &self, requests: Vec<MethodRequest, Global> ) -> Result<Vec<Result<Response<MethodResponse>, Error>, Global>, Error>

pub fn request( &self, request: MethodRequest ) -> Result<Response<MethodResponse>, Error>

pub fn submit(&self, txn: &SignedTransaction) -> Result<Response<()>, Error>

pub fn get_metadata_by_version( &self, version: u64 ) -> Result<Response<MetadataView>, Error>

pub fn get_metadata(&self) -> Result<Response<MetadataView>, Error>

pub fn get_account( &self, address: AccountAddress ) -> Result<Response<Option<AccountView>>, Error>

pub fn get_account_by_version( &self, address: AccountAddress, version: u64 ) -> Result<Response<Option<AccountView>>, Error>

pub fn get_transactions( &self, start_seq: u64, limit: u64, include_events: bool ) -> Result<Response<Vec<TransactionView, Global>>, Error>

pub fn get_account_transaction( &self, address: AccountAddress, seq: u64, include_events: bool ) -> Result<Response<Option<TransactionView>>, Error>

pub fn get_account_transactions( &self, address: AccountAddress, start_seq: u64, limit: u64, include_events: bool ) -> Result<Response<Vec<TransactionView, Global>>, Error>

pub fn get_events( &self, key: EventKey, start_seq: u64, limit: u64 ) -> Result<Response<Vec<EventView, Global>>, Error>

pub fn get_currencies( &self ) -> Result<Response<Vec<CurrencyInfoView, Global>>, Error>

pub fn get_network_status(&self) -> Result<Response<u64>, Error>

pub fn get_state_proof( &self, from_version: u64 ) -> Result<Response<StateProofView>, Error>

pub fn get_accumulator_consistency_proof( &self, client_known_version: Option<u64>, ledger_version: Option<u64> ) -> Result<Response<AccumulatorConsistencyProofView>, Error>

pub fn get_account_state_with_proof( &self, address: AccountAddress, from_version: Option<u64>, to_version: Option<u64> ) -> Result<Response<AccountStateWithProofView>, Error>

pub fn get_transactions_with_proofs( &self, start_version: u64, limit: u64, include_events: bool ) -> Result<Response<Option<TransactionsWithProofsView>>, Error>

pub fn get_account_transactions_with_proofs( &self, address: AccountAddress, start_seq: u64, limit: u64, include_events: bool, ledger_version: Option<u64> ) -> Result<Response<AccountTransactionsWithProofView>, Error>

pub fn get_events_with_proofs( &self, key: EventKey, start_seq: u64, limit: u64 ) -> Result<Response<Vec<EventWithProofView, Global>>, Error>

pub fn get_event_by_version_with_proof( &self, key: EventKey, version: Option<u64> ) -> Result<Response<EventByVersionWithProofView>, Error>

pub fn get_deserialized_events<T>( &self, event_key: &EventKey, start_seq: u64, limit: u64 ) -> Result<Response<Vec<Event<T>, Global>>, Error>where T: MoveStructType + DeserializeOwned,

Return the events of type T that have been emitted to event_key since start_seq, with a max of limit results Returns an empty vector if there are no such event The type T must match the event types associated with event_key

pub fn get_deserialized_resource<T>( &self, address: AccountAddress ) -> Result<Response<Option<T>>, Error>where T: MoveResource,

Deserialize and return the resource value of type T stored under address Returns None if there is no such value

Trait Implementations§

§

impl Clone for BlockingClient

§

fn clone(&self) -> BlockingClient

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
§

impl Debug for BlockingClient

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

const: unstable · 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.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more