Install
openclaw skills install @dyegolara/nostr-authAuthenticate to Nostr sign-in challenges (NIP-07 style) without a wallet or browser extension. Signs kind-22242 AUTH challenge events with a secp256k1 (BIP-340) key derived from a local master secret and optionally submits them to the service callback. Use when a site or API asks for a signed Nostr event to prove key ownership. More methods coming: NIP-98 HTTP Auth, NIP-42 relay AUTH, NIP-05.
openclaw skills install @dyegolara/nostr-authUse this skill for authentication only — signing sign-in events that prove ownership of a Nostr identity. It never publishes notes, connects to relays beyond the configured callback, or requires a wallet or browser extension.
kind, tags, content) or a challenge string.--domain for the service host (used for deterministic key
derivation), --callback URL to submit the signed event to.--dry-run when the signed event must be inspected before
submission.Do not invent or alter challenges. Ask for a fresh challenge when the service reports it was already used.
The bundled helper uses only Node.js built-ins and lives at:
<skill_dir>/scripts/nostr_auth.js
Inspect the identity and signature without authenticating:
node <skill_dir>/scripts/nostr_auth.js pubkey --domain example.com
node <skill_dir>/scripts/nostr_auth.js --challenge "<hex>" --relay "wss://..." --dry-run --json
After confirming the service and callback are expected, submit:
node <skill_dir>/scripts/nostr_auth.js --challenge "<hex>" --relay "wss://..." --callback "https://example.com/verify" --json
Or sign a full event template:
node <skill_dir>/scripts/nostr_auth.js sign '{"kind":22242,"tags":[["challenge","<hex>"]],"content":""}' --domain example.com --callback https://example.com/verify --json
The helper requires Node.js 20.19 or newer. The only network request is the final callback POST.
HMAC-SHA256(master, domain),
from the persisted master secret (~/.config/nostr-auth/master.key, mode
0600).sha256(JSON.stringify([0, pubkey, created_at, kind, tags, content])).event.sig.{"event": <signed>} to the callback. Interpret {"status":"OK"} as
accepted; a fresh challenge is needed after {"status":"ERROR"}.0600); expose the nsec to nobody.--dry-run before submitting.npub derived here is an agent identity — it is not the same key as a
user's browser extension unless the master secret comes from it.Invalid hex / odd length — malformed key or challenge input.Callback returned non-JSON or HTTP <n> — the service is down or the URL is
wrong; verify --callback.{"status":"ERROR"} — challenge may already be used; request a fresh one.cd <skill_dir>
npm test
The local mock service validates the full sign → submit → verify roundtrip.