dup-tools-wasm
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i dup-tools-wasm

Weekly Downloads

0

Version

0.3.1

License

AGPL-3.0

Unpacked Size

589 kB

Total Files

7

Last publish

Collaborators

  • librelois