orly

command module
v0.65.60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: AGPL-3.0 Imports: 21 Imported by: 0

README

git.smesh.lol/orly


orly.dev

Version v0.62.0 Documentation

Can Youse Paradigm?

Every hour you don’t zap, a donkey eats another cabbage. You can stop this. 🫏

Support this project

mleku · npub1fjqqy4a93z5zsjwsfxqhc2764kvykfdyttvldkkkdera8dr78vhsmmleku

Architecture Overview

ORLY supports a modular IPC architecture where core functionality runs as independent gRPC services:

orly launcher (process supervisor)
├── orly db              (gRPC :50051) - Event storage & queries
├── orly acl             (gRPC :50052) - Access control
├── orly bridge          (SMTP :2525)  - Marmot email bridge (DM ↔ SMTP)
├── orly sync distributed (gRPC :50061) - Peer-to-peer sync
├── orly sync cluster    (gRPC :50062) - Cluster replication
├── orly sync relaygroup (gRPC :50063) - Relay group config (Kind 39105)
├── orly sync negentropy (gRPC :50064) - NIP-77 set reconciliation
└── orly                 (WebSocket/HTTP) - Main relay

Benefits:

  • Resource isolation: Database, ACL, and sync run in separate processes
  • Independent scaling: Scale sync services independently from the relay
  • Fault tolerance: Service crashes don't bring down the entire relay
  • Modular deployment: Enable only the services you need

See docs/IPC_SYNC_SERVICES.md for detailed API documentation.

Table of Contents

⚠️ Bug Reports & Feature Requests

Bug reports and feature requests that do not follow the protocol will not be accepted.

Before submitting any issue, you must read and follow BUG_REPORTS_AND_FEATURE_REQUEST_PROTOCOL.md.

Requirements:

  • Bug reports: Include environment details, reproduction steps, expected/actual behavior, and logs
  • Feature requests: Include problem statement, proposed solution, and use cases
  • Both: Search existing issues first, verify with latest version, provide minimal reproduction

Issues missing required information will be closed without review.

⚠️ System Requirements

IMPORTANT: ORLY requires a minimum of 500MB of free memory to operate.

The relay uses adaptive PID-controlled rate limiting to manage memory pressure. By default, it will:

  • Auto-detect available system memory at startup
  • Target 66% of available memory, capped at 1.5GB for optimal performance
  • Fail to start if less than 500MB is available

You can override the memory target with ORLY_RATE_LIMIT_TARGET_MB (e.g., ORLY_RATE_LIMIT_TARGET_MB=2000 for 2GB).

To disable rate limiting (not recommended): ORLY_RATE_LIMIT_ENABLED=false

About

ORLY is a nostr relay written from the ground up to be performant, low latency, and built with a number of features designed to make it well suited for:

  • personal relays
  • small community relays
  • business deployments and RaaS (Relay as a Service) with a nostr-native NWC client to allow accepting payments through NWC capable lightning nodes
  • high availability clusters for reliability and/or providing a unified data set across multiple regions

Performance & Cryptography

ORLY leverages high-performance libraries and custom optimizations for exceptional speed:

  • SIMD Libraries: Uses minio/sha256-simd for accelerated SHA256 hashing
  • p256k1 Cryptography: Implements p256k1.mleku.dev for fast elliptic curve operations optimized for nostr
  • Fast Message Encoders: High-performance encoding/decoding with templexxx/xhex for SIMD-accelerated hex operations

The encoders achieve 24% faster JSON marshaling, 16% faster canonical encoding, and 54-91% reduction in memory allocations through custom buffer pre-allocation and zero-allocation optimization techniques.

ORLY uses a fast embedded badger database with a database designed for high performance querying and event storage.

Building

ORLY is a standard Go application that can be built using the Go toolchain.

Prerequisites
  • Go 1.25.3 or later
  • Git
  • For web UI: Bun JavaScript runtime
Basic Build

To build the unified binary (relay + all subcommands):

git clone <repository-url>
cd git.smesh.lol/orly
go build -o orly ./cmd/orly

To build the relay-only binary (no subcommands):

go build -o orly .
Building with Web UI

To build with the embedded web interface:

# Build the Svelte web application
cd app/web
bun install
bun run build

# Build the Go binary from project root
cd ../../
go build -o orly ./cmd/orly

The recommended way to build and embed the web UI is using the provided script:

./scripts/update-embedded-web.sh

This script will:

  • Build the Svelte app in app/web to app/web/dist using Bun (preferred) or fall back to npm/yarn/pnpm
  • Run go install from the repository root so the binary picks up the new embedded assets
  • Automatically detect and use the best available JavaScript package manager

For manual builds, you can also use:

#!/bin/bash
# build.sh
echo "Building Svelte app..."
cd app/web
bun install
bun run build

echo "Building Go binary..."
cd ../../
go build -o orly ./cmd/orly

echo "Build complete!"

Make it executable with chmod +x build.sh and run with ./build.sh.

Core Features

Web UI

ORLY includes a modern web-based user interface built with Svelte for relay management and monitoring.

  • Secure Authentication: Nostr key pair authentication with challenge-response
  • Event Management: Browse, export, import, and search events
  • User Administration: Role-based permissions (guest, user, admin, owner)
  • Sprocket Management: Upload and monitor event processing scripts
  • Real-time Updates: Live event streaming and system monitoring
  • Responsive Design: Works on desktop and mobile devices
  • Dark/Light Themes: Persistent theme preferences

The web UI is embedded in the relay binary and accessible at the relay's root path.

Web UI Development

For development with hot-reloading, ORLY can proxy web requests to a local dev server while still handling WebSocket relay connections and API requests.

Environment Variables:

  • ORLY_WEB_DISABLE - Set to true to disable serving the embedded web UI
  • ORLY_WEB_DEV_PROXY_URL - URL of the dev server to proxy web requests to (e.g., localhost:8080)

Setup:

  1. Start the dev server (in one terminal):
cd app/web
bun install
bun run dev

