Burn & Claim Docs
What Burn & Claim's public API does, and where to find each part of it.
Solana keeps a deposit, called rent, in every account that holds a token. When a wallet no longer needs an account (an empty token account, a token it wants rid of, an NFT it doesn't want), closing or burning it returns that rent to the wallet. Burn & Claim finds every such account in a wallet, prices the cleanup, and builds the transactions that do it.
The Burn & Claim app is a client of a public API, and so is anything you build. The API is at https://api.burnandclaim.com/v1.
From scan to submit
- Scan a wallet: every asset it holds, what can be done with each, and what each action returns and costs.
- Quote a selection: the SOL back, the fees, and how many wallet approvals it takes, against the chain as it is now.
- Prepare a round: the API packs the selection into as few transactions as the network allows, simulates them and splits them into approvals.
- Stamp each approval just before the wallet opens: its transactions get a fresh blockhash.
- The wallet signs, and only signs.
- Submit what the wallet signed: the API checks each transaction is exactly the one it built, co-signs it, sends it, waits for it to confirm, and records it.
How a cleanup works explains each step, and the quickstart runs them with the SDK.
Why the API co-signs
Every transaction the API builds names its co-signer as a signer, so it lands only through submit. Submit co-signs a transaction only when it is exactly the one the API built, fees included, so nothing reaches the chain that it didn't check.
What's here
- Quickstart: a cleanup from scan to submit with
@burnandclaim/sdk. - Concepts: rounds and approvals, fees and donations, and the API's conventions.
- Authentication and rate limits: calling without a key, and with one.
- The SDK and its cookbook.
- Errors: every error code, and what to do about each.
- The API reference: every public route, rendered from the API's contract.