SDK 概念
Rust crate 把 Pinocchio 相关知识和约束打包起来,避免 AI Agent 依赖过期训练数据或错误 web 结果。
核心模块
guard:signer、writable、owner、PDA、discriminator 和 rent 检查。schema:用于 zero-copy account layout contract 的AccountSchema。dispatch:single-byte instruction dispatch 和显式错误处理。idioms:account parsing、CPI、PDA、events、architecture 和 helpers。testing:litesvm 和 mollusk-svm 测试参考及 helper assertions。anti_patterns:常见 Solana/Pinocchio 安全反模式。
Agent 规则
项目规则要求从 geppetto::* 导入,使用 guard::* 做账户访问,实现 AccountSchema,并避免 unknown dispatch tag 被静默成功处理。