Tools for DUP Protocol.

Usage no npm install needed!

<script type="module">
  import dupToolsWasm from 'https://cdn.skypack.dev/dup-tools-wasm';


DUP Tools

A 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.

Project state

npm version pipeline status coverage report

📝 Usage

Full usage example with online demo

⚡ Quick start guide

  1. install npm

  2. Create an empty folder for your project, and open a terminal in it.

  3. To install dup-tools-wasm run

    npm install dup-tools-wasm
  4. create a js file myFirstExperiment.js with the following code :

    import * as dup from "dup-tools-wasm";
    const keypair = dup.generate_ed25519_keypair("salt", "password");


  5. Fork for in browser use case :

    create an html file index.html with the following code :

    <meta charset="utf-8"/>
    <h1>See your console result (F12 by default)</h1>
    <script module src="myFirstExperiment.js"></script>
  6. Fork for node.js use case :

End WiP


🔮 Prerequisites

You need wasm-pack and it prerequisites (Rust and npm)

🛠️ Build with wasm-pack build

wasm-pack build

🔬 Test in Headless Browsers with wasm-pack test

wasm-pack test --headless --firefox
wasm-pack test --headless --chrome
wasm-pack test --headless --safari

🎁 Publish new release to NPM

Before publish, build in release mode without default features :

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) :

wasm-pack publish