Kicking off 100 Days of Solana. Day 1: generate a keypair with @solana/kit, fund it from the devnet faucet, and verify the balance.
Why
Starting a 100-day Solana challenge to build real on-chain intuition. Day 1 is the simplest possible starting point: generate a keypair, fund it, read the balance back.
Stack
@solana/kit— the modular successor to@solana/web3.js- Devnet RPC:
https://api.devnet.solana.com - Faucet: faucet.solana.com
Generate a keypair
import { generateKeyPairSigner } from '@solana/kit';
const wallet = await generateKeyPairSigner();
console.log('Your new wallet address:', wallet.address);Each run produces a different address. The private key lives only in memory and is discarded when the process exits — no persistence yet (that's Day 2).
Fund it
- Run the script, copy the printed address.
- Go to faucet.solana.com, select Devnet, paste the address.
- Request airdrop. Free test SOL lands in seconds.
Verify the balance
import { createSolanaRpc, devnet, address } from '@solana/kit';
const rpc = createSolanaRpc(devnet('https://api.devnet.solana.com'));
const funded = address('FWfsV8wkM5EYk6XMK5qFokBRk9rwaRpqFEWz8zjvDJMc');
const { value: balance } = await rpc.getBalance(funded).send();
const balanceInSol = Number(balance) / 1_000_000_000;
console.log(`Balance: ${balanceInSol} SOL`);Output:
Wallet address: FWfsV8wkM5EYk6XMK5qFokBRk9rwaRpqFEWz8zjvDJMc
Balance: 5 SOLGotcha: Bun doesn't work here
I tried bun run check-balance.mjs first and got:
TypeError: undefined is not a function
at new e (.../@solana/rpc/dist/index.node.mjs:52:18)@solana/rpc calls setMaxListeners(n, AbortSignal) from node:events. Bun's shim doesn't implement that signature. Run with Node, not Bun.
Lamports vs SOL
1 SOL = 1,000,000,000 lamports (10⁹). The RPC always returns lamports — divide by 1_000_000_000 for display.
Next
Day 2: persist the keypair to disk so the wallet survives process restarts.