0.3.1 • Published 4 years ago

dup-tools-wasm v0.3.1

Weekly downloads
3
License
AGPL-3.0
Repository
-
Last release
4 years ago

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");
    console.log(keypair);

    WiP

  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

Contribute

🔮 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
0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago