Trait parity_rpc::v1::Parity
source · [−]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
fn transactions_limit(&self) -> Result<usize>
fn transactions_limit(&self) -> Result<usize>
Returns current transactions limit.
fn extra_data(&self) -> Result<Bytes>
fn extra_data(&self) -> Result<Bytes>
Returns mining extra data.
fn gas_floor_target(&self) -> Result<U256>
fn gas_floor_target(&self) -> Result<U256>
Returns mining gas floor target.
fn gas_ceil_target(&self) -> Result<U256>
fn gas_ceil_target(&self) -> Result<U256>
Returns mining gas floor cap.
fn min_gas_price(&self) -> Result<U256>
fn min_gas_price(&self) -> Result<U256>
Returns minimal gas price for transaction to be included in queue.
fn dev_logs_levels(&self) -> Result<String>
fn dev_logs_levels(&self) -> Result<String>
Returns logs levels
Returns chain name - DEPRECATED. Use parity_chainName
instead.
fn rpc_settings(&self) -> Result<RpcSettings>
fn rpc_settings(&self) -> Result<RpcSettings>
Returns rpc settings
fn default_extra_data(&self) -> Result<Bytes>
fn default_extra_data(&self) -> Result<Bytes>
Returns default extra data
fn gas_price_histogram(&self) -> BoxFuture<Histogram>
fn gas_price_histogram(&self) -> BoxFuture<Histogram>
Returns distribution of gas price in latest blocks.
fn unsigned_transactions_count(&self) -> Result<usize>
fn unsigned_transactions_count(&self) -> Result<usize>
Returns number of unsigned transactions waiting in the signer queue (if signer enabled) Returns error when signer is disabled
fn generate_secret_phrase(&self) -> Result<String>
fn generate_secret_phrase(&self) -> Result<String>
Returns a cryptographically random phrase sufficient for securely seeding a secret key.
fn phrase_to_address(&self, _: String) -> Result<H160>
fn phrase_to_address(&self, _: String) -> Result<H160>
Returns whatever address would be derived from the given phrase if it were to seed a brainwallet.
fn registry_address(&self) -> Result<Option<H160>>
fn registry_address(&self) -> Result<Option<H160>>
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.
fn pending_transactions(
&self,
_: Option<usize>,
_: Option<TransactionFilter>
) -> Result<Vec<Transaction>>
fn pending_transactions(
&self,
_: Option<usize>,
_: Option<TransactionFilter>
) -> Result<Vec<Transaction>>
Returns all pending transactions from transaction queue.
fn all_transactions(&self) -> Result<Vec<Transaction>>
fn all_transactions(&self) -> Result<Vec<Transaction>>
Returns all transactions from transaction queue.
Some of them might not be ready to be included in a block yet.
fn all_transaction_hashes(&self) -> Result<Vec<H256>>
fn all_transaction_hashes(&self) -> Result<Vec<H256>>
Same as parity_allTransactions, but return only transactions hashes.
fn future_transactions(&self) -> Result<Vec<Transaction>>
fn future_transactions(&self) -> Result<Vec<Transaction>>
Returns all future transactions from transaction queue (deprecated)
fn pending_transactions_stats(&self) -> Result<BTreeMap<H256, TransactionStats>>
fn pending_transactions_stats(&self) -> Result<BTreeMap<H256, TransactionStats>>
Returns propagation statistics on transactions pending in the queue.
fn new_transactions_stats(&self) -> Result<BTreeMap<H256, TransactionStats>>
fn new_transactions_stats(&self) -> Result<BTreeMap<H256, TransactionStats>>
Returns propagation statistics on transactions recently added into the queue.
fn local_transactions(&self) -> Result<BTreeMap<H256, LocalTransactionStatus>>
fn local_transactions(&self) -> Result<BTreeMap<H256, LocalTransactionStatus>>
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.
fn next_nonce(&self, _: H160) -> BoxFuture<U256>
fn next_nonce(&self, _: H160) -> BoxFuture<U256>
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.
fn chain_status(&self) -> Result<ChainStatus>
fn chain_status(&self) -> Result<ChainStatus>
Get the current chain status.
fn block_header(&self, _: Option<BlockNumber>) -> BoxFuture<Rich<Header>>
fn block_header(&self, _: Option<BlockNumber>) -> BoxFuture<Rich<Header>>
Get block header.
Same as eth_getBlockByNumber
but without uncles and transactions.
fn block_receipts(&self, _: Option<BlockNumber>) -> BoxFuture<Vec<Receipt>>
fn block_receipts(&self, _: Option<BlockNumber>) -> BoxFuture<Vec<Receipt>>
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.
Provided methods
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
Create an IoDelegate
, wiring rpc calls to the trait methods.