Full lesson
solana-carbon-wallet
What it does
From the project README:
A full-stack web application built with **Next.js** and **Solana Web3.js** that allows users to interact with the Solana blockchain in a sustainable and educational way.
- Original
- tbetti/solana-carbon-wallet
- SuperStack fork
- Blockchains/solana-carbon-wallet @
e09add1 - Stars
- 0
- Last push (original)
- 2025-12-12
- Languages
- TypeScript, JavaScript, CSS, Dockerfile
- Detected stack
- Next.jsweb3.js
- Categories
- Wallets & Identity
- Licence
- Apache-2.0
- Homepage
- https://solana-carbon-wallet.vercel.app
Architecture
102 source files. By extension: .tsx ×81, .js ×14, .ts ×7.
| Top-level directory | Source files |
|---|---|
frontend | 91 |
backend | 11 |
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/solana-carbon-wallet/. 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.
frontend/src/components/SendTransaction.tsx L25–48 @ e09add1 · Apache-2.0 · original lamports: 1_000_000, }), ]; // Get the lates block hash to use on our transaction and confirmation let latestBlockhash = await connection.getLatestBlockhash() // Create a new TransactionMessage with version and compile it to legacy const messageLegacy = new TransactionMessage({ payerKey: publicKey, recentBlockhash: latestBlockhash.blockhash, instructions, }).compileToLegacyMessage(); // Create a new VersionedTransacction which supports legacy and v0 const transation = new VersionedTransaction(messageLegacy) // Send transaction and await for signature signature = await sendTransaction(transation, connection); // Send transaction and await for signature await connection.confirmTransaction({ signature, ...latestBlockhash }, 'confirmed'); console.log(signature);- Line 30
let latestBlockhash = await connection.getLatestBlockhash(): Fetches a recent blockhash. Transactions expire if it gets too old. - Line 43
signature = await sendTransaction(transation, connection);: Submits the signed transaction to the cluster.
frontend/src/components/SendVersionedTransaction.tsx L25–48 @ e09add1 · Apache-2.0 · original lamports: 1_000_000, }), ]; // Get the lates block hash to use on our transaction and confirmation let latestBlockhash = await connection.getLatestBlockhash() // Create a new TransactionMessage with version and compile it to version 0 const messageV0 = new TransactionMessage({ payerKey: publicKey, recentBlockhash: latestBlockhash.blockhash, instructions, }).compileToV0Message(); // Create a new VersionedTransacction to support the v0 message const transation = new VersionedTransaction(messageV0) // Send transaction and await for signature signature = await sendTransaction(transation, connection); // Await for confirmation await connection.confirmTransaction({ signature, ...latestBlockhash }, 'confirmed'); console.log(signature);- Line 30
let latestBlockhash = await connection.getLatestBlockhash(): Fetches a recent blockhash. Transactions expire if it gets too old. - Line 43
signature = await sendTransaction(transation, connection);: 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 |
|---|---|---|
frontend | npm run dev | next dev |
frontend | npm run start | next start |
frontend | npm run build | next build |
frontend | npm run lint | next lint |
backend | npm run test | echo "Error: no test specified" && exit 1 |
What you could build from it
- Fork the SuperStack copy and extend it within the Wallets & Identity gaps listed on the idea page.
- Learn the pattern first: Building and sending transactions from a client
- Learn the pattern first: Program Derived Addresses (PDAs)