v4 source realm
Package treasury holds funds and accounts for reservations across independent policies.
Package treasury holds funds and accounts for reservations across independent policies.
2
const MaxPageSize
45
func AcceptSponsorTransfer
crossing Actionfunc AddPolicy
crossing Actionfunc Approve
crossing Actionfunc Cancel
crossing Actionfunc CancelDraft
crossing Actionfunc CancelPendingPolicyCaps
crossing Actionfunc CancelPendingReserveFloor
crossing Actionfunc CheckSpend
ActionCheckSpend preflights a reservation amount against an active, registered lane.
func CloseIssuance
crossing Actionfunc CreateProgram
crossing Actionfunc ExecutePolicyCaps
crossing Actionfunc ExecuteReserveFloor
crossing Actionfunc Expire
crossing Actionfunc FinalizeClose
crossing ActionFinalizeClose creates a sponsor refund and freezes the period displayed for the program.
func Fund
crossing Actionfunc FundFromBanker
crossing Actionfunc FundToken
crossing Actionfunc GetLanePeriodUsage
Actionfunc GetRegisteredToken
Actionfunc GetTreasuryAssetBalance
ActionGetTreasuryAssetBalance returns physical custody and outstanding claims and allocations.
func GetTreasuryBalance
ActionGetTreasuryBalance returns total bank cash and the portion owed to programs.
func LatestProgramID
Actionfunc Open
crossing Actionfunc OpenFromBanker
crossing Actionfunc OpenToken
crossing Actionfunc ProposeSponsorTransfer
crossing Actionfunc PruneClosed
crossing Actionfunc QueuePolicyCaps
crossing Action1func QueuePolicyCaps(cur realm, programID int64, lane string, periodCap, itemCap int64) int64QueuePolicyCaps changes an active lane's spending limits without altering prior usage.
func QueueReserveFloor
crossing ActionQueueReserveFloor returns the first block at which the change may take effect. With a zero delay, the change takes effect immediately.
func RegisterPolicy
crossing Actionfunc RegisterToken
crossing ActionRegisterToken binds a key to a GRC20 ledger for the lifetime of the treasury.
func Reject
crossing Actionfunc RemovePolicy
crossing Actionfunc Render
func Reserve
crossing Action1func Reserve(cur realm, programID int64, lane string, recipient address, amount, deadline int64, memo string) (int64, int64)Reserve assigns the next item ID in the lane and returns it with the remaining available balance.
func UpdateReserveFloor
crossing Actionfunc Withdraw
crossing ActionWithdraw pays an approved claim. Use lane "refund" and item ID 0 for the sponsor refund.
func GetClaim
Actionfunc GetPeriodUsage
Actionfunc GetProgram
Actionfunc ListPrograms
ActionListPrograms returns programs in descending ID order.
func PolicyRenderRoute
ActionPolicyRenderRoute resolves a policy route against the lanes registered to its realm. A bare program route may return several lanes for the caller to display.
func GetReservation
Actionfunc ListReservations
ActionListReservations returns a lane's items in ascending ID order.
func GetTokenMetadata
Action6
type ClaimView
structtype LaneUsageView
structtype PolicyView
structtype ProgramView
struct 1type ProgramView struct {
2 ID int64
3 Title string
4 Sponsor address
5 PendingSponsor address
6 Status string
7 Asset string
8 AssetSymbol string
9 AssetDecimals int
10 ReserveFloor int64
11 GovDelay int64
12 PendingFloor int64
13 PendingFloorETA int64
14 CurrentHeight int64
15 StartHeight int64
16 IssueEndHeight int64
17 IssueClosedHeight int64
18 IssueBlocks int64
19 PeriodBlocks int64
20 MaxHoldBlocks int64
21 CurrentPeriod int64
22 ClosedHeight int64
23 ClosedPeriod int64
24 Pruned bool
25 ActiveReservations int64
26 Balance budget.Ledger
27 Policies []PolicyView
28}