Skip to content

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