🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

mithril-client-wasm

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mithril-client-wasm

Mithril client WASM

latest
Source
npmnpm
Version
0.3.5
Version published
Maintainers
0
Created
Source

Mithril-client-wasm cnpm License Discord

This is a work in progress đź› 

  • mithril-client-wasm defines all the tooling necessary to manipulate Mithril certified types available from a Mithril aggregator from a WASM compatible browser.

  • The different types of available data certified by Mithril are:

    • Snapshot: list and get.
    • Mithril stake distribution: list and get.
    • Cardano transactions: list & get snapshots, get proofs
    • Certificate: list, get, and chain validation.

Installation

  • Install a correctly configured Rust toolchain (latest stable version). You can follow the instructions provided here.

  • Install the WASM target:

rustup target add wasm32-unknown-unknown
  • Install Rust WASM Pack:
cargo install wasm-pack
  • Install clang:
sudo apt install clang
  • Install nodejs version 16.15+
sudo apt install nodejs
  • Install npm version 8.11+
sudo apt install npm

[!WARNING] If you have troubles building the BLST library, you will need to:

  • Install Emscripten
  • For macOS users, consider reading this guide to activate the emcc command
  • Use these environment variables to use this compiler (or prefix all following commands with them):
export CC=emcc
export AR=emar
  • Install the WASM emscripten target:
rustup target add wasm32-unknown-emscripten

Build Mithril client library in WASM

Go to the mithril-client-wasm directory:

cd mithril-client-wasm

Then you can build the WASM library:

make build

Run the Mithril client library in the browser

You will need to run the Mithril client library in a compatible browser:

BrowserMinimum versionReleasedTested in CI
Chrome542016-10-12:heavy_check_mark:
Edge792020-01-15-
Firefox382015-05-12:heavy_check_mark:
Opera412016-10-25-
Safari15.42022-03-14-
Chrome Android542016-10-19-
Firefox for Android382015-05-12-
Opera Android412016-10-25-
Safari on iOS15.42022-03-14-

Go to the mithril-client-wasm directory:

cd mithril-client-wasm

Install the library:

make www-install

Then you can serve the Mithril client library in the browser:

make www-serve

Finally, open http://localhost:8080 with your browser. (port 8080 is the default port)

FAQs

Package last updated on 25 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts