Closed
Description
At Breez, we are interested in supporting WASM in the Nodeless SDK. The SDK depends on boltz-rust
, which isn't compatible right now due to dependencies on:
ureq
to access Boltz APIelectrum-client
for accessing blockchain datatungstenite
for the WebSocket status streamsecp256k1-zkp
We’d like to discuss possible approaches to enable WASM support while keeping the existing functionality intact.
Potential solutions:
- Accessing Boltz API
- Solution can be as simple as switching to
reqwest
. It implements WASM support by simply mapping requests to the browser'sfetch
API. We could switch toreqwest
or allow the selection of the http client through features.
- Solution can be as simple as switching to
- Access to blockchain data
- This seems like the most challenging part. One option is for the crate to offload communication to the client. An alternative is to add esplora as a possible backend since it's based on http.
- Status stream
- There are several crates that could be used for websockets on WASM.
gloo-net
seems like a good option.
- There are several crates that could be used for websockets on WASM.
- secp256k1-zkp
Would love to hear your thoughts on these approaches to see if we can proceed with the corresponding contributions.
Metadata
Metadata
Assignees
Labels
No labels