Skip to content

ecioppettini/js-cardano-wasm

This branch is 6 commits behind input-output-hk/js-cardano-wasm:master.

Folders and files

NameName
Last commit message
Last commit date
Jan 30, 2020
Aug 5, 2019
Mar 9, 2019
Aug 19, 2019
Aug 7, 2019
Mar 6, 2018
Mar 6, 2019
Apr 24, 2018
Mar 12, 2018
Apr 24, 2018
Mar 1, 2018
Jul 3, 2018
Jan 16, 2019
Jan 28, 2019
Jan 22, 2019
Mar 12, 2018

Repository files navigation

cardano wasm binding for JavaScript

Installation

# install rustup
curl https://sh.rustup.rs -sSf | sh
# use nightly version
rustup install nightly-2018-06-05
rustup target add wasm32-unknown-unknown --toolchain nightly

Build the Library

To Compile the rust crypto to a Web Assembly (WASM) module and build JS library run the ./build script. (only necessary if you want to build locally)

Run the Example

There is a simple example application in js-example that can be run to test some of the features.

installation

within js-example/ folder

  1. npm install
  2. npm run install

Building

within js-example/ run npm run build

Running

open js-example/index.html in any browser

Use the Crypto Library

Install

You can either build the library locally on your machine to test the latest version with your project or install via NPM.

Install locally:

in the root of this repo: npm link in the root of your project: npm link rust-cardano-crypto

Install via NPM:

in the root of your project: npm install rust-cardano-crypto

Import the API in Your Code

// Import like this:
import CardanoCrypto from 'rust-cardano-crypto'
// Or access as global in browsers:
CardanoCrypto.PaperWallet.scramble(iv, password, input)

Notes

The rust code contains rwc/ a fork of rust-crypto without the dependencies that cannot be build easily in a wasm environment, and minus the algorithms that are not useful.

About

various cardano javascript using wasm bindings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 43.1%
  • JavaScript 34.4%
  • PureScript 22.0%
  • Other 0.5%