Install
openclaw skills install nad-walletš Nad Wallet - Monad Chain Identity for AI Agents. Create wallets, sign messages (SIWE), manage MON tokens programmatically. Built for the Nad ecosystem (nad.fun, NadMail, NadName).
openclaw skills install nad-walletEvery autonomous agent needs a wallet on Monad. Create one without human help.
TL;DR: Programmatic wallet creation on Monad blockchain. SIWE auth for NadMail, MON balance checks, ecosystem integration.
Create and manage Monad chain wallets programmatically for the Nad ecosystem.
| ā DO | ā DON'T |
|---|---|
| Use NAD_PRIVATE_KEY environment variable | Store private keys in plain text files |
| Set wallet files to chmod 600 | Commit wallet files to git |
Use --env mode (recommended) | Use console.log(privateKey) |
| Back up mnemonics offline | Share private keys or mnemonics |
Store files in ~/.nad-wallet/ only | Auto-detect wallets outside ~/.nad-wallet/ |
š Security Standards: Identical to Base Wallet security practices but adapted for Monad/Nad ecosystem.
| Property | Value |
|---|---|
| Blockchain | Monad |
| Chain ID | 143 |
| RPC URL | https://rpc.monad.xyz |
| Explorer | https://explorer.monad.xyz |
| Native Token | MON |
| Ecosystem | nad.fun, NadMail, NadName |
# Output as environment variable format (safest)
node scripts/create-wallet.js --env
# Output example:
# export NAD_WALLET_ADDRESS="0x..."
# export NAD_PRIVATE_KEY="0x..."
Then copy to your shell or .env file.
# Only if you need file-based storage
node scripts/create-wallet.js --managed my-agent
ā ļø This stores private key in ~/.nad-wallet/wallets/my-agent.json
const { ethers } = require('ethers');
// ā
SECURE: Load from environment variable
const wallet = new ethers.Wallet(process.env.NAD_PRIVATE_KEY);
console.log('Address:', wallet.address);
// ā NEVER: console.log('Private Key:', wallet.privateKey);
const provider = new ethers.JsonRpcProvider('https://rpc.monad.xyz');
const connectedWallet = wallet.connect(provider);
// Check balance
const balance = await provider.getBalance(wallet.address);
console.log('Balance:', ethers.formatEther(balance), 'MON');
const message = `nadmail.ai wants you to sign in with your Ethereum account:
${wallet.address}
Sign in to NadMail
URI: https://nadmail.ai
Version: 1
Chain ID: 143
Nonce: ${nonce}
Issued At: ${new Date().toISOString()}`;
const signature = await wallet.signMessage(message);
const provider = new ethers.JsonRpcProvider('https://rpc.monad.xyz');
const connectedWallet = wallet.connect(provider);
const tx = await connectedWallet.sendTransaction({
to: recipientAddress,
value: ethers.parseEther('0.1') // 0.1 MON
});
const receipt = await tx.wait();
console.log('TX Hash:', tx.hash);
console.log('Explorer:', `https://explorer.monad.xyz/tx/${tx.hash}`);
| Script | Description |
|---|---|
create-wallet.js --env | Create wallet, output as env vars (recommended) |
create-wallet.js --managed [name] | Create wallet, save to file (opt-in) |
create-wallet.js --json | Create wallet, output as JSON |
nadmail-register.js --handle [name] | Register for NadMail with SIWE |
check-balance.js [address] | Check MON wallet balance |
Register for NadMail (Web3 email for Nad ecosystem) using your wallet signature.
# Set your private key
export NAD_PRIVATE_KEY="0x..."
# Register with your desired handle
node scripts/nadmail-register.js --handle littlelobster
# First create a managed wallet
node scripts/create-wallet.js --managed my-agent
# Then register for NadMail
node scripts/nadmail-register.js --wallet my-agent --handle littlelobster
~/.nad-wallet/nadmail-token.json# Using environment variable
NAD_PRIVATE_KEY="0x..." node scripts/check-balance.js
# Using managed wallet
node scripts/check-balance.js my-wallet
# Using specific address
node scripts/check-balance.js 0x1234...5678
Example output:
š° Nad Wallet Balance Check
==================================================
Address: 0x1234...5678
Network: Monad (Chain ID 143)
RPC: https://rpc.monad.xyz
š Balance: 42.5 MON
Wei: 42500000000000000000
š Explorer: https://explorer.monad.xyz/address/0x1234...5678
š Nad Ecosystem:
⢠nad.fun - Meme token platform
⢠NadMail (nadmail.ai) - Web3 email
⢠NadName (app.nad.domains) - Domain names
~/.nad-wallet/
āāā wallets/ # Managed wallet storage
ā āāā my-agent.json # Wallet file (600 perms)
ā āāā my-agent.mnemonic # Backup phrase (400 perms)
āāā nadmail-token.json # NadMail API token (600 perms)
āāā audit.log # Operation audit log (600 perms)
nadmail-register.jsAll operations are logged to ~/.nad-wallet/audit.log with:
# ā
Recommended approach
export NAD_PRIVATE_KEY="0x..."
export NAD_WALLET_ADDRESS="0x..."
# Use in scripts
node scripts/check-balance.js
node scripts/nadmail-register.js --handle myname
const fs = require('fs');
const path = require('path');
// Store with restricted permissions (only if absolutely necessary)
const filepath = path.join(process.env.HOME, '.nad-wallet', 'wallets', 'wallet.json');
fs.writeFileSync(filepath, JSON.stringify({
address: wallet.address,
privateKey: wallet.privateKey // Only store if absolutely necessary
}), { mode: 0o600 }); // Owner read/write only
Add to your project's .gitignore:
# Nad Wallet files - NEVER commit!
.nad-wallet/
*.wallet.json
*.mnemonic
private-key*
nad-private-key*
# Environment files
.env
.env.local
| Aspect | Base Wallet | Nad Wallet |
|---|---|---|
| Blockchain | Base (8453) | Monad (143) |
| RPC | https://mainnet.base.org | https://rpc.monad.xyz |
| Explorer | basescan.org | explorer.monad.xyz |
| Native Token | ETH | MON |
| Email Service | BaseMail | NadMail |
| Config Directory | ~/.base-wallet/ | ~/.nad-wallet/ |
| Wallet Directory | ~/.openclaw/wallets/ | ~/.nad-wallet/wallets/ |
| Environment Variable | PRIVATE_KEY | NAD_PRIVATE_KEY |
| Ecosystem | Base ecosystem | nad.fun, NadMail, NadName |
If you have Base Wallet experience:
# Navigate to skill directory
cd /path/to/nad-wallet
# Install dependencies
npm install
# Create your first wallet
node scripts/create-wallet.js --env
# Check balance
NAD_PRIVATE_KEY="0x..." node scripts/check-balance.js
# Register for NadMail
NAD_PRIVATE_KEY="0x..." node scripts/nadmail-register.js --handle myname
{
"ethers": "^6.0.0"
}
No additional dependencies required. Pure Node.js + ethers.js.
"Wallet not found"
"Registration failed"
"Permission denied"
chmod 600 ~/.nad-wallet/wallets/*.jsonchmod 700 ~/.nad-wallet/# Check if set
echo $NAD_PRIVATE_KEY
# Set temporarily
export NAD_PRIVATE_KEY="0x..."
# Set permanently (add to ~/.bashrc or ~/.zshrc)
echo 'export NAD_PRIVATE_KEY="0x..."' >> ~/.bashrc
MIT License - Build awesome things with Nad Wallet! š