Is it possible to have a blocking instantiateSecp256k1?
madeken opened this issue · comments
I'm trying to use bitcoin-ts inside my (synchronous) library, but it's a bit clumsy to use due to the async nature of instantiateSecp256k1 and (AFACIT) will force my functions to also become async (or loading the library async). I'm not quite sure how the webassembly stuff works, but I'm wording if it's possible to have a blocking version?
Your functions do not have to be async, you'll just have to load it async.
Unfortunately, there doesn't appear to be a way to start up WASM binaries synchronously. As WebAssembly.instantiate will always return a promise.
Thought so! Thanks for the reply.