Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v1 source pure

Package budget implements the value-only accounting used by Shared Budget.

Overview

Package budget implements the value-only accounting used by Shared Budget.

Constants 1

Functions 9

func Add

1func Add(a, b int64) int64
source

func EvidenceCommitment

1func EvidenceCommitment(programID int64, lane string, itemID int64, proofDigest string) string
source

EvidenceCommitment binds a salted proof digest to its program and item.

func ParsePolicyViewPath

1func ParsePolicyViewPath(path string) (int64, int64)
source

ParsePolicyViewPath reads programID or programID/itemID for policy renders.

func PeriodAt

1func PeriodAt(height, start, periodBlocks int64) int64
source

Types 1

type Ledger

struct
1type Ledger struct {
2	Funded    int64
3	Available int64
4	Reserved  int64
5	Claimable int64
6	Paid      int64
7}
source

Methods on Ledger

func Approve

method on Ledger
1func (l Ledger) Approve(amount int64) Ledger
source

func Fund

method on Ledger
1func (l Ledger) Fund(amount int64) Ledger
source

func Pay

method on Ledger
1func (l Ledger) Pay(amount int64) Ledger
source

func Release

method on Ledger
1func (l Ledger) Release(amount int64) Ledger
source

func Reserve

method on Ledger
1func (l Ledger) Reserve(amount int64) Ledger
source

Dependencies

Imports 5

/p/g1aj9pzthj36aav0kff2zcmx9llapa7ng7xzcfct/shared_budget/budget/v1

Imported by indexer

Source Files 3