Conversation
rolznz
commented
Mar 20, 2025
rolznz
commented
Mar 20, 2025
rolznz
commented
Mar 20, 2025
rolznz
commented
Mar 20, 2025
rolznz
commented
Mar 20, 2025
rolznz
commented
Mar 20, 2025
bumi
reviewed
Mar 25, 2025
This was referenced Apr 1, 2025
…lling, fix exports
bumi
approved these changes
Apr 6, 2025
| import { nwc } from "@getalby/sdk"; | ||
| const nwcClient = new nwc.NWCClient({ | ||
| nostrWalletConnectUrl: loadNWCUrl(), | ||
| }); // loadNWCUrl is some function to get the NWC URL from some (encrypted) storage |
Contributor
There was a problem hiding this comment.
we should sync the naming here.
connection URI vs. credentials vs. secret, ... 🙈
This example shows how to receive a payment and split it to other recipients
Contributor
|
maybe some more Money inspiration: https://www.npmjs.com/package/ts-money (not for here as a dependency though) |
rolznz
commented
Apr 6, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Add another ln client example
Co-authored-by: Michael Bumann <hello@michaelbumann.com>
rolznz
commented
Apr 7, 2025
* feat: allow comment and payerdata in LNClient pay method * fix: apply transaction metadata to all related transaction method types * chore: update example and lnclient docs to pay ln address with extra metadata
* docs: add some comments to the examples * docs: comments * feat: add lnclient receive timeout for ReceiveInvoice class (#357) * chore: remove unnecessary comment * chore: remove unnecessary comment --------- Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>
rolznz
commented
Apr 9, 2025
| * @param args additional options, e.g. to set a description on the payment request, or store metadata for the received payment | ||
| * @returns the invoice to be paid, along with methods to easily listen for a payment and act upon it. | ||
| */ | ||
| async receive( |
Contributor
Author
There was a problem hiding this comment.
I wonder if the name receive is misleading since it actually returns an invoice which could be paid. But I can't think of a better name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #343 and #342
This PR adds a simpler way for new developers to interact with a lightning wallet. You only need a couple lines to do cool stuff. Unlike the
NWCClient, theLNClientuses satoshi values (is this confusing?)Alby JS SDK is now dependent on the lightning tools package. (Pros: devs don't need to install both and could have some of the functions easily available here)
Most of the README is now moved into separate readme files (see docs)
Separate components (NWC, WebLN, LNClient, OAuth) are now in separate folders. This is an update to 5.0.0 as some of the imports are breaking changes.
OAuth examples are now moved into a subfolder.
I haven't proxied all the methods yet, I wonder if it's better to just make the internal nwcClient publicly accesible (as it is now)
TODOs: