Skip to main content

WalletsClient

Struct WalletsClient 

Source
pub struct WalletsClient { /* private fields */ }
Expand description

Client for wallets operations.

Implementations§

Source§

impl WalletsClient

Source

pub fn new(client: Client) -> Self

Source

pub async fn abort_transaction( &self, wallet_id: String, transaction_id: String, ) -> Result<AbortTransactionResponse, Error>

Aborts a transaction that is currently in ‘Executing’ status and has not yet been signed. Sets the transaction status to ‘Failed’ and removes it from the retry queue.

This is useful when a transaction is stuck in the execution pipeline (e.g., during construct or sign phase) and you want to abort it without waiting for it to fail on its own.

Source

pub async fn abort_transfer( &self, wallet_id: String, transfer_id: String, ) -> Result<AbortTransferResponse, Error>

Aborts a transfer that is currently in ‘Executing’ status and has not yet been signed. Sets the transfer status to ‘Failed’ and removes it from the retry queue.

This is useful when a transfer is stuck in the execution pipeline (e.g., during construct or sign phase) and you want to abort it without waiting for it to fail on its own.

Source

pub async fn activate_wallet( &self, wallet_id: String, body: ActivateWalletRequest, ) -> Result<ActivateWalletResponse, Error>

Activates a wallet by deploying the account contract on-chain, making it ready for transactions.

This operation is required for wallets on networks where you need to explicitly activate your account on-chain
before it can be used for transactions.
Source

pub async fn list_transactions( &self, wallet_id: String, query: Option<ListTransactionsQuery>, ) -> Result<ListTransactionsResponse, Error>

Retrieves a list of transactions requests for the specified wallet.

Source

pub async fn sign_and_broadcast_transaction( &self, wallet_id: String, body: SignAndBroadcastTransactionRequest, ) -> Result<SignAndBroadcastTransactionResponse, Error>

Sign & Broadcast transaction enables communication with any arbitrary smart contract of the target blockchain. You can construct a transaction that performs a complex task and this endpoint will sign the transaction, add the signature and broadcast it to chain. It can be used to call smart contract functions like mint tokens and even deploy new smart contracts.

StatusDefinition
Source

pub async fn cancel_transaction( &self, wallet_id: String, transaction_id: String, ) -> Result<CancelTransactionResponse, Error>

Cancels an EVM transaction by creating a replacement transaction with the same nonce. The new transaction sends 0 value to the same address, effectively nullifying the original transaction.

This endpoint works for:

  • EVM-compatible networks (Ethereum, Polygon, BSC, etc.)
Source

pub async fn cancel_transfer( &self, wallet_id: String, transfer_id: String, ) -> Result<CancelTransferResponse, Error>

Cancels an EVM transfer by creating a replacement transaction with the same nonce. The new transaction sends 0 value to the same address, effectively nullifying the original transfer.

This endpoint works for:

  • EVM-compatible networks (Ethereum, Polygon, BSC, etc.)
Source

pub async fn proxy_arequest_to_the_canton_ledger_api( &self, wallet_id: String, body: ProxyARequestToTheCantonLedgerApiRequest, ) -> Result<Value, Error>

Proxies a request to the Canton Ledger API associated with this wallet, using the validator’s OAuth2 credentials. Restricted to a curated allow-list of read-style resources. Used to satisfy the Canton WalletConnect canton_ledgerApi method.

Source

pub async fn speed_up_transaction( &self, wallet_id: String, transaction_id: String, ) -> Result<SpeedUpTransactionResponse, Error>

Speeds up a transaction by creating a replacement transaction with the same parameters but higher gas fees.

This endpoint only works for:

  • EVM-compatible networks (Ethereum, Polygon, BSC, etc.)
Source

pub async fn speed_up_transfer( &self, wallet_id: String, transfer_id: String, ) -> Result<SpeedUpTransferResponse, Error>

Speeds up a transfer by creating a replacement transaction with the same parameters but higher gas fees.

This endpoint only works for:

  • EVM-compatible networks (Ethereum, Polygon, BSC, etc.)
Source

pub async fn list_wallets( &self, query: Option<ListWalletsQuery>, ) -> Result<ListWalletsResponse, Error>

