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 package

Overview

Package capwallet issues narrow, bounded, revocable capabilities to agents — instead of handing an agent a wallet key and hoping its prompt stays safe.

The demo makes three ideas that are usually conflated stand apart:

  • identity — "this is agent Percy"
  • authorization — "Percy may call this function on this realm"
  • approval — "Percy may do it at most N times, for ≤ M coins, before block H, and I can revoke it at any moment"

A capability is the third thing: a least-privilege grant with a ceiling, an expiry, a use counter and a kill switch. Other realms consult Authorized() before honoring an agent action; the granter revokes with one call the instant something looks wrong.

Function

Get

func Get(id uint64) Capability

Get returns a copy of a capability.

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g1manfred47kzduec920z88wfr64ylksmdcedlf5/agents/capwallet.Get()"

Result