Struct near_fetch::Client
source · pub struct Client { /* private fields */ }Expand description
Client that implements exponential retrying and caching of access key nonces.
Implementations§
source§impl Client
impl Client
sourcepub fn from_client(client: JsonRpcClient) -> Self
pub fn from_client(client: JsonRpcClient) -> Self
Construct a Client from an existing JsonRpcClient.
sourcepub async fn send_tx(
&self,
signer: &InMemorySigner,
receiver_id: &AccountId,
actions: Vec<Action>
) -> Result<FinalExecutionOutcomeView>
pub async fn send_tx( &self, signer: &InMemorySigner, receiver_id: &AccountId, actions: Vec<Action> ) -> Result<FinalExecutionOutcomeView>
Send a series of Actions as a SignedTransaction to the network.
sourcepub async fn view<T: Serialize, R: DeserializeOwned>(
&self,
receiver_id: &AccountId,
function_name: &str,
args: T
) -> Result<R>
pub async fn view<T: Serialize, R: DeserializeOwned>( &self, receiver_id: &AccountId, function_name: &str, args: T ) -> Result<R>
View into a function.
sourcepub async fn access_key(
&self,
account_id: &AccountId,
public_key: &PublicKey
) -> Result<(AccessKeyView, CryptoHash)>
pub async fn access_key( &self, account_id: &AccountId, public_key: &PublicKey ) -> Result<(AccessKeyView, CryptoHash)>
Fetches the access key for the given account ID and public key.
sourcepub async fn view_block(
&self,
block_reference: BlockReference
) -> Result<BlockView>
pub async fn view_block( &self, block_reference: BlockReference ) -> Result<BlockView>
Fetches the block for this block reference.
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request