-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated tutorials with archive + stub * removed out of date faq pages * added binary build instructions section * removed clients from docs * added clients to devportal * moved nym-vs-others to docs from devportal * removed ood quickstart stuff * tweaked integration options page * summary changes for new structure * moved sdk to devportal * removed sdk from docs * changed summary file for new structure * added intro client overview page * added wallet gif * fixed now broken links * removed old comm pages * added references to newer apps (oreowallet + zcash demo) * updated darkfi irc socks5 * fixed broken link --------- Co-authored-by: mfahampshire <mfahampshire@pm.me>
- Loading branch information
1 parent
39e2473
commit 44cf9b0
Showing
88 changed files
with
244 additions
and
1,921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Building from Source | ||
|
||
> Nym runs on Mac OS X, Linux, and Windows. All nodes **except the Desktop Wallet and NymConnect** on Windows should be considered experimental - it works fine if you're an app developer but isn't recommended for running nodes. | ||
## Building Nym | ||
Nym has two main codebases: | ||
|
||
- the [Nym platform](https://github.com/nymtech/nym), written in Rust. This contains all of our code _except_ for the validators. | ||
- the [Nym validators](https://github.com/nymtech/nyxd), written in Go. | ||
|
||
> This page details how to build the main Nym platform code. | ||
## Prerequisites | ||
- Debian/Ubuntu: `pkg-config`, `build-essential`, `libssl-dev`, `curl`, `jq`, `git` | ||
|
||
``` | ||
apt install pkg-config build-essential libssl-dev curl jq git | ||
``` | ||
|
||
- Arch/Manjaro: `base-devel` | ||
|
||
``` | ||
pacman -S base-devel | ||
``` | ||
|
||
- Mac OS X: `pkg-config` , `brew`, `openss1`, `protobuf`, `curl`, `git` | ||
Running the following the script installs Homebrew and the above dependencies: | ||
|
||
``` | ||
/bin/bash -c "$(curl -fsSL https://github.com/Homebrew/install/HEAD/install.sh)" | ||
``` | ||
|
||
- `Rust & cargo >= {{minimum_rust_version}}` | ||
|
||
We recommend using the [Rust shell script installer](https://www.rust-lang.org/tools/install). Installing cargo from your package manager (e.g. `apt`) is not recommended as the packaged versions are usually too old. | ||
|
||
If you really don't want to use the shell script installer, the [Rust installation docs](https://forge.rust-lang.org/infra/other-installation-methods.html) contain instructions for many platforms. | ||
|
||
## Download and build Nym binaries | ||
The following commands will compile binaries into the `nym/target/release` directory: | ||
|
||
```sh | ||
rustup update | ||
git clone https://github.com/nymtech/nym.git | ||
cd nym | ||
|
||
git reset --hard # in case you made any changes on your branch | ||
git pull # in case you've checked it out before | ||
|
||
git checkout master # master branch has the latest release version: `develop` will most likely be incompatible with deployed public networks | ||
|
||
cargo build --release # build your binaries with **mainnet** configuration | ||
``` | ||
|
||
Quite a bit of stuff gets built. The key working parts for devs are the Client binaries and the CLI tool: | ||
|
||
* [websocket client](../clients/websocket-client.md): `nym-client` | ||
* [socks5 client](../clients/socks5-client.md): `nym-socks5-client` | ||
* [nym-cli tool](https://nymtech.net/docs/tools/nym-cli.md): `nym-cli` | ||
|
||
> You cannot build from GitHub's .zip or .tar.gz archive files on the releases page - the Nym build scripts automatically include the current git commit hash in the built binary during compilation, so the build will fail if you use the archive code (which isn't a Git repository). Check the code out from github using `git clone` instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Pre-built Binaries | ||
|
||
The [Github releases page](https://github.com/nymtech/nym/releases) has pre-built binaries which should work on Ubuntu 20.04 and other Debian-based systems, but at this stage cannot be guaranteed to work everywhere. | ||
|
||
If the pre-built binaries don't work or are unavailable for your system, you will need to build the platform yourself. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Clients Overview | ||
|
||
A large proportion of the Nym mixnet's functionality is implemented client-side. | ||
|
||
Clients perform the following actions on behalf of users: | ||
|
||
* determine network topology - what mixnodes exist, what their keys are, etc. | ||
* register with a gateway | ||
* authenticate with a gateway | ||
* receive and decrypt messages from the gateway | ||
* create layer-encrypted Sphinx packets | ||
* send Sphinx packets with real messages | ||
* send Sphinx packet _cover traffic_ when no real messages are being sent | ||
* retransmit un-acknowledged packet sends - if a client sends 100 packets to a gateway, but only receives an acknowledgement ('ack') for 95 of them, it will resend those 5 packets to the gateway again, to make sure that all packets are received. | ||
|
||
> As a developer, you'll want to use a Nym client to send your application network traffic through the mixnet; whether that is an RPC call, a TCP connection request, or treating it like a UDP pipe, you need to send whatever bytes your app needs to send through it. However, unlike (e.g.) a TCP Socket, Nym client communication is message-based, so you cannot (yet) simply plug-and-play using the mixnet as a seamless drop-in replacement. We are currently working on stream-like abstractions for ease of integration with the Rust SDK. | ||
## Types of Nym clients | ||
At present, there are three Nym clients: | ||
|
||
- the websocket (native) client | ||
- the SOCKS5 client | ||
- the wasm (webassembly) client | ||
|
||
You need to choose which one you want incorporate into your app. Which one you use will depend largely on your preferred programming style and the purpose of your app. | ||
|
||
### The websocket client | ||
Your first option is the native websocket client (`nym-client`). This is a compiled program that can run on Linux, Mac OS X, and Windows machines. It can be run as a persistent process on a desktop or server machine. You can connect to it with **any language that supports websockets**. | ||
|
||
> Rust developers can import websocket client functionality into their code via the [Rust SDK](sdk/rust/rust.md). | ||
### The webassembly client | ||
If you're working in JavaScript or Typescript in the browser, or building an [edge computing](https://en.wikipedia.org/wiki/Edge_computing) app, you'll likely want to choose the webassembly client. | ||
|
||
It's packaged and [available on the npm registry](https://www.npmjs.com/package/@nymproject/nym-client-wasm), so you can `npm install` it into your JavaScript or TypeScript application. | ||
|
||
> The webassembly client is most easily used via the [Typescript SDK](sdk/typescript.md). Typescript developers who wish to send API requests through the mixnet can can also check the [`mixfetch`]() package. | ||
### The SOCKS5 client | ||
The `nym-socks5-client` is useful for allowing existing applications to use the Nym mixnet without any code changes. All that's necessary is that they can use one of the SOCKS5, SOCKS4a, or SOCKS4 proxy protocols (which many applications can - crypto wallets, browsers, chat applications etc). | ||
|
||
When used as a standalone client, it's less flexible as a way of writing custom applications than the other clients, but able to be used to proxy application traffic through the mixnet without having to make any code changes. | ||
|
||
> Rust developers can import socks client functionality into their code via the [Rust SDK](sdk/rust/rust.md). | ||
## Commonalities between clients | ||
All Nym client packages present basically the same capabilities to the privacy application developer. They need to run as a persistent process in order to stay connected and ready to receive any incoming messages from their gateway nodes. They register and authenticate to gateways, and encrypt Sphinx packets. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.