I'd like to use getMinimumBalanceForRentExemption
. With that said, it expects a parameter of the size of the data account. I'd like to know if there's a way to get the estimate size of an account or whether I have to calculate it by hand.
In my rust code, I use use std::mem::size_of
to get the size of a struct. Anything similar in the client side which is the one setting the rent budget or maybe something similar in the IDL?