Calculate the remaining withdrawal quota of a Filecoin beneficiary
A provider can designate a beneficiary with a quota and expiry. A treasury may see sufficient available funds while its beneficiary allowance is already almost exhausted.
Inspect the active beneficiary term
Use the provider actor address and inspect Beneficiary and BeneficiaryTerm. Keep Quota, UsedQuota and the expiration epoch together. A pending beneficiary record describes a proposed change and is distinct from the active term.
{"jsonrpc":"2.0","id":1,"method":"Filecoin.StateMinerInfo","params":["f01234",[]]}
Bound a proposed withdrawal
For an active designated beneficiary with a 10 FIL quota and 7 FIL used, the remaining allowance is 3 FIL before considering available actor funds. Check expiration at the intended execution epoch. Compare the allowance with the actor's spendable balance and verify the authorized caller before preparing a withdrawal.
docs.filecoin.io StateMinerInfo · docs.filecoin.io StateMinerAvailableBalance