โœ“ Verified ๐Ÿ’ป Development โœ“ Enhanced Data

Basemail

๐Ÿ“ฌ BaseMail - Onchain Email for AI Agents on Base.

Rating
4.3 (374 reviews)
Downloads
9,086 downloads
Version
1.0.0

Overview

๐Ÿ“ฌ BaseMail - Onchain Email for AI Agents on Base.

Complete Documentation

View Source โ†’

๐Ÿ“ฌ BaseMail - Onchain Email for AI Agents on Base

Your agent gets a real email address, linked to its onchain identity. No human needed.

TL;DR: Own a Basename (yourname.base.eth)? Get [email protected] instantly. Sign with your Base wallet, send emails autonomously.

Why BaseMail?

  • Built on Base Chain โ€” Email identity tied to your onchain wallet on Base (Coinbase's L2)
  • Basename integration โ€” .base.eth holders get matching @basemail.ai addresses automatically
  • SIWE authentication โ€” Sign-In with Ethereum, no passwords or CAPTCHA needed
  • Autonomous for AI agents โ€” Register for services, submit forms, receive confirmations without human help
  • Verifiable identity โ€” Your email is cryptographically linked to your Base wallet address
BaseMail gives AI agents verifiable email identities on Base Chain:

How it works

text
Base Wallet โ†’ SIWE Signature โ†’ BaseMail Registration โ†’ [email protected]
     โ†‘                                                        โ†“
Basename (.base.eth)                              Send & receive email autonomously


๐Ÿ” Wallet Setup (Choose One)

Option A: Environment Variable (Recommended โœ…)

If you already have a wallet, just set the env var โ€” no private key stored to file:

bash
export BASEMAIL_PRIVATE_KEY="0x..."
node scripts/register.js

โœ… Safest method: private key exists only in memory.


Option B: Specify Wallet Path

Point to your existing private key file:

bash
node scripts/register.js --wallet /path/to/your/private-key

โœ… Uses your existing wallet, no copying.


Option C: Managed Mode (Beginners)

Let the skill generate and manage a wallet for you:

bash
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 each time you use the wallet
- Mnemonic displayed once for manual backup (never saved to file)
- Password input is masked (hidden) in terminal


โš ๏ธ Security Guidelines

  • Never commit private keys to git
  • Never share private keys or mnemonics publicly
  • Never add ~/.basemail/ to version control
  • Private key files should be chmod 600 (owner read/write only)
  • Prefer environment variables (Option A) over file storage
  • --wallet paths are validated: must be under $HOME, no traversal, max 1KB file size
  • Private key format is validated (0x + 64 hex chars) before use
  • Password input is masked in terminal (characters hidden)
  • This skill only signs SIWE authentication messages โ€” it never sends funds or on-chain transactions

Recommended .gitignore

gitignore
# BaseMail - NEVER commit!
.basemail/
**/private-key.enc


๐Ÿš€ Quick Start

1๏ธโƒฃ Register

bash
# Using environment variable
export BASEMAIL_PRIVATE_KEY="0x..."
node scripts/register.js

# Or with Basename
node scripts/register.js --basename yourname.base.eth

2๏ธโƒฃ Send Email

bash
node scripts/send.js "[email protected]" "Hello!" "Nice to meet you ๐Ÿฆž"

3๏ธโƒฃ Check Inbox

bash
node scripts/inbox.js              # List emails
node scripts/inbox.js <email_id>   # Read specific email


๐Ÿ“ฆ Scripts

ScriptPurposeNeeds Private Key
setup.jsShow helpโŒ
setup.js --managedGenerate wallet (always encrypted)โŒ
register.jsRegister email addressโœ…
send.jsSend emailโŒ (uses token)
inbox.jsCheck inboxโŒ (uses token)
audit.jsView audit logโŒ

๐Ÿ“ File Locations

text
~/.basemail/
โ”œโ”€โ”€ private-key.enc   # Encrypted private key (AES-256-GCM, chmod 600)
โ”œโ”€โ”€ wallet.json       # Wallet info (public address only)
โ”œโ”€โ”€ token.json        # Auth token (chmod 600)
โ””โ”€โ”€ audit.log         # Operation log (no sensitive data)


๐ŸŽจ Get a Basename-Linked Email

Want [email protected] instead of [email protected]?

  • Register a Basename (.base.eth) at https://www.base.org/names
  • Link it: node scripts/register.js --basename yourname.base.eth
Your Basename is your onchain identity on Base โ€” and BaseMail turns it into a working email address.


๐Ÿ”ง API Reference

EndpointMethodPurpose
/api/auth/startPOSTStart SIWE auth
/api/auth/verifyPOSTVerify wallet signature
/api/registerPOSTRegister email
/api/register/upgradePUTUpgrade to Basename
/api/sendPOSTSend email
/api/inboxGETList inbox
/api/inbox/:idGETRead email content
Full docs: https://api.basemail.ai/api/docs


๐ŸŒ Links

  • Website: https://basemail.ai
  • API: https://api.basemail.ai
  • API Docs: https://api.basemail.ai/api/docs
  • Get a Basename: https://www.base.org/names
  • Base Chain: https://base.org
  • Source: https://github.com/dAAAb/BaseMail-Skill

๐Ÿ“ Changelog

v1.8.0 (2026-02-18)

  • ๐Ÿ“ Enhanced description: emphasize Base Chain and Basename (.base.eth) integration
  • ๐Ÿ“ Added architecture diagram showing wallet โ†’ SIWE โ†’ email flow
  • ๐Ÿ“ Better explanation of onchain identity and verifiable email
  • ๐Ÿ”— Added source repo and Base Chain links

v1.7.0 (2026-02-18)

  • ๐Ÿ” Security hardening (addresses ClawHub "Suspicious" classification):
  • Added OpenClaw metadata: declares BASEMAIL_PRIVATE_KEY in requires.env
  • Password input now masked in terminal (characters hidden as *)
  • Stronger password requirements: min 8 chars, must include letter + number
  • --wallet path validation: must be under $HOME, no .. traversal, max 1KB, regular file only
  • Private key format validation (0x + 64 hex chars) on all input sources
  • Removed --no-encrypt option โ€” managed wallets are always encrypted
  • Mnemonic is displayed once and never saved to file (removed save-to-file prompt)
  • Removed legacy plaintext key file references
  • ๐Ÿ“ Added notes in metadata clarifying: this skill only signs SIWE messages, never sends funds
  • ๐Ÿ“ Updated security guidelines and file locations documentation

v1.4.0 (2026-02-08)

  • โœจ Better branding and descriptions
  • ๐Ÿ“ Full English documentation

v1.1.0 (2026-02-08)

  • ๐Ÿ” Security: opt-in private key storage
  • โœจ Support env var, path, auto-detect
  • ๐Ÿ”’ Encrypted storage option (--encrypt)
  • ๐Ÿ“Š Audit logging

v1.6.0 (Security Update)

  • ๐Ÿ” Breaking: --managed now encrypts by default
  • ๐Ÿ” Removed auto-detection of external wallet paths (security improvement)
  • ๐Ÿ” Mnemonic no longer auto-saved; displayed once for manual backup
  • ๐Ÿ“ Updated documentation for clarity

v1.0.0

  • ๐ŸŽ‰ Initial release

Installation

Terminal bash

openclaw install basemail
    
Copied!

๐Ÿ’ปCode Examples

Basename (.base.eth) Send & receive email autonomously

basename-baseeth-send--receive-email-autonomously.txt
---

## ๐Ÿ” Wallet Setup (Choose One)

### Option A: Environment Variable (Recommended โœ…)

If you already have a wallet, just set the env var โ€” **no private key stored to file**:

node scripts/register.js

node-scriptsregisterjs.txt
> โœ… Safest method: private key exists only in memory.

---

### Option B: Specify Wallet Path

Point to your existing private key file:

node scripts/register.js --wallet /path/to/your/private-key

node-scriptsregisterjs---wallet-pathtoyourprivate-key.txt
> โœ… Uses your existing wallet, no copying.

---

### Option C: Managed Mode (Beginners)

Let the skill generate and manage a wallet for you:

node scripts/register.js

node-scriptsregisterjs.txt
> โœ… **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 each time you use the wallet
> - Mnemonic displayed once for manual backup (never saved to file)
> - Password input is masked (hidden) in terminal

---

## โš ๏ธ Security Guidelines

1. **Never** commit private keys to git
2. **Never** share private keys or mnemonics publicly
3. **Never** add `~/.basemail/` to version control
4. Private key files should be chmod `600` (owner read/write only)
5. Prefer environment variables (Option A) over file storage
6. `--wallet` paths are validated: must be under `$HOME`, no traversal, max 1KB file size
7. Private key format is validated (`0x` + 64 hex chars) before use
8. Password input is masked in terminal (characters hidden)
9. This skill only signs SIWE authentication messages โ€” it **never sends funds or on-chain transactions**

### Recommended .gitignore

**/private-key.enc

private-keyenc.txt
---

## ๐Ÿš€ Quick Start

### 1๏ธโƒฃ Register

node scripts/inbox.js <email_id> # Read specific email

node-scriptsinboxjs-emailid--read-specific-email.txt
---

## ๐Ÿ“ฆ Scripts

| 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) |
| `inbox.js` | Check inbox | โŒ (uses token) |
| `audit.js` | View audit log | โŒ |

---

## ๐Ÿ“ File Locations
example.txt
Base Wallet โ†’ SIWE Signature โ†’ BaseMail Registration โ†’ [email protected]
     โ†‘                                                        โ†“
Basename (.base.eth)                              Send & receive email autonomously
example.txt
# BaseMail - NEVER commit!
.basemail/
**/private-key.enc
example.sh
# Using environment variable
export BASEMAIL_PRIVATE_KEY="0x..."
node scripts/register.js

# Or with Basename
node scripts/register.js --basename yourname.base.eth
example.txt
~/.basemail/
โ”œโ”€โ”€ private-key.enc   # Encrypted private key (AES-256-GCM, chmod 600)
โ”œโ”€โ”€ wallet.json       # Wallet info (public address only)
โ”œโ”€โ”€ token.json        # Auth token (chmod 600)
โ””โ”€โ”€ audit.log         # Operation log (no sensitive data)

Tags

#coding_agents-and-ides

Quick Info

Category Development
Model Claude 3.5
Complexity Multi-Agent
Author daaab
Last Updated 3/10/2026
๐Ÿš€
Optimized for
Claude 3.5
๐Ÿง 

Ready to Install?

Get started with this skill in seconds

openclaw install basemail