Talking to the network: tooling and your first wallet
RPC nodes as your entrypoint into Solana, installing the tooling, and creating your first wallet.
In the introduction I mentioned that the network is held up by two types of nodes: voting validators and non-voting ones — the so-called RPC nodes. A voting validator can serve RPC requests too, of course, but in practice the load is usually split: validators vote, RPC nodes answer questions.
So, to get anything out of Solana — read its state or send a transaction into it — we need that entrypoint: some RPC node that will accept our requests. The options are:
- A subscription with a provider (Helius, QuickNode, Triton and others) — the most common choice. They run the nodes; you get a URL with an API key baked in.
- Your own RPC node — more on how to stand one up here: (link to my how-to article).
- Solana’s public node (
https://api.mainnet-beta.solana.com) — free, but with a harsh rate limit (only so many requests per second before it starts rejecting you) and the “heavy” methods disabled. Fine for a first look, no good for anything serious.
I’ll be showing examples on a node from Helius. At the time of writing, their free tier includes 1 million credits per month and 10 requests per second — more than enough to get acquainted with the network (plans change now and then, check the documentation for current numbers).
Installing the tooling
We’ll definitely need Solana’s tooling along the way, so it’s best to install everything up front and then focus on the network itself. Here’s the official guide for installing all the tools (Rust, Solana CLI, Anchor):
👉 https://solana.com/docs/intro/installation
It doesn’t get simpler than that. By the way, Solana has genuinely decent documentation — worth a browse, especially if you want to skim through all the HTTP RPC methods.
Picking an environment
As I said before, there’s devnet, mainnet and other clusters — separate, independent copies of the network. Mainnet (technically mainnet-beta) is the real one, where SOL costs actual money and mistakes cost actual money too; devnet is a public playground running the same software, where the SOL is free, worthless, and handed out on request. Which one to use while learning depends on what you’re after: want the safest possible ride — take devnet (free SOL, mistakes cost nothing); want to work with live data right away, or move real SOL between wallets by hand — head straight to mainnet. Your call.
First, let’s look at the current config:
solana config get
You’ll see output roughly like this:
Config File: /Users/test/.config/solana/cli/config.yml
RPC URL: https://api.mainnet-beta.solana.com
WebSocket URL: wss://api.mainnet-beta.solana.com/ (computed)
Keypair Path: /Users/test/.config/solana/id.json
Commitment: confirmed
The RPC URL and WebSocket URL tell you we’re on mainnet. Also note the Commitment: confirmed line — that’s the confirmation level from the introduction (how “settled” a piece of data has to be before the network reports it to you: processed / confirmed / finalized), and it’s what the CLI uses by default.
Switching environments:
solana config set --url mainnet-beta # or the short form: solana config set -um
solana config set --url devnet # -ud
solana config set --url testnet # -ut
solana config set --url localhost # -ul
You can also drop in the URL of your provider’s node here:
solana config set --url https://mainnet.helius-rpc.com/?api-key=<your-key>
Creating your first wallet
solana-keygen new
Generating a new keypair
For added security, enter a BIP39 passphrase
NOTE! This passphrase improves security of the recovery seed phrase NOT the
keypair file itself, which is stored as insecure plain text
BIP39 Passphrase (empty for none):
Wrote new keypair to /Users/test/.config/solana/id.json
pubkey: 8dBTPrjnkXyuQK3KDt9wrZBfizEZijmmUQXVHpFbVwGT
Save this seed phrase and your BIP39 passphrase to recover your new keypair:
cream bleak tortoise ocean nasty game gift forget fancy salon mimic amazing
To see the address of the freshly created wallet:
solana address
So what just happened?
The command generated an Ed25519 keypair — the fundamental object behind every “wallet” in crypto. A keypair is two mathematically linked keys: a private key (went into id.json; the BIP39 seed phrase is derived from it — those twelve English words are just a human-friendly backup encoding of the same secret, which is why anyone who reads them owns the wallet) and a public key — those 32 bytes in base58 that everyone calls the “wallet address”. The private key is what lets you sign things: produce a cryptographic proof that a transaction really came from you, which anyone can verify against your public key without ever seeing the secret. Note that no transaction went out to the network in the process: a wallet is just a pair of keys sitting on your disk; an account on the blockchain will only come into existence the first time some lamports land on the address.
Mathematically, an Ed25519 public key is a point on an elliptic curve (on-curve). Remember that: later we’ll meet addresses deliberately derived to be off the curve (off-curve) — PDAs, Program Derived Addresses. By definition they have no private key, and only programs (Solana’s word for smart contracts) can sign on their behalf. Half of Solana’s architecture rests on this trick, but that’s for the article on core concepts.
First money in the wallet
If you’re on devnet, you can simply ask the network for SOL — this is called an airdrop, and on devnet it means exactly what it sounds like: free (worthless) test tokens dropped onto your address so you have something to experiment with:
solana airdrop 2
The command is heavily rate-limited and fails fairly often — when it does, the web faucet at https://faucet.solana.com comes to the rescue.
On mainnet there are no freebies, but it’s more interesting: in the upcoming examples I’ll transfer real SOL to our wallet, buy some SPL token (Solana’s standard for tokens other than SOL itself — the local equivalent of “any coin that lives on the network”), and show you a curious thing. SOL sits directly on your system account (denominated in lamports, the smallest unit of SOL, 1 SOL = 10⁹ lamports — think satoshis to bitcoin, or cents to a dollar with nine zeroes), but every token you buy lives on a separate account, the so-called ATA (Associated Token Account). An ATA is exactly one of those PDAs, deterministically derived from the pair “your wallet + the token’s mint” — so for every token you have exactly one predictable address, and anyone can send you a token without asking “where to”. Creating each ATA locks up a rent-exempt deposit (~0.002 SOL) — that’s where the “missing pennies” go when you buy new tokens. What this rent business is and why it exists — we’ll take that apart separately.
What’s next
That’s it for tooling and the wallet. In the next article we’ll go through what the RPC actually offers: how to read accounts and transactions over HTTP, and how to subscribe to events over WebSocket (accountSubscribe, logsSubscribe and friends) — which, by the way, is a direct bridge to the data-streams topic from the introduction.