Struct parity_rpc::v1::ParityClient
source · [−]pub struct ParityClient<C, M> where
C: PrometheusMetrics, { /* private fields */ }
Expand description
Parity implementation.
Implementations
sourceimpl<C, M> ParityClient<C, M> where
C: BlockChainClient + PrometheusMetrics + EngineInfo,
impl<C, M> ParityClient<C, M> where
C: BlockChainClient + PrometheusMetrics + EngineInfo,
sourcepub fn new(
client: Arc<C>,
miner: Arc<M>,
sync: Arc<dyn SyncProvider>,
net: Arc<dyn ManageNetwork>,
logger: Arc<RotatingLogger>,
settings: Arc<NetworkSettings>,
signer: Option<Arc<SignerService>>,
ws_address: Option<Host>,
snapshot: Option<Arc<dyn SnapshotService>>
) -> Self
pub fn new(
client: Arc<C>,
miner: Arc<M>,
sync: Arc<dyn SyncProvider>,
net: Arc<dyn ManageNetwork>,
logger: Arc<RotatingLogger>,
settings: Arc<NetworkSettings>,
signer: Option<Arc<SignerService>>,
ws_address: Option<Host>,
snapshot: Option<Arc<dyn SnapshotService>>
) -> Self
Creates new ParityClient
.
Trait Implementations
sourceimpl<C, M, S> Parity for ParityClient<C, M> where
S: StateInfo + 'static,
C: BlockChainClient + BlockChainClient + PrometheusMetrics + StateClient<State = S> + Call<State = S> + EngineInfo + 'static,
M: MinerService<State = S> + 'static,
impl<C, M, S> Parity for ParityClient<C, M> where
S: StateInfo + 'static,
C: BlockChainClient + BlockChainClient + PrometheusMetrics + StateClient<State = S> + Call<State = S> + EngineInfo + 'static,
M: MinerService<State = S> + 'static,
sourcefn transactions_limit(&self) -> Result<usize>
fn transactions_limit(&self) -> Result<usize>
Returns current transactions limit.
sourcefn min_gas_price(&self) -> Result<U256>
fn min_gas_price(&self) -> Result<U256>
Returns minimal gas price for transaction to be included in queue.
sourcefn extra_data(&self) -> Result<Bytes>
fn extra_data(&self) -> Result<Bytes>
Returns mining extra data.
sourcefn gas_floor_target(&self) -> Result<U256>
fn gas_floor_target(&self) -> Result<U256>
Returns mining gas floor target.
sourcefn gas_ceil_target(&self) -> Result<U256>
fn gas_ceil_target(&self) -> Result<U256>
Returns mining gas floor cap.
sourcefn dev_logs_levels(&self) -> Result<String>
fn dev_logs_levels(&self) -> Result<String>
Returns logs levels
sourcefn net_chain(&self) -> Result<String>
fn net_chain(&self) -> Result<String>
Returns chain name - DEPRECATED. Use parity_chainName
instead.
sourcefn chain(&self) -> Result<String>
fn chain(&self) -> Result<String>
Get the chain name. Returns one of the pre-configured chain names or a filename.
sourcefn registry_address(&self) -> Result<Option<H160>>
fn registry_address(&self) -> Result<Option<H160>>
Returns the value of the registrar for this network.
sourcefn rpc_settings(&self) -> Result<RpcSettings>
fn rpc_settings(&self) -> Result<RpcSettings>
Returns rpc settings
sourcefn default_extra_data(&self) -> Result<Bytes>
fn default_extra_data(&self) -> Result<Bytes>
Returns default extra data
sourcefn gas_price_histogram(&self) -> BoxFuture<Histogram>
fn gas_price_histogram(&self) -> BoxFuture<Histogram>
Returns distribution of gas price in latest blocks.
sourcefn 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 Read more
sourcefn 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.
sourcefn phrase_to_address(&self, phrase: String) -> Result<H160>
fn phrase_to_address(&self, phrase: String) -> Result<H160>
Returns whatever address would be derived from the given phrase if it were to seed a brainwallet.
sourcefn list_accounts(
&self,
count: u64,
after: Option<H160>,
block_number: Option<BlockNumber>
) -> Result<Option<Vec<H160>>>
fn list_accounts(
&self,
count: u64,
after: Option<H160>,
block_number: Option<BlockNumber>
) -> Result<Option<Vec<H160>>>
Returns all addresses if Fat DB is enabled (--fat-db
), or null if not.
sourcefn list_storage_keys(
&self,
address: H160,
count: u64,
after: Option<H256>,
block_number: Option<BlockNumber>
) -> Result<Option<Vec<H256>>>
fn list_storage_keys(
&self,
address: H160,
count: u64,
after: Option<H256>,
block_number: Option<BlockNumber>
) -> Result<Option<Vec<H256>>>
Returns all storage keys of the given address (first parameter) if Fat DB is enabled (--fat-db
),
or null if not. Read more
sourcefn encrypt_message(&self, key: H512, phrase: Bytes) -> Result<Bytes>
fn encrypt_message(&self, key: H512, phrase: Bytes) -> Result<Bytes>
Encrypt some data with a public key under ECIES. First parameter is the 512-byte destination public key, second is the message. Read more
sourcefn pending_transactions(
&self,
limit: Option<usize>,
filter: Option<TransactionFilter>
) -> Result<Vec<Transaction>>
fn pending_transactions(
&self,
limit: Option<usize>,
filter: Option<TransactionFilter>
) -> Result<Vec<Transaction>>
Returns all pending transactions from transaction queue.
sourcefn all_transactions(&self) -> Result<Vec<Transaction>>
fn all_transactions(&self) -> Result<Vec<Transaction>>
Returns all transactions from transaction queue. Read more
sourcefn all_transaction_hashes(&self) -> Result<Vec<H256>>
fn all_transaction_hashes(&self) -> Result<Vec<H256>>
Same as parity_allTransactions, but return only transactions hashes.
sourcefn future_transactions(&self) -> Result<Vec<Transaction>>
fn future_transactions(&self) -> Result<Vec<Transaction>>
Returns all future transactions from transaction queue (deprecated)
sourcefn 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.
sourcefn 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.
sourcefn 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.
sourcefn ws_url(&self) -> Result<String>
fn ws_url(&self) -> Result<String>
Returns current WS Server interface and port or an error if ws server is disabled.
sourcefn next_nonce(&self, address: H160) -> BoxFuture<U256>
fn next_nonce(&self, address: H160) -> BoxFuture<U256>
Returns next nonce for particular sender. Should include all transactions in the queue.
sourcefn mode(&self) -> Result<String>
fn mode(&self) -> Result<String>
Get the mode. Returns one of: “active”, “passive”, “dark”, “offline”.
sourcefn chain_status(&self) -> Result<ChainStatus>
fn chain_status(&self) -> Result<ChainStatus>
Get the current chain status.
sourcefn block_header(&self, number: Option<BlockNumber>) -> BoxFuture<Rich<Header>>
fn block_header(&self, number: Option<BlockNumber>) -> BoxFuture<Rich<Header>>
Get block header.
Same as eth_getBlockByNumber
but without uncles and transactions. Read more
sourcefn block_receipts(&self, number: Option<BlockNumber>) -> BoxFuture<Vec<Receipt>>
fn block_receipts(&self, number: 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
. Read more
sourcefn call(
&self,
requests: Vec<CallRequest>,
num: Option<BlockNumber>
) -> Result<Vec<Bytes>>
fn call(
&self,
requests: Vec<CallRequest>,
num: Option<BlockNumber>
) -> Result<Vec<Bytes>>
Call contract, returning the output data.
sourcefn submit_work_detail(
&self,
nonce: H64,
pow_hash: H256,
mix_hash: H256
) -> Result<H256>
fn submit_work_detail(
&self,
nonce: H64,
pow_hash: H256,
mix_hash: H256
) -> Result<H256>
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). Read more
sourcefn status(&self) -> Result<()>
fn status(&self) -> Result<()>
Returns the status of the node. Used as the health endpoint. Read more
sourcefn verify_signature(
&self,
is_prefixed: bool,
message: Bytes,
r: H256,
s: H256,
v: U64
) -> Result<RecoveredAccount>
fn verify_signature(
&self,
is_prefixed: bool,
message: Bytes,
r: H256,
s: H256,
v: U64
) -> Result<RecoveredAccount>
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 Read more
sourcefn 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.
Auto Trait Implementations
impl<C, M> !RefUnwindSafe for ParityClient<C, M>
impl<C, M> Send for ParityClient<C, M> where
C: Send + Sync,
M: Send + Sync,
impl<C, M> Sync for ParityClient<C, M> where
C: Send + Sync,
M: Send + Sync,
impl<C, M> Unpin for ParityClient<C, M>
impl<C, M> !UnwindSafe for ParityClient<C, M>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more