pub trait AuthorApiClient<Hash, BlockHash>: SubscriptionClientTwhere
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
BlockHash: Send + Sync + 'static + DeserializeOwned,{
// Provided methods
fn submit_extrinsic<'life0, 'async_trait>(
&'life0 self,
extrinsic: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn insert_key<'life0, 'async_trait>(
&'life0 self,
key_type: String,
suri: String,
public: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn rotate_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn rotate_keys_with_owner<'life0, 'async_trait>(
&'life0 self,
owner: Bytes,
) -> Pin<Box<dyn Future<Output = Result<GeneratedSessionKeys, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn has_session_keys<'life0, 'async_trait>(
&'life0 self,
session_keys: Bytes,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn has_key<'life0, 'async_trait>(
&'life0 self,
public_key: Bytes,
key_type: String,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn pending_extrinsics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn remove_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes_or_hash: Vec<ExtrinsicOrHash<Hash>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Hash>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn watch_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Subscription<TransactionStatus<Hash, BlockHash>>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
}Expand description
Re-export the API for backward compatibility.
Client implementation for the AuthorApi RPC API.
Provided Methods§
Sourcefn submit_extrinsic<'life0, 'async_trait>(
&'life0 self,
extrinsic: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn submit_extrinsic<'life0, 'async_trait>(
&'life0 self,
extrinsic: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Submit hex-encoded extrinsic for inclusion in block.
Sourcefn insert_key<'life0, 'async_trait>(
&'life0 self,
key_type: String,
suri: String,
public: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn insert_key<'life0, 'async_trait>(
&'life0 self,
key_type: String,
suri: String,
public: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Insert a key into the keystore.
Sourcefn rotate_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn rotate_keys<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Generate new session keys and returns the corresponding public keys.
Sourcefn rotate_keys_with_owner<'life0, 'async_trait>(
&'life0 self,
owner: Bytes,
) -> Pin<Box<dyn Future<Output = Result<GeneratedSessionKeys, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn rotate_keys_with_owner<'life0, 'async_trait>(
&'life0 self,
owner: Bytes,
) -> Pin<Box<dyn Future<Output = Result<GeneratedSessionKeys, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Generate new session keys and returns the corresponding public keys.
The owner should be something that can be used on chain for verifying the ownership of the
generated keys using the returned proof. For example, owner could be set to the account
id of the account registering the returned public session keys. The actual data to pass for
owner depends on the runtime logic verifying the proof.
Sourcefn has_session_keys<'life0, 'async_trait>(
&'life0 self,
session_keys: Bytes,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn has_session_keys<'life0, 'async_trait>(
&'life0 self,
session_keys: Bytes,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Checks if the keystore has private keys for the given session public keys.
session_keys is the SCALE encoded session keys object from the runtime.
Returns true iff all private keys could be found.
Sourcefn has_key<'life0, 'async_trait>(
&'life0 self,
public_key: Bytes,
key_type: String,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn has_key<'life0, 'async_trait>(
&'life0 self,
public_key: Bytes,
key_type: String,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Checks if the keystore has private keys for the given public key and key type.
Returns true if a private key could be found.
Sourcefn pending_extrinsics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn pending_extrinsics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Bytes>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Returns all pending extrinsics, potentially grouped by sender.
Sourcefn remove_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes_or_hash: Vec<ExtrinsicOrHash<Hash>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn remove_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes_or_hash: Vec<ExtrinsicOrHash<Hash>>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Hash>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.
Sourcefn watch_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Subscription<TransactionStatus<Hash, BlockHash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn watch_extrinsic<'life0, 'async_trait>(
&'life0 self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<Subscription<TransactionStatus<Hash, BlockHash>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Submit an extrinsic to watch.
See TransactionStatus for details on
transaction life cycle.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.