# @yeecoders/schnorrkel-js

> A fork of [@parity/schnorrkel-js](https://github.com/polkadot-js/schnorrkel-js/tree/b1a1bf25be7397d3c21bba5ddde14286a58b269c) that allows proper operation against all the environments that the `@polkadot/api` supports. Changes from the base repo -

Latest version **0.2.0-16** (published 2020-02-14) · 0 weekly downloads

## Install

```sh
npm install @yeecoders/schnorrkel-js
pnpm add @yeecoders/schnorrkel-js
yarn add @yeecoders/schnorrkel-js
bun add @yeecoders/schnorrkel-js
```

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0-16 |
| Published | 2020-02-14 |
| First published | 2020-02-14 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 293.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | guoxbin |

## Links

- npm: https://www.npmjs.com/package/@yeecoders/schnorrkel-js
- npm.io page: https://npm.io/package/@yeecoders/schnorrkel-js

## Recent versions

- 0.2.0-16 (latest) — 2020-02-14
- 0.2.0-15 — 2020-02-14
- 0.2.0-14 — 2020-02-14
- 0.2.0-13 — 2020-02-14
- 0.2.0-12 — 2020-02-14

## README

# @yeecoders/schnorrkel-js

A fork of [@parity/schnorrkel-js](https://github.com/polkadot-js/schnorrkel-js/tree/b1a1bf25be7397d3c21bba5ddde14286a58b269c) that allows proper operation against all the environments that the `@polkadot/api` supports. Changes from the base repo -

- WASM initialisation is done async, via Promise (this allows for clear operation in webpack environments without additional workers)
- WASM outputs are optimised via `wasm-opt` from the [binaryen](https://github.com/WebAssembly/binaryen) project
- Output bundle is wrapped with camelCase names (not including the `__***` internal functions)
- Full named functions and parameter TypeScript definitions
- Requires for crypto is wrapped, removing "on-demand-require" warnings in webpack environment
- WASM output is done via a base-64 encoded string, supporting both Node.js and browser environments
- Extensive code cleanups and addition of functions required for all sr25519 operations
- Extended tests to cover Rust, wasm (via Node) and wasm (via jest), remove (here unused) www interfaces
- TextDecoder is polyfilled by using the version from `@polkadot/util` (consistent support, alos on React Native)
- Polyfill for crypto functions that are not available in some environments (e.g. Jest & React Native)

## requirements
 - rustup 1.20.2 (13979c968 2019-10-16)
 - rustc 1.41.0-nightly (99b89533d 2019-12-16)
 - wasm-pack 0.9.0
 - wasm-opt version 90 (version_90-66-g716813059)

## development

1. Build can be done via `./build.sh`
2. Tests can be done via `./test.sh`

## future work

Support asm.js for environments (like React Native) that doesn't have WASM support. Initial attempts made at this, but not active.

---
_Source: https://npm.io/package/@yeecoders/schnorrkel-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
