ClientWithGetMinimumBalance
Represents a client that can compute the minimum balance required for an account to be exempt from deletion.
Different implementations may compute this value differently — for example, by calling the
getMinimumBalanceForRentExemption RPC method, or by using a locally cached value.
Example
Properties
getMinimumBalance()
Computes the minimum lamports required for an account with the given data size.
By default, the 128-byte account header is added on top of the provided space. Pass
{ withoutHeader: true } to skip adding the header bytes.
Parameters
| Parameter | Type | Description |
|---|---|---|
space | number | The number of bytes of account data. |
config? | GetMinimumBalanceConfig | Optional configuration for the computation. |
Returns
Promise<Lamports>
A promise resolving to the minimum Lamports required.
See
@solana/accounts#BASE_ACCOUNT_SIZE | BASE_ACCOUNT_SIZE for the account header size constant.