# parrhesia v0.12.0 - API Reference

## Modules

- [Parrhesia.Auth.Challenges](Parrhesia.Auth.Challenges.md): Connection-scoped NIP-42 challenge storage.

- [Parrhesia.Auth.Nip98](Parrhesia.Auth.Nip98.md): Minimal NIP-98 HTTP auth validation.

- [Parrhesia.Auth.Nip98ReplayCache](Parrhesia.Auth.Nip98ReplayCache.md): Tracks recently accepted NIP-98 auth event ids to prevent replay.

- [Parrhesia.Auth.Supervisor](Parrhesia.Auth.Supervisor.md): Supervision entrypoint for AUTH challenge/session tracking.

- [Parrhesia.Config](Parrhesia.Config.md): Runtime configuration cache backed by ETS.
- [Parrhesia.ConnectionStats](Parrhesia.ConnectionStats.md): Per-listener connection and subscription counters.
- [Parrhesia.Fanout.Dispatcher](Parrhesia.Fanout.Dispatcher.md): Asynchronous local fanout dispatcher.

- [Parrhesia.Groups.Flow](Parrhesia.Groups.Flow.md): Relay access membership projection backed by the shared group storage adapter.

- [Parrhesia.Negentropy.Engine](Parrhesia.Negentropy.Engine.md): Relay/client-agnostic negentropy reconciliation engine.

- [Parrhesia.Negentropy.Message](Parrhesia.Negentropy.Message.md): NIP-77 negentropy message codec and helpers.

- [Parrhesia.Negentropy.Sessions](Parrhesia.Negentropy.Sessions.md): In-memory NIP-77 session tracking over bounded local event snapshots.

- [Parrhesia.Policy.ConnectionPolicy](Parrhesia.Policy.ConnectionPolicy.md): Connection/session-level policy checks shared by websocket and management entrypoints.

- [Parrhesia.Policy.EventPolicy](Parrhesia.Policy.EventPolicy.md): Write/read policy checks for relay operations.

- [Parrhesia.Policy.Supervisor](Parrhesia.Policy.Supervisor.md): Supervision entrypoint for policy/rate-limit/ACL workers.

- [Parrhesia.PostgresTypes](Parrhesia.PostgresTypes.md): Custom Postgrex type definitions used by `Parrhesia.Repo` and `Parrhesia.ReadRepo`.
- [Parrhesia.Protocol](Parrhesia.Protocol.md): Nostr protocol message decode/encode helpers.
- [Parrhesia.Protocol.EventValidator](Parrhesia.Protocol.EventValidator.md): Strict NIP-01 event validation helpers.

- [Parrhesia.Protocol.Filter](Parrhesia.Protocol.Filter.md): NIP-01 filter validation and matching.

- [Parrhesia.ReadRepo](Parrhesia.ReadRepo.md): PostgreSQL repository dedicated to read-heavy workloads when a separate read pool is enabled.

- [Parrhesia.Repo](Parrhesia.Repo.md): PostgreSQL repository for write traffic and storage adapter persistence.
- [Parrhesia.Storage](Parrhesia.Storage.md): Storage boundary entrypoint.
- [Parrhesia.Storage.ACL](Parrhesia.Storage.ACL.md): Storage callbacks for persisted ACL rules.

- [Parrhesia.Storage.Adapters.Memory.ACL](Parrhesia.Storage.Adapters.Memory.ACL.md): In-memory prototype adapter for `Parrhesia.Storage.ACL`.

- [Parrhesia.Storage.Adapters.Memory.Admin](Parrhesia.Storage.Adapters.Memory.Admin.md): In-memory prototype adapter for `Parrhesia.Storage.Admin`.

- [Parrhesia.Storage.Adapters.Memory.Events](Parrhesia.Storage.Adapters.Memory.Events.md): In-memory prototype adapter for `Parrhesia.Storage.Events`.

- [Parrhesia.Storage.Adapters.Memory.Groups](Parrhesia.Storage.Adapters.Memory.Groups.md): In-memory prototype adapter for `Parrhesia.Storage.Groups`.

- [Parrhesia.Storage.Adapters.Memory.Moderation](Parrhesia.Storage.Adapters.Memory.Moderation.md): In-memory prototype adapter for `Parrhesia.Storage.Moderation`.

- [Parrhesia.Storage.Adapters.Postgres.ACL](Parrhesia.Storage.Adapters.Postgres.ACL.md): PostgreSQL-backed implementation for `Parrhesia.Storage.ACL`.

- [Parrhesia.Storage.Adapters.Postgres.Admin](Parrhesia.Storage.Adapters.Postgres.Admin.md): PostgreSQL-backed implementation for `Parrhesia.Storage.Admin`.

- [Parrhesia.Storage.Adapters.Postgres.Circuit](Parrhesia.Storage.Adapters.Postgres.Circuit.md): Lightweight fast-fail guard for PostgreSQL connectivity incidents.
- [Parrhesia.Storage.Adapters.Postgres.Events](Parrhesia.Storage.Adapters.Postgres.Events.md): PostgreSQL-backed implementation for `Parrhesia.Storage.Events`.

- [Parrhesia.Storage.Adapters.Postgres.Groups](Parrhesia.Storage.Adapters.Postgres.Groups.md): PostgreSQL-backed implementation for `Parrhesia.Storage.Groups`.

- [Parrhesia.Storage.Adapters.Postgres.Moderation](Parrhesia.Storage.Adapters.Postgres.Moderation.md): PostgreSQL-backed implementation for `Parrhesia.Storage.Moderation`.

