Close empty token accounts (agent-owned app wallet)
close_empty_accountsClose empty token accounts owned by an agent's app wallet and reclaim the rent, sending it to a sign-in wallet or back to the app wallet. Non-empty accounts are skipped; only rent is moved.
Instructions
Close every EMPTY token account of this agent's own app wallet (owner = the local P-256 key from create_app_wallet) and send the rent to the sign-in wallet (default) or back to the app wallet. A non-empty account is never included. The transaction is decoded and checked locally (only CloseAccount, authority = the app wallet, rent to the chosen destination) before the owner key signs. Moves only rent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| destination | No | where the rent goes; default app_wallet (then app_wallet_withdraw moves the SOL to your sign-in wallet) |