MoonPay Auth
Set up MoonPay on Zo so later wallet, buy, swap, or virtual-account flows can run cleanly.
What Zo Uses
- Terminal for
mpCLI commands - Browser for any verification or continuation links
- Optional Gmail connection only if OTP retrieval is explicitly appropriate and available
Prerequisites
- Node.js and npm available on Zo
- A MoonPay account email address
Zo-Native Setup
- Install the MoonPay CLI in the terminal:
npm i -g @moonpay/cli
- Verify the install:
mp --version
mp --help
- Check whether the user is already authenticated:
mp user retrieve
- If not authenticated, start login:
mp login --email user@example.com
mp login generates a sign-in link and attempts to open it in a browser. On Zo, treat that as a Zo browser step, not a local-desktop browser step.
If MoonPay returns a sign-in link or asks for browser continuation, move the user to Zo browser and complete that step there.
Complete verification:
mp verify --email user@example.com --code 123456
- Inspect available wallets:
mp wallet list
- If no wallet exists, create one:
mp wallet create --name "default"
Wallet Operations
# Create a new wallet
mp wallet create --name "default"
# Import from mnemonic
mp wallet import --name "restored" --mnemonic "word1 word2 ..."
# Import from private key for a single chain
mp wallet import --name "imported" --key <hex-key> --chain ethereum
# List wallets
mp wallet list
# Retrieve one wallet
mp wallet retrieve --wallet "default"
Config and Storage Notes
- Wallets:
~/.config/moonpay/wallets.json - Credentials:
~/.config/moonpay/credentials.json - General config:
~/.config/moonpay/config.json
These are local to the Zo machine. Do not assume the user is on a desktop with local MoonPay state elsewhere.
Failure Handling
- If
mpis missing, install it and verify again. - If
mp user retrievefails, do not continue to buy, swap, or virtual-account flows until login is complete. - If
mp loginproduces a sign-in link or browser continuation step, move the user to Zo browser rather than describing local-browser steps. - If the user has no wallet, create or import one before balance or swap flows.
Safety Notes
- Do not ask the user to paste private keys, mnemonics, or secrets into chat.
mp wallet exportis interactive and should not be used as part of a normal Zo agent flow.- Only retrieve OTP codes from Gmail if the user has Gmail connected and the flow clearly requires it.
Related Skills
moonpay-check-walletmoonpay-buy-cryptomoonpay-swap-tokensmoonpay-virtual-account