x402 Wallet Manager

Generate and manage a persistent Solana wallet for x402 payments

Overview

This node manages a persistent Solana wallet for x402 payments, allowing users to generate a new wallet, retrieve wallet information, or check the wallet's balance on the Solana blockchain. It supports both the mainnet and devnet networks. The node is useful for scenarios where automated wallet management is needed, such as in payment processing systems or blockchain applications requiring wallet persistence and balance monitoring.

Use Case Examples

  1. Generate a new Solana wallet on the devnet for testing purposes.
  2. Check the balance of an existing Solana wallet to ensure it has sufficient funds for transactions.
  3. Reset the wallet to create a new keypair, useful if the old wallet's private key is lost or compromised.

Properties

Name Meaning
Network Specifies which Solana network (mainnet or devnet) the wallet will operate on.
Action Determines the operation to perform on the wallet: get wallet info, check balance, or reset the wallet.
Warning Displays a warning notice when the reset action is selected, alerting that resetting will generate a new wallet and old funds will be lost if the private key is not backed up.

Output

JSON

  • walletAddress - The public address of the Solana wallet.
  • network - The Solana network used (mainnet or devnet).
  • balances
    • usdc - The USDC token balance of the wallet.
    • sol - The SOL token balance of the wallet.
  • status - The readiness status of the wallet, indicating if it is ready, needs funding, or has insufficient balance.
  • ready - Boolean indicating if the wallet is ready for use (has sufficient funds).
  • createdAt - Timestamp when the wallet was created.
  • privateKey - The private key of the wallet (included only for 'info' or 'reset' actions).
  • message - A message describing the wallet state, such as funding instructions or readiness confirmation.
  • fundingInstructions
    • address - The wallet address to send funds to.
    • network - The network name in uppercase.
    • steps - Step-by-step instructions to fund the wallet, especially useful for new or unfunded wallets.

Dependencies

  • Requires a Solana wallet management utility for keypair generation and balance retrieval.
  • No external API credentials are explicitly required, but the node interacts with Solana blockchain networks.

Troubleshooting

  • If the wallet balance is insufficient, the node will indicate the need for funding and provide instructions.
  • Resetting the wallet generates a new keypair; users must back up the private key to avoid losing access to funds.
  • Network selection must match the intended Solana environment; using mainnet credentials on devnet or vice versa will cause balance and transaction issues.

Links

  • Solana Documentation - Official documentation for Solana blockchain, useful for understanding wallet and network concepts.
  • Devnet USDC Faucet - A resource to obtain USDC tokens on Solana devnet for testing.
  • Solana Devnet Faucet - A resource to obtain SOL tokens on Solana devnet for transaction fees.

Discussion