You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I arrived in this repo by doing a deep dive starting from the BitcoinDevKit. I am writing a library called bdk-wasm enabling usage of BDK in the browser and Node by compiling it to WASM and creating TypeScript bindings.
I was surprised when I saw that BDK, when using the bitcoind_rpc feature, compiles to WASM just fine and can be executed. It sadly fails in the browser and Node with the following error:
JsonRpc(Transport(SocketError(Error { kind: Unsupported, message: \"operation not supported on this platform\" })))
The Bitcoin node exposes over HTTP and we can successfully query Esplora from the browser and Node using esplora_client. This package uses reqwest under the hood that has a target "wasm32-unknown-unknown". Meaning that I think this package could work easily within browser and Node when compiled to WASM.
Proposal
Add a feature or target mechanism that uses reqwest, adding support for Browser and Node environments.
Let me know if you think this won't work or if it's a bad idea. I'm happy to implement the changes myself.
The text was updated successfully, but these errors were encountered:
We've considered reqwest and passed on it because it has a very large dependency tree and doesn't match our MSRV policy (although it looks like right now we have the same MSRV).
We've also struggled to get anybody to maintain this crate -- nobody likes working on HTTP. It's a crufty mess of an overloaded protocol and an eternal source of mysterious "this happens to me on Mac OS 10.3 on Tuesdays when the microwave was on for more than 90 seconds, the error message is sockaddr had invalid syn packet metaflorp bitflags" type bugs.
So is WASM for that matter, and WASM has the additional problem that the tooling is unstable and impossible to pin or even to run in a sealed environment.
I'll leave this issue open since, in general, we would like to support WASM, and we're often willing to support popular crates like reqwest (at least, behind a default-off feature gate) that will work in our CI. But I personally am not willing to do the work to maintain this right now.
Hahaha understandable. Let's keep this open and see as it's true that we shouldn't expect someone to maintain this if there is no strong demand for it.
Hi everyone,
I arrived in this repo by doing a deep dive starting from the BitcoinDevKit. I am writing a library called
bdk-wasm
enabling usage of BDK in the browser and Node by compiling it to WASM and creating TypeScript bindings.I was surprised when I saw that BDK, when using the
bitcoind_rpc
feature, compiles to WASM just fine and can be executed. It sadly fails in the browser and Node with the following error:The Bitcoin node exposes over HTTP and we can successfully query
Esplora
from the browser and Node usingesplora_client
. This package usesreqwest
under the hood that has a target"wasm32-unknown-unknown"
. Meaning that I think this package could work easily within browser and Node when compiled to WASM.Proposal
Add a
feature
ortarget
mechanism that usesreqwest
, adding support for Browser and Node environments.Let me know if you think this won't work or if it's a bad idea. I'm happy to implement the changes myself.
The text was updated successfully, but these errors were encountered: