---
title: Advanced Token Instructions
description:
  Batch multiple token operations into a single instruction, and recover SOL
  from token accounts, mints, and multisigs with the Token Program.
url: /docs/tokens/advanced
---

Beyond the common create, mint, and transfer operations, the Token Program is
also called from on-chain programs via CPI and includes instructions for
recovering lamports:

<Cards>
  <Card
    title="Calling the Token Program via CPI"
    href="/docs/tokens/advanced/cpi"
  >
    Invoke the Token Program from an on-chain program — transfer, mint, and burn
    tokens, sign with a PDA authority, and batch instructions into a single CPI.
  </Card>

<Card
  title="Withdraw Excess Lamports"
  href="/docs/tokens/advanced/withdraw-excess-lamports"
>
  Recover SOL above the rent-exempt minimum from token accounts, mints, and
  multisig accounts without changing token balances.
</Card>

  <Card title="Unwrap Lamports" href="/docs/tokens/advanced/unwrap-lamports">
    Convert wrapped SOL back into lamports, in full or in part, without closing
    the token account.
  </Card>
</Cards>

<Callout type="info">

_rs`WithdrawExcessLamports`_ and _rs`UnwrapLamports`_ are available through the
[`@solana-program/token`](https://www.npmjs.com/package/@solana-program/token)
client. Calling the Token Program via CPI applies to on-chain programs.

</Callout>

## Lamport recovery

_rs`WithdrawExcessLamports`_ recovers SOL above the rent-exempt minimum from
token accounts, mints, and multisig accounts. _rs`UnwrapLamports`_ converts
wrapped SOL in a native token account back into lamports.
