Skip to content
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

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

im-adithya
Copy link
Member

@im-adithya im-adithya commented Jul 10, 2024

Closes #228

@im-adithya im-adithya requested a review from rolznz July 10, 2024 06:24
@rolznz
Copy link
Contributor

rolznz commented Jul 10, 2024

@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

README.md Outdated Show resolved Hide resolved
@im-adithya
Copy link
Member Author

this change removes the WebLN provider stuff

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
Copy link
Contributor

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.
Copy link
Contributor

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.

@rolznz
Copy link
Contributor

rolznz commented Jul 10, 2024

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.

@rolznz rolznz marked this pull request as draft September 1, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update README with NWCClient examples
2 participants