Trait tc_rpc_api::author::AuthorApi[][src]

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

Tetcore authoring RPC API

Associated Types

type Metadata: PubSubMetadata[src]

RPC metadata

Loading content...

Required methods

fn submit_extrinsic(&self, extrinsic: Bytes) -> FutureResult<Hash>[src]

Submit hex-encoded extrinsic for inclusion in block.

fn insert_key(
    &self,
    key_type: String,
    suri: String,
    public: Bytes
) -> Result<()>
[src]

Insert a key into the keystore.

fn rotate_keys(&self) -> Result<Bytes>[src]

Generate new session keys and returns the corresponding public keys.

fn has_session_keys(&self, session_keys: Bytes) -> Result<bool>[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.

fn has_key(&self, public_key: Bytes, key_type: String) -> Result<bool>[src]

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

Returns true if a private key could be found.

fn pending_extrinsics(&self) -> Result<Vec<Bytes>>[src]

Returns all pending extrinsics, potentially grouped by sender.

fn remove_extrinsic(
    &self,
    bytes_or_hash: Vec<ExtrinsicOrHash<Hash>>
) -> Result<Vec<Hash>>
[src]

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

fn watch_extrinsic(
    &self,
    metadata: Self::Metadata,
    subscriber: Subscriber<TransactionStatus<Hash, BlockHash>>,
    bytes: Bytes
)
[src]

Submit an extrinsic to watch.

See TransactionStatus for details on transaction life cycle.

fn unwatch_extrinsic(
    &self,
    metadata: Option<Self::Metadata>,
    id: SubscriptionId
) -> Result<bool>
[src]

Unsubscribe from extrinsic watching.

Loading content...

Provided methods

fn to_delegate(self) -> IoDelegate<Self, Self::Metadata> where
    Hash: Send + Sync + 'static + Serialize + DeserializeOwned,
    BlockHash: Send + Sync + 'static + Serialize
[src]

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

Loading content...

Implementors

Loading content...