All Projects → paritytech → Schnorrkel Js

paritytech / Schnorrkel Js

Licence: apache-2.0
a Javascript wrapper for schnorrkel signatures on Ristretto using WebAssembly.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Schnorrkel Js

Nice Front End Tutorial
🌍 Constantly updated front-end resources, tutorials, opinions(与时俱进版前端资源,教程和意见。)
Stars: ✭ 755 (+5292.86%)
Mutual labels:  webassembly
Tungsten
Ricardian contract bond, claim, and arbitration management system
Stars: ✭ 17 (+21.43%)
Mutual labels:  webassembly
Zemeroth
😠⚔️😈 A minimalistic 2D turn-based tactical game in Rust
Stars: ✭ 940 (+6614.29%)
Mutual labels:  webassembly
Wasmer Php
🐘🕸️ WebAssembly runtime for PHP
Stars: ✭ 796 (+5585.71%)
Mutual labels:  webassembly
Awesome Wasm Zh
WebAssembly(wasm)资源精选
Stars: ✭ 838 (+5885.71%)
Mutual labels:  webassembly
Yew Starter
A template for starting a Yew.
Stars: ✭ 22 (+57.14%)
Mutual labels:  webassembly
Ssvm
SSVM is a high performance, extensible, and hardware optimized WebAssembly Virtual Machine for cloud, AI, and blockchain applications.
Stars: ✭ 751 (+5264.29%)
Mutual labels:  webassembly
Csla
A home for your business logic in any .NET application.
Stars: ✭ 865 (+6078.57%)
Mutual labels:  webassembly
Gameboy
🎮 Game Boy emulator written in Rust
Stars: ✭ 17 (+21.43%)
Mutual labels:  webassembly
Wasm Json Toolkit
[ORPHANED] A small toolkit for converting wasm binaries into json and back.
Stars: ✭ 23 (+64.29%)
Mutual labels:  webassembly
Design
Ewasm Design Overview and Specification
Stars: ✭ 827 (+5807.14%)
Mutual labels:  webassembly
Markdown Wasm
Markdown parser and HTML generator implemented in WebAssembly, based on md4c
Stars: ✭ 833 (+5850%)
Mutual labels:  webassembly
Gltfpp
glTF 2.0 loader for C++14
Stars: ✭ 22 (+57.14%)
Mutual labels:  webassembly
Webassembly
A minimal toolkit and runtime to produce and run WebAssembly modules.
Stars: ✭ 786 (+5514.29%)
Mutual labels:  webassembly
Nearcore
Reference client for NEAR Protocol
Stars: ✭ 840 (+5900%)
Mutual labels:  webassembly
Raylib
A simple and easy-to-use library to enjoy videogames programming
Stars: ✭ 8,169 (+58250%)
Mutual labels:  webassembly
Wasm2kt
Web Assembly to Kotlin and Java converter. Allows to compile a C or C++ program/library, and generate a Kotlin or Java program/library.
Stars: ✭ 18 (+28.57%)
Mutual labels:  webassembly
Notecalc3
NoteCalc is a handy calculator trying to bring the advantages of Soulver to the web.
Stars: ✭ 879 (+6178.57%)
Mutual labels:  webassembly
Webrtc
Pure Go implementation of the WebRTC API
Stars: ✭ 8,399 (+59892.86%)
Mutual labels:  webassembly
Viper
[WIP] A Pythonesque language with a design that focuses on efficiency and expressiveness. Compiles to WebAssembly
Stars: ✭ 23 (+64.29%)
Mutual labels:  webassembly

Schnorrkel-js

Provides a Javascript wrapper for some of the high-level functionality provided by schnorrkel.

How to Use

Install

npm install @substrate/schnorrkel-js

API

The functions exposed via wasm are explained here(rust) or [here(js)]. You can clone the repo and run the following to see the details:

cargo docs --open 

Build

Current experimental setup is created using wasm-pack and webpack/node/npm. Make sure to have both of them, alongside the latest nightly version of Rust installed.

In the root of the project run:

wasm-pack build --target browser

A directory named pkg should be created. Then:

cd pkg
npm link 

This creates a local binding to npm, instructing it to use this folder whenever schnorrkel-js was imported as an npm module using require() or import.

Next, create head to the provided www folder (experimental test folder created via npm: npm init wasm-app www) and:

# Run just once
npm link schnorrkel-js
npm install
npm run start

The current index.js does absolutely nothing. It just binds the compiled wasm blob as a parsed object to the window object so that it can be easily tested in the console.

import * as schnorrkel from 'schnorrkel-js'

window.schnorrkel = schnorrkel

To make any further changes, given that the linking with npm link is correct, just re-compile with wasm-pack build and let the npm run start be running in a separate process. It should automatically reload.

The default webpage

Tests

Run the tests in Node.Js environment via

wasm-pack test --node 

or to run them directly in the browser:

add this line to the tests module in lib.rs

wasm_bindgen_test_configure!(run_in_browser);

Then

wasm-pack test --chrome  
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].