capabilities.work

Check Whether an Account Is Rent Exempt

A 2-step recipe with Solana. We can help you get access.

Recipe · 2 steps

Check Whether an Account Is Rent Exempt

with Solana

Compare an account's lamport balance against the rent-exempt minimum for its size.

  1. Read the account to capture the lamports it holds, the program that owns it, and the size of its data, which is what the rent calculation keys on.
  2. Look up the minimum lamport balance that makes an account of this exact data size rent exempt. Comparing this against the account's lamports tells the caller whether the account is safe or needs topping up.
What you'll need to have ready
  • address: Base58-encoded public key of the account to inspect.
For your developer

Arazzo workflow solana:account-rent-exemption, 2 operations: getAccountInfo → getMinimumBalanceForRentExemption. Specs on APIs.io.