Install
openclaw skills install @daaab/basemailπ¬ BaseMail - Onchain Email for AI Agents on Base. Get yourname@basemail.ai linked to your Basename (.base.eth). SIWE wallet auth, no CAPTCHA, no passwords. Give your agent a verifiable email identity on Base Chain β register for services, send emails, and receive confirmations autonomously.
openclaw skills install @daaab/basemailYour agent gets a real email address, linked to its onchain identity. No human needed.
TL;DR: Own a Basename (yourname.base.eth)? Get yourname@basemail.ai instantly. Sign with your Base wallet, send emails autonomously.
.base.eth holders get matching @basemail.ai addresses automaticallyBaseMail gives AI agents verifiable email identities on Base Chain:
yourname.base.eth β yourname@basemail.ai0xwallet@basemail.aiBase Wallet β SIWE Signature β BaseMail Registration β yourname@basemail.ai
β β
Basename (.base.eth) Send & receive email autonomously
If you already have a wallet, just set the env var β no private key stored to file:
export BASEMAIL_PRIVATE_KEY="0x..."
node scripts/register.js
β Safest method: private key exists only in memory.
Point to your existing private key file:
node scripts/register.js --wallet /path/to/your/private-key
β Uses your existing wallet, no copying.
Let the skill generate and manage a wallet for you:
node scripts/setup.js --managed
node scripts/register.js
β Always encrypted β Private key protected with AES-256-GCM
- You'll set a password during setup (min 8 chars, must include letter + number)
- Password required only when the private key is needed (registration)
- Mnemonic displayed once for manual backup (never saved to file)
- Password input is masked (hidden) in terminal
- Agents / no TTY:
BASEMAIL_PASSWORD=β¦ node scripts/setup.js --managed --yes(never hangs on prompts)
~/.basemail/ to version control600 (owner read/write only)--wallet paths are validated: must be under $HOME, no traversal, max 1KB file size0x + 64 hex chars) before use# BaseMail - NEVER commit!
.basemail/
**/private-key.enc
# Using environment variable
export BASEMAIL_PRIVATE_KEY="0x..."
node scripts/register.js
# Or with Basename
node scripts/register.js --basename yourname.base.eth
node scripts/send.js "friend@basemail.ai" "Hello!" "Nice to meet you π¦"
node scripts/inbox.js # List emails
node scripts/inbox.js <email_id> # Read specific email
| Script | Purpose | Needs Private Key |
|---|---|---|
setup.js | Show help | β |
setup.js --managed | Generate wallet (always encrypted) | β |
register.js | Register email address | β |
send.js | Send email | β (uses token, auto-refreshes) |
inbox.js | Check inbox | β (uses token, auto-refreshes) |
audit.js | View audit log | β |
~/.basemail/
βββ private-key.enc # Encrypted private key (AES-256-GCM, chmod 600)
βββ wallet.json # Wallet info (public address only)
βββ token.json # Auth token + refresh_token + expires_at (chmod 600)
βββ audit.log # Operation log (no sensitive data)
Want yourname@basemail.ai instead of 0x...@basemail.ai?
.base.eth) at https://www.base.org/namesnode scripts/register.js --basename yourname.base.ethYour Basename is your onchain identity on Base β and BaseMail turns it into a working email address.
| Endpoint | Method | Purpose |
|---|---|---|
/api/auth/start | POST | Start SIWE auth (returns message to sign) |
/api/auth/agent-register | POST | Verify signature + register (idempotent; returns token, refresh_token, email) |
/api/auth/refresh | POST | Renew the 24 h token with refresh_token |
/api/register/upgrade | PUT | Upgrade to Basename |
/api/send | POST | Send email |
/api/inbox | GET | List inbox |
/api/inbox/:id | GET | Read email content |
Full docs: https://api.basemail.ai/api/docs
POST /api/auth/agent-register (was verify + register); re-running no longer saves Email: nulltoken.json stores refresh_token + expires_at; send.js / inbox.js renew the token automatically (and retry once on 401) β the private key is only needed for the first registrationcode, hint and Retry-After (e.g. the 5 registrations/IP/hour limit) instead of JSON parse crashessetup.js --managed: fixed isEncrypt is not defined crash; password prompt handles pasted input; non-TTY support via --yes + BASEMAIL_PASSWORDBASEMAIL_API_KEY (long-lived bm_live_β¦ key) accepted as an alternative credentialws advisory), engines.node >= 18BASEMAIL_PRIVATE_KEY in requires.env*)--wallet path validation: must be under $HOME, no .. traversal, max 1KB, regular file only0x + 64 hex chars) on all input sources--no-encrypt option β managed wallets are always encryptednotes in metadata clarifying: this skill only signs SIWE messages, never sends funds--managed now encrypts by default