Skip to content

Commit 3d2e7f9

Browse files
authored
Merge pull request #43 from Dnreikronos/dev
Dev
2 parents ef6742f + f2cc8fb commit 3d2e7f9

18 files changed

Lines changed: 4016 additions & 38 deletions

File tree

backend/src/idl/crypto.json

Lines changed: 105 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@
99
"instructions": [
1010
{
1111
"name": "approve_delegate",
12-
"discriminator": [68, 6, 248, 64, 195, 222, 182, 223],
12+
"discriminator": [
13+
68,
14+
6,
15+
248,
16+
64,
17+
195,
18+
222,
19+
182,
20+
223
21+
],
1322
"accounts": [
1423
{
1524
"name": "delegate_approval",
@@ -18,7 +27,16 @@
1827
"seeds": [
1928
{
2029
"kind": "const",
21-
"value": [100, 101, 108, 101, 103, 97, 116, 101]
30+
"value": [
31+
100,
32+
101,
33+
108,
34+
101,
35+
103,
36+
97,
37+
116,
38+
101
39+
]
2240
},
2341
{
2442
"kind": "arg",
@@ -38,7 +56,18 @@
3856
{
3957
"kind": "const",
4058
"value": [
41-
100, 101, 108, 101, 103, 97, 116, 101, 95, 112, 100, 97
59+
100,
60+
101,
61+
108,
62+
101,
63+
103,
64+
97,
65+
116,
66+
101,
67+
95,
68+
112,
69+
100,
70+
97
4271
]
4372
}
4473
]
@@ -84,7 +113,16 @@
84113
},
85114
{
86115
"name": "charge_subscription",
87-
"discriminator": [121, 52, 210, 23, 3, 68, 86, 194],
116+
"discriminator": [
117+
121,
118+
52,
119+
210,
120+
23,
121+
3,
122+
68,
123+
86,
124+
194
125+
],
88126
"accounts": [
89127
{
90128
"name": "delegate_approval",
@@ -93,7 +131,16 @@
93131
"seeds": [
94132
{
95133
"kind": "const",
96-
"value": [100, 101, 108, 101, 103, 97, 116, 101]
134+
"value": [
135+
100,
136+
101,
137+
108,
138+
101,
139+
103,
140+
97,
141+
116,
142+
101
143+
]
97144
},
98145
{
99146
"kind": "arg",
@@ -114,7 +161,18 @@
114161
{
115162
"kind": "const",
116163
"value": [
117-
100, 101, 108, 101, 103, 97, 116, 101, 95, 112, 100, 97
164+
100,
165+
101,
166+
108,
167+
101,
168+
103,
169+
97,
170+
116,
171+
101,
172+
95,
173+
112,
174+
100,
175+
97
118176
]
119177
}
120178
]
@@ -150,7 +208,16 @@
150208
},
151209
{
152210
"name": "revoke_delegate",
153-
"discriminator": [142, 66, 98, 126, 102, 60, 92, 163],
211+
"discriminator": [
212+
142,
213+
66,
214+
98,
215+
126,
216+
102,
217+
60,
218+
92,
219+
163
220+
],
154221
"accounts": [
155222
{
156223
"name": "delegate_approval",
@@ -159,7 +226,16 @@
159226
"seeds": [
160227
{
161228
"kind": "const",
162-
"value": [100, 101, 108, 101, 103, 97, 116, 101]
229+
"value": [
230+
100,
231+
101,
232+
108,
233+
101,
234+
103,
235+
97,
236+
116,
237+
101
238+
]
163239
},
164240
{
165241
"kind": "arg",
@@ -189,7 +265,16 @@
189265
"accounts": [
190266
{
191267
"name": "DelegateApproval",
192-
"discriminator": [41, 170, 124, 42, 55, 141, 43, 120]
268+
"discriminator": [
269+
41,
270+
170,
271+
124,
272+
42,
273+
55,
274+
141,
275+
43,
276+
120
277+
]
193278
}
194279
],
195280
"errors": [
@@ -202,6 +287,16 @@
202287
"code": 6001,
203288
"name": "InsufficientAllowance",
204289
"msg": "Insufficient allowance"
290+
},
291+
{
292+
"code": 6002,
293+
"name": "InvalidTokenAccount",
294+
"msg": "Invalid token account"
295+
},
296+
{
297+
"code": 6003,
298+
"name": "ArithmeticOverflow",
299+
"msg": "Arithmetic overflow"
205300
}
206301
],
207302
"types": [
@@ -254,4 +349,4 @@
254349
}
255350
}
256351
]
257-
}
352+
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
name: solana-dev
3+
description: End-to-end Solana development playbook (Jan 2026). Prefer Solana Foundation framework-kit (@solana/client + @solana/react-hooks) for React/Next.js UI. Prefer @solana/kit for all new client/RPC/transaction code. When legacy dependencies require web3.js, isolate it behind @solana/web3-compat (or @solana/web3.js as a true legacy fallback). Covers wallet-standard-first connection (incl. ConnectorKit), Anchor/Pinocchio programs, Codama-based client generation, LiteSVM/Mollusk/Surfpool testing, and security checklists.
4+
user-invocable: true
5+
---
6+
7+
# Solana Development Skill (framework-kit-first)
8+
9+
## What this Skill is for
10+
Use this Skill when the user asks for:
11+
- Solana dApp UI work (React / Next.js)
12+
- Wallet connection + signing flows
13+
- Transaction building / sending / confirmation UX
14+
- On-chain program development (Anchor or Pinocchio)
15+
- Client SDK generation (typed program clients)
16+
- Local testing (LiteSVM, Mollusk, Surfpool)
17+
- Security hardening and audit-style reviews
18+
- Confidential transfers (Token-2022 ZK extension)
19+
20+
## Default stack decisions (opinionated)
21+
1) **UI: framework-kit first**
22+
- Use `@solana/client` + `@solana/react-hooks`.
23+
- Prefer Wallet Standard discovery/connect via the framework-kit client.
24+
25+
2) **SDK: @solana/kit first**
26+
- Prefer Kit types (`Address`, `Signer`, transaction message APIs, codecs).
27+
- Prefer `@solana-program/*` instruction builders over hand-rolled instruction data.
28+
29+
3) **Legacy compatibility: web3.js only at boundaries**
30+
- If you must integrate a library that expects web3.js objects (`PublicKey`, `Transaction`, `Connection`),
31+
use `@solana/web3-compat` as the boundary adapter.
32+
- Do not let web3.js types leak across the entire app; contain them to adapter modules.
33+
34+
4) **Programs**
35+
- Default: Anchor (fast iteration, IDL generation, mature tooling).
36+
- Performance/footprint: Pinocchio when you need CU optimization, minimal binary size,
37+
zero dependencies, or fine-grained control over parsing/allocations.
38+
39+
5) **Testing**
40+
- Default: LiteSVM or Mollusk for unit tests (fast feedback, runs in-process).
41+
- Use Surfpool for integration tests against realistic cluster state (mainnet/devnet) locally.
42+
- Use solana-test-validator only when you need specific RPC behaviors not emulated by LiteSVM.
43+
44+
## Operating procedure (how to execute tasks)
45+
When solving a Solana task:
46+
47+
### 1. Classify the task layer
48+
- UI/wallet/hook layer
49+
- Client SDK/scripts layer
50+
- Program layer (+ IDL)
51+
- Testing/CI layer
52+
- Infra (RPC/indexing/monitoring)
53+
54+
### 2. Pick the right building blocks
55+
- UI: framework-kit patterns.
56+
- Scripts/backends: @solana/kit directly.
57+
- Legacy library present: introduce a web3-compat adapter boundary.
58+
- High-performance programs: Pinocchio over Anchor.
59+
60+
### 3. Implement with Solana-specific correctness
61+
Always be explicit about:
62+
- cluster + RPC endpoints + websocket endpoints
63+
- fee payer + recent blockhash
64+
- compute budget + prioritization (where relevant)
65+
- expected account owners + signers + writability
66+
- token program variant (SPL Token vs Token-2022) and any extensions
67+
68+
### 4. Add tests
69+
- Unit test: LiteSVM or Mollusk.
70+
- Integration test: Surfpool.
71+
- For "wallet UX", add mocked hook/provider tests where appropriate.
72+
73+
### 5. Deliverables expectations
74+
When you implement changes, provide:
75+
- exact files changed + diffs (or patch-style output)
76+
- commands to install/build/test
77+
- a short "risk notes" section for anything touching signing/fees/CPIs/token transfers
78+
79+
## Progressive disclosure (read when needed)
80+
- UI + wallet + hooks: [frontend-framework-kit.md](frontend-framework-kit.md)
81+
- Kit ↔ web3.js boundary: [kit-web3-interop.md](kit-web3-interop.md)
82+
- Anchor programs: [programs-anchor.md](programs-anchor.md)
83+
- Pinocchio programs: [programs-pinocchio.md](programs-pinocchio.md)
84+
- Testing strategy: [testing.md](testing.md)
85+
- IDLs + codegen: [idl-codegen.md](idl-codegen.md)
86+
- Payments: [payments.md](payments.md)
87+
- Confidential transfers: [confidential-transfers.md](confidential-transfers.md)
88+
- Security checklist: [security.md](security.md)
89+
- Reference links: [resources.md](resources.md)

0 commit comments

Comments
 (0)