- [Parrhesia.Storage.Adapters.Postgres.ModerationCache](Parrhesia.Storage.Adapters.Postgres.ModerationCache.md): ETS owner process for moderation cache tables.

- [Parrhesia.Storage.Admin](Parrhesia.Storage.Admin.md): Storage callbacks used by relay management endpoints (NIP-86 backing).

- [Parrhesia.Storage.Events](Parrhesia.Storage.Events.md): Storage callbacks for event persistence and query operations.

- [Parrhesia.Storage.Groups](Parrhesia.Storage.Groups.md): Storage callbacks for NIP-29/NIP-43 group membership and role state.

- [Parrhesia.Storage.Moderation](Parrhesia.Storage.Moderation.md): Storage callbacks for moderation and access-control state.

- [Parrhesia.Storage.Partitions](Parrhesia.Storage.Partitions.md): Partition lifecycle helpers for Postgres `events` and `event_tags` monthly partitions.

- [Parrhesia.Storage.Supervisor](Parrhesia.Storage.Supervisor.md): Supervision entrypoint for storage adapter processes.

- [Parrhesia.Subscriptions.Index](Parrhesia.Subscriptions.Index.md): ETS-backed subscription index used for fanout candidate narrowing.
- [Parrhesia.Subscriptions.Supervisor](Parrhesia.Subscriptions.Supervisor.md): Supervision entrypoint for subscription index and fanout workers.

- [Parrhesia.Sync.Supervisor](Parrhesia.Sync.Supervisor.md): Supervision entrypoint for sync control-plane processes.

- [Parrhesia.Tasks.ExpirationWorker](Parrhesia.Tasks.ExpirationWorker.md): Periodic worker that purges expired events.

- [Parrhesia.Tasks.Nip66Publisher](Parrhesia.Tasks.Nip66Publisher.md): Periodic worker that publishes NIP-66 monitor and discovery events.

- [Parrhesia.Tasks.PartitionBootstrap](Parrhesia.Tasks.PartitionBootstrap.md): One-shot startup worker that ensures monthly storage partitions exist before
write-capable services are started.

- [Parrhesia.Tasks.PartitionRetentionWorker](Parrhesia.Tasks.PartitionRetentionWorker.md): Periodic worker that ensures monthly event partitions and applies retention pruning.

- [Parrhesia.Tasks.Supervisor](Parrhesia.Tasks.Supervisor.md): Supervision entrypoint for background maintenance jobs.

- [Parrhesia.Telemetry](Parrhesia.Telemetry.md): Supervision entrypoint and helpers for relay telemetry.
- [Parrhesia.Web.Connection](Parrhesia.Web.Connection.md): Per-connection websocket process state and message handling.

- [Parrhesia.Web.Endpoint](Parrhesia.Web.Endpoint.md): Supervision entrypoint for configured ingress listeners.

- [Parrhesia.Web.EventIngestLimiter](Parrhesia.Web.EventIngestLimiter.md): Relay-wide EVENT ingest rate limiting over a fixed time window.

- [Parrhesia.Web.IPEventIngestLimiter](Parrhesia.Web.IPEventIngestLimiter.md): Per-IP EVENT ingest rate limiting over a fixed time window.

- [Parrhesia.Web.Management](Parrhesia.Web.Management.md): HTTP management API (NIP-86 style) with NIP-98 auth validation.

- [Parrhesia.Web.MetricsEndpoint](Parrhesia.Web.MetricsEndpoint.md): Optional dedicated HTTP listener for Prometheus metrics scraping.

- [Parrhesia.Web.PubkeyEventIngestLimiter](Parrhesia.Web.PubkeyEventIngestLimiter.md): Per-pubkey EVENT ingest rate limiting over a fixed time window.
- [Parrhesia.Web.RelayInfo](Parrhesia.Web.RelayInfo.md): NIP-11 relay information document.

- Embedded API
  - [Parrhesia.API.ACL](Parrhesia.API.ACL.md): Public ACL API and rule matching for protected sync traffic.
  - [Parrhesia.API.Admin](Parrhesia.API.Admin.md): Public management API facade.
  - [Parrhesia.API.Auth](Parrhesia.API.Auth.md): Public helpers for event validation and NIP-98 HTTP authentication.
  - [Parrhesia.API.Auth.Context](Parrhesia.API.Auth.Context.md): Authenticated request details returned by shared auth helpers.
  - [Parrhesia.API.Events](Parrhesia.API.Events.md): Canonical event publish, query, and count API.
  - [Parrhesia.API.Events.PublishResult](Parrhesia.API.Events.PublishResult.md): Result shape for event publish attempts.
  - [Parrhesia.API.Identity](Parrhesia.API.Identity.md): Server-auth identity management.
  - [Parrhesia.API.RequestContext](Parrhesia.API.RequestContext.md): Shared request context used across API and policy surfaces.
  - [Parrhesia.API.Stream](Parrhesia.API.Stream.md): In-process subscription API with relay-equivalent catch-up and live fanout semantics.
  - [Parrhesia.API.Sync](Parrhesia.API.Sync.md): Sync server control-plane API.

- Runtime
  - [Parrhesia](Parrhesia.md): Parrhesia is a Nostr relay runtime that can run standalone or as an embedded OTP service.
  - [Parrhesia.Plug](Parrhesia.Plug.md): Official Plug interface for mounting Parrhesia HTTP/WebSocket ingress in a host app.
  - [Parrhesia.Release](Parrhesia.Release.md): Helpers for running Ecto tasks from a production release.
  - [Parrhesia.Runtime](Parrhesia.Runtime.md): Top-level Parrhesia supervisor.

