Giter VIP home page Giter VIP logo

js-cardano-wasm's Introduction

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.

js-cardano-wasm's People

Contributors

nicolasdp avatar vincenthz avatar dominikguzei avatar alanverbner avatar vsubhuman avatar ddeath avatar nicarq avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.