bitcoindevkit / rust-electrum-client

Bitcoin Electrum client library. Supports plaintext, TLS and Onion servers.
MIT License
78 stars 63 forks source link

Async support? #96

Open Kixunil opened 1 year ago

Kixunil commented 1 year ago

As a networking-related dependency, this would be a great candidate for making it async.

oleonardolima commented 11 months ago

As I mentioned at https://github.com/bitcoindevkit/bdk/issues/66 I guess it would also make it possible to add Tor support using arti-client.

Kixunil commented 11 months ago

@oleonardolima I think just make it possible to switch up any transport layer using a trait. Probably tokio::AsyncRead etc.

oleonardolima commented 11 months ago

Good, that makes sense. I'll try to take a look at it after adding the support on rust-esplora-client

Kixunil commented 11 months ago

@oleonardolima FYI I hand-wrote an async client with a few methods that were required for my project. I may be able to publish it as it may serve as a starting point.

oleonardolima commented 11 months ago

@Kixunil Cool! Thanks, that would be really helpful and a great starting point.

RCasatta commented 9 months ago

I just finished here thinking to trying to use arti_client with rust-electrum-client but noting that is async based while this is not.

Even some temporary hack like SyncIoBridge seems not easily applicable here, because the stream is not handled splitted (separated Read/Write)

Kixunil commented 9 months ago

@RCasatta yeah, IIRC that's why I ended up writing my own and as I did I found that the whole thing is quite involved.

@oleonardolima sorry to keep you waiting this long I will try soon.

oleonardolima commented 9 months ago

@Kixunil No worries, I'm still working on fedimint and rust-esplora-client tor support at the moment, but let me know when you do it.

Kixunil commented 9 months ago

It's out now: https://github.com/Kixunil/async-electrum-client

oleonardolima commented 8 months ago

update: I'll probably start working on this during this week, using the @Kixunil work as a starting point.

Do you have any other approach in mind @RCasatta ?

RCasatta commented 7 months ago

Do you have any other approach in mind @RCasatta ?

No

jurvis commented 5 months ago

@oleonardolima curious, are you still actively working on this?

oleonardolima commented 5 months ago

@jurvis I'm not currently working on this, other issues took priority, although it's still on my list. Is it a pressing issue/feature that you need?

jurvis commented 5 months ago

@oleonardolima not pressing, just asking! do you have a draft branch going somewhere?