Client-Side Environments
Using Webmavryk in Client-Side Environments
While Webmavryk works best in Node runtime applications, some of our users working in client-side development might not have access to such features. To accommodate for that, we have decided to provide separate pure JavaScript bundles that you can import into your client-side environment.
Currently, the available bundles are @mavrykdynamics/webmavryk-local-forging and @mavrykdynamics/webmavryk-mavlet-wallet packages.
The bundle wraps functions from the @mavrykdynamics/webmavryk-local-forging package into a single variable called webmavryk_local_forging, and from the @mavrykdynamics/webmavryk-mavlet-wallet package into a single variable called webmavryk_mavet_wallet.
Instructions for Using the Bundle
To use the JavaScript bundle for your project, download the zip file under Assets from your preferred Webmavryk release.
After that, simply copy the .js file and the .map.js file into your project.
Example of how to use the LocalForger class in a simple HTML script tag:
<script type="text/javascript" src="/path/to/webmavryk_local_forging.js"></script><script type="text/javascript">let op = {...}let forger = new webmavryk_local_forging.LocalForger();let res = forger.forge(op);</script>
Example of how to use the MavletWallet class in a simple HTML script tag:
<script type="text/javascript" src="/path/to/webmavryk_mavlet_wallet.js"></script><script type="text/javascript">let op = {...}let wallet = new webmavryk_mavlet_wallet.MavletWallet();</script>