WebAssembly library with Javascript bindings to the new chain libraries.
This library can be used to do things like: create addresses, transactions and certificates, an encode them to be able to post to a node. It can also be used to parse the data fetched from a node (such as blocks). A possible use-case is for building explorers and wallets in javascript, either in the browser or in nodejs, making possible to build engaging blockchain apps with good user interfaces with the same low level primitives already used in the rust node.
npm i --save js-chain-libs
Make sure to update the submodule:
git submodule init
git submodule updateBuild with:
wasm-pack buildCreating an npm module:
wasm-pack packCheck the wallet example to see how to use this bindings in electron
Check the example faucet to see how to use this bindings in node.
Run the tests with
wasm-pack test --headless --chromeBundle javascript tests to run in browser
npm run serveGo to http://127.0.0.1:8080/ to see the results.
Run npm run doc on this repository to generate the jsdoc documentation from the build,the actual files are generated in the docs directory.