[−][src]Struct substrate_subxt::Client
Client to interface with a substrate node.
Implementations
impl<T: System, S, E> Client<T, S, E>[src]
pub fn metadata(&self) -> &Metadata[src]
Returns the chain metadata.
pub async fn fetch<'_, F: Store<T>>(
&'_ self,
store: F,
hash: Option<T::Hash>
) -> Result<F::Returns, Error>[src]
&'_ self,
store: F,
hash: Option<T::Hash>
) -> Result<F::Returns, Error>
Fetch a StorageKey.
pub async fn query_storage<'_>(
&'_ self,
keys: Vec<StorageKey>,
from: T::Hash,
to: Option<T::Hash>
) -> Result<Vec<StorageChangeSet<<T as System>::Hash>>, Error>[src]
&'_ self,
keys: Vec<StorageKey>,
from: T::Hash,
to: Option<T::Hash>
) -> Result<Vec<StorageChangeSet<<T as System>::Hash>>, Error>
Query historical storage entries
pub async fn header<'_, H>(
&'_ self,
hash: Option<H>
) -> Result<Option<T::Header>, Error> where
H: Into<T::Hash> + 'static, [src]
&'_ self,
hash: Option<H>
) -> Result<Option<T::Header>, Error> where
H: Into<T::Hash> + 'static,
Get a header
pub async fn block_hash<'_>(
&'_ self,
block_number: Option<BlockNumber<T>>
) -> Result<Option<T::Hash>, Error>[src]
&'_ self,
block_number: Option<BlockNumber<T>>
) -> Result<Option<T::Hash>, Error>
Get a block hash. By default returns the latest block hash
pub async fn finalized_head<'_>(&'_ self) -> Result<T::Hash, Error>[src]
Get a block hash of the latest finalized block
pub async fn block<'_, H>(
&'_ self,
hash: Option<H>
) -> Result<Option<SignedBlock<Block<<T as System>::Header, <T as System>::Extrinsic>>>, Error> where
H: Into<T::Hash> + 'static, [src]
&'_ self,
hash: Option<H>
) -> Result<Option<SignedBlock<Block<<T as System>::Header, <T as System>::Extrinsic>>>, Error> where
H: Into<T::Hash> + 'static,
Get a block
pub async fn read_proof<'_, H>(
&'_ self,
keys: Vec<StorageKey>,
hash: Option<H>
) -> Result<ReadProof<T::Hash>, Error> where
H: Into<T::Hash> + 'static, [src]
&'_ self,
keys: Vec<StorageKey>,
hash: Option<H>
) -> Result<ReadProof<T::Hash>, Error> where
H: Into<T::Hash> + 'static,
Get proof of storage entries at a specific block's state.
pub async fn submit_extrinsic<'_, X: Encode>(
&'_ self,
extrinsic: X
) -> Result<T::Hash, Error>[src]
&'_ self,
extrinsic: X
) -> Result<T::Hash, Error>
Create and submit an extrinsic and return corresponding Hash if successful
pub async fn submit_and_watch_extrinsic<X: Encode + 'static>(
self,
extrinsic: X,
decoder: EventsDecoder<T>
) -> Result<ExtrinsicSuccess<T>, Error>[src]
self,
extrinsic: X,
decoder: EventsDecoder<T>
) -> Result<ExtrinsicSuccess<T>, Error>
Create and submit an extrinsic and return corresponding Event if successful
pub async fn subscribe_events<'_>(
&'_ self
) -> Result<Subscription<StorageChangeSet<T::Hash>>, Error>[src]
&'_ self
) -> Result<Subscription<StorageChangeSet<T::Hash>>, Error>
Subscribe to events.
pub async fn subscribe_blocks<'_>(
&'_ self
) -> Result<Subscription<T::Header>, Error>[src]
&'_ self
) -> Result<Subscription<T::Header>, Error>
Subscribe to new blocks.
pub async fn subscribe_finalized_blocks<'_>(
&'_ self
) -> Result<Subscription<T::Header>, Error>[src]
&'_ self
) -> Result<Subscription<T::Header>, Error>
Subscribe to finalized blocks.
impl<T, S, E> Client<T, S, E> where
T: System + Balances + Send + Sync + 'static,
S: 'static,
E: SignedExtra<T> + SignedExtension + 'static, [src]
T: System + Balances + Send + Sync + 'static,
S: 'static,
E: SignedExtra<T> + SignedExtension + 'static,
pub async fn create_raw_payload<'_, '_, C: Call<T>>(
&'_ self,
account_id: &'_ <T as System>::AccountId,
call: C
) -> Result<SignedPayload<Encoded, <E as SignedExtra<T>>::Extra>, Error>[src]
&'_ self,
account_id: &'_ <T as System>::AccountId,
call: C
) -> Result<SignedPayload<Encoded, <E as SignedExtra<T>>::Extra>, Error>
Creates raw payload to be signed for the supplied Call without private key
pub async fn xt<'_, P>(
&'_ self,
signer: P,
nonce: Option<T::Index>
) -> Result<XtBuilder<T, P, S, E>, Error> where
P: Pair,
P::Signature: Codec,
S: Verify,
S::Signer: From<P::Public> + IdentifyAccount<AccountId = T::AccountId>, [src]
&'_ self,
signer: P,
nonce: Option<T::Index>
) -> Result<XtBuilder<T, P, S, E>, Error> where
P: Pair,
P::Signature: Codec,
S: Verify,
S::Signer: From<P::Public> + IdentifyAccount<AccountId = T::AccountId>,
Create a transaction builder for a private key.
Trait Implementations
impl<T, S, E> AccountStoreExt<T> for Client<T, S, E> where
T: System + Send + Sync,
S: 'static,
E: Send + Sync + 'static, [src]
T: System + Send + Sync,
S: 'static,
E: Send + Sync + 'static,
fn account<'a>(
&'a self,
account_id: &'a T::AccountId
) -> Pin<Box<dyn Future<Output = Result<AccountInfo<T>, Error>> + Send + 'a>>[src]
&'a self,
account_id: &'a T::AccountId
) -> Pin<Box<dyn Future<Output = Result<AccountInfo<T>, Error>> + Send + 'a>>
impl<T: System, S, E> Clone for Client<T, S, E>[src]
fn clone(&self) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<T, S, E> TotalIssuanceStoreExt<T> for Client<T, S, E> where
T: Balances + Send + Sync,
S: 'static,
E: Send + Sync + 'static, [src]
T: Balances + Send + Sync,
S: 'static,
E: Send + Sync + 'static,
Auto Trait Implementations
impl<T, S = MultiSignature, E = DefaultExtra<T>> !RefUnwindSafe for Client<T, S, E>
impl<T, S, E> Send for Client<T, S, E> where
E: Send,
T: Send,
<T as System>::Hash: Send,
E: Send,
T: Send,
<T as System>::Hash: Send,
impl<T, S, E> Sync for Client<T, S, E> where
E: Sync,
T: Sync,
<T as System>::Hash: Sync,
E: Sync,
T: Sync,
<T as System>::Hash: Sync,
impl<T, S, E> Unpin for Client<T, S, E> where
E: Unpin,
T: Unpin,
<T as System>::Hash: Unpin,
E: Unpin,
T: Unpin,
<T as System>::Hash: Unpin,
impl<T, S = MultiSignature, E = DefaultExtra<T>> !UnwindSafe for Client<T, S, E>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> CheckedConversion for T[src]
fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>, [src]
Self: TryFrom<T>,
fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>, [src]
Self: TryInto<T>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>, [src]
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
fn from_ref(outer: &Outer) -> &T[src]
Get a reference to the inner from the outer.
fn from_mut(outer: &mut Outer) -> &mut T[src]
Get a mutable reference to the inner from the outer.
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>, [src]
T: UncheckedFrom<S>,
fn unchecked_into(self) -> T[src]
impl<T, S> UniqueSaturatedInto<T> for S where
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
T: Bounded,
fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,