anchor
1
总安装量
1
周安装量
#76471
全站排名
安装命令
npx skills add https://github.com/hairyf/blockchain-master --skill anchor
Agent 安装分布
mcpjam
1
claude-code
1
replit
1
junie
1
windsurf
1
zencoder
1
Skill 文档
Skill is based on Anchor v0.32.1, generated 2026-02-09.
Concise reference for building Solana programs with Anchor: macros, accounts, PDAs, CPI, IDL, custom errors, events, zero-copy, constraints, account types, and CLI.
Core References
| Topic | Description | Reference |
|---|---|---|
| Program Structure | declare_id, #[program], #[derive(Accounts)], #[account], Context | core-program-structure |
| PDA | seeds, bump, init, IDL/client resolution, PDA signer | core-pda |
| CPI | CpiContext, transfer, PDA signer, invoke/invoke_signed | core-cpi |
| IDL | Instructions, accounts, discriminators, client usage | core-idl |
Features
| Topic | Description | Reference |
|---|---|---|
| Custom Errors | error_code, err!, require! macros, client handling | features-errors |
| Events | emit!, emit_cpi!, #[event], addEventListener, event-cpi | features-events |
| Zero-Copy | AccountLoader, #[account(zero_copy)], load/load_mut/load_init | features-zero-copy |
References
| Topic | Description | Reference |
|---|---|---|
| Account Constraints | signer, mut, init, seeds/bump, has_one, address, owner | references-account-constraints |
| Account Types | Account, Signer, Program, AccountLoader, Interface types | references-account-types |
| CLI | build, deploy, test, idl, keys, account, expand, upgrade, verify | references-cli |