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/sdkcannot run inside edge runtimes, so writes go through Node. - Fields enforced deterministically outside the model:
scope— string prefix matchspend_cap_tinybar— hard ceilingexpires_at— hard deadlineallowlist_addresses— recipient allowlistnetwork_allowlist— chain allowlist (hedera-testnetonly 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.