Struct ckb_tool::rpc_client::Rpc[][src]

pub struct Rpc {
    pub client: Client,
    pub url: Url,
    pub id_generator: IdGenerator,
}

Fields

client: Clienturl: Urlid_generator: IdGenerator

Implementations

impl Rpc[src]

pub fn new(uri: &str, client: Client) -> Self[src]

pub fn get_block(&self, _hash: H256) -> Result<Option<BlockView>, Error>[src]

pub fn get_fork_block(&self, _hash: H256) -> Result<Option<BlockView>, Error>[src]

pub fn get_block_by_number(
    &self,
    _number: BlockNumber
) -> Result<Option<BlockView>, Error>
[src]

pub fn get_header(&self, _hash: H256) -> Result<Option<HeaderView>, Error>[src]

pub fn get_header_by_number(
    &self,
    _number: BlockNumber
) -> Result<Option<HeaderView>, Error>
[src]

pub fn get_transaction(
    &self,
    _hash: H256
) -> Result<Option<TransactionWithStatus>, Error>
[src]

pub fn get_block_hash(
    &self,
    _number: BlockNumber
) -> Result<Option<H256>, Error>
[src]

pub fn get_tip_header(&self) -> Result<HeaderView, Error>[src]

pub fn get_cells_by_lock_hash(
    &self,
    _lock_hash: H256,
    _from: BlockNumber,
    _to: BlockNumber
) -> Result<Vec<CellOutputWithOutPoint>, Error>
[src]

pub fn get_live_cell(
    &self,
    _out_point: OutPoint,
    _with_data: bool
) -> Result<CellWithStatus, Error>
[src]

pub fn get_tip_block_number(&self) -> Result<BlockNumber, Error>[src]

pub fn get_current_epoch(&self) -> Result<EpochView, Error>[src]

pub fn get_epoch_by_number(
    &self,
    number: EpochNumber
) -> Result<Option<EpochView>, Error>
[src]

pub fn local_node_info(&self) -> Result<LocalNode, Error>[src]

pub fn get_peers(&self) -> Result<Vec<RemoteNode>, Error>[src]

pub fn get_banned_addresses(&self) -> Result<Vec<BannedAddr>, Error>[src]

pub fn set_ban(
    &self,
    address: String,
    command: String,
    ban_time: Option<Timestamp>,
    absolute: Option<bool>,
    reason: Option<String>
) -> Result<(), Error>
[src]

pub fn get_block_template(
    &self,
    bytes_limit: Option<Uint64>,
    proposals_limit: Option<Uint64>,
    max_version: Option<Version>
) -> Result<BlockTemplate, Error>
[src]

pub fn submit_block(
    &self,
    _work_id: String,
    _data: Block
) -> Result<H256, Error>
[src]

pub fn get_blockchain_info(&self) -> Result<ChainInfo, Error>[src]

pub fn get_peers_state(&self) -> Result<Vec<PeerState>, Error>[src]

pub fn compute_transaction_hash(&self, tx: Transaction) -> Result<H256, Error>[src]

pub fn dry_run_transaction(
    &self,
    _tx: Transaction
) -> Result<DryRunResult, Error>
[src]

pub fn send_transaction(&self, tx: Transaction) -> Result<H256, Error>[src]

pub fn tx_pool_info(&self) -> Result<TxPoolInfo, Error>[src]

pub fn send_alert(&self, alert: Alert) -> Result<(), Error>[src]

pub fn add_node(&self, peer_id: String, address: String) -> Result<(), Error>[src]

pub fn remove_node(&self, peer_id: String) -> Result<(), Error>[src]

pub fn process_block_without_verify(
    &self,
    _data: Block
) -> Result<Option<H256>, Error>
[src]

pub fn get_live_cells_by_lock_hash(
    &self,
    lock_hash: H256,
    page: Uint64,
    per_page: Uint64,
    reverse_order: Option<bool>
) -> Result<Vec<LiveCell>, Error>
[src]

pub fn get_transactions_by_lock_hash(
    &self,
    lock_hash: H256,
    page: Uint64,
    per_page: Uint64,
    reverse_order: Option<bool>
) -> Result<Vec<CellTransaction>, Error>
[src]

pub fn index_lock_hash(
    &self,
    lock_hash: H256,
    index_from: Option<BlockNumber>
) -> Result<LockHashIndexState, Error>
[src]

pub fn deindex_lock_hash(&self, lock_hash: H256) -> Result<(), Error>[src]

pub fn get_lock_hash_index_states(
    &self
) -> Result<Vec<LockHashIndexState>, Error>
[src]

pub fn calculate_dao_maximum_withdraw(
    &self,
    _out_point: OutPoint,
    _hash: H256
) -> Result<Capacity, Error>
[src]

pub fn get_cellbase_output_capacity_details(
    &self,
    _hash: H256
) -> Result<Option<BlockReward>, Error>
[src]

pub fn broadcast_transaction(
    &self,
    tx: Transaction,
    cycles: Cycle
) -> Result<H256, Error>
[src]

pub fn estimate_fee_rate(
    &self,
    expect_confirm_blocks: Uint64
) -> Result<EstimateResult, Error>
[src]

Auto Trait Implementations

impl !RefUnwindSafe for Rpc[src]

impl Send for Rpc[src]

impl Sync for Rpc[src]

impl Unpin for Rpc[src]

impl !UnwindSafe for Rpc[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,