// setup/wallet.ts

connect("any base wallet")

Vend402 is wallet-agnostic. Any EVM wallet that holds USDC on Base works as your merchant payout address — MetaMask, Rainbow, Rabby, Coinbase Wallet, Frame, anything. No Coinbase account required.

// step 1 — connect
provider: not found

// no injected wallet — install one of: metamask, rainbow, rabby, coinbase wallet

// step 2 — switch to base
chainId =

// mainnet = real USDC payouts · sepolia = testnet for the live handshake demo

// step 3 — wire it into vend402

Paste your address into the backend as the payout target. Buyer payments through x402 land here automatically — no gas, no signatures from you.

# .env (backend)
MERCHANT_WALLET_ADDRESS=0xYourBaseWalletAddress

# optional — only for the live buyer handshake demo
X402_BUYER_PRIVATE_KEY=0x...   # funded with Base Sepolia ETH + test USDC

// never paste a private key for your payout wallet. only the public 0x… address.

// faq
do I need a Coinbase wallet?
No. x402 is an open protocol — any EVM wallet on Base works.
do I need ETH for gas?
As a merchant, no. You only receive. Buyers pay gas on Base (fractions of a cent).
testnet vs mainnet?
Start on Base Sepolia for the demo, switch to Base mainnet for real payouts.
mainx402 · USDC · base
TypeScript