Use
typeUse records one exercise of a capability.
Value
capwallet.Use
Capability
typeCapability is a least-privilege grant from a granter to a principal.
Value
capwallet.Capability
caps
[]*capwallet.Capability// index 0 => ID 1
- OID
- 04ae7d…29d5:21
caps details
Grant
func(principal .uverse.address, targetRealm string, function string, maxCoins int64, validUntil int64, uses uint32, argsPolicy string) uint64Grant issues a capability. The caller becomes its granter and can revoke it later. validUntil is an absolute block height (0 = no expiry).
- OID
- 04ae7d…29d5:4
Grant details
Exercise
func(id uint64, coins int64)Exercise consumes one use of a capability. Only the principal may call it, and every bound is checked: not revoked, not expired, uses remaining, and coins within the ceiling. On success the use is recorded and the counter decremented.
- OID
- 04ae7d…29d5:6
Exercise details
Revoke
func(id uint64)Revoke disables a capability immediately. Only the granter may revoke.
- OID
- 04ae7d…29d5:7
Revoke details
Authorized
func(id uint64, principal .uverse.address, coins int64) boolAuthorized reports whether principal may exercise capability id for the given coin amount right now — the check a target realm runs before acting. It never mutates state or consumes a use.
- OID
- 04ae7d…29d5:8
Authorized details
Get
func(id uint64) capwallet.CapabilityGet returns a copy of a capability.
- OID
- 04ae7d…29d5:9
Get details
Count
func() intCount returns the number of capabilities issued.
- OID
- 04ae7d…29d5:10
Count details
usable
func(c *capwallet.Capability) bool- OID
- 04ae7d…29d5:11
usable details
assertUsable
func(c *capwallet.Capability)- OID
- 04ae7d…29d5:12
assertUsable details
mustGet
func(id uint64) *capwallet.Capability- OID
- 04ae7d…29d5:13
mustGet details
assert
func(cond bool, msg string)- OID
- 04ae7d…29d5:14
assert details
Render
func(path string) stringRender shows all capabilities, or one capability's detail + usage at :\<id>.
- OID
- 04ae7d…29d5:15
Render details
renderIndex
func() string- OID
- 04ae7d…29d5:16
renderIndex details
renderCap
func(id uint64) string- OID
- 04ae7d…29d5:17
renderCap details
state
func(c *capwallet.Capability) string- OID
- 04ae7d…29d5:18
state details
parseID
func(s string) uint64- OID
- 04ae7d…29d5:19
parseID details
short
func(a .uverse.address) string- OID
- 04ae7d…29d5:20