Tools for DUP Protocol.
npm install dup-tools-wasmA tools box lib for DUP (Dividend Universal Protocol) in WebAssembly (WASM).
- Rust reliability
- WebAssembly performances
- JavaScript wide usability
You can use DUP tools directly in modern browsers or server side with node.js.



Full usage example with online demo
1. install npm
2. Create an empty folder for your project, and open a terminal in it.
3. To install dup-tools-wasm run
``bash`
npm install dup-tools-wasm
4. create a js file myFirstExperiment.js with the following code :
`javascript
import * as dup from "dup-tools-wasm";
const keypair = dup.generate_ed25519_keypair("salt", "password");
console.log(keypair);
`
>>> WiP
5. !Fork for in browser use case :
create an html file index.html with the following code :
`html`
See your console result (F12 by default)
6. !Fork for node.js use case :
>>> End WiP
You need wasm-pack and it prerequisites (Rust and npm)
`bash`
wasm-pack build
`bash`
wasm-pack test --headless --firefox
wasm-pack test --headless --chrome
wasm-pack test --headless --safari
Before publish, build in release mode without default features :
`bash`
wasm-pack build --release -- --no-default-features
You need npm token, if you don't have, get it with npm login command.
Then publish ( help) :
`bash``
wasm-pack publish