Sol.College

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 directorySource files
frontend91
backend11

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.

tbetti/solana-carbon-wallet · 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);
  1. Line 30 let latestBlockhash = await connection.getLatestBlockhash(): Fetches a recent blockhash. Transactions expire if it gets too old.
  2. Line 43 signature = await sendTransaction(transation, connection);: Submits the signed transaction to the cluster.
tbetti/solana-carbon-wallet · 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);
  1. Line 30 let latestBlockhash = await connection.getLatestBlockhash(): Fetches a recent blockhash. Transactions expire if it gets too old.
  2. 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.

DirectoryCommandRuns
frontendnpm run devnext dev
frontendnpm run startnext start
frontendnpm run buildnext build
frontendnpm run lintnext lint
backendnpm run testecho "Error: no test specified" && exit 1

What you could build from it