pub struct MelwalletdClient<T: RpcTransport = DynRpcTransport>(pub T);Expand description
Automatically generated client type that communicates to servers implementing the MelwalletdProtocol protocol. The easiest way to use this is by using the From<RpcTransport> implementation.
See the MelwalletdProtocol trait for further documentation on the functionality of the methods..
Tuple Fields§
§0: TImplementations§
Source§impl<__nrpc_T: RpcTransport + Send + Sync + 'static> MelwalletdClient<__nrpc_T>
impl<__nrpc_T: RpcTransport + Send + Sync + 'static> MelwalletdClient<__nrpc_T>
pub async fn list_wallets( &self, ) -> Result<Vec<String>, MelwalletdError<__nrpc_T::Error>>
pub async fn wallet_summary( &self, wallet_name: String, ) -> Result<Result<WalletSummary, WalletAccessError>, MelwalletdError<__nrpc_T::Error>>
pub async fn latest_header( &self, ) -> Result<Result<Header, NetworkError>, MelwalletdError<__nrpc_T::Error>>
pub async fn melswap_info( &self, pool_key: PoolKey, ) -> Result<Result<Option<PoolState>, NetworkError>, MelwalletdError<__nrpc_T::Error>>
pub async fn simulate_swap( &self, to: Denom, from: Denom, value: u128, ) -> Result<Result<Option<SwapInfo>, NetworkError>, MelwalletdError<__nrpc_T::Error>>
pub async fn create_wallet( &self, wallet_name: String, password: String, secret: Option<String>, ) -> Result<Result<(), CreateWalletError>, MelwalletdError<__nrpc_T::Error>>
pub async fn dump_coins( &self, wallet_name: String, ) -> Result<Result<Vec<(CoinID, CoinData)>, WalletAccessError>, MelwalletdError<__nrpc_T::Error>>
pub async fn dump_transactions( &self, wallet_name: String, ) -> Result<Result<Vec<(TxHash, Option<BlockHeight>)>, WalletAccessError>, MelwalletdError<__nrpc_T::Error>>
pub async fn lock_wallet( &self, wallet_name: String, ) -> Result<Result<(), WalletAccessError>, MelwalletdError<__nrpc_T::Error>>
pub async fn unlock_wallet( &self, wallet_name: String, password: String, ) -> Result<Result<(), WalletAccessError>, MelwalletdError<__nrpc_T::Error>>
pub async fn export_sk( &self, wallet_name: String, password: String, ) -> Result<Result<String, WalletAccessError>, MelwalletdError<__nrpc_T::Error>>
pub async fn prepare_tx( &self, wallet_name: String, request: PrepareTxArgs, ) -> Result<Result<Transaction, NeedWallet<PrepareTxError>>, MelwalletdError<__nrpc_T::Error>>
pub async fn send_tx( &self, wallet_name: String, tx: Transaction, ) -> Result<Result<TxHash, NeedWallet<NetworkError>>, MelwalletdError<__nrpc_T::Error>>
pub async fn tx_balance( &self, wallet_name: String, txhash: HashVal, ) -> Result<Result<Option<TxBalance>, WalletAccessError>, MelwalletdError<__nrpc_T::Error>>
pub async fn tx_status( &self, wallet_name: String, txhash: HashVal, ) -> Result<Result<Option<TransactionStatus>, WalletAccessError>, MelwalletdError<__nrpc_T::Error>>
pub async fn send_faucet( &self, wallet_name: String, ) -> Result<Result<TxHash, NeedWallet<NetworkError>>, MelwalletdError<__nrpc_T::Error>>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for MelwalletdClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for MelwalletdClient<T>where
T: RefUnwindSafe,
impl<T> Send for MelwalletdClient<T>
impl<T> Sync for MelwalletdClient<T>
impl<T> Unpin for MelwalletdClient<T>where
T: Unpin,
impl<T> UnwindSafe for MelwalletdClient<T>where
T: UnwindSafe,
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.