API Reference parrhesia v#0.12.0

Copy Markdown

Modules

Parrhesia is a Nostr relay runtime that can run standalone or as an embedded OTP service.

Public ACL API and rule matching for protected sync traffic.

Public management API facade.

Public helpers for event validation and NIP-98 HTTP authentication.

Authenticated request details returned by shared auth helpers.

Canonical event publish, query, and count API.

Result shape for event publish attempts.

Server-auth identity management.

Shared request context used across API and policy surfaces.

In-process subscription API with relay-equivalent catch-up and live fanout semantics.

Sync server control-plane API.

Connection-scoped NIP-42 challenge storage.

Minimal NIP-98 HTTP auth validation.

Tracks recently accepted NIP-98 auth event ids to prevent replay.

Supervision entrypoint for AUTH challenge/session tracking.

Runtime configuration cache backed by ETS.

Per-listener connection and subscription counters.

Asynchronous local fanout dispatcher.

Relay access membership projection backed by the shared group storage adapter.

Relay/client-agnostic negentropy reconciliation engine.

NIP-77 negentropy message codec and helpers.

In-memory NIP-77 session tracking over bounded local event snapshots.

Official Plug interface for mounting Parrhesia HTTP/WebSocket ingress in a host app.

Connection/session-level policy checks shared by websocket and management entrypoints.

Write/read policy checks for relay operations.

Supervision entrypoint for policy/rate-limit/ACL workers.

Custom Postgrex type definitions used by Parrhesia.Repo and Parrhesia.ReadRepo.

Nostr protocol message decode/encode helpers.

Strict NIP-01 event validation helpers.

NIP-01 filter validation and matching.

PostgreSQL repository dedicated to read-heavy workloads when a separate read pool is enabled.

Helpers for running Ecto tasks from a production release.

PostgreSQL repository for write traffic and storage adapter persistence.

Top-level Parrhesia supervisor.

Storage boundary entrypoint.

Storage callbacks for persisted ACL rules.

PostgreSQL-backed implementation for Parrhesia.Storage.ACL.

Lightweight fast-fail guard for PostgreSQL connectivity incidents.

ETS owner process for moderation cache tables.

Storage callbacks used by relay management endpoints (NIP-86 backing).

Storage callbacks for event persistence and query operations.

Storage callbacks for NIP-29/NIP-43 group membership and role state.

Storage callbacks for moderation and access-control state.

Partition lifecycle helpers for Postgres events and event_tags monthly partitions.

Supervision entrypoint for storage adapter processes.

ETS-backed subscription index used for fanout candidate narrowing.

Supervision entrypoint for subscription index and fanout workers.

Supervision entrypoint for sync control-plane processes.

Periodic worker that purges expired events.

Periodic worker that publishes NIP-66 monitor and discovery events.

One-shot startup worker that ensures monthly storage partitions exist before write-capable services are started.

Periodic worker that ensures monthly event partitions and applies retention pruning.

Supervision entrypoint for background maintenance jobs.

Supervision entrypoint and helpers for relay telemetry.

Per-connection websocket process state and message handling.

Supervision entrypoint for configured ingress listeners.

Relay-wide EVENT ingest rate limiting over a fixed time window.

Per-IP EVENT ingest rate limiting over a fixed time window.

HTTP management API (NIP-86 style) with NIP-98 auth validation.

Optional dedicated HTTP listener for Prometheus metrics scraping.

Per-pubkey EVENT ingest rate limiting over a fixed time window.

NIP-11 relay information document.