pub struct LightClientRpcClient { /* private fields */ }Implementations§
Source§impl LightClientRpcClient
impl LightClientRpcClient
pub fn new(uri: &str) -> Self
pub fn with_builder<F>(uri: &str, f: F) -> Result<Self, Error>
pub fn post<PARAM, RET>( &self, method: &str, params: PARAM, ) -> Result<RET, RpcError>
pub fn set_scripts( &self, scripts: Vec<ScriptStatus>, command: Option<SetScriptsCommand>, ) -> Result<(), RpcError>
pub fn get_scripts(&self) -> Result<Vec<ScriptStatus>, RpcError>
pub fn get_cells( &self, search_key: SearchKey, order: Order, limit: Uint32, after: Option<JsonBytes>, ) -> Result<Pagination<Cell>, RpcError>
pub fn get_transactions( &self, search_key: SearchKey, order: Order, limit: Uint32, after: Option<JsonBytes>, ) -> Result<Pagination<Tx>, RpcError>
pub fn get_cells_capacity( &self, search_key: SearchKey, ) -> Result<CellsCapacity, RpcError>
pub fn send_transaction(&self, tx: Transaction) -> Result<H256, RpcError>
pub fn get_tip_header(&self) -> Result<HeaderView, RpcError>
pub fn get_genesis_block(&self) -> Result<BlockView, RpcError>
pub fn get_header( &self, block_hash: H256, ) -> Result<Option<HeaderView>, RpcError>
pub fn get_transaction( &self, tx_hash: H256, ) -> Result<Option<TransactionWithStatus>, RpcError>
pub fn estimate_cycles( &self, tx: Transaction, ) -> Result<EstimateCycles, RpcError>
Sourcepub fn fetch_header(
&self,
block_hash: H256,
) -> Result<FetchStatus<HeaderView>, RpcError>
pub fn fetch_header( &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(
&self,
tx_hash: H256,
) -> Result<FetchStatus<TransactionWithStatus>, RpcError>
pub fn fetch_transaction( &self, tx_hash: H256, ) -> Result<FetchStatus<TransactionWithStatus>, RpcError>
Fetch a transaction from remote node. If return status is not_found will re-sent fetching request immediately.
Returns: FetchStatus
pub fn get_peers(&self) -> Result<Vec<RemoteNode>, RpcError>
pub fn local_node_info(&self) -> Result<LocalNode, RpcError>
Trait Implementations§
Source§impl Clone for LightClientRpcClient
impl Clone for LightClientRpcClient
Source§impl From<&LightClientRpcClient> for LightClientRpcAsyncClient
Available on non-WebAssembly only.
impl From<&LightClientRpcClient> for LightClientRpcAsyncClient
Available on non-WebAssembly only.
Source§fn from(value: &LightClientRpcClient) -> Self
fn from(value: &LightClientRpcClient) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for LightClientRpcClient
impl !RefUnwindSafe for LightClientRpcClient
impl Send for LightClientRpcClient
impl Sync for LightClientRpcClient
impl Unpin for LightClientRpcClient
impl !UnwindSafe for LightClientRpcClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more