37 releases (24 breaking)

0.27.1 Dec 2, 2023
0.26.0 Oct 13, 2023
0.25.0 Oct 9, 2023
0.24.0 May 12, 2023
0.4.1 Nov 19, 2020

#2735 in Magic Beans

Download history 1/week @ 2024-02-14 14/week @ 2024-02-21 4/week @ 2024-02-28 1/week @ 2024-03-06 3/week @ 2024-03-13 85/week @ 2024-03-27 80/week @ 2024-04-03

168 downloads per month
Used in ergo-headless-dapp-framew…

CC0 license

550KB
11K SLoC

Latest Version Documentation

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

Packages(npm):

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.

Test

Troubleshooting

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']
    })

https://github.com/ergoplatform/sigma-rust/blob/develop/bindings/ergo-lib-wasm/webpack.config.js#L16

Using with create-react-app

CRA does not support WASM. But you can workaround it. You need to override webpack config. Check out - https://stackoverflow.com/questions/59319775/how-to-use-webassembly-wasm-with-create-react-app/59720645#59720645

Dependencies

~22–39MB
~641K SLoC