Guides

Withdraw

Pay an amount from your private balance to a public wallet.

A withdrawal pays an amount from your private balance to a public token account. It is the way out of the pool: after it, the amount is ordinary USDC in a wallet.

In the app#

  1. Open your balance

    Go to the app, connect your wallet and press Open balance.

  2. Choose Withdraw

    Under Balance, switch from Deposit to Withdraw.

  3. Enter the amount and the address

    Amount shows how much is available. To takes a public wallet address and is filled with your connected wallet. The panel lists the relay fee and the total that leaves your balance.

  4. Press Withdraw

    The browser proves the spend and the facilitator relays it. Your wallet signs nothing. When the transaction settles, the amount is in the receiving wallet.

In code#

ts
const withdrawal = await owner.withdraw({
  mint,
  amount: '3000000',
  recipient: wallet.address,
})

withdrawal.status // 'settled'
withdrawal.signature

amount is in raw units. The tokens go to the recipient's associated token account for the mint, or to the account you pass as recipientTokenAccount.

What it needs#

  • A token account at the receiving wallet. The program pays into an existing token account for the mint and does not create one.
  • Enough in at most two notes. A withdrawal spends up to two of your notes, which together must cover the amount and the relay fee. Otherwise withdraw throws INSUFFICIENT_BALANCE. Withdraw in two parts, or first join notes by sending any amount to your own Alba address.
  • Value outside grants. Only the Available figure can be withdrawn. To withdraw what a grant holds, revoke the grant first.

What it costs#

One relay fee, taken from your balance on top of the amount. A withdrawal pays no protocol fee. The app shows the fee before you press Withdraw, and Fees and the ALBA token says where to read it.

What the chain shows#

 AnyoneThe owner
Fromthe poolyour balance
Tothe receiving accountthe receiving account
Amountthe amountthe amount
What remains in your balancesealedevery note

The transfer comes from the pool's vault. It does not show which deposit the amount came from, or what you still hold.