-
Couldn't load subscription status.
- Fork 30
feat: add NWC Wallet Service #346
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that looks like a nice and helpful wrapper!
do I read it correct that for each user/wallet I would need to call the subscribe function?
| relay: Relay; | ||
| relayUrl: string; | ||
|
|
||
| constructor(options: NewNWCWalletServiceOptions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does the wallet service not also have the keypair?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do I read it correct that for each user/wallet I would need to call the subscribe function?
Yes, this is the reason. So that each connection can have unique keypairs, like we do in Alby Hub now
…hared types out of NWCClient
|
Merging for now and will add documentation in a follow-up PR to not cause conflicts with #344 |
This makes it much easier for wallets to add support for NWC, by not having to implement the lower-level NWC spec such as encrypting/decrypting and publishing events, subscribing to the relay etc.
TODOs: