Webassembly Client
Overview
The Nym webassembly client lets any webassembly-capable runtime build and send Sphinx packets to the Nym network, for use in edge computing and browser-based applications.
It is packaged and distributed via the Nym Typescript SDK library. Most developers consume it through the SDK.
The client supports building Sphinx packets from mobile apps and browser-based client-side apps (including Electron or similar).
Building apps with Webassembly Client
See the Typescript SDK docs for examples of usage.
Think about what you're sending
Think about what information your app sends. That covers whatever you put into your Sphinx packet messages as well as what your app's environment may leak.
When writing client apps in HTML/JavaScript, we recommend you do not load external resources from CDNs. Webapp developers often do this to save load time for common resources, or for convenience. For privacy apps it's better not to make these kinds of requests. Pack everything locally.
If you use only local resources within your Electron app or your browser extensions, encoding request data in a Sphinx packet protects you from the normal leakage that gets sent in a browser HTTP request. A lot of metadata leaks when you make an HTTP request from a browser window (opens in a new tab). That leakage doesn't happen in Nym, because you control what gets encoded into Sphinx packets, rather than sending a whole browser environment by default.