ergo-lib-wasm 0.20.1

WASM bindings for ergo-lib

Latest Version Documentation

WebAssembly library with JS/TS bindings for sigma-rust.


Alpha version

On CI build (job JS tests) an alpha build of npm packages is published. The version of the alpha build is comprised of the next minor version with git commit hash suffix (i.e if the current version is 0.12.0 then alpha build will be 0.13.0-alpha-[COMMIT]) and published with alpha tag. See JS tests CI job output for details.



When I build the ergo-lib-wasm and include the pkg folder as dependency in my app I get "TypeError: TextDecoder is not a constructor".

Make sure webpack plugins TextDecoder and TextEncoder are enabled. Check the following lines in webpack config:

new webpack.ProvidePlugin({
      TextDecoder: ['text-encoder', 'TextDecoder'],
      TextEncoder: ['text-encoder', 'TextEncoder']

Using with create-react-app

CRA does not support WASM. But you can workaround it. You need to override webpack config. Check out -