Closed yzernik closed 2 years ago
Yes you can, I even used it myself! See https://github.com/Kixunil/loptos/blob/4390bb008bbd67b4428bbd46b6fe11dc109c4489/src/main.rs#L348-L367
Thanks. I'll try to get a basic example working locally, and open a PR to add it here: https://github.com/Kixunil/tonic_lnd/tree/master/examples
Hi, I am using tonic_lnd too but I can't make SubscribeInvoices
work correctly with my code.
I created this subscribe::invoice call which works perfectly, the problem is that this functions needs to run two .await
s, so I made it async as you can see it here:
https://github.com/grunch/cacri/blob/main/src/lightning/subscribe.rs#L12-L18
Then when I tried to call this function on main()
and it doesn't work, so I called when the user make a POST /invoice
https://github.com/grunch/cacri/blob/main/src/routes.rs#L91
And it works but it stops the function there and never go to insert the record on database, I am a newbie on rust as you can tell, how can I run SubscribeInvoices
when the program starts and in parallel?
BTW I did a PR with the example
I don't have much time to look into it deeply right now but I think you want to call tokio::spawn(invoice(&mut client));
(no await
).
I don't have much time to look into it deeply right now but I think you want to call
tokio::spawn(invoice(&mut client));
(noawait
).
thanks I'll try that
Does anyone have a working example of streaming SendPayment
?
Can I use the streaming gRPC methods? It would be nice to have an example, something like
SubscribeInvoices
.