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#
Open your balance
Go to the app, connect your wallet and press Open balance.
Choose Withdraw
Under Balance, switch from Deposit to Withdraw.
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.
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#
const withdrawal = await owner.withdraw({
mint,
amount: '3000000',
recipient: wallet.address,
})
withdrawal.status // 'settled'
withdrawal.signatureamount 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
withdrawthrowsINSUFFICIENT_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#
| Anyone | The owner | |
|---|---|---|
| From | the pool | your balance |
| To | the receiving account | the receiving account |
| Amount | the amount | the amount |
| What remains in your balance | sealed | every note |
The transfer comes from the pool's vault. It does not show which deposit the amount came from, or what you still hold.