v2 source pure
Package budget provides accounting, spending limits, and presentation for a shared pool.
Package budget provides accounting, spending limits, and presentation for a shared pool.
1
17
func Add
func AllocationBarSVG
func CapMeterSVG
func CheckDeadline
func EvidenceCommitment
1func EvidenceCommitment(programID int64, lane string, itemID int64, proofDigest string) stringEvidenceCommitment binds a salted proof digest to its program and item.
func FormatInt
func FormatUGNOT
FormatUGNOT shows the exact amount in both ugnot and GNOT.
func MarkdownText
MarkdownText escapes printable text for inline Markdown and table cells.
func ParsePolicyViewPath
ParsePolicyViewPath reads programID or programID/itemID for policy renders.
func PeriodAt
func RequireAddress
func RequireDigest
func RequireLaneName
func RequireMemo
RequireMemo accepts a single line of up to 80 printable UTF-8 bytes.
func RequirePositive
func Subtract
func EvaluateSpend
1func EvaluateSpend(available, reserveFloor int64, canBreachFloor bool, itemCap, periodCap, periodUsed, amount int64) SpendCheckEvaluateSpend reports the tightest room, breaking ties in item, period, pool order. A pool failure identifies a shortfall of cash before floor protection.
2
type Ledger
structMethods on Ledger
func Approve
method on Ledgerfunc AssertConserved
method on LedgerAssertConserved checks that all balances are non-negative and account for all funding.