NWC JS SDK
Last updated
Was this helpful?
Last updated
Was this helpful?
The Alby JS SDK allows you to quickly integrate NWC into any JavaScript based application.
The NostrWebLNProvider
exposes the interface to execute lightning wallet functionality through NWC, such as sending payments, making invoices and getting the node balance.
providerName
: name of the provider to load the default options. currently alby
(default)
nostrWalletConnectUrl
: full Nostr Wallet Connect URL as defined by the
relayUrl
: URL of the Nostr relay to be used (e.g. wss://nostr-relay.getalby.com)
walletPubkey
: pubkey of the Nostr Wallet Connect app
secret
: secret key to sign the request event (if not available window.nostr will be used)
authorizationUrl
: URL to the NWC interface for the user to and the app connection
Example NWC URL
Note: A lightning address that clients can use to automatically setup the lud16
field on the user's profile if they have none configured is optional
If you wish your users to create a brand new NWC connection for using your service, you can launch a NWC modal where your user can confirm the connection:
See more functions in the NWC JS SDK .
See more examples in the NWC JS SDK .