{"_id":"@cuonglv0297/mithril-client-wasm","name":"@cuonglv0297/mithril-client-wasm","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.1":{"name":"@cuonglv0297/mithril-client-wasm","collaborators":["dev@iohk.io","mithril-dev@iohk.io"],"description":"Mithril client WASM","version":"0.3.1","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/input-output-hk/mithril.git"},"main":"index.js","homepage":"https://mithril.network","types":"index.d.ts","gitHead":"ab9478d639b8757c0db7499c83d287dc88584bbc","bugs":{"url":"https://github.com/input-output-hk/mithril/issues"},"_id":"@cuonglv0297/mithril-client-wasm@0.3.1","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-n61q2EFYL5ORGnW4NFeg2hiHdeLwZns5Ot41/ED+VlLs/mIq206/7v8iXdjgwvQCP/ZZmsvfYF6czUz6li+rrw==","shasum":"1e40e4b6d686c1fae78aa7fd8a02ccd2d96a7167","tarball":"https://registry.npmjs.org/@cuonglv0297/mithril-client-wasm/-/mithril-client-wasm-0.3.1.tgz","fileCount":5,"unpackedSize":1577693,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLwWwAXmESV4vWKe7zlaO/JSnXGq6xAjJO9Ycx1qTEJAIhAOsEmv7IKEiFko79NmXzoKGQgNOkc4PLiBtTiDuRAFsz"}]},"_npmUser":{"name":"cuonglv0297","email":"levietcuong0297@gmail.com"},"directories":{},"maintainers":[{"name":"cuonglv0297","email":"levietcuong0297@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mithril-client-wasm_0.3.1_1715597808514_0.20207907442272388"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-13T10:56:48.385Z","0.3.1":"2024-05-13T10:56:48.740Z","modified":"2024-05-13T10:56:49.066Z"},"maintainers":[{"name":"cuonglv0297","email":"levietcuong0297@gmail.com"}],"description":"Mithril client WASM","homepage":"https://mithril.network","repository":{"type":"git","url":"git+https://github.com/input-output-hk/mithril.git"},"bugs":{"url":"https://github.com/input-output-hk/mithril/issues"},"license":"Apache-2.0","readme":"# Mithril-client-wasm ![cnpm](https://img.shields.io/npm/v/@mithril-dev/mithril-client-wasm.svg) [![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](LICENSE-APACHE) [![Discord](https://img.shields.io/discord/500028886025895936.svg?logo=discord&style=flat-square)](https://discord.gg/5kaErDKDRq)\n\n**This is a work in progress** 🛠 \n\n* `mithril-client-wasm` defines all the tooling necessary to manipulate Mithril certified types available from a Mithril aggregator from a WASM compatible browser.\n\n* The different types of available data certified by Mithril are:\n    * Snapshot: list and get.\n    * Mithril stake distribution: list and get.\n    * Cardano transactions: list & get snapshots, get proofs\n    * Certificate: list, get, and chain validation.\n\n## Installation\n- Install a correctly configured Rust toolchain (latest stable version). You can follow the instructions provided [here](https://www.rust-lang.org/learn/get-started).\n\n- Install Rust WASM Pack:\n```bash\ncargo install wasm-pack\n```\n\n- Install **clang**:\n```bash\nsudo apt install clang\n```\n\n- Install `nodejs` version `16.15+`\n```bash\nsudo apt install nodejs\n```\n\n- Install `npm` version `8.11+`\n```bash\nsudo apt install npm\n```\n\n> [!WARNING]\n> If you have troubles building the `BLST` library, you will need to:\n> - Install [`Emscripten`](https://emscripten.org/docs/getting_started/downloads.html)\n> - For macOS users, consider reading this [guide](https://github.com/emscripten-core/emscripten/issues/5696) to activate the `emcc` command\n> - Use these environment variables to use this compiler (or prefix all following commands with them):\n> ```bash\n> export CC=emcc\n> export AR=emar\n> ```\n\n## Build Mithril client library in WASM\n\nGo to the `mithril-client-wasm` directory:\n```bash\ncd mithril-client-wasm\n```\n\nThen you can build the WASM library:\n```bash\nmake build\n```\n\n## Run the Mithril client library in the browser\n\nYou will need to run the Mithril client library in a compatible browser:\n\n| Browser | Minimum version | Released | Tested in CI |\n| --- |:---:|:---:|:---:|\n| **Chrome** | `54` | 2016-10-12 | :heavy_check_mark: |\n| **Edge** | `79` | 2020-01-15 | - |\n| **Firefox** | `38` | 2015-05-12 | :heavy_check_mark: |\n| **Opera** | `41` | 2016-10-25 | - |\n| **Safari** | `15.4` | 2022-03-14 | - |\n| **Chrome Android** | `54` | 2016-10-19 | - |\n| **Firefox for Android** | `38` | 2015-05-12 | - |\n| **Opera Android** | `41` | 2016-10-25 | - |\n| **Safari on iOS** | `15.4` | 2022-03-14 | - |\n\n\nGo to the `mithril-client-wasm` directory:\n```bash\ncd mithril-client-wasm\n```\n\nInstall the library:\n```bash\nmake www-install\n```\n\nThen you can serve the Mithril client library in the browser:\n```bash\nmake www-serve\n```\n\nFinally, open [http://localhost:8080](http://localhost:8080) with your browser. (port 8080 is the default port)","readmeFilename":"README.md"}