Prerequisites
- Node.js 22+ (for
npxsupport) - OpenClaw gateway running (for pairing)
- A NervePay account (sign up at nervepay.xyz)
Run Setup
Create your agent identity, generate recovery keys, and link to your dashboard account:
npx nervepay setup
Alternative package managers
bunx nervepay setup # Bun
pnpm dlx nervepay setup # pnpm
openclaw plugins install nervepay && openclaw nervepay setup # OpenClaw plugin
The wizard will:
Create Agent Identity
- Generates W3C DID:
did:nervepay:agent:xxx - Creates Ed25519 keypair
- Shows 12-word BIP39 mnemonic for recovery (save this!)
Link to Your Account
- Opens claim URL in your browser
- Log in to your NervePay dashboard to link the agent
Auto-Configure
- Updates
~/.openclaw/openclaw.json - Backs up credentials to
~/.nervepay/credentials.json
Important: Save Your Recovery Phrase
The 12-word BIP39 mnemonic is shown only once. Write it down securely—it's the only way to recover your agent's keys if you lose access.
Pair Gateway
If pairing wasn't completed during setup (or you want to pair a different gateway), connect via the device node protocol:
npx nervepay pair
Then approve the device on your gateway:
openclaw devices approve <requestId>
The CLI connects as a device node to the gateway via WebSocket, performs a challenge-response handshake with your Ed25519 keys, and waits for you to approve the connection. Timeout defaults to 5 minutes.
Verify Setup
Restart your gateway to load the new configuration:
openclaw gateway stop && openclaw gateway start
Test authentication:
npx nervepay whoami
Expected output:
{"agent_did": "did:nervepay:agent:abc123...","name": "Your Agent Name","reputation_score": 0,"capabilities": {"max_transaction_amount": null}}
Next Steps
Add secrets to vault
Store API keys securely in your agent's vault
Dashboard → Your Agent → Secrets tabUse vault in code
Retrieve secrets at runtime
const { secret } = await nervepay_get_secret({secret_name: "openai_api_key"});
Verify other agents
Check identity before processing requests
const { verified, agent } = await nervepay_verify_agent({did: "did:nervepay:agent:xyz789..."});
Troubleshooting
"npx: command not found"
Install Node.js 22+: nodejs.org. npx is included with Node.js.
npx hangs or takes too long
First run downloads the package. Subsequent runs use cache. Try: npx nervepay@latest setup
"NOT_PAIRED" timeout during pair
Make sure to approve the device on your gateway: openclaw devices approve <requestId> (find it via openclaw devices list). Default timeout is 5 minutes.
"Authentication failed"
1. Check ~/.openclaw/openclaw.json has your credentials
2. Restart gateway: openclaw gateway stop && openclaw gateway start
3. Test: npx nervepay whoami
"Claim URL expired"
Claim URLs expire after 24 hours. Run setup again to generate a new one.
API Integration (Advanced)
For custom frameworks (LangChain, CrewAI, AutoGen) or non-OpenClaw agents, use the REST API directly: