Skip to main content
By the end of this lesson you will have a named local wallet (alice), and you will know how to convert it to its on-chain account address (grd@...).
Prerequisites · gen on your PATH. A local validator reachable on http://127.0.0.1:30001, or pass a different --rpc-url. (Local → DevNet covers DevNet — for now, local is fine.)

Set up your shell

Two environment variables save you from repeating yourself for the rest of the curriculum:
export GEN="gen"                                # or /absolute/path/to/gen
export SERVER_URL="http://127.0.0.1:30001"      # local validator
Every example below uses --json and prefers jq for extracting fields. This isn’t required — drop --json for human-readable output — but it makes the commands scriptable, which is what real apps will do.

Steps

1

Create a wallet named alice

"$GEN" wallet --rpc-url "$SERVER_URL" --json create alice --plaintext
--plaintext keeps the key unencrypted on disk for tutorial convenience. For anything beyond local play, drop the flag and Grid will prompt for a passphrase.
This generates a keypair locally. Nothing has touched the chain yet.
2

Make alice the active wallet

"$GEN" wallet --rpc-url "$SERVER_URL" --json set-active alice
Now any later command without an explicit --wallet uses alice.
3

Resolve alice's account address

ALICE=$("$GEN" wallet --rpc-url "$SERVER_URL" --json show alice | jq -r '.result.account')
echo "$ALICE"
You should see something shaped like:
grd@abcd1234...
Hold on to $ALICE — it’s how you’ll address this account for the rest of the curriculum.

What just happened

You generated a keypair on your laptop and asked the CLI to remember it under a friendly name. Nothing was broadcast. No activations were spent. The account address (grd@...) is deterministically derived from the public key — it exists as a concept the moment the key exists, regardless of whether anyone has heard of it on-chain. The first activation that mentions this address (lesson 2’s faucet call) is what gives it presence in the ledger.
Receipt · 0 activations · 0.000¢ USDG · ~5 ms (local key gen) · Identity is free until you use it.

From the Rust SDK

Wallet creation lives on the gen CLI’s keystore — it is explicitly not exposed in the Rust SDK (client_sdk). Once the key exists on disk, Rust code consumes it via client_sdk::GenSigner:
use client_sdk::GenSigner;

// Loads the private key the CLI wrote in step 1 above. Most apps wrap this
// behind a small `load_signer(name)` helper that reads the keystore file.
let signer: GenSigner = /* construct from your keystore */;
That signer is what every state-changing call in lessons 4 and 6 passes to sign_and_submit_and_wait_activation_with_options. Everything from get-account onward is in the SDK; wallet store and faucet stay on the CLI.

Troubleshooting

Your local validator isn’t running, or it’s bound to a different port. Either start it (gen service validator local --embedded-config) or override SERVER_URL to point at DevNet — see Local → DevNet.If you see Request rejected from a wallet command, the CLI may also be configured to hit a non-local RPC endpoint. Check gen config show; if rpc_url is anything other than the default http://127.0.0.1:30001, run gen config unset rpc-url.
You launched gen service validator local without --embedded-config. Without that flag, the CLI looks for validator/configs/validator_local_runner_config.yaml relative to your current directory and exits with a file-not-found error. Always include --embedded-config unless you’re inside the framework source tree.
Another process (often a previous validator run that didn’t shut down cleanly) is bound to the port. Find it with lsof -nP -iTCP:30001 -sTCP:LISTEN and stop that process before relaunching.
You created alice already. Either pick a new name, or wallet delete alice first.

What’s next

Fund it from the faucet

Get USDG into alice so she can do anything else.