Skip to main content
wallet_setup creates a new wallet or imports an existing private key for paying agents. Uses OWS (Open Wallet Standard) for encrypted key storage when available, falling back to plaintext.
wallet_setup({ action: "create" })

Parameters

action
string
required
Either create to generate a new wallet, or import to import an existing private key. When creating, OWS must be installed. When importing, OWS is preferred but not required — keys are stored in plaintext if OWS is unavailable.
name
string
Wallet name/label. If omitted, a name is auto-generated (e.g., aw-1711612800000 for created wallets, imported-1711612800000 for imports).
key
string
Private key as a hex string. Required when action is import, ignored for create. Accepts keys with or without a 0x prefix.
chain
string
Primary chain — either tempo or base. Defaults to tempo. The wallet is configured for both chains regardless of which you select.

Example Usage

wallet_setup({ action: "create" })

Example Output

Create (with OWS):
Wallet created [encrypted]:
  ID: a1b2c3d4-...
  Address: 0x1234...abcd
  Name: my-marketplace-wallet
  Chains: tempo, base
  Storage: ~/.ows/ (AES-256-GCM encrypted)

Fund this address with USDC on Tempo to start using agents.
For testnet: npx mppx account fund
Import (without OWS):
Key imported [plaintext] — OWS not available for encrypted storage.
  Address: 0x1234...abcd
  Name: imported-1711612800000
  Chains: tempo, base

Install OWS for encrypted storage: npm install -g @open-wallet-standard/core
OWS (Open Wallet Standard) provides AES-256-GCM encrypted key storage in ~/.ows/. Without OWS, imported keys are stored in plaintext in ~/.agentwonderland/config.json. Install OWS with npm install -g @open-wallet-standard/core for secure storage.