Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

capwallet state

Back to all declarations

Use

type

Use records one exercise of a capability.

Value

capwallet.Use

Capability

type

Capability is a least-privilege grant from a granter to a principal.

Value

capwallet.Capability

Grant

func(principal .uverse.address, targetRealm string, function string, maxCoins int64, validUntil int64, uses uint32, argsPolicy string) uint64

Grant issues a capability. The caller becomes its granter and can revoke it later. validUntil is an absolute block height (0 = no expiry).

Open
OID
04ae7d…29d5:4
Grant details

Inspect func

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.

Open
OID
04ae7d…29d5:6
Exercise details

Inspect func

Revoke

func(id uint64)

Revoke disables a capability immediately. Only the granter may revoke.

Open
OID
04ae7d…29d5:7
Revoke details

Inspect func

Authorized

func(id uint64, principal .uverse.address, coins int64) bool

Authorized 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.

Open
OID
04ae7d…29d5:8
Authorized details

Inspect func

Get

func(id uint64) capwallet.Capability

Get returns a copy of a capability.

Open
OID
04ae7d…29d5:9
Get details

Inspect func

Count

func() int

Count returns the number of capabilities issued.

Open
OID
04ae7d…29d5:10
Count details

Inspect func

usable

func(c *capwallet.Capability) bool
Open
OID
04ae7d…29d5:11
usable details

Inspect func

assertUsable

func(c *capwallet.Capability)
Open
OID
04ae7d…29d5:12
assertUsable details

Inspect func

mustGet

func(id uint64) *capwallet.Capability
Open
OID
04ae7d…29d5:13
mustGet details

Inspect func

assert

func(cond bool, msg string)
Open
OID
04ae7d…29d5:14
assert details

Inspect func

Render

func(path string) string

Render shows all capabilities, or one capability's detail + usage at :\<id>.

Open
OID
04ae7d…29d5:15
Render details

Inspect func

renderCap

func(id uint64) string
Open
OID
04ae7d…29d5:17
renderCap details

Inspect func

state

func(c *capwallet.Capability) string
Open
OID
04ae7d…29d5:18
state details

Inspect func

short

func(a .uverse.address) string
Open
OID
04ae7d…29d5:20
short details

Inspect func
Use : type =capwallet.Use
Capability : type =capwallet.Capability
caps : []*capwallet.Capability (len=1) Inspect
Grant : func(principal .uverse.address, targetRealm string, function string, maxCoins int64, validUntil int64, uses uint32, argsPolicy string) uint64 Inspect
Exercise : func(id uint64, coins int64) Inspect
Revoke : func(id uint64) Inspect
Authorized : func(id uint64, principal .uverse.address, coins int64) bool Inspect
Get : func(id uint64) capwallet.Capability Inspect
Count : func() int Inspect
usable : func(c *capwallet.Capability) bool Inspect
assertUsable : func(c *capwallet.Capability) Inspect
mustGet : func(id uint64) *capwallet.Capability Inspect
assert : func(cond bool, msg string) Inspect
Render : func(path string) string Inspect
renderIndex : func() string Inspect
renderCap : func(id uint64) string Inspect
state : func(c *capwallet.Capability) string Inspect
parseID : func(s string) uint64 Inspect
short : func(a .uverse.address) string Inspect