Generating an ETH wallet key

December 1, 2026•
☕ Wird geladen...

Every agent that pays for its own resources needs a private key, and every time I build one I re-decide how much to do it. The answer is always the same, so here is the note.

  1. Generate a fresh EOA. One line with viem, no seed phrase. It is a hot wallet from birth.

    node -e "const { generatePrivateKey, privateKeyToAccount } = require('viem/accounts'); const pk = generatePrivateKey(); console.log('WALLET_PRIVATE_KEY=' + pk); console.log('address: ' + privateKeyToAccount(pk).address)"

    The key just lived in your terminal — clear the scrollback, or pipe it straight into the secret store instead of printing it.

  2. Fund it with the blast radius you accept. A few EURe on Base is often enough — and that balance is the real security boundary: it is the most a thief can take.

  3. Store it where the agent runs. A serverless secret in production, a gitignored .env for local runs, nowhere else.

⏳ Loading reactions...

Comments

Loading comments...