Note the port sirv is listening on (e.g., http://localhost:8080).

  1. Start the relay with dev proxy enabled (in another terminal):
export ORLY_WEB_DISABLE=true
export ORLY_WEB_DEV_PROXY_URL=localhost:8080
./orly

The relay will:

  • Handle WebSocket connections at / for Nostr protocol
  • Handle API requests at /api/*
  • Proxy all other requests (HTML, JS, CSS, assets) to the dev server

With a reverse proxy/tunnel:

If you're running behind a reverse proxy or tunnel (e.g., Caddy, nginx, Cloudflare Tunnel), the setup is the same. The relay listens locally and your reverse proxy forwards traffic to it:

Browser � Reverse Proxy � ORLY (port 3334) � Dev Server (port 8080)
                              �
                         WebSocket/API

Example with the relay on port 3334 and sirv on port 8080:

# Terminal 1: Dev server
cd app/web && bun run dev
# Output: Your application is ready~!
#         Local: http://localhost:8080

# Terminal 2: Relay
export ORLY_WEB_DISABLE=true
export ORLY_WEB_DEV_PROXY_URL=localhost:8080
export ORLY_PORT=3334
./orly

Disabling the web UI without a proxy:

If you only want to disable the embedded web UI (without proxying to a dev server), just set ORLY_WEB_DISABLE=true without setting ORLY_WEB_DEV_PROXY_URL. The relay will return 404 for web UI requests while still handling WebSocket and API requests.

Sprocket Event Processing

ORLY includes a powerful sprocket system for external event processing scripts. Sprocket scripts enable custom filtering, validation, and processing logic for Nostr events before storage.

  • Real-time Processing: Scripts receive events via stdin and respond with JSONL decisions
  • Three Actions: accept, reject, or shadowReject events based on custom logic
  • Automatic Recovery: Failed scripts are automatically disabled with periodic recovery attempts
  • Web UI Management: Upload, configure, and monitor scripts through the admin interface
export ORLY_SPROCKET_ENABLED=true
export ORLY_APP_NAME="ORLY"
# Place script at ~/.config/ORLY/sprocket.sh

For detailed configuration and examples, see the sprocket documentation.

Policy System

ORLY includes a comprehensive policy system for fine-grained control over event storage and retrieval. Configure custom validation rules, access controls, size limits, and age restrictions.

  • Access Control: Allow/deny based on pubkeys, roles, or social relationships
  • Content Filtering: Size limits, age validation, and custom rules
  • Script Integration: Execute custom scripts for complex policy logic
  • Real-time Enforcement: Policies applied to both read and write operations
export ORLY_POLICY_ENABLED=true
# Default policy file: ~/.config/ORLY/policy.json

# OPTIONAL: Use a custom policy file location
# WARNING: ORLY_POLICY_PATH MUST be an ABSOLUTE path (starting with /)
# Relative paths will be REJECTED and the relay will fail to start
export ORLY_POLICY_PATH=/etc/orly/policy.json

For detailed configuration and examples, see the Policy Usage Guide.

Deployment

ORLY includes an automated deployment script that handles Go installation, dependency setup, building, and systemd service configuration.

Automated Deployment

The deployment script (scripts/deploy.sh) provides a complete setup solution:

# Clone the repository
git clone <repository-url>
cd git.smesh.lol/orly

# Run the deployment script
./scripts/deploy.sh

The script will:

  1. Install Go 1.25.3 if not present (in ~/.local/go)
  2. Configure environment by creating ~/.goenv and updating ~/.bashrc
  3. Build the relay with embedded web UI using update-embedded-web.sh
  4. Set capabilities for port 443 binding (requires sudo)
  5. Install binary to ~/.local/bin/orly
  6. Create systemd service and enable it

After deployment, reload your shell environment:

source ~/.bashrc
Network Options

ORLY can handle TLS itself (direct mode) or sit behind a reverse proxy. Choose one.

Run ORLY on localhost and let Caddy, nginx, or another proxy handle TLS termination, WebSocket upgrades, and certificate renewal. This is the production setup used at relay.orly.dev.

Internet (wss://relay.example.com)
    → Caddy/nginx (:443, TLS termination)
        → ORLY (127.0.0.1:3334, plain HTTP/WebSocket)

1. Configure ORLY to listen on localhost only:

export ORLY_LISTEN=127.0.0.1
export ORLY_PORT=3334

Do NOT set ORLY_TLS_DOMAINS — the reverse proxy handles TLS.

2. Install and configure the reverse proxy.

Caddy (recommended — automatic HTTPS, minimal config):

# Install Caddy (Ubuntu/Debian)
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

Create /etc/caddy/Caddyfile:

relay.example.com {
    reverse_proxy 127.0.0.1:3334
}

That's it. Caddy handles TLS certificates, HTTPS, and WebSocket upgrades automatically. No additional configuration needed for WebSocket — Caddy proxies upgrade requests by default.

Reload Caddy:

sudo systemctl reload caddy

nginx alternative:

server {
    listen 443 ssl http2;
    server_name relay.example.com;

    ssl_certificate /etc/letsencrypt/live/relay.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/relay.example.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:3334;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 86400s;
        proxy_send_timeout 86400s;
    }
}

server {
    listen 80;
    server_name relay.example.com;
    return 301 https://$host$request_uri;
}

With nginx you must obtain certificates separately (e.g., certbot --nginx).

3. Open firewall ports:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

4. Verify:

# Check ORLY is listening on localhost
ss -tlnp | grep 3334

# Check proxy is listening externally
ss -tlnp | grep -E ':(80|443)'

# Test WebSocket connection from outside
wscat -c wss://relay.example.com
Option B: Direct Listening (Built-in TLS)

ORLY handles TLS itself using Let's Encrypt ACME. No reverse proxy needed. ORLY binds directly to ports 80 and 443, which requires setcap since it runs as a non-root user.

Internet (wss://relay.example.com)
    → ORLY (:443 HTTPS/WSS + :80 ACME challenges)

1. Set capabilities on the binary:

# Allow binding to privileged ports without root
sudo setcap 'cap_net_bind_service=+ep' ~/.local/bin/orly

Note: setcap must be re-applied after every binary update.

2. Configure TLS domains:

export ORLY_TLS_DOMAINS=relay.example.com

When ORLY_TLS_DOMAINS is set, ORLY ignores ORLY_PORT and listens on :443 (HTTPS/WSS) and :80 (ACME challenges) instead.

3. Optional: custom certificates:

# Load certificates from files instead of (or in addition to) ACME
export ORLY_CERTS=/path/to/cert1,/path/to/cert2

Certificate files should be named with .pem and .key extensions:

  • /path/to/cert1.pem (certificate)
  • /path/to/cert1.key (private key)

4. Open firewall ports:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

5. Verify:

# ORLY should be listening on 80 and 443
ss -tlnp | grep orly

# Test WebSocket
wscat -c wss://relay.example.com
Which option to choose
Reverse Proxy Direct Listening
TLS management Caddy/nginx handles it ORLY's built-in ACME
Multiple services on same IP Yes (proxy routes by domain) No (ORLY owns port 443)
WebSocket config Automatic (Caddy) or manual (nginx) Built-in
Binary updates Just restart ORLY Restart + re-run setcap
Additional software Caddy or nginx None
Used at relay.orly.dev Yes (Caddy) No
systemd Service Management

The deployment script creates a systemd service for easy management:

# Start the service
sudo systemctl start orly

# Stop the service
sudo systemctl stop orly

# Restart the service
sudo systemctl restart orly

# Enable service to start on boot
sudo systemctl enable orly --now

# Disable service from starting on boot
sudo systemctl disable orly --now

# Check service status
sudo systemctl status orly

# View service logs
sudo journalctl -u orly -f

# View recent logs
sudo journalctl -u orly --since "1 hour ago"
Remote Deployment

You can deploy ORLY on a remote server using SSH:

# Deploy to a VPS with SSH key authentication
ssh user@your-server.com << 'EOF'
  # Clone and deploy
  git clone <repository-url>
  cd git.smesh.lol/orly
  ./scripts/deploy.sh

  # Configure your relay
  echo 'export ORLY_TLS_DOMAINS=relay.example.com' >> ~/.bashrc
  echo 'export ORLY_ADMINS=npub1your_admin_key_here' >> ~/.bashrc

  # Start the service
  sudo systemctl start orly --now
EOF

# Check deployment status
ssh user@your-server.com 'sudo systemctl status orly'
Configuration

After deployment, configure your relay by setting environment variables in your shell profile:

# Add to ~/.bashrc or ~/.profile
export ORLY_TLS_DOMAINS=relay.example.com
export ORLY_ADMINS=npub1your_admin_key
export ORLY_ACL_MODE=follows
export ORLY_APP_NAME="MyRelay"

Then restart the service:

source ~/.bashrc
sudo systemctl restart orly
Firewall Configuration

Ensure your firewall allows the necessary ports:

# For TLS-enabled relays
sudo ufw allow 80/tcp   # HTTP (ACME challenges)
sudo ufw allow 443/tcp  # HTTPS/WSS

# For non-TLS relays
sudo ufw allow 3334/tcp # Default ORLY port

# Enable firewall if not already enabled
sudo ufw enable
Monitoring

Monitor your relay using systemd and standard Linux tools:

# Service status and logs
sudo systemctl status orly
sudo journalctl -u orly -f

# Resource usage
htop
sudo ss -tulpn | grep orly

# Disk usage (database grows over time)
du -sh ~/.local/share/ORLY/

# Check TLS certificates (if using Let's Encrypt)
ls -la ~/.local/share/ORLY/autocert/

Testing

ORLY includes comprehensive testing tools for protocol validation and performance testing.

  • Protocol Testing: Use relay-tester for Nostr protocol compliance validation
  • Stress Testing: Performance testing under various load conditions
  • Benchmark Suite: Comparative performance testing across relay implementations

For detailed testing instructions, multi-relay testing scenarios, and advanced usage, see the Relay Testing Guide.

The benchmark suite provides comprehensive performance testing and comparison across multiple relay implementations, including throughput, latency, and memory usage metrics.

Command-Line Tools

ORLY includes several command-line utilities in the cmd/ directory for testing, debugging, and administration.

relay-tester

Nostr protocol compliance testing tool. Validates that a relay correctly implements the Nostr protocol specification.

# Run all protocol compliance tests
go run ./cmd/relay-tester -url ws://localhost:3334

# List available tests
go run ./cmd/relay-tester -list

# Run specific test
go run ./cmd/relay-tester -url ws://localhost:3334 -test "Basic Event"

# Output results as JSON
go run ./cmd/relay-tester -url ws://localhost:3334 -json
benchmark

Comprehensive relay performance benchmarking tool. Tests event storage, queries, and subscription performance with detailed latency metrics (P90, P95, P99).

# Run benchmarks against local database
go run ./cmd/benchmark -data-dir /tmp/bench-db -events 10000 -workers 4

# Run benchmarks against a running relay
go run ./cmd/benchmark -relay ws://localhost:3334 -events 5000

# Use different database backends
go run ./cmd/benchmark -dgraph -events 10000
go run ./cmd/benchmark -neo4j -events 10000

The cmd/benchmark/ directory also includes Docker Compose configurations for comparative benchmarks across multiple relay implementations (strfry, nostr-rs-relay, khatru, etc.).

stresstest

Load testing tool for evaluating relay performance under sustained high-traffic conditions. Generates events with random content and tags to simulate realistic workloads.

# Run stress test with 10 concurrent workers
go run ./cmd/stresstest -url ws://localhost:3334 -workers 10 -duration 60s

# Generate events with random p-tags (up to 100 per event)
go run ./cmd/stresstest -url ws://localhost:3334 -workers 5
blossomtest

Tests the Blossom blob storage protocol (BUD-01/BUD-02) implementation. Validates upload, download, and authentication flows.

# Test with generated key
go run ./cmd/blossomtest -url http://localhost:3334 -size 1024

# Test with specific nsec
go run ./cmd/blossomtest -url http://localhost:3334 -nsec nsec1...

# Test anonymous uploads (no authentication)
go run ./cmd/blossomtest -url http://localhost:3334 -no-auth
aggregator

Event aggregation utility that fetches events from multiple relays using bloom filters for deduplication. Useful for syncing events across relays with memory-efficient duplicate detection.

go run ./cmd/aggregator -relays wss://relay1.com,wss://relay2.com -output events.jsonl
convert

Key format conversion utility. Converts between hex and bech32 (npub/nsec) formats for Nostr keys.

# Convert npub to hex
go run ./cmd/convert npub1abc...

# Convert hex to npub
go run ./cmd/convert 0123456789abcdef...

# Convert secret key (nsec or hex) - outputs both nsec and derived npub
go run ./cmd/convert --secret nsec1xyz...
FIND

Free Internet Name Daemon - CLI tool for the distributed naming system. Manages name registration, transfers, and certificate issuance.

# Validate a name format
go run ./cmd/FIND verify-name example.nostr

# Generate a new key pair
go run ./cmd/FIND generate-key

# Create a registration proposal
go run ./cmd/FIND register myname.nostr

# Transfer a name to a new owner
go run ./cmd/FIND transfer myname.nostr npub1newowner...
policytest

Tests the policy system for event write control. Validates that policy rules correctly allow or reject events based on kind, pubkey, and other criteria.

go run ./cmd/policytest -url ws://localhost:3334 -type event -kind 4678
go run ./cmd/policytest -url ws://localhost:3334 -type req -kind 1
go run ./cmd/policytest -url ws://localhost:3334 -type publish-and-query -count 5
policyfiltertest

Tests policy-based filtering with authorized and unauthorized pubkeys. Validates access control rules for specific users.

go run ./cmd/policyfiltertest -url ws://localhost:3334 \
  -allowed-pubkey <hex> -allowed-sec <hex> \
  -unauthorized-pubkey <hex> -unauthorized-sec <hex>
subscription-test

Tests WebSocket subscription stability over extended periods. Monitors for dropped subscriptions and connection issues.

# Run subscription stability test for 60 seconds
go run ./cmd/subscription-test -url ws://localhost:3334 -duration 60 -kind 1

# With verbose output
go run ./cmd/subscription-test -url ws://localhost:3334 -duration 120 -v
subscription-test-simple

Simplified subscription stability test that verifies subscriptions remain active without dropping over the test duration.

go run ./cmd/subscription-test-simple -url ws://localhost:3334 -duration 120

Access Control

ORLY provides four ACL (Access Control List) modes to control who can publish events to your relay:

Mode Description Best For
none Open relay, anyone can write Public relays
follows Write access based on admin follow lists Personal/community relays
managed Explicit allow/deny lists via NIP-86 API Private relays
curating Three-tier classification with rate limiting Curated community relays
export ORLY_ACL_MODE=follows  # or: none, managed, curating
Follows ACL

The follows ACL system provides flexible relay access control based on social relationships in the Nostr network.

export ORLY_ACL_MODE=follows
export ORLY_ADMINS=npub1fjqqy4a93z5zsjwsfxqhc2764kvykfdyttvldkkkdera8dr78vhsmmleku
./orly

The system grants write access to users followed by designated admins, with read-only access for others. Follow lists update dynamically as admins modify their relationships.

Curation ACL

The curation ACL mode provides sophisticated content curation with a three-tier publisher classification system:

  • Trusted: Unlimited publishing, bypass rate limits
  • Blacklisted: Blocked from publishing, invisible to regular users
  • Unclassified: Rate-limited publishing (default 50 events/day)

Key features:

  • Kind whitelisting: Only allow specific event kinds (e.g., social, DMs, longform)
  • IP-based flood protection: Auto-ban IPs that exceed rate limits
  • Spam flagging: Mark events as spam without deleting
  • Web UI management: Configure via the built-in curation interface
export ORLY_ACL_MODE=curating
export ORLY_OWNERS=npub1your_owner_key
./orly

After starting, publish a configuration event (kind 30078) to enable the relay. The web UI at /#curation provides a complete management interface.

For detailed configuration and API documentation, see the Curation Mode Guide.

Cluster Replication

ORLY supports distributed relay clusters using active replication. When configured with peer relays, ORLY will automatically synchronize events between cluster members using efficient HTTP polling.

export ORLY_RELAY_PEERS=https://peer1.example.com,https://peer2.example.com
export ORLY_CLUSTER_ADMINS=npub1cluster_admin_key

Privacy Considerations: By default, ORLY propagates all events including privileged events (DMs, gift wraps, etc.) to cluster peers for complete synchronization. This ensures no data loss but may expose private communications to other relay operators in your cluster.

To enhance privacy, you can disable propagation of privileged events:

export ORLY_CLUSTER_PROPAGATE_PRIVILEGED_EVENTS=false

Important: When disabled, privileged events will not be replicated to peer relays. This provides better privacy but means these events will only be available on the originating relay. Users should be aware that accessing their privileged events may require connecting directly to the relay where they were originally published.

Marmot Email Bridge

ORLY includes a bidirectional Nostr DM to SMTP email bridge. Users DM the bridge's Nostr pubkey to subscribe (via Lightning payment), send outbound email, and receive inbound email as encrypted DMs.

Features
  • Outbound email: Send a DM with To: / Subject: headers to the bridge pubkey — it sends the email via SMTP
  • Inbound email: Email sent to npub@yourdomain is delivered as an encrypted DM with a reply link
  • Lightning subscriptions: Users pay via NWC (Nostr Wallet Connect) Lightning invoices for 30-day access
  • Attachment encryption: Non-plaintext email parts are zipped, encrypted with ChaCha20-Poly1305, and uploaded to Blossom with fragment-key URLs
  • DKIM signing: Outbound email is DKIM-signed for deliverability (or use an SMTP smarthost)
  • Dual DM protocol: Supports both NIP-04 (kind 4) and NIP-17 gift-wrapped (kind 1059) DMs
  • Rate limiting: Sliding-window rate limits per user and globally
Quick Start
# 1. Build the unified binary
go build -o orly ./cmd/orly

# 2. Set environment
export ORLY_BRIDGE_ENABLED=true
export ORLY_BRIDGE_DOMAIN=yourdomain.com
export ORLY_BRIDGE_SMTP_PORT=2525
export ORLY_BRIDGE_NWC_URI="nostr+walletconnect://..."

# 3. Start (bridge runs alongside the relay)
./orly

Or run standalone against any Nostr relay:

export ORLY_BRIDGE_RELAY_URL=wss://relay.example.com
./orly bridge
Bridge Profile

The bridge publishes a kind 0 (profile metadata) event on startup so Nostr clients can discover it. Create a profile.txt in the bridge data directory (or set ORLY_BRIDGE_PROFILE):

name: Marmot Bridge
about: Nostr-Email bridge at yourdomain.com. DM 'subscribe' to get started.
picture: https://yourdomain.com/avatar.png
nip05: bridge@yourdomain.com
lud16: tips@yourdomain.com
website: https://yourdomain.com

See profile.example.txt for a template.

Client Setup (White Noise, etc.)

NIP-17 messaging clients like White Noise need the bridge to have a kind 10002 relay list event (NIP-65) to know where to send DMs. Without it, the client sees the bridge profile but reports the bridge "isn't on White Noise yet."

Until the bridge publishes kind 10002 automatically, publish one manually using nak:

export NOSTR_SECRET_KEY=nsec1...  # Bridge identity
nak event --kind 10002 \
  --tag r='wss://your-relay.com/' \
  --tag r='wss://relay.damus.io/;read' \
  --tag r='wss://nos.lol/;read' \
  wss://your-relay.com wss://relay.damus.io wss://nos.lol

See Bridge Deployment Guide — Client Setup: White Noise for full instructions.

Documentation

Docker Deployment

ORLY ships a single Docker image that serves both the relay and the email bridge. The default entrypoint runs the relay; pass bridge as the command to run the email bridge.

Build the Image
docker build -t orly .
Run as Relay (default)
docker run --rm -p 3334:3334 -v orly-data:/data orly
Run as Email Bridge
docker run --rm -p 2525:2525 --env-file .env.bridge orly bridge
Docker Compose (Bridge)

A ready-made compose file is provided for bridge deployment:

cp .env.bridge.example .env.bridge   # edit with your values
docker compose -f docker-compose.bridge.yml up --build

See .env.bridge.example for all available configuration variables.

Negentropy Sync (NIP-77)

ORLY supports NIP-77 negentropy-based set reconciliation for efficient relay synchronization.

Quick Start

Enable negentropy client support:

export ORLY_NEGENTROPY_ENABLED=true
./orly

Enable peer relay synchronization:

export ORLY_NEGENTROPY_ENABLED=true
export ORLY_SYNC_NEGENTROPY_PEERS=wss://relay.orly.dev,wss://other-relay.com
./orly
Split IPC Mode

For production deployments, run negentropy as a separate service:

# Build binaries
CGO_ENABLED=0 go build -o orly-sync-negentropy ./cmd/orly-sync-negentropy

# Configure launcher
export ORLY_LAUNCHER_SYNC_NEGENTROPY_ENABLED=true
export ORLY_LAUNCHER_SYNC_NEGENTROPY_BINARY=/path/to/orly-sync-negentropy
export ORLY_SYNC_NEGENTROPY_PEERS=wss://peer-relay.com
strfry Compatibility

ORLY's negentropy implementation is compatible with strfry:

# Pull events from ORLY using strfry
strfry sync wss://your-orly-relay.com --filter '{"kinds": [0, 1, 3]}' --dir down

For detailed configuration including Docker deployments, filtering options, and troubleshooting, see the Negentropy Sync Guide.

Documentation

Deployment & Operations
Document Description
Bridge Deployment Guide DNS, DKIM, NWC, SMTP for Marmot email bridge
Deployment Testing Deployment verification procedures
Build Platforms Multi-platform build guide (Linux, macOS, Windows, Android)
Purego Build System CGO-free build system with runtime library loading
WASM/Mobile Builds WebAssembly and mobile build targets
Configuration & Access Control
Document Description
Policy Usage Guide Event filtering and validation rules
Policy Configuration Reference Complete policy JSON schema
Policy Troubleshooting Diagnosing policy issues
Curation Mode Guide Three-tier publisher classification ACL
HTTP Guard Bot detection and HTTP rate limiting
Branding Guide Relay name, icon, NIP-11 customization
Architecture & Internals
Document Description
IPC Architecture gRPC split-process design
IPC Sync Services Sync service API reference
Negentropy Sync Guide NIP-77 set reconciliation setup
Sync Client Mode Client-mode relay synchronization
Neo4j Backend Neo4j database driver setup and tuning
NIP-77 Analysis NIP-77 implementation details
Protocol Extensions
Document Description
FIND Names Spec Free Internet Name Daemon protocol
FIND Implementation FIND integration architecture and status
NIP-XX Graph Queries REQ filter extension for graph traversals
NIP-XX Cluster Replication HTTP polling-based cluster replication
NIP-XX Responsive Images Image variant protocol extension
NIP Curation Curation-mode protocol spec
NIP NRC Nostr Relay Connection protocol
Development & Reference
Document Description
Glossary ORLY terminology and domain concepts
Relay Testing Guide Protocol compliance testing
Web UI Event Templates Event kind templates for the web UI
Applesauce Reference Applesauce library integration
Graph Implementation Phases Graph query feature tracker
Graph Queries Remaining Outstanding graph query work
Neo4j WoT Spec Web-of-Trust graph schema
Neo4j Schema Changes Guide for modifying the Neo4j schema

Developer Notes

Binary-Optimized Tag Storage

The nostr library (git.smesh.lol/orly/pkg/nostr/encoders/tag) uses binary optimization for e and p tags to reduce memory usage and improve comparison performance.

When events are unmarshaled from JSON, 64-character hex values in e/p tags are converted to 33-byte binary format (32 bytes hash + null terminator).

Important: When working with e/p tag values in code:

  • DO NOT use tag.Value() directly - it returns raw bytes which may be binary, not hex
  • ALWAYS use tag.ValueHex() to get a hex string regardless of storage format
  • Use tag.ValueBinary() to get raw 32-byte binary (returns nil if not binary-encoded)
// CORRECT: Use ValueHex() for hex decoding
pt, err := hex.Dec(string(pTag.ValueHex()))

// WRONG: Value() may return binary bytes, not hex
pt, err := hex.Dec(string(pTag.Value()))  // Will fail for binary-encoded tags!
Release Process

The /release command pushes to the origin remote with tags:

git push origin main --tags

License

Licensed under AGPL-3.0-or-later.

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

  • main.go

Directories

Path Synopsis
app
branding
Package branding provides white-label customization for the ORLY relay web UI.
Package branding provides white-label customization for the ORLY relay web UI.
config
Package config provides a go-simpler.org/env configuration table and helpers for working with the list of key/value lists stored in .env files.
Package config provides a go-simpler.org/env configuration table and helpers for working with the list of key/value lists stored in .env files.
cmd
FIND command
aggregator command
benchmark command
blossom-upload command
blossomtest command
convert command
dashboard-server command
Simple static file server for testing the standalone dashboard
Simple static file server for testing the standalone dashboard
marmot-test command
marmot-wasm command
marmot-wasm — WASM module exposing the marmot MLS DM protocol to JS.
marmot-wasm — WASM module exposing the marmot MLS DM protocol to JS.
nurl command
Package main is a simple implementation of a cURL like tool that can do simple GET/POST operations on a HTTP server that understands NIP-98 authentication, with the signing key found in an environment variable.
Package main is a simple implementation of a cURL like tool that can do simple GET/POST operations on a HTTP server that understands NIP-98 authentication, with the signing key found in an environment variable.
orly command
orly is a unified binary for the ORLY Nostr relay system.
orly is a unified binary for the ORLY Nostr relay system.
orly-acl command
orly-acl is a standalone gRPC ACL server for the ORLY relay.
orly-acl is a standalone gRPC ACL server for the ORLY relay.
orly-acl-curation command
orly-acl-curation is a standalone gRPC ACL server using the Curating mode.
orly-acl-curation is a standalone gRPC ACL server using the Curating mode.
orly-acl-follows command
orly-acl-follows is a standalone gRPC ACL server using the Follows mode.
orly-acl-follows is a standalone gRPC ACL server using the Follows mode.
orly-acl-managed command
orly-acl-managed is a standalone gRPC ACL server using the Managed mode.
orly-acl-managed is a standalone gRPC ACL server using the Managed mode.
orly-certs command
orly-certs is a certificate management service that obtains and renews wildcard SSL certificates from Let's Encrypt using DNS-01 challenges.
orly-certs is a certificate management service that obtains and renews wildcard SSL certificates from Let's Encrypt using DNS-01 challenges.
orly-db command
orly-db is a standalone gRPC database server for the ORLY relay.
orly-db is a standalone gRPC database server for the ORLY relay.
orly-db-badger command
orly-db-badger is a standalone gRPC database server using the Badger backend.
orly-db-badger is a standalone gRPC database server using the Badger backend.
orly-db-neo4j command
orly-db-neo4j is a standalone gRPC database server using the Neo4j backend.
orly-db-neo4j is a standalone gRPC database server using the Neo4j backend.
orly-export command
Package main is a CLI tool to export all events from an ORLY relay via the /api/export HTTP endpoint using NIP-98 authentication.
Package main is a CLI tool to export all events from an ORLY relay via the /api/export HTTP endpoint using NIP-98 authentication.
orly-launcher command
orly-launcher is a process supervisor that manages the database and relay processes in split mode.
orly-launcher is a process supervisor that manages the database and relay processes in split mode.
orly-nits command
orly-nits is a gRPC shim that manages a bitcoind (nits) process and exposes health/status information for the orly-launcher supervisor.
orly-nits is a gRPC shim that manages a bitcoind (nits) process and exposes health/status information for the orly-launcher supervisor.
orly-sync-cluster command
orly-sync-cluster is a standalone gRPC cluster sync service for ORLY.
orly-sync-cluster is a standalone gRPC cluster sync service for ORLY.
orly-sync-distributed command
orly-sync-distributed is a standalone gRPC distributed sync service for ORLY.
orly-sync-distributed is a standalone gRPC distributed sync service for ORLY.
orly-sync-negentropy command
orly-sync-negentropy is a standalone gRPC negentropy sync service for ORLY.
orly-sync-negentropy is a standalone gRPC negentropy sync service for ORLY.
orly-sync-relaygroup command
orly-sync-relaygroup is a standalone gRPC relay group service for ORLY.
orly-sync-relaygroup is a standalone gRPC relay group service for ORLY.
orly/acl
Package acl implements the "orly acl" subcommand for ACL server operations.
Package acl implements the "orly acl" subcommand for ACL server operations.
orly/bridge
Package bridge implements the "orly bridge" subcommand for the Nostr-Email bridge.
Package bridge implements the "orly bridge" subcommand for the Nostr-Email bridge.
orly/bridgebot
Package bridgebot implements the "orly bridgebot" subcommand.
Package bridgebot implements the "orly bridgebot" subcommand.
orly/db
Package db implements the "orly db" subcommand for database operations.
Package db implements the "orly db" subcommand for database operations.
orly/launcher
Package launcher implements the "orly launcher" subcommand for process supervision.
Package launcher implements the "orly launcher" subcommand for process supervision.
orly/relay
Package relay implements the "orly relay" subcommand (the default command).
Package relay implements the "orly relay" subcommand (the default command).
orly/sync
Package sync implements the "orly sync" subcommand for sync service operations.
Package sync implements the "orly sync" subcommand for sync service operations.
orly/testsubscribe
Package testsubscribe provides a CLI command for end-to-end testing of the paid subscription flow: create invoice via NWC, pay it (loopback), activate subscription via ACL gRPC.
Package testsubscribe provides a CLI command for end-to-end testing of the paid subscription flow: create invoice via NWC, pay it (loopback), activate subscription via ACL gRPC.
policytest command
reindex-ppg command
relay-tester command
send-dm command
sm3sh-deploy command
sm3sh-test command
stresstest command
test-nwc command
test-subscribe-e2e command
test-subscribe-e2e exercises the full Marmot bridge subscribe flow: send "subscribe" DM → receive invoice → pay via NWC → receive confirmation.
test-subscribe-e2e exercises the full Marmot bridge subscribe flow: send "subscribe" DM → receive invoice → pay via NWC → receive confirmation.
vainstr command
Package main is a simple nostr key miner that uses the fast bitcoin secp256k1 C library to derive npubs with specified prefix/infix/suffix strings present.
Package main is a simple nostr key miner that uses the fast bitcoin secp256k1 C library to derive npubs with specified prefix/infix/suffix strings present.
wasmdb command
Package main provides the WASM entry point for the WasmDB database.
Package main provides the WASM entry point for the WasmDB database.
pkg
acl
acl/grpc
Package grpc provides a gRPC client that implements the acl.I interface.
Package grpc provides a gRPC client that implements the acl.I interface.
acl/server
Package server provides a shared gRPC ACL server implementation.
Package server provides a shared gRPC ACL server implementation.
archive
Package archive provides query augmentation from authoritative archive relays.
Package archive provides query augmentation from authoritative archive relays.
bridge
Package bridge implements a bidirectional Nostr-Email bridge using the Marmot protocol (MLS-based E2E encrypted messaging) for all Nostr-side communication.
Package bridge implements a bidirectional Nostr-Email bridge using the Marmot protocol (MLS-based E2E encrypted messaging) for all Nostr-side communication.
bunker
Package bunker provides a NIP-46 remote signing service that listens only on the WireGuard VPN network for secure access.
Package bunker provides a NIP-46 remote signing service that listens only on the WireGuard VPN network for secure access.
crawler
Package crawler provides an automated corpus crawler that discovers relays via kind 10002 hop-expansion and then syncs all events from each discovered relay using NIP-77 negentropy set reconciliation.
Package crawler provides an automated corpus crawler that discovers relays via kind 10002 hop-expansion and then syncs all events from each discovered relay using NIP-77 negentropy set reconciliation.
database
Package database provides filter utilities for normalizing tag values.
Package database provides filter utilities for normalizing tag values.
database/bufpool
Package bufpool provides buffer pools for reducing GC pressure in hot paths.
Package bufpool provides buffer pools for reducing GC pressure in hot paths.
database/grpc
Package grpc provides a gRPC client that implements the database.Database interface.
Package grpc provides a gRPC client that implements the database.Database interface.
database/server
Package server provides a shared gRPC database server implementation.
Package server provides a shared gRPC database server implementation.
domain/errors
Package errors provides domain-specific error types for the ORLY relay.
Package errors provides domain-specific error types for the ORLY relay.
domain/events
Package events provides domain event types and a dispatcher for the ORLY relay.
Package events provides domain event types and a dispatcher for the ORLY relay.
domain/events/subscribers
Package subscribers provides domain event subscriber implementations.
Package subscribers provides domain event subscriber implementations.
event/authorization
Package authorization provides event authorization services for the ORLY relay.
Package authorization provides event authorization services for the ORLY relay.
event/ingestion
Package ingestion provides a service for orchestrating the event processing pipeline.
Package ingestion provides a service for orchestrating the event processing pipeline.
event/processing
Package processing provides event processing services for the ORLY relay.
Package processing provides event processing services for the ORLY relay.
event/routing
Package routing provides event routing services for the ORLY relay.
Package routing provides event routing services for the ORLY relay.
event/specialkinds
Package specialkinds provides a registry for handling special event kinds that require custom processing before normal storage/delivery.
Package specialkinds provides a registry for handling special event kinds that require custom processing before normal storage/delivery.
event/validation
Package validation provides event validation services for the ORLY relay.
Package validation provides event validation services for the ORLY relay.
httpguard
Package httpguard provides application-level HTTP protection: bot User-Agent blocking and per-IP rate limiting.
Package httpguard provides application-level HTTP protection: bot User-Agent blocking and per-IP rate limiting.
interfaces/acl
Package acl is an interface for implementing arbitrary access control lists.
Package acl is an interface for implementing arbitrary access control lists.
interfaces/loadmonitor
Package loadmonitor defines the interface for database load monitoring.
Package loadmonitor defines the interface for database load monitoring.
interfaces/negentropy
Package negentropy defines the interface for NIP-77 negentropy operations.
Package negentropy defines the interface for NIP-77 negentropy operations.
interfaces/neterr
Package neterr defines interfaces for network error handling.
Package neterr defines interfaces for network error handling.
interfaces/pid
Package pid defines interfaces for PID controller process variable sources.
Package pid defines interfaces for PID controller process variable sources.
interfaces/resultiter
Package resultiter defines interfaces for iterating over database query results.
Package resultiter defines interfaces for iterating over database query results.
interfaces/store
Package store is an interface and ancillary helpers and types for defining a series of API elements for abstracting the event storage from the implementation.
Package store is an interface and ancillary helpers and types for defining a series of API elements for abstracting the event storage from the implementation.
interfaces/transport
Package transport defines the interface for pluggable network transports.
Package transport defines the interface for pluggable network transports.
interfaces/typer
Package typer is an interface for server to use to identify their type simply for aggregating multiple self-registered server such that the top level can recognise the type of a message and match it to the type of handler.
Package typer is an interface for server to use to identify their type simply for aggregating multiple self-registered server such that the top level can recognise the type of a message and match it to the type of handler.
lol
Package lol (log of location) is a simple logging library that prints a high precision unix timestamp and the source location of a log print to make tracing errors simpler.
Package lol (log of location) is a simple logging library that prints a high precision unix timestamp and the source location of a log print to make tracing errors simpler.
lol/chk
Package chk is a convenience shortcut to use shorter names to access the lol.Logger.
Package chk is a convenience shortcut to use shorter names to access the lol.Logger.
lol/errorf
Package errorf is a convenience shortcut to use shorter names to access the lol.Logger.
Package errorf is a convenience shortcut to use shorter names to access the lol.Logger.
lol/log
Package log is a convenience shortcut to use shorter names to access the lol.Logger.
Package log is a convenience shortcut to use shorter names to access the lol.Logger.
mode
Package mode provides a global ACL mode indicator that can be read by packages that need to know the current access control mode without creating circular dependencies.
Package mode provides a global ACL mode indicator that can be read by packages that need to know the current access control mode without creating circular dependencies.
neo4j
Package neo4j provides hex utilities for normalizing pubkeys and event IDs.
Package neo4j provides hex utilities for normalizing pubkeys and event IDs.
nostr/crypto/ec
Package btcec implements support for the elliptic curves needed for bitcoin.
Package btcec implements support for the elliptic curves needed for bitcoin.
nostr/crypto/ec/base58
Package base58 provides an API for working with modified base58 and Base58Check encodings.
Package base58 provides an API for working with modified base58 and Base58Check encodings.
nostr/crypto/ec/bech32
Package bech32 provides a Go implementation of the bech32 format specified in BIP 173.
Package bech32 provides a Go implementation of the bech32 format specified in BIP 173.
nostr/crypto/ec/chaincfg
Package chaincfg provides basic parameters for bitcoin chain and testnets.
Package chaincfg provides basic parameters for bitcoin chain and testnets.
nostr/crypto/ec/chainhash
Package chainhash provides abstracted hash functionality.
Package chainhash provides abstracted hash functionality.
nostr/crypto/ec/ecdsa
Package ecdsa provides secp256k1-optimized ECDSA signing and verification.
Package ecdsa provides secp256k1-optimized ECDSA signing and verification.
nostr/crypto/ec/musig2
Package musig2 provides an implementation of the musig2 protocol for bitcoin.
Package musig2 provides an implementation of the musig2 protocol for bitcoin.
nostr/crypto/ec/schnorr
Package schnorr provides custom Schnorr signing and verification via secp256k1.
Package schnorr provides custom Schnorr signing and verification via secp256k1.
nostr/crypto/ec/secp256k1
Package secp256k1 implements optimized secp256k1 elliptic curve operations in pure Go.
Package secp256k1 implements optimized secp256k1 elliptic curve operations in pure Go.
nostr/crypto/ec/secp256k1/precomps command
Package main provides a generator for precomputed constants for secp256k1 signatures.
Package main provides a generator for precomputed constants for secp256k1 signatures.
nostr/crypto/ec/taproot
Package taproot provides a collection of tools for encoding bitcoin taproot addresses.
Package taproot provides a collection of tools for encoding bitcoin taproot addresses.
nostr/crypto/ec/wire
Package wire contains a set of data structure definitions for the bitcoin blockchain.
Package wire contains a set of data structure definitions for the bitcoin blockchain.
nostr/crypto/encryption
Package encryption contains the message encryption schemes defined in NIP-04 and NIP-44, used for encrypting the content of nostr messages.
Package encryption contains the message encryption schemes defined in NIP-04 and NIP-44, used for encrypting the content of nostr messages.
nostr/crypto/keys
Package keys is a set of helpers for generating and converting public/secret keys to hex and back to binary.
Package keys is a set of helpers for generating and converting public/secret keys to hex and back to binary.
nostr/encoders/bech32encoding
Package bech32encoding implements NIP-19 entities, which are bech32 encoded data that describes nostr data types.
Package bech32encoding implements NIP-19 entities, which are bech32 encoded data that describes nostr data types.
nostr/encoders/bech32encoding/pointers
Package pointers is a set of basic nip-19 data types for generating bech32 encoded nostr entities.
Package pointers is a set of basic nip-19 data types for generating bech32 encoded nostr entities.
nostr/encoders/bech32encoding/tlv
Package tlv implements a simple Type Length Value encoder for nostr NIP-19 bech32 encoded entities.
Package tlv implements a simple Type Length Value encoder for nostr NIP-19 bech32 encoded entities.
nostr/encoders/envelopes
Package envelopes provides common functions for marshaling and identifying nostr envelopes (JSON arrays containing protocol messages).
Package envelopes provides common functions for marshaling and identifying nostr envelopes (JSON arrays containing protocol messages).
nostr/encoders/envelopes/authenvelope
Package authenvelope defines the auth challenge (relay message) and response (client message) of the NIP-42 authentication protocol.
Package authenvelope defines the auth challenge (relay message) and response (client message) of the NIP-42 authentication protocol.
nostr/encoders/envelopes/closedenvelope
Package closedenvelope defines the nostr message type CLOSED which is sent from a relay to indicate the relay-side termination of a subscription or the demand for authentication associated with a subscription.
Package closedenvelope defines the nostr message type CLOSED which is sent from a relay to indicate the relay-side termination of a subscription or the demand for authentication associated with a subscription.
nostr/encoders/envelopes/closeenvelope
Package closeenvelope provides the encoder for the client message CLOSE which is a request to terminate a subscription.
Package closeenvelope provides the encoder for the client message CLOSE which is a request to terminate a subscription.
nostr/encoders/envelopes/countenvelope
Package countenvelope is an encoder for the COUNT request (client) and response (relay) message types.
Package countenvelope is an encoder for the COUNT request (client) and response (relay) message types.
nostr/encoders/envelopes/eoseenvelope
Package eoseenvelope provides an encoder for the EOSE (End Of Stored Events) event that signifies that a REQ has found all stored events and from here on the request morphs into a subscription, until the limit, if requested, or until CLOSE or CLOSED.
Package eoseenvelope provides an encoder for the EOSE (End Of Stored Events) event that signifies that a REQ has found all stored events and from here on the request morphs into a subscription, until the limit, if requested, or until CLOSE or CLOSED.
nostr/encoders/envelopes/eventenvelope
Package eventenvelope is a codec for the event Submission request EVENT envelope (client) and event Result (to a REQ) from a relay.
Package eventenvelope is a codec for the event Submission request EVENT envelope (client) and event Result (to a REQ) from a relay.
nostr/encoders/envelopes/messages
Package messages is a collection of example/common messages and machine-readable prefixes to use with OK and CLOSED envelopes.
Package messages is a collection of example/common messages and machine-readable prefixes to use with OK and CLOSED envelopes.
nostr/encoders/envelopes/noticeenvelope
Package noticeenvelope is a codec for the NOTICE envelope, which is used to serve (mostly ignored) messages that are supposed to be shown to a user in the client.
Package noticeenvelope is a codec for the NOTICE envelope, which is used to serve (mostly ignored) messages that are supposed to be shown to a user in the client.
nostr/encoders/envelopes/okenvelope
Package okenvelope is a codec for the OK message, which is an acknowledgement for an EVENT eventenvelope.Submission, containing true/false and if false a message with a machine readable error type as found in the messages package.
Package okenvelope is a codec for the OK message, which is an acknowledgement for an EVENT eventenvelope.Submission, containing true/false and if false a message with a machine readable error type as found in the messages package.
nostr/encoders/envelopes/reqenvelope
Package reqenvelope is a message from a client to a relay containing a subscription identifier and an array of filters to search for events.
Package reqenvelope is a message from a client to a relay containing a subscription identifier and an array of filters to search for events.
nostr/encoders/event/examples
Package examples is an embedded jsonl format of a collection of events intended to be used to test an event codec.
Package examples is an embedded jsonl format of a collection of events intended to be used to test an event codec.
nostr/encoders/hex
Package hex is a set of aliases and helpers for using the templexxx SIMD hex encoder.
Package hex is a set of aliases and helpers for using the templexxx SIMD hex encoder.
nostr/encoders/ints
Package ints is an optimised encoder for decimal numbers in ASCII format, that simplifies and accelerates encoding and decoding decimal strings.
Package ints is an optimised encoder for decimal numbers in ASCII format, that simplifies and accelerates encoding and decoding decimal strings.
nostr/encoders/ints/gen command
Package main is a generator for the base10000 (4 digit) encoding of the ints library.
Package main is a generator for the base10000 (4 digit) encoding of the ints library.
nostr/encoders/kind
Package kind includes a type for convenient handling of event kinds, and a kind database with reverse lookup for human-readable information about event kinds.
Package kind includes a type for convenient handling of event kinds, and a kind database with reverse lookup for human-readable information about event kinds.
nostr/encoders/tag
Package tag provides an implementation of a nostr tag list, an array of strings with a usually single letter first "key" field, including methods to compare, marshal/unmarshal and access elements with their proper semantics.
Package tag provides an implementation of a nostr tag list, an array of strings with a usually single letter first "key" field, including methods to compare, marshal/unmarshal and access elements with their proper semantics.
nostr/encoders/tag/atag
Package atag implements a special, optimized handling for keeping a tags (address) in a more memory efficient form while working with these tags.
Package atag implements a special, optimized handling for keeping a tags (address) in a more memory efficient form while working with these tags.
nostr/encoders/timestamp
Package timestamp is a set of helpers for working with timestamps including encoding and conversion to various integer forms, from time.Time and varints.
Package timestamp is a set of helpers for working with timestamps including encoding and conversion to various integer forms, from time.Time and varints.
nostr/encoders/varint
Package varint is a variable integer encoding that works in reverse compared to the stdlib binary Varint.
Package varint is a variable integer encoding that works in reverse compared to the stdlib binary Varint.
nostr/httpauth
Package httpauth provides helpers and encoders for nostr NIP-98 HTTP authentication header messages and a new JWT authentication message and delegation event kind 13004 that enables time limited expiring delegations of authentication (as with NIP-42 auth) for the HTTP API.
Package httpauth provides helpers and encoders for nostr NIP-98 HTTP authentication header messages and a new JWT authentication message and delegation event kind 13004 that enables time limited expiring delegations of authentication (as with NIP-42 auth) for the HTTP API.
nostr/interfaces/signer
Package signer defines server for management of signatures, used to abstract the signature algorithm from the usage.
Package signer defines server for management of signatures, used to abstract the signature algorithm from the usage.
nostr/interfaces/signer/p8k
Package p8k provides a signer.I implementation using the pure Go p256k1.mleku.dev library with BMI2-accelerated assembly on AMD64.
Package p8k provides a signer.I implementation using the pure Go p256k1.mleku.dev library with BMI2-accelerated assembly on AMD64.
nostr/negentropy
Package negentropy implements NIP-77 negentropy-based set reconciliation.
Package negentropy implements NIP-77 negentropy-based set reconciliation.
nostr/protocol/marmot
Package marmot implements the Marmot protocol (MLS-based E2E encrypted messaging) for Nostr.
Package marmot implements the Marmot protocol (MLS-based E2E encrypted messaging) for Nostr.
nostr/types
Package types provides fixed-size cryptographic types for Nostr.
Package types provides fixed-size cryptographic types for Nostr.
nostr/utils/normalize
Package normalize is a set of tools for cleaning up URL s and formatting nostr OK and CLOSED messages.
Package normalize is a set of tools for cleaning up URL s and formatting nostr OK and CLOSED messages.
nostr/utils/number
Package number implements a simple number list, used with relayinfo package for NIP support lists.
Package number implements a simple number list, used with relayinfo package for NIP support lists.
nostr/utils/units
Package units is a convenient set of names designating data sizes in bytes using common ISO names (base 10).
Package units is a convenient set of names designating data sizes in bytes using common ISO names (base 10).
p256k1
Package p256k1 provides a pure Go implementation of the secp256k1 elliptic curve cryptographic operations, including ECDSA signatures, Schnorr signatures (BIP-340), and Elliptic Curve Diffie-Hellman (ECDH) key exchange.
Package p256k1 provides a pure Go implementation of the secp256k1 elliptic curve cryptographic operations, including ECDSA signatures, Schnorr signatures (BIP-340), and Elliptic Curve Diffie-Hellman (ECDH) key exchange.
p256k1/avx
Package avx provides AVX2-accelerated secp256k1 operations using 128-bit limbs.
Package avx provides AVX2-accelerated secp256k1 operations using 128-bit limbs.
p256k1/ecdsa
Package ecdsa provides ECDSA (Elliptic Curve Digital Signature Algorithm) operations on the secp256k1 curve.
Package ecdsa provides ECDSA (Elliptic Curve Digital Signature Algorithm) operations on the secp256k1 curve.
p256k1/exchange
Package exchange provides Elliptic Curve Diffie-Hellman (ECDH) key exchange operations on the secp256k1 curve.
Package exchange provides Elliptic Curve Diffie-Hellman (ECDH) key exchange operations on the secp256k1 curve.
p256k1/keys
Package keys provides secp256k1 key management operations.
Package keys provides secp256k1 key management operations.
p256k1/schnorr
Package schnorr provides BIP-340 Schnorr signature operations on secp256k1.
Package schnorr provides BIP-340 Schnorr signature operations on secp256k1.
p256k1/wnaf
Package wnaf implements windowed Non-Adjacent Form (wNAF) encoding for 256-bit scalars.
Package wnaf implements windowed Non-Adjacent Form (wNAF) encoding for 256-bit scalars.
pid
Package pid provides a generic PID controller implementation with filtered derivative.
Package pid provides a generic PID controller implementation with filtered derivative.
proto/orlydb/v1
Package orlydbv1 provides type converters between proto messages and Go types.
Package orlydbv1 provides type converters between proto messages and Go types.
protocol/directory
Package directory implements the distributed directory consensus protocol as defined in NIP-XX for Nostr relay operators.
Package directory implements the distributed directory consensus protocol as defined in NIP-XX for Nostr relay operators.
protocol/directory-client
Package directory_client provides a client library for the Distributed Directory Consensus Protocol (NIP-XX).
Package directory_client provides a client library for the Distributed Directory Consensus Protocol (NIP-XX).
protocol/graph
Package graph implements NIP-XX Graph Query protocol support.
Package graph implements NIP-XX Graph Query protocol support.
ratelimit
Package ratelimit provides adaptive rate limiting using PID control.
Package ratelimit provides adaptive rate limiting using PID control.
relay
Package relay provides shared startup logic for running the ORLY relay.
Package relay provides shared startup logic for running the ORLY relay.
run
storage
Package storage provides storage management functionality including filesystem space detection, access tracking for events, and garbage collection based on access patterns.
Package storage provides storage management functionality including filesystem space detection, access tracking for events, and garbage collection based on access patterns.
sync
Package sync provides backward compatibility facade for sync services New code should import the specific subpackages directly:
Package sync provides backward compatibility facade for sync services New code should import the specific subpackages directly:
sync/cluster
Package cluster provides cluster replication with persistent state
Package cluster provides cluster replication with persistent state
sync/cluster/grpc
Package grpc provides a gRPC client for the cluster sync service.
Package grpc provides a gRPC client for the cluster sync service.
sync/cluster/server
Package server provides the gRPC server implementation for cluster sync.
Package server provides the gRPC server implementation for cluster sync.
sync/common
Package common provides shared utilities for sync services
Package common provides shared utilities for sync services
sync/distributed
Package distributed provides serial-based peer-to-peer synchronization
Package distributed provides serial-based peer-to-peer synchronization
sync/distributed/grpc
Package grpc provides a gRPC client for the distributed sync service.
Package grpc provides a gRPC client for the distributed sync service.
sync/distributed/server
Package server provides the gRPC server implementation for distributed sync.
Package server provides the gRPC server implementation for distributed sync.
sync/negentropy
Package negentropy provides NIP-77 negentropy-based set reconciliation for both relay-to-relay sync and client-facing WebSocket operations.
Package negentropy provides NIP-77 negentropy-based set reconciliation for both relay-to-relay sync and client-facing WebSocket operations.
sync/negentropy/grpc
Package grpc provides a gRPC client for the negentropy sync service.
Package grpc provides a gRPC client for the negentropy sync service.
sync/negentropy/server
Package server provides the gRPC server implementation for negentropy sync.
Package server provides the gRPC server implementation for negentropy sync.
sync/relaygroup
Package relaygroup provides relay group configuration management
Package relaygroup provides relay group configuration management
sync/relaygroup/grpc
Package grpc provides a gRPC client for the relay group service.
Package grpc provides a gRPC client for the relay group service.
sync/relaygroup/server
Package server provides the gRPC server implementation for relay group.
Package server provides the gRPC server implementation for relay group.
tor
Package tor provides Tor hidden service integration for the ORLY relay.
Package tor provides Tor hidden service integration for the ORLY relay.
transport
Package transport provides a manager for pluggable network transports.
Package transport provides a manager for pluggable network transports.
transport/tcp
Package tcp provides a plain HTTP transport for the relay.
Package tcp provides a plain HTTP transport for the relay.
transport/tls
Package tls provides a TLS/ACME transport for the relay.
Package tls provides a TLS/ACME transport for the relay.
transport/tor
Package tor provides a Tor hidden service transport for the relay.
Package tor provides a Tor hidden service transport for the relay.
utils/apputil
Package apputil provides utility functions for file and directory operations.
Package apputil provides utility functions for file and directory operations.
utils/atomic
Package atomic provides simple wrappers around numerics to enforce atomic access.
Package atomic provides simple wrappers around numerics to enforce atomic access.
utils/atomic/internal/gen-atomicint command
gen-atomicint generates an atomic wrapper around an integer type.
gen-atomicint generates an atomic wrapper around an integer type.
utils/atomic/internal/gen-atomicwrapper command
gen-atomicwrapper generates wrapper types around other atomic types.
gen-atomicwrapper generates wrapper types around other atomic types.
utils/interrupt
Package interrupt is a library for providing handling for Ctrl-C/Interrupt handling and triggering callbacks for such things as closing files, flushing buffers, and other elements of graceful shutdowns.
Package interrupt is a library for providing handling for Ctrl-C/Interrupt handling and triggering callbacks for such things as closing files, flushing buffers, and other elements of graceful shutdowns.
utils/qu
Package qu is a library for making handling signal (chan struct{}) channels simpler, as well as monitoring the state of the signal channels in an application.
Package qu is a library for making handling signal (chan struct{}) channels simpler, as well as monitoring the state of the signal channels in an application.
wasmdb
Package wasmdb provides a WebAssembly-compatible database implementation using IndexedDB as the storage backend.
Package wasmdb provides a WebAssembly-compatible database implementation using IndexedDB as the storage backend.
wireguard
Package wireguard provides an embedded WireGuard VPN server for secure NIP-46 bunker access.
Package wireguard provides an embedded WireGuard VPN server for secure NIP-46 bunker access.
tests
negentropy/event-generator command
event-generator generates properly signed Nostr events for negentropy testing.
event-generator generates properly signed Nostr events for negentropy testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL