Devotd Github
NewAI agents

dongsheng123132/moneyswitch — Solana mainnet opt-in and approval screen improvements

dongsheng123132/moneyswitch is a project that issues API keys for USDC payments to AI agents, and its 2026-11-01 merge commit brought in Solana mainnet opt-in support, a more detailed approval screen, and a fix to align the 402 body, all together.

Repositorydongsheng123132/moneyswitch ↗

dongsheng123132/moneyswitch is a project that issues API keys for USDC payments to AI agents, and its 2026-11-01 merge commit brought in Solana mainnet opt-in support, a more detailed approval screen, and a fix to align the 402 body, all together.

GitHub description: Give your AI an API key for money. MoneyKeys, budgets and approvals for agent payments over x402 + USDC on Monad.

stars
★ 8
Forks
0
Language
TypeScript
License
AGPL-3.0
Latest release
v0.7.6
Read original source ↗View on GitHub ↗

dongsheng123132/moneyswitch is a project that issues payment API keys to AI agents so that they can pay for things via the x402 protocol and USDC. Each key has a spending limit and an approval line, as well as a testnet/mainnet distinction. The 2026-11-01 merge commit is PR #25, the work of bringing the lineage (0c0e093) that had been used for deployments back onto the main branch. Three entries under 'Unreleased — 2026-10-25' were added to the CHANGELOG.

The first entry adds Solana mainnet as an explicit opt-in. It supports two clusters side by side with the existing Devnet, and while it uses a single Ed25519 address derived from the wallet, USDC balances and token accounts are kept separately per cluster. A mainnet key cannot be used on Devnet, nor a testnet key on mainnet, and explorer links follow the cluster as well. The public mainnet RPC was checked read-only to confirm the genesis hash and Circle's USDC mint address (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v, 6 decimals), and the SDK plus the policy, wallet, approval screen, and settlement tests were changed to cover both clusters. The CHANGELOG states that, through the 2026-10-25 approval flow, an actual 0.005 USDC mainnet payment and a 0.01 USDC Devnet payment were settled.

The second entry changes the approval screen so that it reveals what the payment actually does (issue #24). It shows the receiving address exactly as-is including letter case, adds a copy button and an explorer link, and states that in an x402 exact payment the wallet signs only the one USDC transfer, that there is no token approval, and that ETH and SOL do not leave the wallet. On Solana it names the seller-fee payer (extra.feePayer), and explains that if the chain rejects it, the USDC does not move and the reservation is released only after chain confirmation. The screen draws only the values that the server computes and binds at payment time, and a new assertion fixing the exact-SVM command construction was added under packages/x402. The third entry changes the 402 body of the testnet receiving server so that it contains the same quote as the PAYMENT-REQUIRED header (issue #19). The problem was that third-party checkers reading only the body were reporting NO_ACCEPTS from an empty body, and the header remains the source of truth while the price, validation, and settlement are unchanged.

However, the default behavior did not change. Solana mainnet only works when the cluster is put into MONEYSWITCH_NETWORKS to turn it on, and this commit information contains no license and no publicly maintained scale figures. The actual payment recorded on the same day is a single 0.005 USDC one, and there is still no basis for scale or repetition frequency. The .vercelignore appended right afterwards makes it ignore the files entirely, because the local repository root's .data/ holds wallets, passwords, and tokens and must not be deployed by mistake, and .gitattributes fixes LF line endings on patches/*.patch so that the dependency patch hashes recorded by pnpm are identical on Windows and Linux.