Struct polymesh_api::polymesh::Api

source ·
pub struct Api { /* private fields */ }

Implementations§

source§

impl Api

source

pub async fn new(url: &str) -> Result<Self>

source

pub fn call(&self) -> CallApi<'_>

source

pub fn query(&self) -> QueryApi<'_>

source

pub fn query_at(&self, block: BlockHash) -> QueryApi<'_>

source

pub fn paged_query(&self) -> PagedQueryApi<'_>

source

pub fn paged_query_at(&self, block: BlockHash) -> PagedQueryApi<'_>

source

pub fn wrap_call(&self, call: RuntimeCall) -> Result<WrappedCall>

Trait Implementations§

source§

impl ChainApi for Api

§

type RuntimeCall = RuntimeCall

§

type RuntimeEvent = RuntimeEvent

§

type DispatchInfo = DispatchInfo

§

type DispatchError = DispatchError

source§

fn get_nonce<'life0, 'async_trait>( &'life0 self, account: AccountId ) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn block_events<'life0, 'async_trait>( &'life0 self, block: Option<BlockHash> ) -> Pin<Box<dyn Future<Output = Result<Vec<EventRecord<Self::RuntimeEvent>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn event_to_extrinsic_result( event: &EventRecord<Self::RuntimeEvent> ) -> Option<ExtrinsicResult<Self>>

source§

fn client(&self) -> &Client

source§

fn events_to_extrinsic_result( events: &[EventRecord<Self::RuntimeEvent>] ) -> Option<ExtrinsicResult<Self>>

source§

fn submit_and_watch<'life0, 'async_trait>( &'life0 self, xt: ExtrinsicV4 ) -> Pin<Box<dyn Future<Output = Result<TransactionResults<Self>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: Sync + 'async_trait,

Submit a signed/unsigned transaction, but don’t wait for it to execute.
source§

impl Clone for Api

source§

fn clone(&self) -> Api

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
source§

impl<'api> From<&'api Api> for AssetCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for AuthorityDiscoveryCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for AuthorshipCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for BabeCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for BalancesCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for BaseCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for BridgeCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for CapitalDistributionCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for CddServiceProvidersCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for CheckpointCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for CommitteeMembershipCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for ComplianceManagerCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for ContractsCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for CorporateActionCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for CorporateBallotCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for ExternalAgentsCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for GrandpaCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for HistoricalCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for IdentityCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for ImOnlineCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for IndicesCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for MultiSigCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for NftCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for OffencesCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for PermissionsCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for PipsCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for PolymeshCommitteeCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for PolymeshContractsCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for PortfolioCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for PreimageCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for ProtocolFeeCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for RandomnessCollectiveFlipCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for RelayerCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for SchedulerCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for SessionCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for SettlementCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for StakingCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for StatisticsCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for StoCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for SudoCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for SystemCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for TechnicalCommitteeCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for TechnicalCommitteeMembershipCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for TestUtilsCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for TimestampCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for TransactionPaymentCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for TreasuryCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for UpgradeCommitteeCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for UpgradeCommitteeMembershipCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.
source§

impl<'api> From<&'api Api> for UtilityCallApi<'api>

source§

fn from(api: &'api Api) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Api

§

impl Send for Api

§

impl Sync for Api

§

impl Unpin for Api

§

impl !UnwindSafe for Api

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
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
§

impl<T> CheckedConversion for T

§

fn checked_from<T>(t: T) -> Option<Self>
where Self: TryFrom<T>,

Convert from a value of T into an equivalent instance of Option<Self>. Read more
§

fn checked_into<T>(self) -> Option<T>
where Self: TryInto<T>,

Consume self to return Some equivalent value of Option<T>. Read more
source§

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

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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 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, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> SaturatedConversion for T

source§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
source§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. Read more
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<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
source§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

source§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeSend for T
where T: Send,