-
Notifications
You must be signed in to change notification settings - Fork 31
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
How to read balance and transactions through NWC? #182
Comments
Hi Alex, You have ticked the "Read balance" permission so third-party apps can use that connection string to read the balance. Are you developing an app that supports NWC? you could have a look at the Alby JS SDK as it makes it really easy to integrate NWC into a web application. transaction history is coming soon - we're actually working on that right now. |
Hi Roland, Unfortunately I can not use Alby JS SDK because I would like to read the balance from mobile app and I'm not sure how to make an HTTP call to get the balance using the NWC pairing secret. I can open the NWC link in the app and do zaps afterwards (they are working). Can you give me some examples or point me in the right direction in the documentation on how to read the balance without SDK? It's awesome that you are working on transactions. Do you plan to support pagination? Pagination using transaction timestamps with |
Hi @AleksandarIlic we are working on a possible HTTP service with an API that you can use for NWC which might be useful to you. It's not ready yet however. I will let you know when we have updates. What programming language do you use for your mobile app? are websockets difficult to implement there, or would you benefit from a Nostr Wallet Connect SDK in that language?
Yes, the NWC extension for listing transactions (invoices and payments) will support pagination. You can see the planned API here: nostr-protocol/nips#685 We are currently implementing it in this repository and reviewing whether or not the API has everything needed (e.g. to add a NWC connector to the Alby browser extension) - we'll probably request some changes.
If you already have zaps and NWC working, it should be easy to add support for getting the balance. The API is also listed in this PR: nostr-protocol/nips#685 Please let me know if you need any more help. |
Hey there,
How to read the balance once a 3rd-party app gets authorised through NWC pairing secret? How to achieve this?
This is what I see when I do Alby NWC, but I'm not sure how to read the balance.
What about reading transactions history through NWC? Could this be possible?
Thanks,
Alex
The text was updated successfully, but these errors were encountered: