Struct ckb_sdk::rpc::ckb_light_client::LightClientRpcClient
source · Fields§
§client: Client§url: Url§id: u64Implementations§
source§impl LightClientRpcClient
impl LightClientRpcClient
pub fn new(uri: &str) -> Self
pub fn set_scripts(&mut self, scripts: Vec<ScriptStatus>) -> Result<(), RpcError>
pub fn get_scripts(&mut self) -> Result<Vec<ScriptStatus>, RpcError>
pub fn get_cells(
&mut self,
search_key: SearchKey,
order: Order,
limit: Uint32,
after: Option<JsonBytes>
) -> Result<Pagination<Cell>, RpcError>
pub fn get_transactions(
&mut self,
search_key: SearchKey,
order: Order,
limit: Uint32,
after: Option<JsonBytes>
) -> Result<Pagination<Tx>, RpcError>
pub fn get_cells_capacity(
&mut self,
search_key: SearchKey
) -> Result<CellsCapacity, RpcError>
pub fn send_transaction(&mut self, tx: Transaction) -> Result<H256, RpcError>
pub fn get_tip_header(&mut self) -> Result<HeaderView, RpcError>
pub fn get_genesis_block(&mut self) -> Result<BlockView, RpcError>
pub fn get_header(
&mut self,
block_hash: H256
) -> Result<Option<HeaderView>, RpcError>
pub fn get_transaction(
&mut self,
tx_hash: H256
) -> Result<Option<TransactionWithHeader>, RpcError>
sourcepub fn fetch_header(
&mut self,
block_hash: H256
) -> Result<FetchStatus<HeaderView>, RpcError>
pub fn fetch_header(
&mut self,
block_hash: H256
) -> Result<FetchStatus<HeaderView>, RpcError>
Fetch a header from remote node. If return status is not_found will re-sent fetching request immediately.
Returns: FetchStatus
sourcepub fn fetch_transaction(
&mut self,
tx_hash: H256
) -> Result<FetchStatus<TransactionWithHeader>, RpcError>
pub fn fetch_transaction(
&mut self,
tx_hash: H256
) -> Result<FetchStatus<TransactionWithHeader>, RpcError>
Fetch a transaction from remote node. If return status is not_found will re-sent fetching request immediately.
Returns: FetchStatus