All docs

Hedera · HTS Capability Tokens

The bet

"Give the agent your API key" is the wrong shape. The right shape is a capability token: scoped, expiring, spend-capped, network-allowlisted, replay-protected.

Implementation

  • Every mandate is minted as an HTS fungible token (hedera_token_id) via a small Node signer service@hashgraph/sdk cannot run inside edge runtimes, so writes go through Node.
  • Fields enforced deterministically outside the model:
  • scope — string prefix match
  • spend_cap_tinybar — hard ceiling
  • expires_at — hard deadline
  • allowlist_addresses — recipient allowlist
  • network_allowlist — chain allowlist (hedera-testnet only for now)
  • replay_nonce — one-shot
  • Reads (balances, HCS messages, token state) run directly against https://testnet.mirrornode.hedera.com/api/v1/*.
  • A user can revoke a capability from the Payments page.

Env vars

  • HEDERA_OPERATOR_ID (0.0.xxxxxx)
  • HEDERA_OPERATOR_KEY (DER-encoded ED25519)
  • HEDERA_NETWORK=testnet

Win condition

  • The judge tries to spend past the cap on stage. It fails before the LLM is even consulted.
/docs/hedera-hts