Solana Wallet Setup

Set up and manage Solana wallets for autonomous agent payments via the Machine Payments Protocol.

Overview

Agents need Solana wallets to:

  • Hold USDC for MPP payments

  • Sign payment transactions

  • Receive refunds and credits

  • Track payment history on-chain

This guide covers wallet creation, funding, security, and operational best practices.

Creating a Wallet

Using solana-keygen

The Solana CLI provides wallet generation tools.

Install Solana CLI:

sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

Generate new wallet:

solana-keygen new --outfile ~/.config/solana/agent-wallet.json

This creates a new keypair and saves it to the specified file.

Important: Save the seed phrase displayed during generation. This is the only way to recover the wallet if the key file is lost.

Programmatic generation

Generate wallets programmatically for agent fleets:

HD Wallet derivation

For managing multiple agents from a single seed:

Funding Your Wallet

Agents need SOL for transaction fees and USDC for payments.

SOL for transaction fees

Devnet (for testing):

Mainnet-beta (production):

Transfer SOL from an exchange or existing wallet:

Recommended balance: 0.1 SOL per agent (supports ~100,000 transactions)

USDC for payments

Devnet USDC:

Use the SPL Token Faucet:

Mainnet-beta USDC:

Transfer USDC from exchange or existing wallet:

USDC Mint Address (mainnet-beta):

Check balances

Wallet Security

Encrypted storage

Never store unencrypted private keys in production.

Encrypt with passphrase:

Enter strong passphrase when prompted.

Load encrypted wallet:

Environment variables

Load wallet from environment for containerized deployments:

Kubernetes secret:

Hardware wallet integration

For maximum security, use hardware wallets:

Multi-Wallet Strategies

Hot wallet + Cold storage

Keep most funds in cold storage, refill hot wallet as needed:

Agent fleet management

Manage wallets for multiple agents:

Key Rotation

Rotate agent wallet keys periodically for security.

Rotation process

Automated rotation schedule

Devnet vs Mainnet-beta

Devnet configuration

For testing and development:

Advantages:

  • Free SOL via airdrop

  • Free USDC via faucet

  • Safe for testing without financial risk

  • Faster iteration

Limitations:

  • Not all services support devnet

  • Different USDC mint address

  • Network may be unstable

Mainnet-beta configuration

For production deployments:

Advantages:

  • Real services and APIs

  • Production-grade reliability

  • Actual value exchange

Considerations:

  • Requires real SOL and USDC

  • Transaction fees accumulate

  • Irreversible mistakes

Monitoring and Alerts

Track wallet health and set up alerts.

Balance monitoring

Transaction monitoring

Production Checklist

Before deploying agent wallets to production:

Next Steps

Resources

Last updated

Was this helpful?