Full lesson
Griffin
Griffin is an adversarial security platform for AI agents on Solana. Griffin is an adversarial security platform for AI agents on Solana. Five AI attackers run in parallel against a target agent, each specialized in a different attack class
What it does
From the project README:
4th in Latin America, and Top 20 Global at Dev3pack's Hackathon against 380+ projects.*
- Original
- Mariana-Codebase/Griffin
- SuperStack fork
- Blockchains/Griffin @
bc3fcce - Stars
- 1
- Last push (original)
- 2026-05-12
- Languages
- TypeScript, Python, CSS, Dockerfile, JavaScript
- Detected stack
- Next.jssolana-pyweb3.js
- Categories
- AI & Agents
- Licence
- MIT
- Homepage
- https://griffin-psi.vercel.app
Architecture
133 source files. By extension: .tsx ×102, .py ×16, .ts ×15.
| Top-level directory | Source files |
|---|---|
frontend | 109 |
backend | 16 |
shield-sdk | 4 |
target-bot | 4 |
Dapp: devnet deploy pending
⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/griffin/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.
Key code, explained
Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.
backend/src/solana_publisher.py L85–108 @ bc3fcce · MIT · original# ── RPC helpers ────────────────────────────────────────────────────────────── async def _get_blockhash(rpc_url: str) -> Hash: async with httpx.AsyncClient(timeout=10) as c: r = await c.post(rpc_url, json={ "jsonrpc": "2.0", "id": 1, "method": "getLatestBlockhash", "params": [{"commitment": "confirmed"}], }) bh = r.json()["result"]["value"]["blockhash"] return Hash.from_string(bh) async def _send_tx(rpc_url: str, tx: Transaction) -> str: tx_b64 = base64.b64encode(bytes(tx)).decode() async with httpx.AsyncClient(timeout=30) as c: r = await c.post(rpc_url, json={ "jsonrpc": "2.0", "id": 1, "method": "sendTransaction", "params": [tx_b64, {"encoding": "base64", "preflightCommitment": "confirmed"}], }) data = r.json() if "error" in data: raise RuntimeError(f"sendTransaction: {data['error']}")- Line 91
"method": "getLatestBlockhash",: Fetches a recent blockhash. Transactions expire if it gets too old. - Line 103
"method": "sendTransaction",: Submits the signed transaction to the cluster.
How to run, build and test
These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.
| Directory | Command | Runs |
|---|---|---|
shield-sdk | npm run dev | tsc --watch |
shield-sdk | npm run build | tsc |
frontend | npm run dev | next dev |
frontend | npm run start | next start |
frontend | npm run build | next build |
frontend | npm run lint | eslint . |
target-bot | npm run dev | ts-node-dev --respawn --transpile-only src/index.ts |
target-bot | npm run start | node dist/index.js |
target-bot | npm run build | tsc |
What you could build from it
- Fork the SuperStack copy and extend it within the AI & Agents gaps listed on the idea page.