AgnicPay

Send USDC

Send USDC to an Ethereum address or ENS name on Base

Send USDC

Transfer USDC from your wallet to any Ethereum address or ENS name on Base.


Command

npx agnic@latest send <amount> <recipient> [--chain <chain>] [--json]

Arguments

ArgumentDescription
amountAmount to send (see Amount Formats below)
recipientEthereum address (0x...) or ENS name (vitalik.eth)

Options

OptionDescription
--chain <name>Blockchain network (default: base)
--jsonOutput result as JSON

Amount Formats

FormatExampleDescription
Dollar prefix'$1.00', '$0.50'USD notation (single-quote the $)
Decimal1.0, 0.50Human-readable with decimal point
Whole number5, 100Interpreted as whole USDC tokens
Atomic units500000Large integers treated as atomic units

Important: Always single-quote amounts that use $ to prevent bash variable expansion (e.g. '$1.00' not $1.00).


ENS Resolution

ENS names are automatically resolved to addresses via Ethereum mainnet. The command detects ENS names (any string containing .eth), resolves to an address, and displays both in the output.


Examples

# Send $1.00 USDC to an address
npx agnic@latest send 1 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7
 
# Send $0.50 USDC to an ENS name
npx agnic@latest send 0.50 vitalik.eth
 
# Send with dollar sign prefix (note single quotes)
npx agnic@latest send '$5.00' 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb7
 
# Get JSON output
npx agnic@latest send 1 vitalik.eth --json

Prerequisites

  • Must be authenticated (npx agnic@latest status to check; use --token, AGNIC_TOKEN, or browser login)
  • Wallet must have sufficient USDC balance (npx agnic@latest balance to check)

Error Handling

ErrorSolution
"Not authenticated"Provide --token, set AGNIC_TOKEN, or run npx agnic@latest auth login
"Insufficient balance"Check balance with npx agnic@latest balance
"Could not resolve ENS name"Verify the ENS name exists
"Invalid recipient"Must be valid 0x address or ENS name

Next Steps

On this page