Skip to main content

Platform wallet withdrawal

WalletWithdrawal is an atomic, loan-independent component for moving assets held by the user’s platform wallet. It uses live wallet positions instead of asking the application to supply asset balances. This is different from WithdrawCollateral, which removes collateral from a specific loan and is constrained by that loan’s health factor.

Install

The registry installs BorrowProvider and the required shadcn primitives when they are not already present.
WalletWithdrawal requires @satsterminal-sdk/borrow 1.7.2 or later. Earlier versions do not return the asynchronous EVM withdrawal transaction ID correctly.

Render

SDK methods

EVM destination

  • Transfers the selected asset on its existing source chain.
  • Validates the destination as an EVM address.
  • Uses the platform wallet at index 0.
  • Gas is sponsored by the platform.

Balance and status behavior

The component prevents zero, negative, and over-balance submissions. The Max action uses the live position balance. After submission, it polls the asynchronous transaction, exposes an explorer link when the final hash is available, and refreshes wallet positions on completion.
An asset visible in the platform wallet is selectable only when sponsored EVM transfer is configured for that asset and chain.