Skip to main content

Prerequisites

  • Node.js 18+
  • A browser with passkey support (Chrome, Safari, Firefox)

Run init

npx enact-wallet init
This guides you through three steps:
1

Create your wallet

Opens your browser and registers a passkey. Your key is derived from the passkey inside your device’s secure enclave — never stored in plaintext anywhere.
2

Fund your wallet

Send stablecoins (USDC.e, pathUSD) to your wallet address. The CLI displays your address and polls your balance until funds arrive.
3

Create an agent session

Prompts for a spending limit and expiry, then opens your browser for passkey approval of the on-chain authorization.
When complete, a .env file is written to your project:
AGENT_PRIVATE_KEY=0x...
AGENT_ROOT_ADDRESS=0x...
AGENT_ACCESS_KEY_ADDRESS=0x...
AGENT_RPC_URL=https://rpc.moderato.tempo.xyz
AGENT_CHAIN_ID=42431
AGENT_BUDGET_USD=100
AGENT_PRIVATE_KEY is an access key — not your root wallet. It has a hard spending limit enforced on-chain. Your root wallet is secured by your passkey and never exposed.

Make your first paid request

npx enact-wallet pay '<url>'
Enact handles the 402 Payment Required flow automatically. Preview the cost before paying:
npx enact-wallet pay --dry-run '<url>'

Check your balance and session

npx enact-wallet balance    # token balances for your root wallet
npx enact-wallet session    # session info + remaining spending limit

Use in your agent code

Once .env is set, integrate with mppx:
import { Mppx, tempo } from "mppx/client";
import { Account } from "viem/tempo";

const account = Account.fromSecp256k1(process.env.AGENT_PRIVATE_KEY, {
  access: process.env.AGENT_ROOT_ADDRESS,
});

const mppx = Mppx.create({
  methods: [tempo({ account })],
});

// fetch now handles 402 automatically
const response = await mppx.fetch("https://api.example.com/resource");

Next steps

MCP Integration

Connect to Claude Desktop, Cursor, or OpenClaw

CLI Reference

All available commands and flags