Skip to content

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

@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?


### 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
@rolznz
Copy link
Contributor

rolznz commented Apr 1, 2025

Closing in favor of #344 which splits up the documentation

@rolznz rolznz closed this Apr 1, 2025
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