pub struct RpcClient { /* private fields */ }Implementations§
Source§impl RpcClient
impl RpcClient
pub fn new(ckb_uri: &str) -> Self
pub fn new_with_client(ckb_uri: &str, raw: Client) -> Self
pub fn get_transaction( &self, hash: &H256, ) -> impl Future<Output = Result<Option<TransactionView>, Error>>
pub fn get_header_by_number( &self, number: BlockNumber, ) -> impl Future<Output = Result<HeaderView, Error>>
pub fn get_block_by_number( &self, number: BlockNumber, ) -> impl Future<Output = Result<BlockView, Error>>
pub fn get_header( &self, hash: H256, ) -> impl Future<Output = Result<Option<HeaderView>, Error>>
pub fn get_indexer_tip(&self) -> impl Future<Output = Result<IndexerTip, Error>>
pub fn get_transactions( &self, search_key: SearchKey, order: Order, limit: Uint32, after: Option<JsonBytes>, ) -> impl Future<Output = Result<Pagination<Tx>, Error>>
pub fn get_cells( &self, search_key: SearchKey, order: Order, limit: Uint32, after: Option<JsonBytes>, ) -> impl Future<Output = Result<Pagination<Cell>, Error>>
pub fn get_live_cell( &self, out_point: OutPoint, with_data: bool, ) -> impl Future<Output = Result<CellWithStatus, Error>>
pub fn get_cells_capacity( &self, search_key: SearchKey, ) -> impl Future<Output = Result<Option<CellsCapacity>, Error>>
Trait Implementations§
Source§impl Rpc for RpcClient
impl Rpc for RpcClient
fn get_transactions<'life0, 'async_trait>(
&'life0 self,
search_key: SearchKey,
order: Order,
limit: Uint32,
after: Option<JsonBytes>,
) -> Pin<Box<dyn Future<Output = Result<Pagination<Tx>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 H256,
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionView>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_header_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<HeaderView, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_indexer_tip<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IndexerTip, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_number<'life0, 'async_trait>(
&'life0 self,
number: BlockNumber,
) -> Pin<Box<dyn Future<Output = Result<BlockView, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for RpcClient
impl !RefUnwindSafe for RpcClient
impl Send for RpcClient
impl Sync for RpcClient
impl Unpin for RpcClient
impl !UnwindSafe for RpcClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more