Files
nym/wasm/client
Jędrzej Stuczyński 0ee387d983 Feature/cancellation migration (#6014)
* squashing work on using cancellation in nym crates

making nym-task wasm compilable

removed sending of status messages

replaced TaskManager with ShutdownManager in the validator rewarder

additional helpers for ShutdownManager

simplified ShutdownToken by removing the name field

TaskClient => ShutdownToken within all client tasks

wip: remove TaskHandle

* track all long-living client tasks

* add task tracking for most top level tasks within nym-node

* improved default builder

* split up cancellation module

* module documentation and unit tests

* nym node fixes and naming consistency

* wasm fixes

* assert_eq => assert

* wasm fixes and made 'run_until_shutdown' take reference instead of ownership

* linux-specific fixes to IpPacketRouter

* post rebasing fixes for signing monitor

* add ShutdownManager constructor to build it from an external token

* applying PR review suggestions
2025-09-10 13:56:39 +01:00
..
2023-09-21 15:09:34 +01:00
2025-01-15 17:11:17 +00:00
2025-01-15 17:11:17 +00:00

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 SDK directory for examples on how to use it and the NPM packages available.

Developing

Make sure you have wasm-pack installed (cargo install wasm-pack) before you start.

Please use the Makefile targets to build this crate and compile it to WASM:

make build

The outputs will be found here where it will be accessible to the rest of the monorepo using workspaces.

Packaging

TODO

If you're a Nym platform developer who's made changes to the Rust files and wants to re-publish the package to NPM, here's how you do it:

  1. bump version numbers as necessary for SemVer
  2. go the sdk/typescript directory (off the project root)
  3. run:
yarn
yarn build
yarn publish