0.1.30 • Published 3 years ago
iota-walletgen-l4rot v0.1.30
IOTA WEB EXTENSION PoC -> WASM Tests
Prereq:
- install rust
- install wasm-pack with:
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
Building
- compile the rust code to the wasm web target with:
wasm-pack build --target web
Usage
- The building process should have created a
pkg
folder with a.wasm
file and somejs/ts wrappers
- To start using your wasm functions in vanilla JS you need to first initialize the function in a module script:
<script type="module">
// init and export wasm functions
import init, {create_mnemonic} from './pkg/walletgen.js';
await init();
window.create_mnemonic = create_mnemonic;
</script>
In this example init we imported the create_mnemonic
function from walletgen.js
and exported it for further use with window.create_mnemonic
It is also possible to include the
pkg
file with a localnpm install
: https://rustwasm.github.io/wasm-pack/book/tutorials/npm-browser-packages/using-your-library.htmlRun a local server and start using the premade
Mnemonic Generation
example
npm i @iota/wallet
0.1.30
3 years ago
0.1.10
3 years ago
0.1.11
3 years ago
0.1.12
3 years ago
0.1.13
3 years ago
0.1.14
3 years ago
0.1.15
3 years ago
0.1.27
3 years ago
0.1.28
3 years ago
0.1.29
3 years ago
0.1.20
3 years ago
0.1.21
3 years ago
0.1.22
3 years ago
0.1.23
3 years ago
0.1.24
3 years ago
0.1.25
3 years ago
0.1.26
3 years ago
0.1.16
3 years ago
0.1.8
3 years ago
0.1.17
3 years ago
0.1.7
3 years ago
0.1.18
3 years ago
0.1.19
3 years ago
0.1.9
3 years ago
0.1.4
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago