π Register .nad names on Monad blockchain via Nad Name Service (NNS). Real API integration with registerWithSignature, dynamic gas estimation, permanent ownership.
Installs into .claude/skills of the current project.
Are you the author of Nadname Agent?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/modbender-nadname-agent)
---
name: NadName Agent
description: "π Register .nad names on Monad blockchain via Nad Name Service (NNS). Real API integration with registerWithSignature, dynamic gas estimation, permanent ownership."
---
# π NadName Agent v2.0 - .nad Names on Monad
> Register permanent .nad names on Monad blockchain via Nad Name Service with real API integration
**TL;DR:** Get `yourname.nad` on Monad. One-time fee, lifetime ownership. Now with real NAD API integration and accurate pricing!
## What is NNS?
**Nad Name Service (NNS)** is a web3 name service built on Monad blockchain that maps human-readable names like `agent.nad` to cryptocurrency addresses and metadata.
- **Permanent ownership** β One-time registration fee, no renewals
- **NFT-based** β Names are tradeable NFTs
- **Emoji support** β Use π¦.nad or δ½ ε₯½.nad
- **Fast & cheap** β Built on Monad, the fastest blockchain
- **Profile customization** β Set avatar, social links, text records
### Key Details
- **Blockchain**: Monad (Chain ID: 143)
- **RPC**: https://rpc.monad.xyz
- **Contract**: 0xE18a7550AA35895c87A1069d1B775Fa275Bc93Fb
- **Website**: https://app.nad.domains
- **Docs**: https://docs.nad.domains
---
## π Security & Wallet Setup
### Option 1: Environment Variable (Recommended β )
```bash
export PRIVATE_KEY="0x..."
node scripts/check-name.js myname
```
> β **Safest**: Private key exists only in memory, never saved to disk.
### Option 2: Managed Mode (Encrypted)
```bash
node scripts/register-name.js --managed --name myname
```
> β **Secure**: Creates encrypted keystore, password-protected.
### β οΈ Critical Security Rules
1. **NEVER** hardcode private keys in scripts
2. **NEVER** commit private keys to git
3. **NEVER** auto-detect wallet paths (security risk)
4. **ONLY** use PRIVATE_KEY env var or --managed encrypted keystore
5. Private key files should be chmod `600`
---
## π Quick Start
### 1οΈβ£ Check Name Availability
```bash
# Check if name is available and get pricing
node scripts/check-name.js myname
# Output example:
# β myname.nad is available!
# π° Price: 649 MON (base price)
# π Discount: 50% (Christmas special)
# πΈ Final price: 324.5 MON
```
### 2οΈβ£ Register Name
```bash
# Using environment variable
export PRIVATE_KEY="0x..."
node scripts/register-name.js --name myname
# Set as primary name too
node scripts/register-name.js --name myname --set-primary
# Using managed mode (encrypted keystore)
node scripts/register-name.js --managed --name myname --set-primary
```
### 3οΈβ£ List Your Names
```bash
# List names owned by your wallet
node scripts/my-names.js
```
---
## π¦ Scripts Reference
| Script | Purpose | Needs Private Key |
|--------|---------|-------------------|
| `check-name.js` | Check availability & pricing | β |
| `register-name.js` | Register .nad name | β |
| `my-names.js` | List owned names | β (reads from address) |
### check-name.js
Check if a .nad name is available and get current pricing:
```bash
node scripts/check-name.js <name>
node scripts/check-name.js agent
node scripts/check-name.js π¦
```
### register-name.js
Register a new .nad name:
```bash
# Basic registration
node scripts/register-name.js --name myname
# Register and set as primary
node scripts/register-name.js --name myname --set-primary
# Using managed encrypted keystore
node scripts/register-name.js --managed --name myname
# Dry run to check costs without sending transaction
node scripts/register-name.js --name myname --dry-run
# With referrer for potential discounts
node scripts/register-name.js --name myname --referrer 0x...
```
**Flags:**
- `--name <name>` - Name to register (required)
- `--set-primary` - Set as primary name after registration
- `--managed` - Use encrypted keystore (creates if doesn't exist)
- `--address <addr>` - Custom address to use (defaults to wallet address)
- `--dry-run` - Show what would be done without sending transaction
- `--referrer <addr>` - Referrer address for discounts
### my-names.js
List all .nad names owned by an address:
```bash
# Use wallet from PRIVATE_KEY env var
node scripts/my-names.js
# Check specific address
node scripts/my-names.js --address 0x...
# Use managed keystore
node scripts/my-names.js --managed
```
---
## π§ Technical Details
### v2.0 Registration Flow
The new registration process follows CloudLobster's discovered pattern:
**Step 1: Get Registration Data**
```bash
POST https://api.nad.domains/api/register-request
Body: {
"name": "myname",
"owner": "0x...",
"setAsPrimary": true,
"referrer": null,
"paymentToken": "0x0000000000000000000000000000000000000000"
}
Response: {
"registerData": {...},
"signature": "0x...",
"price": "324.5"
}
```
**Step 2: Contract Call**
```javascript
await contract.registerWithSignature(registerData, signature, {
value: ethers.parseEther(price),
gasLimit: estimatedGas * 2n // 2x safety buffer
});
```
### Contract Interaction
- **Contract**: 0xE18a7550AA35895c87A1069d1B775Fa275Bc93Fb
- **Method**: `registerWithSignature(registerData, signature)` with server co-signature
- **Gas**: ~650,000-970,000 gas for registration (2x buffer applied automatically)
- **Pricing**: Real-time from NAD API
- **Payment**: MON tokens sent as transaction value
### Supported Names
- **Length**: 1-63 characters
- **Characters**: a-z, 0-9, emojis, international characters
- **Examples**: `agent.nad`, `π¦.nad`, `δ½ ε₯½.nad`, `salmo.nad`
### Profile Features
After registration, you can customize:
- Avatar image
- Social media links
- Text records (email, website, etc.)
- Primary name setting
---
## π‘ Examples
### Basic Bot Registration
```bash
export PRIVATE_KEY="0x..."
node scripts/check-name.js mybot
# β mybot.nad is available!
# π° Price: 324.5 MON
node scripts/register-name.js --name mybot --set-primary
# π Registration successful!
```
### Dry Run Testing
```bash
# Test registration without spending MON
node scripts/register-name.js --name mybot --dry-run
# πββοΈ DRY RUN MODE - No transaction will be sent
# β Registration data looks valid
# β½ Estimated gas cost: 0.002 MON
# πΈ Total cost: 324.502 MON
```
### Emoji Names
```bash
node scripts/check-name.js π€
node scripts/register-name.js --name π€ --dry-run
```
### Secure Managed Setup
```bash
# First time setup
node scripts/register-name.js --managed --name myagent --dry-run
# Enter password when prompted
# Future use
node scripts/my-names.js --managed
# Enter same password
```
---
## π Links
- **NNS Website**: https://app.nad.domains
- **Documentation**: https://docs.nad.domains
- **Monad Explorer**: https://explorer.monad.xyz
- **Get MON tokens**: https://bridge.monad.xyz
---
## π‘οΈ Security Audit Checklist
Before using this skill:
β No hardcoded private keys
β No auto-detection of external wallet paths
β Environment variables only or encrypted keystore
β No `--no-sandbox` browser usage
β No remote code execution
β Proper file permissions (600) for sensitive files
β Clear security warnings in documentation
This skill follows OpenClaw security best practices and should pass VirusTotal scanning.
---
## π Changelog
### v2.0.0 (2026-02-09) - Real API Integration
- π **Breaking**: Real NAD API integration with `registerWithSignature`
- π Real-time name availability checking via API endpoints
- π° Real-time pricing from NAD API
- β½ Dynamic gas estimation with 2x safety buffer (~1,000,000 gas)
- πββοΈ `--dry-run` flag for testing without spending tokens
- π `--referrer` support for potential discounts
- π Better error handling and transaction feedback
- π **Thanks to CloudLobster** for testing and discovering the real flow!
#### v2.0.0 Improvements Based on CloudLobster's Feedback:
- β Removed hardcoded pricing and fake availability checks
- β Real `POST /api/register-request` β `registerWithSignature` flow
- β Proper gas estimation (646K estimate β 969K actual, now with 2x buffer)
- β Server co-signature integration for NNS backend validation
### v1.0.0 (2026-02-09)
- π Initial release
- β Name availability checking (simulated)
- β Registration with encrypted keystore support
- β Owned names listing
- β Security-first design
- β Support for emoji and international character names