-
Notifications
You must be signed in to change notification settings - Fork 62
Proposal: Add a trait wrapping http calls to hook out in the wasm world #101
Comments
Motivation: There is a Rust crate https://github.com/lightningdevkit/rust-lightning/tree/main/lightning-transaction-sync that makes using LDK much easier as it handles a lot of tricky edge cases. However, it depends upon an HTTP client as it uses Esplora/Electrum. LDK also has extensive language bindings to support other languages but currently this create is not available to languages such as TypeScript/JavaScript in the browser as HTTP is not supported in WASM. Additionally, other environments such as iOS or Android, an LDK user might wish to use the HTTP client available by the platform instead of taking on an extra dependency with a Rust HTTP client. |
Hi @moneyball. Sorry for the delay, I have been letting Github notifications pile up this week. RIght now we have the Transport trait which is close to what you're looking for. If somebody were to write a |
Largely, yes, but it would be substantially easier ecosystem-wide for the hook to be at the HTTP level rather than the request level. That would mean we can reuse it for bitcoind-REST, Electrum, Esplora, etc all in one trait. |
Can you describe this trait? I don't understand what HTTP other than a series of requests. |
The only difference would be the |
Ah, I understand! Concept ACK. Not sure when I'll be able to work on it myself. |
This would abstract users from a specific implementation so they could hook their own if required (eg WASM) or desired (eg use native HTTP client that comes with an OS/environment).
The text was updated successfully, but these errors were encountered: