Files
nym/clients/webassembly
durch 4490f15fcd Rebase on develop
commit 342883fcbe
Author: durch <durch@users.noreply.github.com>
Date:   Thu Apr 27 09:17:18 2023 +0200

    Put back PacketType 1

commit 61a0ee5a19
Author: Tommy Verrall <tommyvez@protonmail.com>
Date:   Wed Apr 26 16:37:29 2023 +0100

    change output for cpu-cycle management logs

commit 3956109c7e
Author: Tommy Verrall <tommy@nymtech.net>
Date:   Wed Apr 26 12:13:22 2023 +0100

    change the workflow file to build with cpucycles

commit 8d725b13c5
Author: durch <durch@users.noreply.github.com>
Date:   Mon Apr 24 13:14:58 2023 +0200

    Outfox client compat

commit 4d166c389b
Author: durch <durch@users.noreply.github.com>
Date:   Fri Apr 21 00:30:46 2023 +0200

    Address PR comments

commit 145c3c1223
Author: durch <durch@users.noreply.github.com>
Date:   Fri Apr 21 00:12:35 2023 +0200

    Rename PacketMode

commit cbd654d6fd
Author: Drazen Urch <drazen@urch.eu>
Date:   Thu Apr 20 23:59:40 2023 +0200

    Outfox rest compat (#3333)

    * Outfox forwarding compat

    * Tidy up interface

    * PacketSize compat

commit e7be91a94c
Author: durch <durch@users.noreply.github.com>
Date:   Wed Apr 19 16:36:48 2023 +0200

    Remove serde cruft

commit 582e7d566a
Author: durch <durch@users.noreply.github.com>
Date:   Wed Apr 19 16:24:09 2023 +0200

    Outfox framing

commit 6464da5f01
Author: durch <durch@users.noreply.github.com>
Date:   Tue Apr 18 22:23:02 2023 +0200

    Framing compat

commit d5e77e499b
Author: durch <durch@users.noreply.github.com>
Date:   Tue Apr 18 18:18:54 2023 +0200

    Framed encoding serde POC

commit f086f9c35a
Author: durch <durch@users.noreply.github.com>
Date:   Tue Apr 18 16:54:21 2023 +0200

    Experiment with serde
2023-05-27 10:58:29 +02:00
..
2023-05-27 10:58:29 +02:00
2020-04-21 10:05:38 +01:00
2020-04-21 10:05:38 +01:00
2020-04-21 10:05:38 +01:00
2020-06-05 18:06:38 +01:00
2020-04-21 10:05:38 +01:00
2023-05-09 10:46:40 +01:00
2020-04-21 10:05:38 +01:00
2022-11-08 17:47:10 +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

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 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