pub struct MpcClient { /* private fields */ }Expand description
The main MPC SDK client.
Implementations§
Source§impl MpcClient
impl MpcClient
Sourcepub async fn create_account(
&self,
req: &CreateAccountRequest,
) -> Result<Account, Error>
pub async fn create_account( &self, req: &CreateAccountRequest, ) -> Result<Account, Error>
Creates a new account in a wallet.
Sourcepub async fn get_account(&self, account_id: &str) -> Result<Account, Error>
pub async fn get_account(&self, account_id: &str) -> Result<Account, Error>
Retrieves an account by ID.
Sourcepub async fn list_accounts(
&self,
req: &ListAccountsRequest,
) -> Result<ListAccountsResponse, Error>
pub async fn list_accounts( &self, req: &ListAccountsRequest, ) -> Result<ListAccountsResponse, Error>
Retrieves a paginated list of accounts.
Source§impl MpcClient
impl MpcClient
Sourcepub async fn create_asset(
&self,
req: &CreateAssetRequest,
) -> Result<Asset, Error>
pub async fn create_asset( &self, req: &CreateAssetRequest, ) -> Result<Asset, Error>
Creates a new asset for an account.
Sourcepub async fn get_asset(&self, asset_id: &str) -> Result<Asset, Error>
pub async fn get_asset(&self, asset_id: &str) -> Result<Asset, Error>
Retrieves an asset by ID.
Sourcepub async fn list_assets(
&self,
req: &ListAssetsRequest,
) -> Result<ListAssetsResponse, Error>
pub async fn list_assets( &self, req: &ListAssetsRequest, ) -> Result<ListAssetsResponse, Error>
Retrieves a paginated list of assets.
Source§impl MpcClient
impl MpcClient
Source§impl MpcClient
impl MpcClient
Sourcepub async fn get_transaction(&self, tx_id: &str) -> Result<Transaction, Error>
pub async fn get_transaction(&self, tx_id: &str) -> Result<Transaction, Error>
Retrieves a transaction by ID.
Sourcepub async fn list_transactions(
&self,
req: &ListTransactionsRequest,
) -> Result<ListTransactionsResponse, Error>
pub async fn list_transactions( &self, req: &ListTransactionsRequest, ) -> Result<ListTransactionsResponse, Error>
Retrieves a paginated list of transactions.
Source§impl MpcClient
impl MpcClient
Sourcepub async fn create_transfer(
&self,
req: &CreateTransferRequest,
) -> Result<TransferResponse, Error>
pub async fn create_transfer( &self, req: &CreateTransferRequest, ) -> Result<TransferResponse, Error>
Creates a transfer to send funds to an external address.
Source§impl MpcClient
impl MpcClient
Sourcepub async fn create_wallet(
&self,
req: &CreateWalletRequest,
) -> Result<Wallet, Error>
pub async fn create_wallet( &self, req: &CreateWalletRequest, ) -> Result<Wallet, Error>
Creates a new MPC wallet.
Sourcepub async fn get_wallet(&self, wallet_id: &str) -> Result<Wallet, Error>
pub async fn get_wallet(&self, wallet_id: &str) -> Result<Wallet, Error>
Retrieves a wallet by ID.
Sourcepub async fn list_wallets(
&self,
req: &ListWalletsRequest,
) -> Result<ListWalletsResponse, Error>
pub async fn list_wallets( &self, req: &ListWalletsRequest, ) -> Result<ListWalletsResponse, Error>
Retrieves a paginated list of wallets.
Auto Trait Implementations§
impl Freeze for MpcClient
impl !RefUnwindSafe for MpcClient
impl Send for MpcClient
impl Sync for MpcClient
impl Unpin for MpcClient
impl UnsafeUnpin for MpcClient
impl !UnwindSafe for MpcClient
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