Expand description
Response shaping — keep RPC/IX outputs to ~200 tokens, not 40KB JSON.
The bounty’s trap #3: raw getAccountInfo/getSignaturesForAddress responses
nuke the agent’s context window and cost the operator money. Judges call
execute and count tokens. Every shaper here stays within a ~200-token budget
(≈ 800 chars at the chars / 4 heuristic — see estimate_tokens).
Shapers are pure string formatting — no consensus concerns, no network.
Enums§
- Account
Kind - What kind of account
shape_account_infois summarizing.
Functions§
- estimate_
tokens - Approximate token count via the
chars / 4heuristic. The bounty’s shaping budget is ~200 tokens;shape_account_info/shape_signatures/shape_attestation_resultall stay under it. - shape_
account_ info - One-line summary of an account, tuned to the
kind. Never dumps the raw bytes. - shape_
attestation_ result - One-line result of a
create_attestationsubmission: PDA + nonce + signature. - shape_
signatures - Compact list of recent signatures for an address. Shows the first few + a “+N more” tail when the list is long.
- short_
pubkey - Short pubkey form: first 4 +
…+ last 4 (e.g.Et5C…T2p). ~9 chars, ~2 tokens.