pub trait Parity: Sized + Send + Sync + 'static {
Show 42 methods fn transactions_limit(&self) -> Result<usize>;
fn extra_data(&self) -> Result<Bytes>;
fn gas_floor_target(&self) -> Result<U256>;
fn gas_ceil_target(&self) -> Result<U256>;
fn min_gas_price(&self) -> Result<U256>;
fn dev_logs(&self) -> Result<Vec<String>>;
fn dev_logs_levels(&self) -> Result<String>;
fn net_chain(&self) -> Result<String>;
fn net_peers(&self) -> Result<Peers>;
fn net_port(&self) -> Result<u16>;
fn rpc_settings(&self) -> Result<RpcSettings>;
fn node_name(&self) -> Result<String>;
fn default_extra_data(&self) -> Result<Bytes>;
fn gas_price_histogram(&self) -> BoxFuture<Histogram>;
fn unsigned_transactions_count(&self) -> Result<usize>;
fn generate_secret_phrase(&self) -> Result<String>;
fn phrase_to_address(&self, _: String) -> Result<H160>;
fn registry_address(&self) -> Result<Option<H160>>;
fn list_accounts(
        &self,
        _: u64,
        _: Option<H160>,
        _: Option<BlockNumber>
    ) -> Result<Option<Vec<H160>>>;
fn list_storage_keys(
        &self,
        _: H160,
        _: u64,
        _: Option<H256>,
        _: Option<BlockNumber>
    ) -> Result<Option<Vec<H256>>>;
fn encrypt_message(&self, _: H512, _: Bytes) -> Result<Bytes>;
fn pending_transactions(
        &self,
        _: Option<usize>,
        _: Option<TransactionFilter>
    ) -> Result<Vec<Transaction>>;
fn all_transactions(&self) -> Result<Vec<Transaction>>;
fn all_transaction_hashes(&self) -> Result<Vec<H256>>;
fn future_transactions(&self) -> Result<Vec<Transaction>>;
fn pending_transactions_stats(
        &self
    ) -> Result<BTreeMap<H256, TransactionStats>>;
fn new_transactions_stats(&self) -> Result<BTreeMap<H256, TransactionStats>>;
fn local_transactions(
        &self
    ) -> Result<BTreeMap<H256, LocalTransactionStatus>>;
fn ws_url(&self) -> Result<String>;
fn next_nonce(&self, _: H160) -> BoxFuture<U256>;
fn mode(&self) -> Result<String>;
fn chain(&self) -> Result<String>;
fn enode(&self) -> Result<String>;
fn chain_status(&self) -> Result<ChainStatus>;
fn node_kind(&self) -> Result<NodeKind>;
fn block_header(&self, _: Option<BlockNumber>) -> BoxFuture<Rich<Header>>;
fn block_receipts(&self, _: Option<BlockNumber>) -> BoxFuture<Vec<Receipt>>;
fn call(
        &self,
        _: Vec<CallRequest>,
        _: Option<BlockNumber>
    ) -> Result<Vec<Bytes>>;
fn submit_work_detail(&self, _: H64, _: H256, _: H256) -> Result<H256>;
fn status(&self) -> Result<()>;
fn verify_signature(
        &self,
        _: bool,
        _: Bytes,
        _: H256,
        _: H256,
        _: U64
    ) -> Result<RecoveredAccount>; fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... }
}
Expand description

Parity-specific rpc interface.

Required methods

Returns current transactions limit.

Returns mining extra data.

Returns mining gas floor target.

Returns mining gas floor cap.

Returns minimal gas price for transaction to be included in queue.

Returns latest logs

Returns logs levels

Returns chain name - DEPRECATED. Use parity_chainName instead.

Returns peers details

Returns network port

Returns rpc settings

Returns node name

Returns default extra data

Returns distribution of gas price in latest blocks.

Returns number of unsigned transactions waiting in the signer queue (if signer enabled) Returns error when signer is disabled

Returns a cryptographically random phrase sufficient for securely seeding a secret key.

Returns whatever address would be derived from the given phrase if it were to seed a brainwallet.

Returns the value of the registrar for this network.

Returns all addresses if Fat DB is enabled (--fat-db), or null if not.

Returns all storage keys of the given address (first parameter) if Fat DB is enabled (--fat-db), or null if not.

Encrypt some data with a public key under ECIES. First parameter is the 512-byte destination public key, second is the message.

Returns all pending transactions from transaction queue.

Returns all transactions from transaction queue.

Some of them might not be ready to be included in a block yet.

Same as parity_allTransactions, but return only transactions hashes.

Returns all future transactions from transaction queue (deprecated)

Returns propagation statistics on transactions pending in the queue.

Returns propagation statistics on transactions recently added into the queue.

Returns a list of current and past local transactions with status details.

Returns current WS Server interface and port or an error if ws server is disabled.

Returns next nonce for particular sender. Should include all transactions in the queue.

Get the mode. Returns one of: “active”, “passive”, “dark”, “offline”.

Get the chain name. Returns one of the pre-configured chain names or a filename.

Get the enode of this node.

Get the current chain status.

Get node kind info.

Get block header. Same as eth_getBlockByNumber but without uncles and transactions.

Get block receipts. Allows you to fetch receipts from the entire block at once. If no parameter is provided defaults to latest.

Call contract, returning the output data.

Used for submitting a proof-of-work solution (similar to eth_submitWork, but returns block hash on success, and returns an explicit error message on failure).

Returns the status of the node. Used as the health endpoint.

The RPC returns successful response if:

  • The node have a peer (unless running a dev chain)
  • The node is not syncing.

Otherwise the RPC returns error.

Extracts Address and public key from signature using the r, s and v params. Equivalent to Solidity erecover as well as checks the signature for chain replay protection

Provided methods

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

Implementors