Files
ergo/irc/nostr/errors.go
T
cloudfodder eb43ff69c4 feat(nostr): nostr-based account registration and verification
Rebuilt the nostr registration feature cleanly on top of current ergo
mainline (origin/master), dropping the stale ergo reversions that were
entangled in the original squashed branch.

- New irc/nostr package: NIP-04/NIP-17 DMs, NIP-05 resolution, relay
  connect/auth, and identifier helpers.
- Registration/verification via nostr: parseCallback auto-detects nostr
  identifiers (NIP-05, npub, hex pubkey) and dispatches a verification DM.
- Nostr-based cloaked hostnames for accounts (opt-in via
  ip-cloaking.nostr-hostnames), applied at the account-cloak sites.
- Config: accounts.registration.nostr-verification and the
  nostr-hostnames cloak option, with matching default.yaml and help text.
- Adds github.com/nbd-wtf/go-nostr and vendored dependencies.
2026-07-28 10:42:09 -07:00

38 lines
1.5 KiB
Go

// Copyright (c) 2024 Ergo Contributors
// released under the MIT license
package nostr
import "errors"
var (
// Identifier validation errors
ErrInvalidNostrIdentifier = errors.New("invalid nostr identifier format")
ErrInvalidPubkeyFormat = errors.New("invalid pubkey format")
ErrInvalidPubkeyLength = errors.New("invalid pubkey length")
ErrInvalidHexFormat = errors.New("invalid hex format")
ErrInvalidPrivkeyLength = errors.New("invalid private key length")
ErrInvalidNpubPrefix = errors.New("invalid npub prefix")
// NIP-05 resolution errors
ErrNIP05ResolutionFailed = errors.New("NIP-05 resolution failed")
ErrNIP05NotFound = errors.New("NIP-05 address not found")
ErrNIP05InvalidResponse = errors.New("invalid NIP-05 response")
ErrNIP05HTTPError = errors.New("HTTP error during NIP-05 resolution")
ErrNIP05PubkeyNotFound = errors.New("pubkey not found in NIP-05 response")
// Relay discovery errors
ErrRelayDiscoveryFailed = errors.New("relay discovery failed")
ErrNoInboxRelaysFound = errors.New("no inbox relays found")
ErrRelayConnectionFailed = errors.New("relay connection failed")
ErrRelayAuthFailed = errors.New("relay authentication failed")
// DM sending errors
ErrDMSendFailed = errors.New("DM send failed")
ErrDMEncryptionFailed = errors.New("DM encryption failed")
ErrNostrKeyNotConfigured = errors.New("nostr private key not configured")
// Decoding errors
ErrNpubDecodingFailed = errors.New("npub decoding failed")
)