Sol.College

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 directorySource files
frontend109
backend16
shield-sdk4
target-bot4

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.

Mariana-Codebase/Griffin · 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']}")
  1. Line 91 "method": "getLatestBlockhash",: Fetches a recent blockhash. Transactions expire if it gets too old.
  2. 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.

DirectoryCommandRuns
shield-sdknpm run devtsc --watch
shield-sdknpm run buildtsc
frontendnpm run devnext dev
frontendnpm run startnext start
frontendnpm run buildnext build
frontendnpm run linteslint .
target-botnpm run devts-node-dev --respawn --transpile-only src/index.ts
target-botnpm run startnode dist/index.js
target-botnpm run buildtsc

What you could build from it