Skip to content

@loktin/sdk / target-savings / scheduledAllowance

Function: scheduledAllowance() ​

scheduledAllowance(input): ScheduledAllowance

Defined in: @loktin/sdk/dist/target-savings/allowance.d.ts:51

Works out the allowance that covers a goal's scheduled deposits until the allowance expires (W57). No network call.

The expiry is the deadline's ledger, estimated at 5 seconds per ledger, plus one day of ledgers, capped at the latest ledger the network allows. The amount covers each period from the first one still collectable up to the earlier of the deadline and the expiry, capped at what the goal still needs. Missed periods are never collected, so they are not counted. After the deadline second nothing is left to collect, so the amount is 0; the deadline second itself is still inside the goal.

Parameters ​

input ​

ScheduledAllowanceInput

Returns ​

ScheduledAllowance

Built on Stellar