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 Php Laravel Package

swentel/nostr-php

A PHP library for building Nostr clients and tools, with support for keys, events, relays, filters, and NIP implementations. It offers a clean, object-oriented API for publishing notes, subscribing to relays, and handling cryptographic signing in Laravel or plain PHP projects.

Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on Nostr plumbing. Server-side Nostr requires Schnorr signatures over secp256k1, canonical event serialization and ID derivation (NIP-01), encrypted DMs (NIP-04/NIP-44), and relay websocket connection pooling with subscription/reconnect handling. This package absorbs that work for a Laravel backend. The buy case is strong: the alternative is weeks of cryptography-adjacent engineering that needs specialist review before it can touch production keys.
  • Feature: "Sign in with Nostr" / decentralized identity. An npub-based login or account-linking option (with NIP-05 handle verification) is a concrete, shippable auth path for crypto-native and censorship-sensitive user segments. This package lets you prototype it in days rather than scoping a protocol project.
  • Feature: content distribution as a channel, not a product. Cross-posting blog posts, changelog entries, or announcements to relays turns Nostr into a low-cost, algorithm-free distribution surface alongside RSS and social. Publish-side only — no feed UI, no moderation burden.
  • Roadmap sequencing decision. Whether Nostr becomes "a distribution integration," "an identity provider," or "a social surface" is a strategy call. This package is cheap enough to fund a one-sprint spike that produces real data (relay publish success rates, latency, engagement) before committing to any of the three.
  • Monetization exploration: Lightning zaps. A tipping/zap flow on creator content is testable without building wallet or Lightning infrastructure yourself; Nostr events carry the zap request/ receipt semantics.
  • Ingest and webhook use cases. Subscribing to relay events for brand mentions, community moderation queues, or event-driven automations — useful for creator-tools and community products.
  • Use cases where fit is strongest: creator/publishing tools, community platforms with crypto-native audiences, media provenance and attestation features, marketplaces needing portable reputation or listings, and any product with users who explicitly ask for censorship resistance or data portability.
  • Architecture decision it nudges you toward: isolate Nostr behind an internal adapter interface (NostrPublisher, NostrIdentity) rather than calling the library directly from controllers. That decision preserves the option to swap to a JS/Go/Rust implementation later at low cost.
  • Risk/vendor decision: 70 stars and effectively a single-maintainer project means this is a dependency to wrap and pin, not one to spread across the codebase. That should be an explicit engineering standard in the ticket, not a footnote.

When to Consider This Package

Adopt when:

  • Your backend is PHP/Laravel and Nostr work is server-side (signing, publishing, subscribing, verifying) rather than browser-side.
  • The scope is modest: a handful of relays, publish rates in the tens-to-hundreds per minute, and tolerance for a few seconds of latency.
  • You need a fast, low-commitment spike to answer a strategy question — "is there demand for this?" — and want real relay traffic instead of mockups.
  • You lack in-house cryptography and protocol expertise and would otherwise be hand-rolling signing code.
  • You're comfortable with MIT licensing and PHP 8.x version constraints, and you're willing to own a thin abstraction layer plus a fork-if-abandoned contingency.
  • Low blast radius: Nostr is a secondary channel or an optional feature flag, so an upstream bug is an inconvenience rather than an outage.

Look elsewhere when:

  • You need a long-lived relay connection daemon. PHP's request lifecycle is a poor host for persistent websockets; you'll want Swoole/RoadRunner/ReactPHP, or — better — a separate service in Node (nostr-tools), Go, or Rust, with your Laravel app talking to it over HTTP/queue.
  • Throughput or indexing is the core product. High-volume relay ingestion, full-text search over events, or a relay you operate yourself belongs with strfry/nostream, not a helper library.
  • NIP coverage is the risk. Verify the specific NIPs your roadmap needs are implemented and current before committing; a small library's NIP matrix lags the spec, and "not implemented" often surfaces mid-sprint.
  • Your Nostr surface is client-side. If signing happens in the user's browser or extension, nostr-tools (JS) is the right tool and this package adds nothing.
  • You require audited cryptography or formal compliance. Nostr key handling is custody of user identity; if you'll hold keys server-side, a helper library is not a security control, and you should plan for review regardless of which library you pick.
  • Maintainer concentration is unacceptable. If your org won't ship on a 70-star, one-maintainer dependency for a customer-facing feature, budget for a fork or wait.

How to Pitch It (Stakeholders)

To executives: This is a small, free (MIT), actively maintained PHP library that lets us test whether Nostr is a real distribution and identity channel for our product without a protocol project. It replaces what would otherwise be several weeks of specialized cryptography and networking work with an integration we can scope in a sprint. The cost is one engineer for roughly one sprint behind a feature flag, with a clear kill criterion: if relay publish success and engagement don't clear the bar, we delete the flag and keep the spike's findings. Downside is bounded and the learning is not — it also informs our broader "open protocol / data portability" positioning.

To engineering: The library covers the fiddly parts — event serialization and IDs, Schnorr signing, relay connections, key handling — so you're writing product code, not spec code. Two non-negotiables: wrap it behind our own interface so it never leaks into controllers, and pin the version, because a 70-star single-maintainer project is a dependency we contain, not one we trust implicitly. The likely end state for anything real-time is this library for signing and publishing plus a small worker for persistent relay subscriptions — plan the seam now so we don't rewrite later.

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.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk