Trait sc_rpc::author::AuthorApi  [−][src]
pub trait AuthorApi<Hash, BlockHash>: 'static + Send + Sync { type Metadata: PubSubMetadata; pub fn submit_extrinsic(
&self,
extrinsic: Bytes
) -> Box<dyn Future<Item = Hash, Error = Error> + 'static + Send, Global>; pub fn insert_key(
&self,
key_type: String,
suri: String,
public: Bytes
) -> Result<(), Error>; pub fn rotate_keys(&self) -> Result<Bytes, Error>; pub fn has_session_keys(&self, session_keys: Bytes) -> Result<bool, Error>; pub fn has_key(
&self,
public_key: Bytes,
key_type: String
) -> Result<bool, Error>; pub fn pending_extrinsics(&self) -> Result<Vec<Bytes, Global>, Error>; pub fn remove_extrinsic(
&self,
bytes_or_hash: Vec<ExtrinsicOrHash<Hash>, Global>
) -> Result<Vec<Hash, Global>, Error>; pub fn watch_extrinsic(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<TransactionStatus<Hash, BlockHash>, Error>,
bytes: Bytes
); pub fn unwatch_extrinsic(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> Result<bool, Error>; pub fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
where
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
BlockHash: Send + Sync + 'static + Serialize, { ... } }
Substrate authoring RPC API
Associated Types
type Metadata: PubSubMetadata[src]
RPC metadata
Required methods
pub fn submit_extrinsic(
    &self, 
    extrinsic: Bytes
) -> Box<dyn Future<Item = Hash, Error = Error> + 'static + Send, Global>[src]
&self,
extrinsic: Bytes
) -> Box<dyn Future<Item = Hash, Error = Error> + 'static + Send, Global>
Submit hex-encoded extrinsic for inclusion in block.
pub fn insert_key(
    &self, 
    key_type: String, 
    suri: String, 
    public: Bytes
) -> Result<(), Error>[src]
&self,
key_type: String,
suri: String,
public: Bytes
) -> Result<(), Error>
Insert a key into the keystore.
pub fn rotate_keys(&self) -> Result<Bytes, Error>[src]
Generate new session keys and returns the corresponding public keys.
pub fn has_session_keys(&self, session_keys: Bytes) -> Result<bool, Error>[src]
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.
pub fn has_key(
    &self, 
    public_key: Bytes, 
    key_type: String
) -> Result<bool, Error>[src]
&self,
public_key: Bytes,
key_type: String
) -> Result<bool, Error>
Checks if the keystore has private keys for the given public key and key type.
Returns true if a private key could be found.
pub fn pending_extrinsics(&self) -> Result<Vec<Bytes, Global>, Error>[src]
Returns all pending extrinsics, potentially grouped by sender.
pub fn remove_extrinsic(
    &self, 
    bytes_or_hash: Vec<ExtrinsicOrHash<Hash>, Global>
) -> Result<Vec<Hash, Global>, Error>[src]
&self,
bytes_or_hash: Vec<ExtrinsicOrHash<Hash>, Global>
) -> Result<Vec<Hash, Global>, Error>
Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.
pub fn watch_extrinsic(
    &self, 
    metadata: Self::Metadata, 
    subscriber: Subscriber<TransactionStatus<Hash, BlockHash>, Error>, 
    bytes: Bytes
)[src]
&self,
metadata: Self::Metadata,
subscriber: Subscriber<TransactionStatus<Hash, BlockHash>, Error>,
bytes: Bytes
)
Submit an extrinsic to watch.
See TransactionStatus for details on transaction
life cycle.
pub fn unwatch_extrinsic(
    &self, 
    metadata: Option<Self::Metadata>, 
    id: SubscriptionId
) -> Result<bool, Error>[src]
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> Result<bool, Error>
Unsubscribe from extrinsic watching.
Provided methods
pub fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> where
    Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
    BlockHash: Send + Sync + 'static + Serialize, [src]
Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
BlockHash: Send + Sync + 'static + Serialize,
Create an IoDelegate, wiring rpc calls to the trait methods.
Implementors
impl<P, Client> AuthorApi<<P as TransactionPool>::Hash, <<P as TransactionPool>::Block as Block>::Hash> for Author<P, Client> where
    P: TransactionPool + Sync + Send + 'static,
    Client: HeaderBackend<P::Block> + ProvideRuntimeApi<P::Block> + Send + Sync + 'static,
    Client::Api: SessionKeys<P::Block, Error = ClientError>, [src]
impl<P, Client> AuthorApi<<P as TransactionPool>::Hash, <<P as TransactionPool>::Block as Block>::Hash> for Author<P, Client> where
    P: TransactionPool + Sync + Send + 'static,
    Client: HeaderBackend<P::Block> + ProvideRuntimeApi<P::Block> + Send + Sync + 'static,
    Client::Api: SessionKeys<P::Block, Error = ClientError>, [src]type Metadata = Metadata
fn insert_key(
    &self, 
    key_type: String, 
    suri: String, 
    public: Bytes
) -> Result<()>[src]
&self,
key_type: String,
suri: String,
public: Bytes
) -> Result<()>
fn rotate_keys(&self) -> Result<Bytes>[src]
fn has_session_keys(&self, session_keys: Bytes) -> Result<bool>[src]
fn has_key(&self, public_key: Bytes, key_type: String) -> Result<bool>[src]
fn submit_extrinsic(&self, ext: Bytes) -> FutureResult<TxHash<P>>[src]
fn pending_extrinsics(&self) -> Result<Vec<Bytes>>[src]
fn remove_extrinsic(
    &self, 
    bytes_or_hash: Vec<ExtrinsicOrHash<TxHash<P>>>
) -> Result<Vec<TxHash<P>>>[src]
&self,
bytes_or_hash: Vec<ExtrinsicOrHash<TxHash<P>>>
) -> Result<Vec<TxHash<P>>>
fn watch_extrinsic(
    &self, 
    _metadata: Self::Metadata, 
    subscriber: Subscriber<TransactionStatus<TxHash<P>, BlockHash<P>>>, 
    xt: Bytes
)[src]
&self,
_metadata: Self::Metadata,
subscriber: Subscriber<TransactionStatus<TxHash<P>, BlockHash<P>>>,
xt: Bytes
)
fn unwatch_extrinsic(
    &self, 
    _metadata: Option<Self::Metadata>, 
    id: SubscriptionId
) -> Result<bool>[src]
&self,
_metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> Result<bool>