# rust-cardano-crypto

> Cardano crypto implemented in Rust and transpiled to WebAssembly

Latest version **0.2.0** (published 2018-04-18) · 0 weekly downloads

## Install

```sh
npm install rust-cardano-crypto
pnpm add rust-cardano-crypto
yarn add rust-cardano-crypto
bun add rust-cardano-crypto
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2018-04-18 |
| First published | 2018-03-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 265 |
| Maintainers | dominikguzei |

## Links

- npm: https://www.npmjs.com/package/rust-cardano-crypto
- Repository: https://github.com/input-output-hk/rust-cardano-crypto
- Homepage: https://github.com/input-output-hk/rust-cardano-crypto#readme
- Issues: https://github.com/input-output-hk/rust-cardano-crypto/issues
- npm.io page: https://npm.io/package/rust-cardano-crypto

## Dependencies (2)

- [iconv-lite](https://npm.io/package/iconv-lite.md) 0.4.19
- [safe-buffer](https://npm.io/package/safe-buffer.md) 5.1.1

## Recent versions

- 0.2.0 (latest) — 2018-04-18
- 0.1.1 — 2018-03-12
- 0.1.0 — 2018-03-12

## README

cardano rust / wasm experiments
===============================

Installation
------------
```
# install rustup
curl https://sh.rustup.rs -sSf | sh
# use nightly version
rustup install nightly
rustup default nightly
# with wasm32 target
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

2. `npm install`
3. `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
```js
// 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](https://github.com/DaGenix/rust-crypto)
without the dependencies that cannot be build easily in a wasm environment, and minus the 
algorithms that are not useful.

---
_Source: https://npm.io/package/rust-cardano-crypto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
