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

feat: add webln.request #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rolznz
Copy link

@rolznz rolznz commented Jan 17, 2023

This PR adds some extra type definitions for further functionality exposed by the Alby extension, most importantly the new webln.request method.

The arguments and return types for this method are not typed yet, but I will aim to do this to improve the developer experience of using WebLN.

@wbobeirne
Copy link
Member

Hey @rolznz, can you provide any further details about how webln.request is expected to work from an implementation standpoint, and from a UX standpoint? I'd be hesitant to give sites arbitrary access to underlying node RPC methods, where they won't have any guarantee of implementation, expected input, expected output, version of the implementation etc. Especially since some of these could be used in a destructive or malicious way.

From a UX and DX perspective, WebLN should smooth out the rough edges of various implementations, giving you structured methods to get things done. I think if any of these request methods are especially useful, it should just be a full fledged method.

I do like the concept of enhancing getInfo to indicate what is supported though. That would definitely solve the problem of not all WebLN implementations supporting all methods.

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