Trait sc_rpc::author::AuthorApi[][src]

pub trait AuthorApi<Hash, BlockHash>: 'static + Send + Sync {
    type Metadata: PubSubMetadata;
    fn submit_extrinsic(
        &self,
        extrinsic: Bytes
    ) -> Box<dyn Future<Item = Hash, Error = Error> + Send + 'static, Global>;
fn insert_key(
        &self,
        key_type: String,
        suri: String,
        public: Bytes
    ) -> Result<(), Error>;
fn rotate_keys(&self) -> Result<Bytes, Error>;
fn has_session_keys(&self, session_keys: Bytes) -> Result<bool, Error>;
fn has_key(
        &self,
        public_key: Bytes,
        key_type: String
    ) -> Result<bool, Error>;
fn pending_extrinsics(&self) -> Result<Vec<Bytes, Global>, Error>;
fn remove_extrinsic(
        &self,
        bytes_or_hash: Vec<ExtrinsicOrHash<Hash>, Global>
    ) -> Result<Vec<Hash, Global>, Error>;
fn watch_extrinsic(
        &self,
        metadata: Self::Metadata,
        subscriber: Subscriber<TransactionStatus<Hash, BlockHash>, Error>,
        bytes: Bytes
    );
fn unwatch_extrinsic(
        &self,
        metadata: Option<Self::Metadata>,
        id: SubscriptionId
    ) -> Result<bool, Error>; fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
    where
        Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
        BlockHash: Send + Sync + 'static + Serialize
, { ... } }
Expand description

Substrate authoring RPC API

Associated Types

RPC metadata

Required methods

Submit hex-encoded extrinsic for inclusion in block.

Insert a key into the keystore.

Generate new session keys and returns the corresponding public keys.

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.

Checks if the keystore has private keys for the given public key and key type.

Returns true if a private key could be found.

Returns all pending extrinsics, potentially grouped by sender.

Remove given extrinsic from the pool and temporarily ban it to prevent reimporting.

Submit an extrinsic to watch.

See TransactionStatus for details on transaction life cycle.

Unsubscribe from extrinsic watching.

Provided methods

Create an IoDelegate, wiring rpc calls to the trait methods.

Implementors