What Does Withdraw Excess Lamports Do?
WithdrawExcessLamports moves SOL held by a Token Program account above its
rent-exempt minimum to a destination account. Token balances and mint supply are
untouched — only the surplus lamports move.
This recovers SOL that was previously stranded: lamports sent to a token
account, mint, or multisig (all owned by the Token Program) could not otherwise
be moved.
Source Reference
Accounts
| Account | Description |
|---|---|
source | Writable. The token account, mint, or multisig to withdraw from. |
destination | Writable. Receives the excess lamports. |
authority | Signs based on the source account type (see below). |
Who Can Sign
The required signer depends on the type of thesource account:
| Source account | Signer |
|---|---|
| Token account | The token account owner (or its multisig signers). |
| Mint with a mint authority | The mint authority. |
| Mint without a mint authority | The mint account itself must sign (see the note below). |
| Multisig | The configured M-of-N signers. |
The “mint without a mint authority” case is uncommon. When it applies, the mint
account is the signer: a program-owned (off-curve) mint signs via a CPI from its
owning program, and a keypair (on-curve) mint signs with its key.
Native (wrapped SOL) token accounts are not supported and return
NativeNotSupported. The withdrawal cannot drop the source account below
its rent-exempt minimum.How to Withdraw Excess Lamports
The example uses a configured@solana/kit client — see
Transfer Tokens for client setup.
Withdraw excess lamports (Kit)
multiSigners.