Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Nostr Client Bundle Laravel Package

decent-newsroom/nostr-client-bundle

View on GitHub
Deep Wiki
Context7

Nostr Client Bundle

Reusable Symfony integration wrapping innis/nostr-client, an AMPHP-based async WebSocket client for the Nostr protocol.

The bundle wires the vendor library's static factory into DI-managed services so the host application can inject a ready-to-use relay client instead of constructing it by hand:

  • Innis\Nostr\Client\Application\Port\NostrClientInterface — connect, subscribe, publish, health-check against one or more relays.
  • Innis\Nostr\Client\Domain\Service\RelayHealthCheckerInterface — standalone relay health checks without an active connection.
  • Innis\Nostr\Client\Domain\ValueObject\ConnectionConfig — the default connection configuration derived from bundle config.
  • DecentNewsroom\NostrClientBundle\Contract\NostrClientFactoryInterface — a stable, bundle-owned seam for creating clients/health-checkers, so call sites don't depend on the vendor factory directly.

Documentation

Configuration

# config/packages/nostr_client.yaml
nostr_client:
    connection_timeout_seconds: 10
    auto_reconnect: true
    reconnect_initial_delay_ms: 500
    reconnect_max_delay_ms: 60000
    reconnect_max_attempts: 0
    user_agent: null

Usage

use Innis\Nostr\Client\Application\Port\NostrClientInterface;
use Innis\Nostr\Core\Domain\Entity\Filter;
use Innis\Nostr\Core\Domain\ValueObject\Protocol\RelayUrl;

final class ExampleService
{
    public function __construct(private readonly NostrClientInterface $client) {}

    public function fetchRecent(string $relayUrl): void
    {
        $relay = RelayUrl::fromString($relayUrl);
        $this->client->connect($relay);
        // ...subscribe/publish as needed, see innis/nostr-client README.
        $this->client->close();
    }
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator