* Compiles but runtime time fails * wip * Beginning of clean-up - creation of config to keep things together * Removed unused module * Removed hardcoded constants * Easier way of sending binary messages * WIP cleanup before machine switch * Upgrade wasm-bindgen to 0.2.83 * Fixed compilation warnings for wasm client * all clients compiling without warnings * disabling topology refresh in wasm * Added a config option to disable loop cover traffic stream * config changes * Make webassembly work in a web worker - `wasm-timer` modified to work in web worker - add worker target to webpack - add client to call from HTML - update README to build WASM for bundling (this does not build ES modules) * Restored topology refreshing * correctly polling items in the wasm delay_queue * Allow client to read up to 8 messages at once from gateway connection (#1669) * Allow client to read up to 8 messages at once from gateway connection * Importing tokio::select in wasm32 target * Updated changelog * missing imports * Introduced disable_main_poisson_packet_distribution to force real_traffic_stream to disable poisson sending (#1664) * Introduced disable_main_poisson_packet_distribution to force real_traffic_stream to disable poisson sending * Updated changelog * Adjusting default settings * Introduced a client-configurable option to force it to use extended packet size * local adjustments * Removed warning associated with receiving extended packets * Minimal v2-required changes * Updated changelog * explicitly allowing clippy drop_non_drop Co-authored-by: Mark Sinclair <mmsinclair@gmail.com>
Nym Sphinx webassembly client
Produces layer-encrypted Sphinx packets for use with Nym mixnets.
Sphinx packets ensure the privacy of information in transit, even when the adversary is able to monitor the network in its entirety. When used with a mixnet, both content (what you said) and metadata (who you said it to, when you said it) are protected.
This helps browser-based and mobile applications get stronger privacy, in a way that wasn't previously possible.
This client is part of the Nym project. It's written in Rust and compiled to WebAssembly.
Security Status
From a security point of view, this module is not yet complete. Key missing features include, but are not limited to: cover traffic, sending packets with delay according to Poisson distribution.
They should be implemented soon. You can build your applications, but don't rely on it for strong anonymity yet if your application needs cover traffic.
Using it
See the Nym docs.
Demo
There's a demo web application in the js-example folder. To run it, first make sure you've got a recent npm installed, then follow the instructions in its README.
Developing
This is a Rust crate which is set up to automatically cross-compile the contents of src to WebAssembly (aka wasm). It's published from the main Nym platform monorepo in the clients/webassembly directory.
First, make sure you've got all the Rust wasm toolchain installed. Cross-compilation sounds scary, but the Rust crew have enabled a remarkably simple setup.
Furthermore, wasm-bindgen documentation provides excellent tips to solving common problems.
Whenever you change any Rust in the src directory, run wasm-pack build --scope nymproject to update the built wasm artefact in the pkg directory.
To be clear, this is not something that most JS developers need to worry about, this is only for Nym devs. The packages on NPM have all files in place. Just install and enjoy!
Packaging
If you're a Nym platform developer who's made changes to the Rust (or JS) files and wants to re-publish the package to NPM, here's how you do it:
- bump version numbers as necessary for SemVer
wasm-pack build --scope nymprojectbuilds the wasm binaries into thepkgdirectory (not in source control)cd pkg && npm publish --access=publicwill publish your changed package to NPM