🗼Alby NWC Relay

Use the Alby NWC Relay for your NWC wallet service

NWC is an open protocol to let your users connect their wallets to third-party applications and enjoy in-app payments. Dozens of apps and wallets support NWC already. Join the community.

What are NWC Wallet services?

To enable your bitcoin lightning wallet to be connected via the NWC protocol, you need to build an NWC wallet service, which takes care of:

  1. Accessing the wallet for transactions and wallet information

  2. Creating NWC URIs to initiate the connection between apps and your wallet

  3. Sending and receiving NWC messages to facilitate lightning capabilities in connected apps

Watch these videos to see how much NWC improves the payment experience for users.

Why do I need an NWC relay?

NWC uses Nostr's relay technology to send and receive the mentioned NWC requests. As defined by the NWC specification a wallet service needs to issue NWC URIs containing the relay.

NWC does not specify any requirements on the type of a Nostr-compatible relay. However, it is recommended to use a dedicated relay. Doing so prevents metadata leaks and ensures reliability.

That's why Alby is offering a professionally operated relay specialized on NWC events.

How can I get started?

Interested wallet application aspiring to build a robust NWC wallet service can access the relay at: wss://relay.getalby.com/v1.

There is no authentication needed. We want you to focus on building instead of dealing with administrative topics.

There are two options to start sending and receiving events:

  1. Use the NWC HTTP API to communicate events via HTTP instead of dealing with websockets.

  2. Connect yourself to wss://relay.getalby.com/v1

Benefits of Using Alby's NWC Relay

Our relay infrastructure offers several key advantages:

  • Scalable Architecture - Built with horizontal scaling using RabbitMQ and Kubernetes to handle growing demand seamlessly.

  • Enhanced Delivery Guarantees - Persisted ephemeral events until consumed, providing better guarantees for NWC event delivery compared to standard relays.

Technical Requirements

To ensure optimal performance and prevent abuse, our relay has the following requirements for Nostr query filters:

  • Author or Tag Required - Queries must include either an author field, a #p tag, or an #e tag (tagged event) in the filter

  • Limited Filter Count - The number of filters per query is restricted to a reasonable amount.

  • Limited Kind Count - The number of kinds within filters is also limited.

These restrictions help maintain relay performance and prevent overly broad queries. If your queries are being rejected, please ensure they meet these requirements.

Rate Limiting and Service Guidelines

Important: Public unauthorized requests to our main relay are subject to rate limiting to avoid abuse. If you encounter rate limiting errors, please confirm your client code doesn't have any errors that cause it to incorrectly send events too frequently to the relay. We reserve the right to change these limits at any time if needed to better protect the service for all users and prevent disruptions and abuse.

For Partners: Wallet service providers who want to use our relay infrastructure for their dedicated services should reach out and ask us to set up a dedicated relay service . This ensures you avoid being rate limited on the open public relay address, both currently and in case we need to increase restrictions on limits in the future.

In case of any questions, feel free to contact us.

Last updated

Was this helpful?