Retrieves the list of Wallets in your organization. You can filter the results by owner (either by owner id or owner username). Pagination is supported via limit and paginationToken parameters.

Source

pub async fn create_wallet( &self, body: CreateWalletRequest, ) -> Result<CreateWalletResponse, Error>

Creates a new Wallet associated with the given chain (such as Bitcoin or Ethereum ). Returns a new wallet entity.

Source

pub async fn get_transaction( &self, wallet_id: String, transaction_id: String, ) -> Result<GetTransactionResponse, Error>

Retrieve information about a specific transaction.

Source

pub async fn get_transfer( &self, wallet_id: String, transfer_id: String, ) -> Result<GetTransferResponse, Error>

Retrieves a Wallet Transfer Request by its ID.

Source

pub async fn get_wallet( &self, wallet_id: String, ) -> Result<GetWalletResponse, Error>

Retrieves a Wallet information by its ID.

Source

pub async fn update_wallet( &self, wallet_id: String, body: UpdateWalletRequest, ) -> Result<UpdateWalletResponse, Error>

Updates the name of an existing wallet.

Source

pub async fn get_wallet_assets( &self, wallet_id: String, query: Option<GetWalletAssetsQuery>, ) -> Result<GetWalletAssetsResponse, Error>

Retrieves a list of assets owned by the specified wallet. Return values vary by chain as shown below.

Source

pub async fn get_wallet_history( &self, wallet_id: String, query: Option<GetWalletHistoryQuery>, ) -> Result<GetWalletHistoryResponse, Error>

Retrieves a list of historical on chain activities for the specified wallet.

The list reflects the indexed on-chain activity: it includes confirmed transactions only.

Source

pub async fn get_wallet_nfts( &self, wallet_id: String, ) -> Result<GetWalletNftsResponse, Error>

Retrieves a list of NFTs owned by the specified Wallet.

Source

pub async fn import_wallet( &self, body: ImportWalletRequest, ) -> Result<ImportWalletResponse, Error>

This endpoint is not enabled by default. [Contact Dfns](https://support.dfns.co) to have it activated.
Source

pub async fn list_transfers( &self, wallet_id: String, query: Option<ListTransfersQuery>, ) -> Result<ListTransfersResponse, Error>

Retrieves a list of transfer requests for the specified wallet.

Source

pub async fn transfer_asset( &self, wallet_id: String, body: TransferAssetRequest, ) -> Result<TransferAssetResponse, Error>

Transfer an asset out of the specified wallet to a destination address. For all fungible token transfers, the transfer amount must be specified in the minimum denomination of that token. For example, use the amount in Satoshi for a Bitcoin transfer, or the amount in Wei for an Ethereum transfer etc.

Source

pub async fn tag_wallet( &self, wallet_id: String, body: TagWalletRequest, ) -> Result<TagWalletResponse, Error>

Add a Tag to a wallet.

Source

pub async fn untag_wallet( &self, wallet_id: String, body: UntagWalletRequest, ) -> Result<UntagWalletResponse, Error>

Removes the specified tags from a wallet.

Source

pub async fn get_offer( &self, wallet_id: String, offer_id: String, ) -> Result<GetOfferResponse, Error>

Retrieve information about a specific offer received on your wallet.

Source

pub async fn list_offers( &self, wallet_id: String, query: Option<ListOffersQuery>, ) -> Result<ListOffersResponse, Error>

List all offers received on a specific wallet.

Source

pub async fn accept_offer( &self, wallet_id: String, offer_id: String, ) -> Result<AcceptOfferResponse, Error>

Accept an offer received on your wallet.

Source

pub async fn reject_offer( &self, wallet_id: String, offer_id: String, ) -> Result<RejectOfferResponse, Error>

Reject an offer received on your wallet.

Source

pub async fn list_org_wallet_history( &self, query: Option<ListOrgWalletHistoryQuery>, ) -> Result<Value, Error>

Retrieve the transaction history across all wallets within a specified timeframe. The time range is unbounded, but the CSV export is capped at 100,000 rows.

Trait Implementations§

Source§

impl Clone for WalletsClient

Source§

fn clone(&self) -> WalletsClient

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more