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

fix: pass TLV value as hex from nwc webln provider to nwc client keysend #229

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

rolznz
Copy link
Contributor

@rolznz rolznz commented Jul 8, 2024

With WebLN keysend TLVs, the value is passed as plaintext:
https://www.webln.guide/building-lightning-apps/webln-reference/webln.keysend

In NIP-47 spec the value should be hex encoded:
https://github.com/nostr-protocol/nips/blob/master/47.md#pay_keysend

This PR fixes the NostrWeblnProvider to pass the TLV values hex-encoded instead of plaintext.

@im-adithya
Copy link
Member

We should also change the new NWC client example to pass hex encoded value to tlv_records here and here

@rolznz
Copy link
Contributor Author

rolznz commented Jul 9, 2024

@im-adithya good catch, thanks!

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/domelementtype@2.3.0 None 0 11.4 kB feedic

🚮 Removed packages: npm/css-tree@1.1.3, npm/domhandler@4.3.1, npm/is-callable@1.2.7, npm/is-string@1.0.7, npm/is-symbol@1.0.4, npm/regexp.prototype.flags@1.4.3

View full report↗︎

@rolznz rolznz enabled auto-merge (squash) July 10, 2024 06:34
@rolznz rolznz merged commit 1621456 into master Jul 10, 2024
3 checks passed
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.

2 participants