pub struct DeveloperWalletsClient { /* private fields */ }Expand description
Async HTTP client for the Circle W3S Developer-Controlled Wallets API.
Implementations§
Source§impl DeveloperWalletsClient
impl DeveloperWalletsClient
Sourcepub fn new(api_key: impl Into<String>) -> Self
pub fn new(api_key: impl Into<String>) -> Self
Creates a new client using the Circle production base URL.
Sourcepub fn with_base_url(
api_key: impl Into<String>,
base_url: impl Into<String>,
) -> Self
pub fn with_base_url( api_key: impl Into<String>, base_url: impl Into<String>, ) -> Self
Creates a new client with a custom base URL (useful for Prism mock servers).
Sourcepub async fn create_wallet_set(
&self,
req: &CreateWalletSetRequest,
) -> Result<WalletSetResponse, Error>
pub async fn create_wallet_set( &self, req: &CreateWalletSetRequest, ) -> Result<WalletSetResponse, Error>
Create a new developer-controlled wallet set.
Sourcepub async fn get_wallet_set(&self, id: &str) -> Result<WalletSetResponse, Error>
pub async fn get_wallet_set(&self, id: &str) -> Result<WalletSetResponse, Error>
Get a wallet set by its UUID.
Sourcepub async fn update_wallet_set(
&self,
id: &str,
req: &UpdateWalletSetRequest,
) -> Result<WalletSetResponse, Error>
pub async fn update_wallet_set( &self, id: &str, req: &UpdateWalletSetRequest, ) -> Result<WalletSetResponse, Error>
Update the name of a wallet set.
Sourcepub async fn list_wallet_sets(
&self,
params: &ListWalletSetsParams,
) -> Result<WalletSets, Error>
pub async fn list_wallet_sets( &self, params: &ListWalletSetsParams, ) -> Result<WalletSets, Error>
List all wallet sets belonging to the entity.
Sourcepub async fn create_wallets(
&self,
req: &CreateWalletsRequest,
) -> Result<Wallets, Error>
pub async fn create_wallets( &self, req: &CreateWalletsRequest, ) -> Result<Wallets, Error>
Create one or more developer-controlled wallets.
Sourcepub async fn list_wallets(
&self,
params: &ListWalletsParams,
) -> Result<Wallets, Error>
pub async fn list_wallets( &self, params: &ListWalletsParams, ) -> Result<Wallets, Error>
List wallets matching the given filters.
Sourcepub async fn get_wallet(&self, id: &str) -> Result<WalletResponse, Error>
pub async fn get_wallet(&self, id: &str) -> Result<WalletResponse, Error>
Get a wallet by its UUID.
Sourcepub async fn update_wallet(
&self,
id: &str,
req: &UpdateWalletRequest,
) -> Result<WalletResponse, Error>
pub async fn update_wallet( &self, id: &str, req: &UpdateWalletRequest, ) -> Result<WalletResponse, Error>
Update the name or reference ID of a wallet.
Sourcepub async fn list_wallet_balances(
&self,
params: &ListWalletBalancesParams,
) -> Result<WalletsWithBalances, Error>
pub async fn list_wallet_balances( &self, params: &ListWalletBalancesParams, ) -> Result<WalletsWithBalances, Error>
List developer wallets with their token balances.
Sourcepub async fn list_wallet_token_balances(
&self,
wallet_id: &str,
params: &WalletNftsParams,
) -> Result<Balances, Error>
pub async fn list_wallet_token_balances( &self, wallet_id: &str, params: &WalletNftsParams, ) -> Result<Balances, Error>
Retrieve token balances for a single wallet by its UUID.
Sourcepub async fn list_wallet_nfts(
&self,
wallet_id: &str,
params: &ListWalletNftsParams,
) -> Result<Nfts, Error>
pub async fn list_wallet_nfts( &self, wallet_id: &str, params: &ListWalletNftsParams, ) -> Result<Nfts, Error>
Retrieve NFTs held by a wallet by its UUID.
Sourcepub async fn sign_message(
&self,
req: &SignMessageRequest,
) -> Result<SignatureResponse, Error>
pub async fn sign_message( &self, req: &SignMessageRequest, ) -> Result<SignatureResponse, Error>
Sign a plain or hex-encoded message.
Sourcepub async fn sign_typed_data(
&self,
req: &SignTypedDataRequest,
) -> Result<SignatureResponse, Error>
pub async fn sign_typed_data( &self, req: &SignTypedDataRequest, ) -> Result<SignatureResponse, Error>
Sign an EIP-712 typed data payload.
Sourcepub async fn sign_transaction(
&self,
req: &SignTransactionRequest,
) -> Result<SignTransactionResponse, Error>
pub async fn sign_transaction( &self, req: &SignTransactionRequest, ) -> Result<SignTransactionResponse, Error>
Sign a raw transaction.
Sourcepub async fn list_transactions(
&self,
params: &ListTransactionsParams,
) -> Result<Transactions, Error>
pub async fn list_transactions( &self, params: &ListTransactionsParams, ) -> Result<Transactions, Error>
List transactions matching the given filters.
Sourcepub async fn get_transaction(
&self,
id: &str,
) -> Result<TransactionResponse, Error>
pub async fn get_transaction( &self, id: &str, ) -> Result<TransactionResponse, Error>
Get a transaction by its UUID.
Sourcepub async fn create_transfer_transaction(
&self,
req: &CreateTransferTxRequest,
) -> Result<TransactionResponse, Error>
pub async fn create_transfer_transaction( &self, req: &CreateTransferTxRequest, ) -> Result<TransactionResponse, Error>
Create a developer-controlled transfer transaction.
Sourcepub async fn get_fee_parameters(
&self,
req: &CreateTransferTxRequest,
) -> Result<EstimateFeeResponse, Error>
pub async fn get_fee_parameters( &self, req: &CreateTransferTxRequest, ) -> Result<EstimateFeeResponse, Error>
Get fee parameters for a transfer.
Sourcepub async fn create_contract_execution_transaction(
&self,
req: &CreateContractExecutionTxRequest,
) -> Result<TransactionResponse, Error>
pub async fn create_contract_execution_transaction( &self, req: &CreateContractExecutionTxRequest, ) -> Result<TransactionResponse, Error>
Create a developer-controlled contract execution transaction.
Sourcepub async fn cancel_transaction(
&self,
id: &str,
req: &CancelTxRequest,
) -> Result<TransactionResponse, Error>
pub async fn cancel_transaction( &self, id: &str, req: &CancelTxRequest, ) -> Result<TransactionResponse, Error>
Cancel a stuck or queued transaction.
Sourcepub async fn accelerate_transaction(
&self,
id: &str,
req: &AccelerateTxRequest,
) -> Result<TransactionResponse, Error>
pub async fn accelerate_transaction( &self, id: &str, req: &AccelerateTxRequest, ) -> Result<TransactionResponse, Error>
Accelerate a stuck transaction by resubmitting with higher fees.
Sourcepub async fn get_token(&self, id: &str) -> Result<TokenResponse, Error>
pub async fn get_token(&self, id: &str) -> Result<TokenResponse, Error>
Get a token by its UUID.
Sourcepub async fn estimate_transfer_fee(
&self,
req: &EstimateTransferFeeRequest,
) -> Result<EstimateFeeResponse, Error>
pub async fn estimate_transfer_fee( &self, req: &EstimateTransferFeeRequest, ) -> Result<EstimateFeeResponse, Error>
Estimate fees for a transfer transaction.
Sourcepub async fn validate_address(
&self,
req: &ValidateAddressRequest,
) -> Result<ValidateAddressResponse, Error>
pub async fn validate_address( &self, req: &ValidateAddressRequest, ) -> Result<ValidateAddressResponse, Error>
Validate a blockchain address.