Struct ckb_sdk::CkbRpcClient
source · [−]Fields
client: Clienturl: Urlid: u64Implementations
sourceimpl CkbRpcClient
impl CkbRpcClient
pub fn new(uri: &str) -> Self
pub fn get_block(&mut self, hash: H256) -> Result<Option<BlockView>, RpcError>
pub fn get_block_by_number(
&mut self,
number: BlockNumber
) -> Result<Option<BlockView>, RpcError>
pub fn get_block_hash(
&mut self,
number: BlockNumber
) -> Result<Option<H256>, RpcError>
pub fn get_current_epoch(&mut self) -> Result<EpochView, RpcError>
pub fn get_epoch_by_number(
&mut self,
number: EpochNumber
) -> Result<Option<EpochView>, RpcError>
pub fn get_header(&mut self, hash: H256) -> Result<Option<HeaderView>, RpcError>
pub fn get_header_by_number(
&mut self,
number: BlockNumber
) -> Result<Option<HeaderView>, RpcError>
pub fn get_live_cell(
&mut self,
out_point: OutPoint,
with_data: bool
) -> Result<CellWithStatus, RpcError>
pub fn get_tip_block_number(&mut self) -> Result<BlockNumber, RpcError>
pub fn get_tip_header(&mut self) -> Result<HeaderView, RpcError>
pub fn get_transaction(
&mut self,
hash: H256
) -> Result<Option<TransactionWithStatus>, RpcError>
pub fn get_transaction_proof(
&mut self,
tx_hashes: Vec<H256>,
block_hash: Option<H256>
) -> Result<TransactionProof, RpcError>
pub fn verify_transaction_proof(
&mut self,
tx_proof: TransactionProof
) -> Result<Vec<H256>, RpcError>
pub fn get_fork_block(
&mut self,
block_hash: H256
) -> Result<Option<BlockView>, RpcError>
pub fn get_consensus(&mut self) -> Result<Consensus, RpcError>
pub fn get_block_median_time(
&mut self,
block_hash: H256
) -> Result<Option<Timestamp>, RpcError>
pub fn get_block_economic_state(
&mut self,
block_hash: H256
) -> Result<Option<BlockEconomicState>, RpcError>
pub fn get_banned_addresses(&mut self) -> Result<Vec<BannedAddr>, RpcError>
pub fn get_peers(&mut self) -> Result<Vec<RemoteNode>, RpcError>
pub fn local_node_info(&mut self) -> Result<LocalNode, RpcError>
pub fn set_ban(
&mut self,
address: String,
command: String,
ban_time: Option<Timestamp>,
absolute: Option<bool>,
reason: Option<String>
) -> Result<(), RpcError>
pub fn sync_state(&mut self) -> Result<SyncState, RpcError>
pub fn set_network_active(&mut self, state: bool) -> Result<(), RpcError>
pub fn add_node(
&mut self,
peer_id: String,
address: String
) -> Result<(), RpcError>
pub fn remove_node(&mut self, peer_id: String) -> Result<(), RpcError>
pub fn clear_banned_addresses(&mut self) -> Result<(), RpcError>
pub fn ping_peers(&mut self) -> Result<(), RpcError>
pub fn send_transaction(
&mut self,
tx: Transaction,
outputs_validator: Option<OutputsValidator>
) -> Result<H256, RpcError>
pub fn remove_transaction(&mut self, tx_hash: H256) -> Result<bool, RpcError>
pub fn tx_pool_info(&mut self) -> Result<TxPoolInfo, RpcError>
pub fn clear_tx_pool(&mut self) -> Result<(), RpcError>
pub fn get_raw_tx_pool(
&mut self,
verbose: Option<bool>
) -> Result<RawTxPool, RpcError>
pub fn tx_pool_ready(&mut self) -> Result<bool, RpcError>
pub fn get_blockchain_info(&mut self) -> Result<ChainInfo, RpcError>
pub fn get_block_template(
&mut self,
bytes_limit: Option<Uint64>,
proposals_limit: Option<Uint64>,
max_version: Option<Version>
) -> Result<BlockTemplate, RpcError>
pub fn submit_block(
&mut self,
_work_id: String,
_data: Block
) -> Result<H256, RpcError>
pub fn send_alert(&mut self, alert: Alert) -> Result<(), RpcError>
pub fn process_block_without_verify(
&mut self,
data: Block,
broadcast: bool
) -> Result<Option<H256>, RpcError>
pub fn truncate(&mut self, target_tip_hash: H256) -> Result<(), RpcError>
pub fn generate_block(
&mut self,
block_assembler_script: Option<Script>,
block_assembler_message: Option<JsonBytes>
) -> Result<H256, RpcError>
pub fn notify_transaction(&mut self, tx: Transaction) -> Result<H256, RpcError>
pub fn jemalloc_profiling_dump(&mut self) -> Result<String, RpcError>
pub fn update_main_logger(
&mut self,
config: MainLoggerConfig
) -> Result<(), RpcError>
pub fn set_extra_logger(
&mut self,
name: String,
config_opt: Option<ExtraLoggerConfig>
) -> Result<(), RpcError>
Auto Trait Implementations
impl !RefUnwindSafe for CkbRpcClient
impl Send for CkbRpcClient
impl Sync for CkbRpcClient
impl Unpin for CkbRpcClient
impl !UnwindSafe for CkbRpcClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more