-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add README for nwc client #230
base: master
Are you sure you want to change the base?
Conversation
@im-adithya this change removes the WebLN provider stuff, which I am not sure is what we want. What I meant is to add a bit of extra documentation on how to use the NWCClient directly CC @bumi |
This PR only adds NWCClient documentation (and pushes WebLN provider to the bottom) can you check the diffs again? |
|
||
The Alby JS SDK allows you to easily integrate Nostr Wallet Connect into any JavaScript based application. | ||
|
||
### NWCClient | ||
|
||
### Options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the headers, they should not all be ###
const response = await nwc.payInvoice({ invoice }); | ||
``` | ||
|
||
That's it! Unlike WebLN, you don't even have to enable to connect to the relay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think people reading this understand this? and this is not the reason to use or not use WebLN.
When does the user want to use WebLN vs the NWCClient directly, and do they know why? and then we should plan how we can easily communicate that to the user and structure the README For example, if you're building an app that already uses webln integrated, it makes more sense to use the NostrWebLNClient (Or Bitcoin Connect?) Alternatively, if you only support NWC (e.g. something like ZapPlanner where you have async payments on your backend) maybe it makes sense to use the NWCClient directly. |
Closes #228