Skip to content

@loktin/sdk / target-savings / GoalAllowance

Type Alias: GoalAllowance ​

GoalAllowance = "auto" | "none" | { amount: bigint; expiryLedger: number; }

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

The allowance a new goal approves for its scheduled deposits. An owner has one token allowance for Target Savings, shared by all their goals, and an approval replaces it whole.

  • 'auto' approves what all the owner's open goals need, the new one included: each worked out with scheduledAllowance, then combined with combineAllowances.
  • 'none' approves nothing and leaves the current allowance as it is.
  • An object approves exactly that, and replaces the allowance of all the owner's goals.

Goals are best created one at a time, so each 'auto' approval sees the goals before it.

Built on Stellar