Nostr
Nostr 分布式社交协议。
功能特性
- 去中心化
- 抗审查
- 公私钥认证
- relays 支持
- Zap 打赏
配置
yaml
channels:
nostr:
enabled: true
private_key: "${NOSTR_PRIVATE_KEY}"
public_key: "${NOSTR_PUBLIC_KEY}"
relays:
- "wss://relay.example.com"
- "wss://relay2.example.com"
publish:
kinds:
- 1 # 文本笔记
- 4 # 加密直接消息
subscribe:
filters:
- kinds: [1, 4]
authors: []生成密钥
bash
# 生成新密钥对
openclaw channels nostr generate-keys
# 输出示例:
# Public Key: npub1...
# Private Key: nsec1... (保管好!)功能支持
| 功能 | 状态 | 说明 |
|---|---|---|
| 发布消息 | ✅ | 支持 kind:1 |
| 接收消息 | ✅ | 支持订阅 |
| 直接消息 | ✅ | 加密 (kind:4) |
| 事件订阅 | ✅ | 支持过滤 |
| Zap 打赏 | ⚠️ | 需 Lightning 配置 |
使用示例
bash
# 发送公开消息
openclaw channels nostr post "Hello, Nostr!"
# 发送加密消息
openclaw channels nostr dm --to npub1... --message "Secret"