[DOCs]: New docs framework (#5017)
* started todo list for rework * startd long todo list * startd long todo list * remove ts docs from ts sdk dir * started new docs draft * rearranged code example dir structure * modified code component filepaths * first pass rust sdk * small shift typescript org * updated todo list * consolidating images folders in one place * first pass @ operator docs * gen updates * sdk in its own dir * first pass developers structure * first pass network structure * structure * add licensing * moved old docs -> old_docs dir for clarity when devving * moving around new docs - think this is the final dir structure * updated todo list * new autodoc version (#4781) * Update rework_todo.md * quick first sketch of landing page * rework of structure of developers * added arch and concepts stubs * add new bits to todo list * new list * tweak to overview * mixnet node overview * tweak overview * first pass new arch * first pass concepts * first pass traffic * more network docs * moved some chain files to the dev portal stubs * removed old reference to archive * note to client * concepts 2nd pass * crypto first proper pass, sphinx * stub for not p2p * structure change * traffic 2nd pass * misc * hid root index * overhaul arch * overhaul arch * add links + tweaks * update todo list * updating nyx section * added zknym docs * added zknym docs * note on where to find deployed info * smart contracts done * started moving integrations docs over from ts sdk * pass @ integration page * todo for the tldr overview * added ffi stub files * updated todo list * move sdks to developers * initial pass at new clients overview for developers * rework intro * add echo serv to tools * sidebar autocollapse * integration overview work + tools * concepts overview for devporta * stub * more for networking pages * added to concepts in dev portal * updated arch * crypto overview page * typo fix * add credential stub * first pass concepts done * start reorg of rust sdk docs * reorg + added FFI table * added no scroll to inline code * finished ffi overview page * first pass @ rest of rust sdk doc * first pass ffi * tweaks * added testnet example + note to custom topology example overview * stripped unnecessary stuff from TS * tweaks to ffi * updated faq * first pass tcpproxy * commit before moving image dir * moved images/ to correct place * started on client redo * chain first pass * moved cli wallet out of tools * first pass new ws client * new chain info, left todo links in * links * more links * chain registry * added echo server to tools * rust sdk links * ts sdk links * final linkchecks * redo acks diagram as mermaid * add mermaid flow diagram * added links for codecs + full flow diagram * removed todo * remove forced dark mode * diagram + concepts overview * small correction re tcpproxy ffi * remove diagram title * new sock5 diagram, minor client docs tweaks * diagrams * change order in list * added note for standalone: can be accessed via sdk * tweaks * replaced old diagram with mermaid * fixed link * hardcoded import version for the moment * update deps * remove test component * recreated tools dir * remove tools dir moved to wrong palce * prebuild and predev script for autodoc commands * make script own command instead of prebuild * made code blocks sh * updated autogenerated docs * temp * auto commit generated command files * add link to autodoc generated files * updated autodoc for committing changing else exit * auto commit generated command files * updated readme * make subcommand headers smaller * removed mdbook related scripts * update readme * update readme * removed backups of root meta.json * cherry pick yana commits + some extra config in theme * update readme * update theme: width of page and padding * some more themeing * changed erroneous note * docs redirects first pass * tweaking * new pages + rest of redirects for old docs/ * brought in archive + done rewrites for devportal * cherry pick yana landingpage * tweaked landing page component * changed theme of mermaid diagram to match everything else * updated todo list * [DOCs]: Operators rework to next.js (#4930) * initialise operators guides v2 * new introduction page * add variables csv and page * add baseurl to allow short path * add sandbox page * added building from source page * add binary pages * add preliminary steps * clean preliminary steps dir * syntax edit * syntax edit * add configuration page * create new proxy configuration page * create new proxy configuration page * create bonding.mdx page * correct images path * syntax edit * add new validator setup page * add api setup page * add nyx configuration page * add nym node and maintenance pages * finish maintenance and add nymvisor conf page * add manual upgrade page * add nymvisor upgrade page * add performance testing page and dir * add node api check page * add explore nym scripts page * add testing pages * fix menu issue by moving snippets to coomponents * add all troubleshooting pages * add general faq page * add nym node faq page * add nyx faq page * revamp legal forum to community counsel and add all pages * rewire relative paths to new structure * simplify setup and remove lock file * syntax fix * rm package.json * re add package.json, rm package-lock.json * removed old books from commit * address review comments --------- Co-authored-by: mfahampshire <maxhampshire@pm.me> Co-authored-by: mx <33262279+mfahampshire@users.noreply.github.com> * tweak client links * also moved matrix images to correct place * Max/fix links new docs framework (#4989) * tweak client links * standardise images in public/ * old images move to public/archive * rename overview to more descriptive * links (#4990) * links * removed todos * updated todo list * minor themeing * operator redirects * pick yana's edits: remove specified callout theming * added todo comments for old ts sdk redirects * [new/docs/operators]: Create archive section - PR ready to merge (#5004) * [new-docs/operators] : Fix callout syntax (#5006) * fix callout syntax from color to type * correct callout from danger to warning * update footer * updated footer * finalised rewrites * tweaks to clients and reintroduced old examples page * update todo * Max/individual command autodocs (#5015) * auto commit generated command files * added to autodoc.sh: build all binaries before running * autodoc move individual command outputs to components * Max/individual command autodocs (#5018) * updated autodoc script * updated autodoc script for fix + reintroduced gitignore file for generated markdown * auto commit generated command files * auto commit generated command files * added command-outputs to autodoc script * fix merge conflicts * repush components * remove old docs dirs * auto commit generated command files * auto commit generated command files * updated messages paradigm with the standalone proxies * [NEW-DOCs/operators]: Command output, accordion, api scraping & all final tasks (#5026) * add custom scripts, create prebuild to import data to pages * update after latest prebuild * auto commit generated command files * add accordion component * add changbelog page * add node_api_check outputs * finish all command outputs * more accordions beautifications * finish accordion * PR ready to go * address review comments --------- Co-authored-by: mfahampshire <maxhampshire@pm.me> * Adjust padding * Fix responsive design * cherry pick yana landingpage flex update * reremove old docs * added dependencies to readme * pushing build attempt changes * fix merge errors, path errors, dump uselss dinosaurs - BUILT THE F*N DOCS w success * moved prebuild to its own script * generate timenow * auto commit generated command files * remove comment * auto commit generated command files * auto commit generated command files * auto commit generated command files * build from new configs * add mdx type as explicit dep * remove rc from version in package * change predev script * update readme with scripts * update general info * add license * auto commit generated command files * add updated components * removed old examples page for the moment * remove old list will reintroduce hidden behind gitignore for future * reintroduce todo list behind gitignore * added standalone tcpproxy binary info * nothing change for redeploy test * make build standalone * updated readme * working on new cd * remove export * updated ci/cd for docs * added ci script for dist * hide text on laptop wide screen * add pnpm to ci/cd * add pnpm version to ci/cd * add default dir to ci/cd * change path to script * update projct name ci * lint ci branch ignore * add basePath to next.config.js * update doc rewrites * revert basePath addition * update basePath * add mobile styles * fix responsive style * remove old ts sdk docs workflow * temp remove autodoc from workspace * update sidebar for clarity: crypto = cryptography * ignore documentation in pr-validation workflow --------- Co-authored-by: Yana <yanok87@users.noreply.github.com> Co-authored-by: import this <97586125+serinko@users.noreply.github.com> Co-authored-by: fmtabbara <fmtabbara@hotmail.co.uk>
@@ -6,20 +6,27 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: arc-ubuntu-20.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: documentation/docs
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Dependencies (Linux)
|
||||
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git python3 && sudo apt-get update --fix-missing
|
||||
- name: Install pip3
|
||||
run: sudo apt install -y python3-pip
|
||||
run: sudo apt install -y python3-pip
|
||||
- name: Install Python3 modules
|
||||
run: sudo pip3 install pandas tabulate
|
||||
- name: Install rsync
|
||||
run: sudo apt-get install rsync
|
||||
- uses: rlespinasse/github-slug-action@v3.x
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
version: 9
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
node-version: 20
|
||||
- name: Install Rust stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@@ -29,33 +36,13 @@ jobs:
|
||||
with:
|
||||
command: build
|
||||
args: --workspace --release
|
||||
- name: Install mdbook and plugins
|
||||
run: cd documentation && ./install_mdbook_deps.sh
|
||||
- name: Remove existing Nym config directory (`~/.nym/`)
|
||||
run: cd documentation && ./remove_existing_config.sh
|
||||
continue-on-error: false
|
||||
# This is the original flow
|
||||
# - name: Build all projects in documentation/ & move to ~/dist/docs/
|
||||
# run: cd documentation && ./build_all_to_dist.sh
|
||||
|
||||
# This is a workaround replacement which builds on the last working commit b332a6b55668f60988e36961f3f62a794ba82ddb and then on current branch
|
||||
- name: Save current branch to ~/current_branch
|
||||
run: git rev-parse --abbrev-ref HEAD > ~/current_branch
|
||||
- name: Git pull, reset & switch to b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||
run: git pull && git reset --hard && git checkout b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||
- name: Build all projects in documentation/ & move to ~/dist/docs/ from b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||
run: cd documentation && ./build_all_to_dist.sh
|
||||
|
||||
- name: Switch to current branch
|
||||
run: git checkout $echo "$(cat ~/current_branch)"
|
||||
- name: Build all projects in documentation/ & move to ~/dist/docs/ on current branch
|
||||
run: cd documentation && ./build_all_to_dist.sh && rm ~/current_branch
|
||||
|
||||
# End of replacemet
|
||||
|
||||
- name: Post process
|
||||
run: cd documentation && ./post_process.sh
|
||||
continue-on-error: false
|
||||
- name: Install project dependencies
|
||||
run: pnpm i
|
||||
- name: Build project
|
||||
run: pnpm run build
|
||||
- name: Move files to /dist/
|
||||
run: ../scripts/move-to-dist.sh
|
||||
|
||||
- name: Create Vercel project file
|
||||
uses: mobiledevops/secret-to-file-action@v1
|
||||
|
||||
@@ -3,28 +3,35 @@ name: ci-docs
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches-ignore: master
|
||||
branches-ignore: [master]
|
||||
paths:
|
||||
- 'documentation/docs/**'
|
||||
- '.github/workflows/ci-docs.yml'
|
||||
- "documentation/docs/**"
|
||||
- ".github/workflows/ci-docs.yml"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: arc-ubuntu-20.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: documentation/docs
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Dependencies (Linux)
|
||||
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler git python3 && sudo apt-get update --fix-missing
|
||||
- name: Install pip3
|
||||
run: sudo apt install -y python3-pip
|
||||
run: sudo apt install -y python3-pip
|
||||
- name: Install Python3 modules
|
||||
run: sudo pip3 install pandas tabulate
|
||||
- name: Install rsync
|
||||
run: sudo apt-get install rsync
|
||||
- uses: rlespinasse/github-slug-action@v3.x
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
version: 9
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
node-version: 20
|
||||
- name: Install Rust stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
@@ -34,30 +41,13 @@ jobs:
|
||||
with:
|
||||
command: build
|
||||
args: --workspace --release
|
||||
- name: Install mdbook and plugins
|
||||
run: cd documentation && ./install_mdbook_deps.sh
|
||||
- name: Remove existing Nym config directory (`~/.nym/`)
|
||||
run: cd documentation && ./remove_existing_config.sh
|
||||
continue-on-error: false
|
||||
|
||||
# This is the original flow
|
||||
# - name: Build all projects in documentation/ & move to ~/dist/docs/
|
||||
# run: cd documentation && ./build_all_to_dist.sh
|
||||
|
||||
# This is a workaround replacement which builds on the last working commit b332a6b55668f60988e36961f3f62a794ba82ddb and then on current branch
|
||||
- name: Save current branch to ~/current_branch
|
||||
run: git rev-parse --abbrev-ref HEAD > ~/current_branch
|
||||
- name: Git pull, reset & switch to b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||
run: git pull && git reset --hard && git checkout b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||
- name: Build all projects in documentation/ & move to ~/dist/docs/ from b332a6b55668f60988e36961f3f62a794ba82ddb
|
||||
run: cd documentation && ./build_all_to_dist.sh
|
||||
|
||||
- name: Switch to current branch
|
||||
run: git checkout $echo "$(cat ~/current_branch)"
|
||||
- name: Build all projects in documentation/ & move to ~/dist/docs/ on current branch
|
||||
run: cd documentation && ./build_all_to_dist.sh && rm ~/current_branch
|
||||
|
||||
# End of replacemet
|
||||
- name: Install project dependencies
|
||||
run: pnpm i
|
||||
- name: Build project
|
||||
run: pnpm run build
|
||||
- name: Move files to /dist/
|
||||
run: ../scripts/move-to-dist.sh
|
||||
|
||||
- name: Deploy branch to CI www
|
||||
continue-on-error: true
|
||||
@@ -68,5 +58,5 @@ jobs:
|
||||
SOURCE: "dist/docs/"
|
||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/docs-${{ env.GITHUB_REF_SLUG }}
|
||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/docs-nextra-${{ env.GITHUB_REF_SLUG }}
|
||||
EXCLUDE: "/node_modules/"
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
name: ci-sdk-docs-typescript
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "sdk/typescript/**"
|
||||
- "wasm/**"
|
||||
- '.github/workflows/ci-sdk-docs-typescript.yml'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: custom-linux
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install rsync
|
||||
run: sudo apt-get install rsync
|
||||
continue-on-error: true
|
||||
- uses: rlespinasse/github-slug-action@v3.x
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18.17
|
||||
- name: Install Rust stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Setup yarn
|
||||
run: npm install -g yarn
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.20'
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
|
||||
- name: Install wasm-opt
|
||||
uses: ./.github/actions/install-wasm-opt
|
||||
with:
|
||||
version: '116'
|
||||
|
||||
- name: Build branch WASM packages
|
||||
run: make sdk-wasm-build
|
||||
|
||||
- name: Install
|
||||
run: yarn
|
||||
- name: Build
|
||||
run: yarn docs:prod:build
|
||||
- name: Deploy branch to CI www (docs)
|
||||
continue-on-error: true
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }}
|
||||
ARGS: "-rltgoDzvO --delete"
|
||||
SOURCE: "dist/ts/"
|
||||
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }}
|
||||
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }}
|
||||
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/sdk-ts-docs-${{ env.GITHUB_REF_SLUG }}
|
||||
EXCLUDE: "/dist/, /node_modules/"
|
||||
- name: Matrix - Node Install
|
||||
run: npm install
|
||||
working-directory: .github/workflows/support-files
|
||||
- name: Matrix - Send Notification
|
||||
env:
|
||||
NYM_NOTIFICATION_KIND: ts-packages
|
||||
NYM_PROJECT_NAME: "sdk-ts-docs"
|
||||
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}/docs/sdk/typescript"
|
||||
NYM_CI_WWW_LOCATION: "sdk-ts-docs-${{ env.GITHUB_REF_SLUG }}"
|
||||
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
|
||||
GIT_BRANCH: "${GITHUB_REF##*/}"
|
||||
IS_SUCCESS: "${{ job.status == 'success' }}"
|
||||
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}"
|
||||
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM }}"
|
||||
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}"
|
||||
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}"
|
||||
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}"
|
||||
uses: docker://keybaseio/client:stable-node
|
||||
with:
|
||||
args: .github/workflows/support-files/notifications/entry_point.sh
|
||||
@@ -4,7 +4,9 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- develop
|
||||
- 'release/**'
|
||||
- "release/**"
|
||||
paths-ignore:
|
||||
- "documentation/**"
|
||||
types:
|
||||
- labeled
|
||||
- unlabeled
|
||||
|
||||
@@ -430,6 +430,14 @@ version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
||||
|
||||
[[package]]
|
||||
name = "autodoc"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"env_logger 0.11.5",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.6.20"
|
||||
@@ -2354,6 +2362,19 @@ dependencies = [
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.11.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
|
||||
dependencies = [
|
||||
"anstream",
|
||||
"anstyle",
|
||||
"env_filter",
|
||||
"humantime 2.1.0",
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "envy"
|
||||
version = "0.4.2"
|
||||
@@ -7467,7 +7488,7 @@ version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d"
|
||||
dependencies = [
|
||||
"env_logger",
|
||||
"env_logger 0.7.1",
|
||||
"log",
|
||||
]
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ members = [
|
||||
"common/wasm/utils",
|
||||
"common/wireguard",
|
||||
"common/wireguard-types",
|
||||
# "documentation/autodoc",
|
||||
"explorer-api",
|
||||
"explorer-api/explorer-api-requests",
|
||||
"explorer-api/explorer-client",
|
||||
@@ -203,7 +204,7 @@ axum-extra = "0.9.4"
|
||||
base64 = "0.22.1"
|
||||
bincode = "1.3.3"
|
||||
bip39 = { version = "2.0.0", features = ["zeroize"] }
|
||||
bit-vec = "0.7.0" # can we unify those?
|
||||
bit-vec = "0.7.0" # can we unify those?
|
||||
bitvec = "1.0.0"
|
||||
blake3 = "1.5.4"
|
||||
bloomfilter = "1.0.14"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
todo.md
|
||||
@@ -1,30 +1,53 @@
|
||||
# Documentation
|
||||
# Nym Docs v2
|
||||
|
||||
This is v2 of the nym docs, condensed from various mdbooks projects that we had previously.
|
||||
|
||||
These docs are hosted at [nymtech.net/docs](www.nymtech.net/docs).
|
||||
|
||||
## Doc projects
|
||||
Each directory contains a readme with more information about running and contributing to the projects. Each is built with [`mdbook`](https://rust-lang.github.io/mdBook/index.html) - use `mdbook serve` to build and serve them (defaults to `localhost:3000`).
|
||||
* `docs` contains technical documentation hosted at [https://nymtech.net/docs](https://nymtech.net/docs)
|
||||
* `dev-portal` contains developer documentation hosted at [https://nymtech.net/developers](https://nymtech.net/developers)
|
||||
* `operators` contains node setup and maintenance guides hosted at [https://nymtech.net/operators](https://nymtech.net/operators)
|
||||
`docs/pages/` contains several subdirs, each hosting a subsection of the docs:
|
||||
* `network` contains key concepts, cryptosystems, architecture.
|
||||
* `developers` contains key concepts for developers, required architecture, and Rust/Typescript SDK docs.
|
||||
* `operators` contains node setup and maintenance guides.
|
||||
|
||||
> If you are looking for the Typescript SDK documentation located at [sdk.nymtech.net](https://sdk.nymtech.net) this can be found in `../sdk/typescript/docs/`
|
||||
## Local development
|
||||
### Dependencies
|
||||
Our `prebuild` script relies on the following:
|
||||
- `python`
|
||||
- `pip`
|
||||
- [`pandas`](https://pandas.pydata.org/)
|
||||
- [`tabulate`](https://pypi.org/project/tabulate/)
|
||||
- `jq`
|
||||
|
||||
## Contribution
|
||||
* If you wish to add to the documentation please create a PR against this repo.
|
||||
* If you are **adding a plugin dependency** make sure to also **add that to the list of plugins in `install_mdbook_deps.sh` line 12**.
|
||||
Otherwise make sure to have `node` installed.
|
||||
|
||||
## Scripts
|
||||
* `bump_versions.sh` allows you to update the ~~`platform_release_version` and~~ `wallet_release_version` variable~~s~~ in the `book.toml` of each mdbook project at once. You can also optionally update the `minimum_rust_version` as well. Helpful for lazy-updating when cutting a new version of the docs.
|
||||
### Serve Local (Hot Reload)
|
||||
```sh
|
||||
pnpm i
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
* The following scripts are used by the `ci-dev.yml` and `cd-dev.yml` scripts (located in `../.github/workflows/`):
|
||||
* `build_all_to_dist.sh` is used for building all mdbook projects and moving the rendered html to `../dist/` to be rsynced with various servers.
|
||||
* `install_mdbook_deps.sh` checks for an existing install of mdbook (and plugins), uninstalls them, and then installs them on a clean slate. This is to avoid weird dependency clashes if relying on an existing mdbook version.
|
||||
* `post_process.sh` is used to post process CSS/image/href links for serving several mdbooks from a subdirectory.
|
||||
* `removed_existing_config.sh` is used to check for existing nym client/node config files on the CI/CD server and remove it if it exists. This is to mitigate issues with `mdbook-cmdrun` where e.g. a node is already initialised, and the command fails.
|
||||
Open `http://localhost:3000`.
|
||||
|
||||
## CI/CD
|
||||
Deployment of the docs is partially automated and partially manual.
|
||||
* `ci-docs.yml` will run on pushes to all branches **apart from `master`**
|
||||
* `cd-docs.yml` must be run manually. This pushes to a staging branch which then must be manually promoted to production.
|
||||
## Build
|
||||
```sh
|
||||
pnpm run build
|
||||
```
|
||||
|
||||
The static output will be in `./out`;
|
||||
|
||||
## Contribution
|
||||
* If you wish to add to the documentation please create a PR against this repo, with a `patch` against `develop`.
|
||||
|
||||
## Scripts
|
||||
* There are several autogenerated command files for clients and binaries. These are generated with `generate:commands`, which runs the `autodoc` rust binary, moves the files to their required places, and then if there is an update, commits them to git. This is for remote deployments.
|
||||
* Python scripts TODO
|
||||
|
||||
### Autodoc
|
||||
`autodoc` is a script that generates markdown files containing commands and their output (both command and `--help` output). For the moment the binaries and their commands are manually configured in the script.
|
||||
|
||||
## CI/CD
|
||||
TODO
|
||||
|
||||
## Licensing and copyright information
|
||||
This is a monorepo and components that make up Nym as a system are licensed individually, so for accurate information, please check individual files.
|
||||
@@ -36,4 +59,3 @@ As a general approach, licensing is as follows this pattern:
|
||||
* Nym applications and binaries are [GPL-3.0-only](https://www.gnu.org/licenses/)
|
||||
|
||||
* Used libraries and different components are [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html) or [MIT](https://mit-license.org/)
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
autodoc-generated-markdown/*
|
||||
@@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "autodoc"
|
||||
version = "0.1.0"
|
||||
authors.workspace = true
|
||||
repository.workspace = true
|
||||
homepage.workspace = true
|
||||
documentation.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
env_logger = "0.11.3"
|
||||
log.workspace = true
|
||||
@@ -0,0 +1,44 @@
|
||||
# Autodoc
|
||||
|
||||
WIP command output documentation generator. Run via `../scripts/next-scripts/autodoc.sh` to create a bunch of markdown files which are then moved around for importing into the documentation.
|
||||
|
||||
## `Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }`
|
||||
If you run into this error, make sure that you have the following directory structure:
|
||||
|
||||
```sh
|
||||
autodoc/
|
||||
├── autodoc-generated-markdown/
|
||||
│ └── commands/
|
||||
├── Cargo.toml
|
||||
├── README.md
|
||||
└── src
|
||||
└── main.rs
|
||||
```
|
||||
|
||||
And if you don't - create it and re-run.
|
||||
|
||||
If you are encountering this error with this dir structure in place, check that all Nym binaries that are listed in `main.rs` also exist in `nym/target/release/`.
|
||||
|
||||
Run this crate on its own with `debug` logging and it should panic on the missing binary:
|
||||
|
||||
```sh
|
||||
RUST_LOG="debug" cargo run --release
|
||||
Finished `release` profile [optimized] target(s) in 0.20s
|
||||
Running `/home/______/src/nym/target/release/autodoc`
|
||||
[2024-10-23T08:11:01Z DEBUG autodoc] now running Some(
|
||||
"nym-api",
|
||||
)
|
||||
[2024-10-23T08:11:01Z DEBUG autodoc] stderr: " 2024-10-23T08:11:01.981Z INFO nym_api > Starting nym api...\n"
|
||||
[2024-10-23T08:11:01Z DEBUG autodoc] stderr: " 2024-10-23T08:11:01.985Z INFO nym_api > Starting nym api...\n"
|
||||
[2024-10-23T08:11:01Z INFO autodoc] SKIPPING ../../target/release/nym-api init
|
||||
[2024-10-23T08:11:01Z INFO autodoc] creating own file for ../../target/release/nym-api init --help
|
||||
[2024-10-23T08:11:01Z DEBUG autodoc] stderr: " 2024-10-23T08:11:01.993Z INFO nym_api > Starting nym api...\n"
|
||||
|
||||
< snip >
|
||||
|
||||
[2024-10-23T08:11:02Z DEBUG autodoc] now running Some(
|
||||
"nym-cli",
|
||||
)
|
||||
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
|
||||
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
```sh
|
||||
Show build information of this binary
|
||||
|
||||
Usage: nym-api build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
```sh
|
||||
|
||||
Binary Name: nym-api
|
||||
Build Timestamp: 2024-10-09T13:56:14.428750844Z
|
||||
Build Version: 1.1.42
|
||||
Commit SHA: fac373c1db4fa5389ba61de7943c77023467bccb
|
||||
Commit Date: 2024-10-09T14:59:40.000000000+02:00
|
||||
Commit Branch: max/new-docs-framework
|
||||
rustc Version: 1.80.0
|
||||
rustc Channel: stable
|
||||
cargo Profile: release
|
||||
|
||||
```
|
||||
@@ -0,0 +1,95 @@
|
||||
# `nym-api` Binary Commands (Autogenerated)
|
||||
|
||||
These docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script.
|
||||
```sh
|
||||
[2m2024-10-29T09:51:44.008469Z[0m [32m INFO[0m [2mnym-api/src/main.rs[0m[2m:[0m[2m41[0m[2m:[0m Starting nym api...
|
||||
Usage: nym-api [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
init Initialise a Nym Api instance with persistent config.toml file
|
||||
run Run the Nym Api with provided configuration optionally overriding set parameters
|
||||
build-info Show build information of this binary
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
-c, --config-env-file <CONFIG_ENV_FILE>
|
||||
Path pointing to an env file that configures the Nym API [env: NYMAPI_CONFIG_ENV_FILE_ARG=]
|
||||
--no-banner
|
||||
A no-op flag included for consistency with other binaries (and compatibility with nymvisor, oops) [env: NYMAPI_NO_BANNER_ARG=]
|
||||
-h, --help
|
||||
Print help
|
||||
-V, --version
|
||||
Print version
|
||||
```
|
||||
|
||||
### `init`
|
||||
```sh
|
||||
[2m2024-10-29T09:51:44.013292Z[0m [32m INFO[0m [2mnym-api/src/main.rs[0m[2m:[0m[2m41[0m[2m:[0m Starting nym api...
|
||||
Initialise a Nym Api instance with persistent config.toml file
|
||||
|
||||
Usage: nym-api init [OPTIONS]
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of the nym-api we want to initialise. if unspecified, a default value will be used. default: "default" [env: NYMAPI_ID_ARG=] [default: default]
|
||||
-m, --enable-monitor
|
||||
Specifies whether network monitoring is enabled on this API default: false [env: NYMAPI_ENABLE_MONITOR_ARG=]
|
||||
-r, --enable-rewarding
|
||||
Specifies whether network rewarding is enabled on this API default: false [env: NYMAPI_ENABLE_REWARDING_ARG=]
|
||||
--nyxd-validator <NYXD_VALIDATOR>
|
||||
Endpoint to nyxd instance used for contract information. default: http://localhost:26657 [env: NYMAPI_NYXD_VALIDATOR_ARG=]
|
||||
--mnemonic <MNEMONIC>
|
||||
Mnemonic of the network monitor used for sending rewarding and zk-nyms transactions default: None [env: NYMAPI_MNEMONIC_ARG=]
|
||||
--enable-zk-nym
|
||||
Flag to indicate whether credential signer authority is enabled on this API default: false [env: NYMAPI_ENABLE_ZK_NYM_ARG=]
|
||||
--announce-address <ANNOUNCE_ADDRESS>
|
||||
Announced address that is going to be put in the DKG contract where zk-nym clients will connect to obtain their credentials default: None [env: NYMAPI_ANNOUNCE_ADDRESS_NYM_ARG=]
|
||||
--monitor-credentials-mode
|
||||
Set this nym api to work in a enabled credentials that would attempt to use gateway with the bandwidth credential requirement [env: NYMAPI_MONITOR_CREDENTIALS_MODE_ARG=]
|
||||
--bind-address <BIND_ADDRESS>
|
||||
Socket address this api will use for binding its http API. default: `127.0.0.1:8080` in `debug` builds and `0.0.0.0:8080` in `release`
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
|
||||
### `run`
|
||||
```sh
|
||||
[2m2024-10-29T09:51:44.032688Z[0m [32m INFO[0m [2mnym-api/src/main.rs[0m[2m:[0m[2m41[0m[2m:[0m Starting nym api...
|
||||
Run the Nym Api with provided configuration optionally overriding set parameters
|
||||
|
||||
Usage: nym-api run [OPTIONS]
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of the nym-api we want to run.if unspecified, a default value will be used. default: "default" [env: NYMAPI_ID_ARG=] [default: default]
|
||||
-m, --enable-monitor <ENABLE_MONITOR>
|
||||
Specifies whether network monitoring is enabled on this API default: None - config value will be used instead [env: NYMAPI_ENABLE_MONITOR_ARG=] [possible values: true, false]
|
||||
-r, --enable-rewarding <ENABLE_REWARDING>
|
||||
Specifies whether network rewarding is enabled on this API default: None - config value will be used instead [env: NYMAPI_ENABLE_REWARDING_ARG=] [possible values: true, false]
|
||||
--nyxd-validator <NYXD_VALIDATOR>
|
||||
Endpoint to nyxd instance used for contract information. default: None - config value will be used instead [env: NYMAPI_NYXD_VALIDATOR_ARG=]
|
||||
--mnemonic <MNEMONIC>
|
||||
Mnemonic of the network monitor used for sending rewarding and zk-nyms transactions default: None - config value will be used instead [env: NYMAPI_MNEMONIC_ARG=]
|
||||
--enable-zk-nym <ENABLE_ZK_NYM>
|
||||
Flag to indicate whether coconut signer authority is enabled on this API default: None - config value will be used instead [env: NYMAPI_ENABLE_ZK_NYM_ARG=] [possible values: true, false]
|
||||
--announce-address <ANNOUNCE_ADDRESS>
|
||||
Announced address that is going to be put in the DKG contract where zk-nym clients will connect to obtain their credentials default: None - config value will be used instead [env: NYMAPI_ANNOUNCE_ADDRESS_ARG=]
|
||||
--monitor-credentials-mode <MONITOR_CREDENTIALS_MODE>
|
||||
Set this nym api to work in a enabled credentials that would attempt to use gateway with the bandwidth credential requirement default: None - config value will be used instead [env: NYMAPI_MONITOR_CREDENTIALS_MODE_ARG=] [possible values: true, false]
|
||||
--bind-address <BIND_ADDRESS>
|
||||
Socket address this api will use for binding its http API. default: `127.0.0.1:8080` in `debug` builds and `0.0.0.0:8080` in `release`
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
|
||||
### `build-info`
|
||||
```sh
|
||||
[2m2024-10-29T09:51:44.037915Z[0m [32m INFO[0m [2mnym-api/src/main.rs[0m[2m:[0m[2m41[0m[2m:[0m Starting nym api...
|
||||
Show build information of this binary
|
||||
|
||||
Usage: nym-api build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,25 @@
|
||||
```sh
|
||||
Initialise a Nym Api instance with persistent config.toml file
|
||||
|
||||
Usage: nym-api init [OPTIONS]
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of the nym-api we want to initialise. if unspecified, a default value will be used. default: "default" [default: default]
|
||||
-m, --enable-monitor
|
||||
Specifies whether network monitoring is enabled on this API default: false
|
||||
-r, --enable-rewarding
|
||||
Specifies whether network rewarding is enabled on this API default: false
|
||||
--nyxd-validator <NYXD_VALIDATOR>
|
||||
Endpoint to nyxd instance used for contract information. default: http://localhost:26657
|
||||
--mnemonic <MNEMONIC>
|
||||
Mnemonic of the network monitor used for sending rewarding and zk-nyms transactions default: None
|
||||
--enable-zk-nym
|
||||
Flag to indicate whether credential signer authority is enabled on this API default: false
|
||||
--announce-address <ANNOUNCE_ADDRESS>
|
||||
Announced address that is going to be put in the DKG contract where zk-nym clients will connect to obtain their credentials default: None
|
||||
--monitor-credentials-mode
|
||||
Set this nym api to work in a enabled credentials that would attempt to use gateway with the bandwidth credential requirement
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
```sh
|
||||
Show build information of this binary
|
||||
|
||||
Usage: nym-client build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
```sh
|
||||
|
||||
Binary Name: nym-client
|
||||
Build Timestamp: 2024-10-09T13:56:14.428750844Z
|
||||
Build Version: 1.1.39
|
||||
Commit SHA: fac373c1db4fa5389ba61de7943c77023467bccb
|
||||
Commit Date: 2024-10-09T14:59:40.000000000+02:00
|
||||
Commit Branch: max/new-docs-framework
|
||||
rustc Version: 1.80.0
|
||||
rustc Channel: stable
|
||||
cargo Profile: release
|
||||
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
```sh
|
||||
Generate shell completions
|
||||
|
||||
Usage: nym-client completions <SHELL>
|
||||
|
||||
Arguments:
|
||||
<SHELL> [possible values: bash, elvish, fish, power-shell, zsh]
|
||||
|
||||
Options:
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
```sh
|
||||
Generate Fig specification
|
||||
|
||||
Usage: nym-client generate-fig-spec
|
||||
|
||||
Options:
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,585 @@
|
||||
```sh
|
||||
const completion: Fig.Spec = {
|
||||
name: "nym-native-client",
|
||||
description: "Implementation of the Nym Client",
|
||||
subcommands: [
|
||||
{
|
||||
name: "init",
|
||||
description: "Initialise a Nym client. Do this first!",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to create config for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--gateway",
|
||||
description: "Id of the gateway we are going to connect to",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "gateway",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nyxd-urls",
|
||||
description: "Comma separated list of rest endpoints of the nyxd validators",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nyxd_urls",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nym-apis",
|
||||
description: "Comma separated list of rest endpoints of the API validators",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nym_apis",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--custom-mixnet",
|
||||
description: "Path to .json file containing custom network specification",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "custom_mixnet",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--enabled-credentials-mode",
|
||||
description: "Set this client to work in a enabled credentials mode that would attempt to use gateway with bandwidth credential requirement",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "enabled_credentials_mode",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"true",
|
||||
"false",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--disable-socket",
|
||||
description: "Whether to not start the websocket",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "disable_socket",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"true",
|
||||
"false",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-p", "--port"],
|
||||
description: "Port for the socket (if applicable) to listen on in all subsequent runs",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "port",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--host",
|
||||
description: "Ip for the socket (if applicable) to listen for requests",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "host",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--force-tls-gateway",
|
||||
description: "Specifies whether the client will attempt to enforce tls connection to the desired gateway",
|
||||
},
|
||||
{
|
||||
name: "--latency-based-selection",
|
||||
description: "Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly",
|
||||
exclusiveOn: [
|
||||
"--gateway",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "--fastmode",
|
||||
description: "Mostly debug-related option to increase default traffic rate so that you would not need to modify config post init",
|
||||
},
|
||||
{
|
||||
name: "--no-cover",
|
||||
description: "Disable loop cover traffic and the Poisson rate limiter (for debugging only)",
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "run",
|
||||
description: "Run the Nym client with provided configuration client optionally overriding set parameters",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to create config for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--gateway",
|
||||
description: "Id of the gateway we want to connect to. If overridden, it is user's responsibility to ensure prior registration happened",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "gateway",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nyxd-urls",
|
||||
description: "Comma separated list of rest endpoints of the nyxd validators",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nyxd_urls",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nym-apis",
|
||||
description: "Comma separated list of rest endpoints of the API validators",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nym_apis",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--custom-mixnet",
|
||||
description: "Path to .json file containing custom network specification",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "custom_mixnet",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--enabled-credentials-mode",
|
||||
description: "Set this client to work in a enabled credentials mode that would attempt to use gateway with bandwidth credential requirement",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "enabled_credentials_mode",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"true",
|
||||
"false",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--disable-socket",
|
||||
description: "Whether to not start the websocket",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "disable_socket",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"true",
|
||||
"false",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-p", "--port"],
|
||||
description: "Port for the socket to listen on",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "port",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--host",
|
||||
description: "Ip for the socket (if applicable) to listen for requests",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "host",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--fastmode",
|
||||
description: "Mostly debug-related option to increase default traffic rate so that you would not need to modify config post init",
|
||||
},
|
||||
{
|
||||
name: "--no-cover",
|
||||
description: "Disable loop cover traffic and the Poisson rate limiter (for debugging only)",
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "import-credential",
|
||||
description: "Import a pre-generated credential",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client that is going to import the credential",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--credential-data",
|
||||
description: "Explicitly provide the encoded credential data (as base58)",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "credential_data",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--credential-path",
|
||||
description: "Specifies the path to file containing binary credential data",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "credential_path",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--version",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "version",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "list-gateways",
|
||||
description: "List all registered with gateways",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to list gateways for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "add-gateway",
|
||||
description: "Add new gateway to this client",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to add gateway for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--gateway-id",
|
||||
description: "Explicitly specify id of the gateway to register with. If unspecified, a random gateway will be chosen instead",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "gateway_id",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nym-apis",
|
||||
description: "Comma separated list of rest endpoints of the API validators",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nym_apis",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--custom-mixnet",
|
||||
description: "Path to .json file containing custom network specification",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "custom_mixnet",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--force-tls-gateway",
|
||||
description: "Specifies whether the client will attempt to enforce tls connection to the desired gateway",
|
||||
},
|
||||
{
|
||||
name: "--latency-based-selection",
|
||||
description: "Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly",
|
||||
exclusiveOn: [
|
||||
"--gateway-id",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "--set-active",
|
||||
description: "Specify whether this new gateway should be set as the active one",
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "switch-gateway",
|
||||
description: "Change the currently active gateway. Note that you must have already registered with the new gateway!",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to list gateways for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--gateway-id",
|
||||
description: "Id of the gateway we want to switch to",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "gateway_id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "show-ticketbooks",
|
||||
description: "Display information associated with the imported ticketbooks,",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client that is going to display the ticketbook information",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "build-info",
|
||||
description: "Show build information of this binary",
|
||||
options: [
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "completions",
|
||||
description: "Generate shell completions",
|
||||
options: [
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
args: {
|
||||
name: "shell",
|
||||
suggestions: [
|
||||
"bash",
|
||||
"elvish",
|
||||
"fish",
|
||||
"power-shell",
|
||||
"zsh",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "generate-fig-spec",
|
||||
description: "Generate Fig specification",
|
||||
options: [
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "help",
|
||||
description: "Print this message or the help of the given subcommand(s)",
|
||||
subcommands: [
|
||||
{
|
||||
name: "init",
|
||||
description: "Initialise a Nym client. Do this first!",
|
||||
},
|
||||
{
|
||||
name: "run",
|
||||
description: "Run the Nym client with provided configuration client optionally overriding set parameters",
|
||||
},
|
||||
{
|
||||
name: "import-credential",
|
||||
description: "Import a pre-generated credential",
|
||||
},
|
||||
{
|
||||
name: "list-gateways",
|
||||
description: "List all registered with gateways",
|
||||
},
|
||||
{
|
||||
name: "add-gateway",
|
||||
description: "Add new gateway to this client",
|
||||
},
|
||||
{
|
||||
name: "switch-gateway",
|
||||
description: "Change the currently active gateway. Note that you must have already registered with the new gateway!",
|
||||
},
|
||||
{
|
||||
name: "show-ticketbooks",
|
||||
description: "Display information associated with the imported ticketbooks,",
|
||||
},
|
||||
{
|
||||
name: "build-info",
|
||||
description: "Show build information of this binary",
|
||||
},
|
||||
{
|
||||
name: "completions",
|
||||
description: "Generate shell completions",
|
||||
},
|
||||
{
|
||||
name: "generate-fig-spec",
|
||||
description: "Generate Fig specification",
|
||||
},
|
||||
{
|
||||
name: "help",
|
||||
description: "Print this message or the help of the given subcommand(s)",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
options: [
|
||||
{
|
||||
name: ["-c", "--config-env-file"],
|
||||
description: "Path pointing to an env file that configures the client",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "config_env_file",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--no-banner",
|
||||
description: "Flag used for disabling the printed banner in tty",
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
{
|
||||
name: ["-V", "--version"],
|
||||
description: "Print version",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default completion;
|
||||
```
|
||||
@@ -0,0 +1,15 @@
|
||||
```sh
|
||||
Import a pre-generated credential
|
||||
|
||||
Usage: nym-client import-credential --id <ID> <--credential-data <CREDENTIAL_DATA>|--credential-path <CREDENTIAL_PATH>>
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of client that is going to import the credential
|
||||
--credential-data <CREDENTIAL_DATA>
|
||||
Explicitly provide the encoded credential data (as base58)
|
||||
--credential-path <CREDENTIAL_PATH>
|
||||
Specifies the path to file containing binary credential data
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
@@ -0,0 +1,27 @@
|
||||
```sh
|
||||
Initialise a Nym client. Do this first!
|
||||
|
||||
Usage: nym-client init [OPTIONS] --id <ID>
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of client we want to create config for
|
||||
--gateway <GATEWAY>
|
||||
Id of the gateway we are going to connect to
|
||||
--force-tls-gateway
|
||||
Specifies whether the client will attempt to enforce tls connection to the desired gateway
|
||||
--latency-based-selection
|
||||
Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly
|
||||
--nym-apis <NYM_APIS>
|
||||
Comma separated list of rest endpoints of the API validators
|
||||
--disable-socket <DISABLE_SOCKET>
|
||||
Whether to not start the websocket [possible values: true, false]
|
||||
-p, --port <PORT>
|
||||
Port for the socket (if applicable) to listen on in all subsequent runs
|
||||
--host <HOST>
|
||||
Ip for the socket (if applicable) to listen for requests
|
||||
-o, --output <OUTPUT>
|
||||
[default: text] [possible values: text, json]
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
```sh
|
||||
List all registered with gateways
|
||||
|
||||
Usage: nym-client list-gateways [OPTIONS] --id <ID>
|
||||
|
||||
Options:
|
||||
--id <ID> Id of client we want to list gateways for
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,21 @@
|
||||
```sh
|
||||
Run the Nym client with provided configuration client optionally overriding set parameters
|
||||
|
||||
Usage: nym-client run [OPTIONS] --id <ID>
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of client we want to create config for
|
||||
--gateway <GATEWAY>
|
||||
Id of the gateway we want to connect to. If overridden, it is user's responsibility to ensure prior registration happened
|
||||
--nym-apis <NYM_APIS>
|
||||
Comma separated list of rest endpoints of the API validators
|
||||
--disable-socket <DISABLE_SOCKET>
|
||||
Whether to not start the websocket [possible values: true, false]
|
||||
-p, --port <PORT>
|
||||
Port for the socket to listen on
|
||||
--host <HOST>
|
||||
Ip for the socket (if applicable) to listen for requests
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
```sh
|
||||
Change the currently active gateway. Note that you must have already registered with the new gateway!
|
||||
|
||||
Usage: nym-client switch-gateway --id <ID> --gateway-id <GATEWAY_ID>
|
||||
|
||||
Options:
|
||||
--id <ID> Id of client we want to list gateways for
|
||||
--gateway-id <GATEWAY_ID> Id of the gateway we want to switch to
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,12 @@
|
||||
```sh
|
||||
Show bonding information of this node depending on its currently selected mode
|
||||
|
||||
Usage: nym-node bonding-information [OPTIONS]
|
||||
|
||||
Options:
|
||||
--id <ID> Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
|
||||
--config-file <CONFIG_FILE> Path to a configuration file of this node [env: NYMNODE_CONFIG=]
|
||||
--mode <MODE> [env: NYMNODE_MODE=] [possible values: mixnode, entry-gateway, exit-gateway]
|
||||
-o, --output <OUTPUT> Specify the output format of the bonding information (`text` or `json`) [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,3 @@
|
||||
```sh
|
||||
[2m2024-10-22T13:00:32.542213Z[0m [31mERROR[0m [2mnym-node/src/config/upgrade_helpers.rs[0m[2m:[0m[2m16[0m[2m:[0m Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
```sh
|
||||
Show build information of this binary
|
||||
|
||||
Usage: nym-node build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
```sh
|
||||
|
||||
Binary Name: nym-node
|
||||
Build Timestamp: 2024-10-09T13:56:14.428750844Z
|
||||
Build Version: 1.1.6
|
||||
Commit SHA: fac373c1db4fa5389ba61de7943c77023467bccb
|
||||
Commit Date: 2024-10-09T14:59:40.000000000+02:00
|
||||
Commit Branch: max/new-docs-framework
|
||||
rustc Version: 1.80.0
|
||||
rustc Channel: stable
|
||||
cargo Profile: release
|
||||
|
||||
```
|
||||
@@ -0,0 +1,237 @@
|
||||
# `nym-node` Binary Commands (Autogenerated)
|
||||
|
||||
These docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script.
|
||||
```sh
|
||||
Usage: nym-node [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
build-info Show build information of this binary
|
||||
bonding-information Show bonding information of this node depending on its currently selected mode
|
||||
node-details Show details of this node
|
||||
migrate Attempt to migrate an existing mixnode or gateway into a nym-node
|
||||
run Start this nym-node
|
||||
sign Use identity key of this node to sign provided message
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
-c, --config-env-file <CONFIG_ENV_FILE>
|
||||
Path pointing to an env file that configures the nym-node and overrides any preconfigured values [env: NYMNODE_CONFIG_ENV_FILE_ARG=]
|
||||
--no-banner
|
||||
Flag used for disabling the printed banner in tty [env: NYMNODE_NO_BANNER=]
|
||||
-h, --help
|
||||
Print help
|
||||
-V, --version
|
||||
Print version
|
||||
```
|
||||
|
||||
### `build-info`
|
||||
```sh
|
||||
Show build information of this binary
|
||||
|
||||
Usage: nym-node build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
|
||||
### `bonding-information`
|
||||
```sh
|
||||
Show bonding information of this node depending on its currently selected mode
|
||||
|
||||
Usage: nym-node bonding-information [OPTIONS]
|
||||
|
||||
Options:
|
||||
--id <ID> Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
|
||||
--config-file <CONFIG_FILE> Path to a configuration file of this node [env: NYMNODE_CONFIG=]
|
||||
--mode <MODE> [env: NYMNODE_MODE=] [possible values: mixnode, entry-gateway, exit-gateway]
|
||||
-o, --output <OUTPUT> Specify the output format of the bonding information (`text` or `json`) [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
|
||||
### `node-details`
|
||||
```sh
|
||||
Show details of this node
|
||||
|
||||
Usage: nym-node node-details [OPTIONS]
|
||||
|
||||
Options:
|
||||
--id <ID> Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
|
||||
--config-file <CONFIG_FILE> Path to a configuration file of this node [env: NYMNODE_CONFIG=]
|
||||
-o, --output <OUTPUT> Specify the output format of the node details (`text` or `json`) [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
|
||||
### `migrate`
|
||||
```sh
|
||||
Attempt to migrate an existing mixnode or gateway into a nym-node
|
||||
|
||||
Usage: nym-node migrate [OPTIONS] <--id <ID>|--config-file <CONFIG_FILE>> <NODE_TYPE>
|
||||
|
||||
Arguments:
|
||||
<NODE_TYPE> Type of node (mixnode or gateway) to migrate into a nym-node [possible values: mixnode, gateway]
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of the node that's going to get migrated
|
||||
--config-file <CONFIG_FILE>
|
||||
Path to a configuration file of the node that's going to get migrated
|
||||
--preserve-id
|
||||
Specify whether to preserve id of the imported node
|
||||
--public-ips <PUBLIC_IPS>
|
||||
Comma separated list of public ip addresses that will be announced to the nym-api and subsequently to the clients. In nearly all circumstances, it's going to be identical to the address you're going to use for bonding [env: NYMNODE_PUBLIC_IPS=]
|
||||
--hostname <HOSTNAME>
|
||||
Optional hostname associated with this gateway that will be announced to the nym-api and subsequently to the clients [env: NYMNODE_HOSTNAME=]
|
||||
--location <LOCATION>
|
||||
Optional **physical** location of this node's server. Either full country name (e.g. 'Poland'), two-letter alpha2 (e.g. 'PL'), three-letter alpha3 (e.g. 'POL') or three-digit numeric-3 (e.g. '616') can be provided [env: NYMNODE_LOCATION=]
|
||||
--http-bind-address <HTTP_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its http API. default: `0.0.0.0:8080` [env: NYMNODE_HTTP_BIND_ADDRESS=]
|
||||
--landing-page-assets-path <LANDING_PAGE_ASSETS_PATH>
|
||||
Path to assets directory of custom landing page of this node [env: NYMNODE_HTTP_LANDING_ASSETS=]
|
||||
--http-access-token <HTTP_ACCESS_TOKEN>
|
||||
An optional bearer token for accessing certain http endpoints. Currently only used for prometheus metrics [env: NYMNODE_HTTP_ACCESS_TOKEN=]
|
||||
--expose-system-info <EXPOSE_SYSTEM_INFO>
|
||||
Specify whether basic system information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_INFO=] [possible values: true, false]
|
||||
--expose-system-hardware <EXPOSE_SYSTEM_HARDWARE>
|
||||
Specify whether basic system hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_HARDWARE=] [possible values: true, false]
|
||||
--expose-crypto-hardware <EXPOSE_CRYPTO_HARDWARE>
|
||||
Specify whether detailed system crypto hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_CRYPTO_HARDWARE=] [possible values: true, false]
|
||||
--mixnet-bind-address <MIXNET_BIND_ADDRESS>
|
||||
Address this node will bind to for listening for mixnet packets default: `0.0.0.0:1789` [env: NYMNODE_MIXNET_BIND_ADDRESS=]
|
||||
--mixnet-announce-port <MIXNET_ANNOUNCE_PORT>
|
||||
If applicable, custom port announced in the self-described API that other clients and nodes will use. Useful when the node is behind a proxy [env: NYMNODE_MIXNET_ANNOUNCE_PORT=]
|
||||
--nym-api-urls <NYM_API_URLS>
|
||||
Addresses to nym APIs from which the node gets the view of the network [env: NYMNODE_NYM_APIS=]
|
||||
--nyxd-urls <NYXD_URLS>
|
||||
Addresses to nyxd chain endpoint which the node will use for chain interactions [env: NYMNODE_NYXD=]
|
||||
--wireguard-enabled <WIREGUARD_ENABLED>
|
||||
Specifies whether the wireguard service is enabled on this node [env: NYMNODE_WG_ENABLED=] [possible values: true, false]
|
||||
--wireguard-bind-address <WIREGUARD_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its wireguard interface. default: `0.0.0.0:51822` [env: NYMNODE_WG_BIND_ADDRESS=]
|
||||
--wireguard-private-ip <WIREGUARD_PRIVATE_IP>
|
||||
Private IP address of the wireguard gateway. default: `10.1.0.1` [env: NYMNODE_WG_IP=]
|
||||
--wireguard-announced-port <WIREGUARD_ANNOUNCED_PORT>
|
||||
Port announced to external clients wishing to connect to the wireguard interface. Useful in the instances where the node is behind a proxy [env: NYMNODE_WG_ANNOUNCED_PORT=]
|
||||
--wireguard-private-network-prefix <WIREGUARD_PRIVATE_NETWORK_PREFIX>
|
||||
The prefix denoting the maximum number of the clients that can be connected via Wireguard. The maximum value for IPv4 is 32 and for IPv6 is 128 [env: NYMNODE_WG_PRIVATE_NETWORK_PREFIX=]
|
||||
--verloc-bind-address <VERLOC_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its verloc API. default: `0.0.0.0:1790` [env: NYMNODE_VERLOC_BIND_ADDRESS=]
|
||||
--verloc-announce-port <VERLOC_ANNOUNCE_PORT>
|
||||
If applicable, custom port announced in the self-described API that other clients and nodes will use. Useful when the node is behind a proxy [env: NYMNODE_VERLOC_ANNOUNCE_PORT=]
|
||||
--entry-bind-address <ENTRY_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its client websocket API. default: `0.0.0.0:9000` [env: NYMNODE_ENTRY_BIND_ADDRESS=]
|
||||
--announce-ws-port <ANNOUNCE_WS_PORT>
|
||||
Custom announced port for listening for websocket client traffic. If unspecified, the value from the `bind_address` will be used instead [env: NYMNODE_ENTRY_ANNOUNCE_WS_PORT=]
|
||||
--announce-wss-port <ANNOUNCE_WSS_PORT>
|
||||
If applicable, announced port for listening for secure websocket client traffic [env: NYMNODE_ENTRY_ANNOUNCE_WSS_PORT=]
|
||||
--enforce-zk-nyms <ENFORCE_ZK_NYMS>
|
||||
Indicates whether this gateway is accepting only coconut credentials for accessing the mixnet or if it also accepts non-paying clients [env: NYMNODE_ENFORCE_ZK_NYMS=] [possible values: true, false]
|
||||
--mnemonic <MNEMONIC>
|
||||
Custom cosmos wallet mnemonic used for zk-nym redemption. If no value is provided, a fresh mnemonic is going to be generated [env: NYMNODE_MNEMONIC=]
|
||||
--upstream-exit-policy-url <UPSTREAM_EXIT_POLICY_URL>
|
||||
Specifies the url for an upstream source of the exit policy used by this node [env: NYMNODE_UPSTREAM_EXIT_POLICY=]
|
||||
--open-proxy <OPEN_PROXY>
|
||||
Specifies whether this exit node should run in 'open-proxy' mode and thus would attempt to resolve **ANY** request it receives [env: NYMNODE_OPEN_PROXY=] [possible values: true, false]
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
|
||||
### `run`
|
||||
```sh
|
||||
Start this nym-node
|
||||
|
||||
Usage: nym-node run [OPTIONS]
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
|
||||
--config-file <CONFIG_FILE>
|
||||
Path to a configuration file of this node [env: NYMNODE_CONFIG=]
|
||||
--accept-operator-terms-and-conditions
|
||||
Explicitly specify whether you agree with the terms and conditions of a nym node operator as defined at <https://nymtech.net/terms-and-conditions/operators/v1.0.0> [env: NYMNODE_ACCEPT_OPERATOR_TERMS=]
|
||||
--deny-init
|
||||
Forbid a new node from being initialised if configuration file for the provided specification doesn't already exist [env: NYMNODE_DENY_INIT=]
|
||||
--init-only
|
||||
If this is a brand new nym-node, specify whether it should only be initialised without actually running the subprocesses [env: NYMNODE_INIT_ONLY=]
|
||||
--local
|
||||
Flag specifying this node will be running in a local setting [env: NYMNODE_LOCAL=]
|
||||
--mode <MODE>
|
||||
Specifies the current mode of this nym-node [env: NYMNODE_MODE=] [possible values: mixnode, entry-gateway, exit-gateway]
|
||||
-w, --write-changes
|
||||
If this node has been initialised before, specify whether to write any new changes to the config file [env: NYMNODE_WRITE_CONFIG_CHANGES=]
|
||||
--bonding-information-output <BONDING_INFORMATION_OUTPUT>
|
||||
Specify output file for bonding information of this nym-node, i.e. its encoded keys. NOTE: the required bonding information is still a subject to change and this argument should be treated only as a preview of future features [env: NYMNODE_BONDING_INFORMATION_OUTPUT=]
|
||||
-o, --output <OUTPUT>
|
||||
Specify the output format of the bonding information (`text` or `json`) [env: NYMNODE_OUTPUT=] [default: text] [possible values: text, json]
|
||||
--public-ips <PUBLIC_IPS>
|
||||
Comma separated list of public ip addresses that will be announced to the nym-api and subsequently to the clients. In nearly all circumstances, it's going to be identical to the address you're going to use for bonding [env: NYMNODE_PUBLIC_IPS=]
|
||||
--hostname <HOSTNAME>
|
||||
Optional hostname associated with this gateway that will be announced to the nym-api and subsequently to the clients [env: NYMNODE_HOSTNAME=]
|
||||
--location <LOCATION>
|
||||
Optional **physical** location of this node's server. Either full country name (e.g. 'Poland'), two-letter alpha2 (e.g. 'PL'), three-letter alpha3 (e.g. 'POL') or three-digit numeric-3 (e.g. '616') can be provided [env: NYMNODE_LOCATION=]
|
||||
--http-bind-address <HTTP_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its http API. default: `0.0.0.0:8080` [env: NYMNODE_HTTP_BIND_ADDRESS=]
|
||||
--landing-page-assets-path <LANDING_PAGE_ASSETS_PATH>
|
||||
Path to assets directory of custom landing page of this node [env: NYMNODE_HTTP_LANDING_ASSETS=]
|
||||
--http-access-token <HTTP_ACCESS_TOKEN>
|
||||
An optional bearer token for accessing certain http endpoints. Currently only used for prometheus metrics [env: NYMNODE_HTTP_ACCESS_TOKEN=]
|
||||
--expose-system-info <EXPOSE_SYSTEM_INFO>
|
||||
Specify whether basic system information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_INFO=] [possible values: true, false]
|
||||
--expose-system-hardware <EXPOSE_SYSTEM_HARDWARE>
|
||||
Specify whether basic system hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_HARDWARE=] [possible values: true, false]
|
||||
--expose-crypto-hardware <EXPOSE_CRYPTO_HARDWARE>
|
||||
Specify whether detailed system crypto hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_CRYPTO_HARDWARE=] [possible values: true, false]
|
||||
--mixnet-bind-address <MIXNET_BIND_ADDRESS>
|
||||
Address this node will bind to for listening for mixnet packets default: `0.0.0.0:1789` [env: NYMNODE_MIXNET_BIND_ADDRESS=]
|
||||
--mixnet-announce-port <MIXNET_ANNOUNCE_PORT>
|
||||
If applicable, custom port announced in the self-described API that other clients and nodes will use. Useful when the node is behind a proxy [env: NYMNODE_MIXNET_ANNOUNCE_PORT=]
|
||||
--nym-api-urls <NYM_API_URLS>
|
||||
Addresses to nym APIs from which the node gets the view of the network [env: NYMNODE_NYM_APIS=]
|
||||
--nyxd-urls <NYXD_URLS>
|
||||
Addresses to nyxd chain endpoint which the node will use for chain interactions [env: NYMNODE_NYXD=]
|
||||
--wireguard-enabled <WIREGUARD_ENABLED>
|
||||
Specifies whether the wireguard service is enabled on this node [env: NYMNODE_WG_ENABLED=] [possible values: true, false]
|
||||
--wireguard-bind-address <WIREGUARD_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its wireguard interface. default: `0.0.0.0:51822` [env: NYMNODE_WG_BIND_ADDRESS=]
|
||||
--wireguard-private-ip <WIREGUARD_PRIVATE_IP>
|
||||
Private IP address of the wireguard gateway. default: `10.1.0.1` [env: NYMNODE_WG_IP=]
|
||||
--wireguard-announced-port <WIREGUARD_ANNOUNCED_PORT>
|
||||
Port announced to external clients wishing to connect to the wireguard interface. Useful in the instances where the node is behind a proxy [env: NYMNODE_WG_ANNOUNCED_PORT=]
|
||||
--wireguard-private-network-prefix <WIREGUARD_PRIVATE_NETWORK_PREFIX>
|
||||
The prefix denoting the maximum number of the clients that can be connected via Wireguard. The maximum value for IPv4 is 32 and for IPv6 is 128 [env: NYMNODE_WG_PRIVATE_NETWORK_PREFIX=]
|
||||
--verloc-bind-address <VERLOC_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its verloc API. default: `0.0.0.0:1790` [env: NYMNODE_VERLOC_BIND_ADDRESS=]
|
||||
--verloc-announce-port <VERLOC_ANNOUNCE_PORT>
|
||||
If applicable, custom port announced in the self-described API that other clients and nodes will use. Useful when the node is behind a proxy [env: NYMNODE_VERLOC_ANNOUNCE_PORT=]
|
||||
--entry-bind-address <ENTRY_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its client websocket API. default: `0.0.0.0:9000` [env: NYMNODE_ENTRY_BIND_ADDRESS=]
|
||||
--announce-ws-port <ANNOUNCE_WS_PORT>
|
||||
Custom announced port for listening for websocket client traffic. If unspecified, the value from the `bind_address` will be used instead [env: NYMNODE_ENTRY_ANNOUNCE_WS_PORT=]
|
||||
--announce-wss-port <ANNOUNCE_WSS_PORT>
|
||||
If applicable, announced port for listening for secure websocket client traffic [env: NYMNODE_ENTRY_ANNOUNCE_WSS_PORT=]
|
||||
--enforce-zk-nyms <ENFORCE_ZK_NYMS>
|
||||
Indicates whether this gateway is accepting only coconut credentials for accessing the mixnet or if it also accepts non-paying clients [env: NYMNODE_ENFORCE_ZK_NYMS=] [possible values: true, false]
|
||||
--mnemonic <MNEMONIC>
|
||||
Custom cosmos wallet mnemonic used for zk-nym redemption. If no value is provided, a fresh mnemonic is going to be generated [env: NYMNODE_MNEMONIC=]
|
||||
--upstream-exit-policy-url <UPSTREAM_EXIT_POLICY_URL>
|
||||
Specifies the url for an upstream source of the exit policy used by this node [env: NYMNODE_UPSTREAM_EXIT_POLICY=]
|
||||
--open-proxy <OPEN_PROXY>
|
||||
Specifies whether this exit node should run in 'open-proxy' mode and thus would attempt to resolve **ANY** request it receives [env: NYMNODE_OPEN_PROXY=] [possible values: true, false]
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
|
||||
### `sign`
|
||||
```sh
|
||||
Use identity key of this node to sign provided message
|
||||
|
||||
Usage: nym-node sign [OPTIONS] <--text <TEXT>|--contract-msg <CONTRACT_MSG>>
|
||||
|
||||
Options:
|
||||
--id <ID> Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
|
||||
--config-file <CONFIG_FILE> Path to a configuration file of this node [env: NYMNODE_CONFIG=]
|
||||
--text <TEXT> Signs an arbitrary piece of text with your identity key
|
||||
--contract-msg <CONTRACT_MSG> Signs a transaction-specific payload, that is going to be sent to the smart contract, with your identity key
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,68 @@
|
||||
```sh
|
||||
Attempt to migrate an existing mixnode or gateway into a nym-node
|
||||
|
||||
Usage: nym-node migrate [OPTIONS] <--id <ID>|--config-file <CONFIG_FILE>> <NODE_TYPE>
|
||||
|
||||
Arguments:
|
||||
<NODE_TYPE> Type of node (mixnode or gateway) to migrate into a nym-node [possible values: mixnode, gateway]
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of the node that's going to get migrated
|
||||
--config-file <CONFIG_FILE>
|
||||
Path to a configuration file of the node that's going to get migrated
|
||||
--preserve-id
|
||||
Specify whether to preserve id of the imported node
|
||||
--public-ips <PUBLIC_IPS>
|
||||
Comma separated list of public ip addresses that will be announced to the nym-api and subsequently to the clients. In nearly all circumstances, it's going to be identical to the address you're going to use for bonding [env: NYMNODE_PUBLIC_IPS=]
|
||||
--hostname <HOSTNAME>
|
||||
Optional hostname associated with this gateway that will be announced to the nym-api and subsequently to the clients [env: NYMNODE_HOSTNAME=]
|
||||
--location <LOCATION>
|
||||
Optional **physical** location of this node's server. Either full country name (e.g. 'Poland'), two-letter alpha2 (e.g. 'PL'), three-letter alpha3 (e.g. 'POL') or three-digit numeric-3 (e.g. '616') can be provided [env: NYMNODE_LOCATION=]
|
||||
--http-bind-address <HTTP_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its http API. default: `0.0.0.0:8080` [env: NYMNODE_HTTP_BIND_ADDRESS=]
|
||||
--landing-page-assets-path <LANDING_PAGE_ASSETS_PATH>
|
||||
Path to assets directory of custom landing page of this node [env: NYMNODE_HTTP_LANDING_ASSETS=]
|
||||
--http-access-token <HTTP_ACCESS_TOKEN>
|
||||
An optional bearer token for accessing certain http endpoints. Currently only used for prometheus metrics [env: NYMNODE_HTTP_ACCESS_TOKEN=]
|
||||
--expose-system-info <EXPOSE_SYSTEM_INFO>
|
||||
Specify whether basic system information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_INFO=] [possible values: true, false]
|
||||
--expose-system-hardware <EXPOSE_SYSTEM_HARDWARE>
|
||||
Specify whether basic system hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_SYSTEM_HARDWARE=] [possible values: true, false]
|
||||
--expose-crypto-hardware <EXPOSE_CRYPTO_HARDWARE>
|
||||
Specify whether detailed system crypto hardware information should be exposed. default: true [env: NYMNODE_HTTP_EXPOSE_CRYPTO_HARDWARE=] [possible values: true, false]
|
||||
--mixnet-bind-address <MIXNET_BIND_ADDRESS>
|
||||
Address this node will bind to for listening for mixnet packets default: `0.0.0.0:1789` [env: NYMNODE_MIXNET_BIND_ADDRESS=]
|
||||
--nym-api-urls <NYM_API_URLS>
|
||||
Addresses to nym APIs from which the node gets the view of the network [env: NYMNODE_NYM_APIS=]
|
||||
--nyxd-urls <NYXD_URLS>
|
||||
Addresses to nyxd chain endpoint which the node will use for chain interactions [env: NYMNODE_NYXD=]
|
||||
--wireguard-enabled <WIREGUARD_ENABLED>
|
||||
Specifies whether the wireguard service is enabled on this node [env: NYMNODE_WG_ENABLED=] [possible values: true, false]
|
||||
--wireguard-bind-address <WIREGUARD_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its wireguard interface. default: `0.0.0.0:51822` [env: NYMNODE_WG_BIND_ADDRESS=]
|
||||
--wireguard-private-ip <WIREGUARD_PRIVATE_IP>
|
||||
Private IP address of the wireguard gateway. default: `10.1.0.1` [env: NYMNODE_WG_IP=]
|
||||
--wireguard-announced-port <WIREGUARD_ANNOUNCED_PORT>
|
||||
Port announced to external clients wishing to connect to the wireguard interface. Useful in the instances where the node is behind a proxy [env: NYMNODE_WG_ANNOUNCED_PORT=]
|
||||
--wireguard-private-network-prefix <WIREGUARD_PRIVATE_NETWORK_PREFIX>
|
||||
The prefix denoting the maximum number of the clients that can be connected via Wireguard. The maximum value for IPv4 is 32 and for IPv6 is 128 [env: NYMNODE_WG_PRIVATE_NETWORK_PREFIX=]
|
||||
--verloc-bind-address <VERLOC_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its verloc API. default: `0.0.0.0:1790` [env: NYMNODE_VERLOC_BIND_ADDRESS=]
|
||||
--entry-bind-address <ENTRY_BIND_ADDRESS>
|
||||
Socket address this node will use for binding its client websocket API. default: `0.0.0.0:9000` [env: NYMNODE_ENTRY_BIND_ADDRESS=]
|
||||
--announce-ws-port <ANNOUNCE_WS_PORT>
|
||||
Custom announced port for listening for websocket client traffic. If unspecified, the value from the `bind_address` will be used instead [env: NYMNODE_ENTRY_ANNOUNCE_WS_PORT=]
|
||||
--announce-wss-port <ANNOUNCE_WSS_PORT>
|
||||
If applicable, announced port for listening for secure websocket client traffic [env: NYMNODE_ENTRY_ANNOUNCE_WSS_PORT=]
|
||||
--enforce-zk-nyms <ENFORCE_ZK_NYMS>
|
||||
Indicates whether this gateway is accepting only coconut credentials for accessing the mixnet or if it also accepts non-paying clients [env: NYMNODE_ENFORCE_ZK_NYMS=] [possible values: true, false]
|
||||
--mnemonic <MNEMONIC>
|
||||
Custom cosmos wallet mnemonic used for zk-nym redemption. If no value is provided, a fresh mnemonic is going to be generated [env: NYMNODE_MNEMONIC=]
|
||||
--upstream-exit-policy-url <UPSTREAM_EXIT_POLICY_URL>
|
||||
Specifies the url for an upstream source of the exit policy used by this node [env: NYMNODE_UPSTREAM_EXIT_POLICY=]
|
||||
--open-proxy <OPEN_PROXY>
|
||||
Specifies whether this exit node should run in 'open-proxy' mode and thus would attempt to resolve **ANY** request it receives [env: NYMNODE_OPEN_PROXY=] [possible values: true, false]
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
```sh
|
||||
Show details of this node
|
||||
|
||||
Usage: nym-node node-details [OPTIONS]
|
||||
|
||||
Options:
|
||||
--id <ID> Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
|
||||
--config-file <CONFIG_FILE> Path to a configuration file of this node [env: NYMNODE_CONFIG=]
|
||||
-o, --output <OUTPUT> Specify the output format of the node details (`text` or `json`) [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,3 @@
|
||||
```sh
|
||||
[2m2024-10-22T13:00:32.562750Z[0m [31mERROR[0m [2mnym-node/src/config/upgrade_helpers.rs[0m[2m:[0m[2m16[0m[2m:[0m Failed to finish upgrade - failed to load config file using path '/home/m/.nym/nym-nodes/default-nym-node/config/config.toml'. detailed message: No such file or directory (os error 2)
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
```sh
|
||||
Use identity key of this node to sign provided message
|
||||
|
||||
Usage: nym-node sign [OPTIONS] <--text <TEXT>|--contract-msg <CONTRACT_MSG>>
|
||||
|
||||
Options:
|
||||
--id <ID> Id of the nym-node to use [env: NYMNODE_ID=] [default: default-nym-node]
|
||||
--config-file <CONFIG_FILE> Path to a configuration file of this node [env: NYMNODE_CONFIG=]
|
||||
--text <TEXT> Signs an arbitrary piece of text with your identity key
|
||||
--contract-msg <CONTRACT_MSG> Signs a transaction-specific payload, that is going to be sent to the smart contract, with your identity key
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,15 @@
|
||||
```sh
|
||||
Add new gateway to this client
|
||||
|
||||
Usage: nym-socks5-client add-gateway [OPTIONS] --id <ID>
|
||||
|
||||
Options:
|
||||
--id <ID> Id of client we want to add gateway for
|
||||
--gateway-id <GATEWAY_ID> Explicitly specify id of the gateway to register with. If unspecified, a random gateway will be chosen instead
|
||||
--force-tls-gateway Specifies whether the client will attempt to enforce tls connection to the desired gateway
|
||||
--latency-based-selection Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly
|
||||
--set-active Specify whether this new gateway should be set as the active one
|
||||
--nym-apis <NYM_APIS> Comma separated list of rest endpoints of the API validators
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
```sh
|
||||
Show build information of this binary
|
||||
|
||||
Usage: nym-socks5-client build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
```sh
|
||||
|
||||
Binary Name: nym-socks5-client
|
||||
Build Timestamp: 2024-10-09T13:56:14.428750844Z
|
||||
Build Version: 1.1.39
|
||||
Commit SHA: fac373c1db4fa5389ba61de7943c77023467bccb
|
||||
Commit Date: 2024-10-09T14:59:40.000000000+02:00
|
||||
Commit Branch: max/new-docs-framework
|
||||
rustc Version: 1.80.0
|
||||
rustc Channel: stable
|
||||
cargo Profile: release
|
||||
|
||||
```
|
||||
@@ -0,0 +1,11 @@
|
||||
```sh
|
||||
Generate shell completions
|
||||
|
||||
Usage: nym-socks5-client completions <SHELL>
|
||||
|
||||
Arguments:
|
||||
<SHELL> [possible values: bash, elvish, fish, power-shell, zsh]
|
||||
|
||||
Options:
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
```sh
|
||||
Generate Fig specification
|
||||
|
||||
Usage: nym-socks5-client generate-fig-spec
|
||||
|
||||
Options:
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,619 @@
|
||||
```sh
|
||||
const completion: Fig.Spec = {
|
||||
name: "nym-socks5-client",
|
||||
description: "A SOCKS5 localhost proxy that converts incoming messages to Sphinx and sends them to a Nym address",
|
||||
subcommands: [
|
||||
{
|
||||
name: "init",
|
||||
description: "Initialise a Nym client. Do this first!",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to create config for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--gateway",
|
||||
description: "Id of the gateway we are going to connect to",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "gateway",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nyxd-urls",
|
||||
description: "Comma separated list of rest endpoints of the nyxd validators",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nyxd_urls",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nym-apis",
|
||||
description: "Comma separated list of rest endpoints of the API validators",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nym_apis",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--custom-mixnet",
|
||||
description: "Path to .json file containing custom network specification",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "custom_mixnet",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--enabled-credentials-mode",
|
||||
description: "Set this client to work in a enabled credentials mode that would attempt to use gateway with bandwidth credential requirement",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "enabled_credentials_mode",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"true",
|
||||
"false",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--provider",
|
||||
description: "Address of the socks5 provider to send messages to",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "provider",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--use-reply-surbs",
|
||||
description: "Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "use_reply_surbs",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"true",
|
||||
"false",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-p", "--port"],
|
||||
description: "Port for the socket to listen on in all subsequent runs",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "port",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--host",
|
||||
description: "The custom host on which the socks5 client will be listening for requests",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "host",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--force-tls-gateway",
|
||||
description: "Specifies whether the client will attempt to enforce tls connection to the desired gateway",
|
||||
},
|
||||
{
|
||||
name: "--latency-based-selection",
|
||||
description: "Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly",
|
||||
exclusiveOn: [
|
||||
"--gateway",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "--fastmode",
|
||||
description: "Mostly debug-related option to increase default traffic rate so that you would not need to modify config post init",
|
||||
},
|
||||
{
|
||||
name: "--no-cover",
|
||||
description: "Disable loop cover traffic and the Poisson rate limiter (for debugging only)",
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help (see more with '--help')",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "run",
|
||||
description: "Run the Nym client with provided configuration client optionally overriding set parameters",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to create config for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--gateway",
|
||||
description: "Id of the gateway we want to connect to. If overridden, it is user's responsibility to ensure prior registration happened",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "gateway",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nyxd-urls",
|
||||
description: "Comma separated list of rest endpoints of the nyxd validators",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nyxd_urls",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nym-apis",
|
||||
description: "Comma separated list of rest endpoints of the API validators",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nym_apis",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--custom-mixnet",
|
||||
description: "Path to .json file containing custom network specification",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "custom_mixnet",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--enabled-credentials-mode",
|
||||
description: "Set this client to work in a enabled credentials mode that would attempt to use gateway with bandwidth credential requirement",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "enabled_credentials_mode",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"true",
|
||||
"false",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--use-anonymous-replies",
|
||||
description: "Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "use_anonymous_replies",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"true",
|
||||
"false",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--provider",
|
||||
description: "Address of the socks5 provider to send messages to",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "provider",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-p", "--port"],
|
||||
description: "Port for the socket to listen on",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "port",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--host",
|
||||
description: "The custom host on which the socks5 client will be listening for requests",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "host",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--geo-routing",
|
||||
description: "Set geo-aware mixnode selection when sending mixnet traffic, for experiments only",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "geo_routing",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--fastmode",
|
||||
description: "Mostly debug-related option to increase default traffic rate so that you would not need to modify config post init",
|
||||
},
|
||||
{
|
||||
name: "--no-cover",
|
||||
description: "Disable loop cover traffic and the Poisson rate limiter (for debugging only)",
|
||||
},
|
||||
{
|
||||
name: "--medium-toggle",
|
||||
description: "Enable medium mixnet traffic, for experiments only. This includes things like disabling cover traffic, no per hop delays, etc",
|
||||
},
|
||||
{
|
||||
name: "--outfox",
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help (see more with '--help')",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "import-credential",
|
||||
description: "Import a pre-generated credential",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client that is going to import the credential",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--credential-data",
|
||||
description: "Explicitly provide the encoded credential data (as base58)",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "credential_data",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--credential-path",
|
||||
description: "Specifies the path to file containing binary credential data",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "credential_path",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--version",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "version",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "list-gateways",
|
||||
description: "List all registered with gateways",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to list gateways for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "add-gateway",
|
||||
description: "Add new gateway to this client",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to add gateway for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--gateway-id",
|
||||
description: "Explicitly specify id of the gateway to register with. If unspecified, a random gateway will be chosen instead",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "gateway_id",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--nym-apis",
|
||||
description: "Comma separated list of rest endpoints of the API validators",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "nym_apis",
|
||||
isOptional: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--custom-mixnet",
|
||||
description: "Path to .json file containing custom network specification",
|
||||
hidden: true,
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "custom_mixnet",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--force-tls-gateway",
|
||||
description: "Specifies whether the client will attempt to enforce tls connection to the desired gateway",
|
||||
},
|
||||
{
|
||||
name: "--latency-based-selection",
|
||||
description: "Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly",
|
||||
exclusiveOn: [
|
||||
"--gateway-id",
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "--set-active",
|
||||
description: "Specify whether this new gateway should be set as the active one",
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "switch-gateway",
|
||||
description: "Change the currently active gateway. Note that you must have already registered with the new gateway!",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client we want to list gateways for",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--gateway-id",
|
||||
description: "Id of the gateway we want to switch to",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "gateway_id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "show-ticketbooks",
|
||||
description: "Display information associated with the imported ticketbooks,",
|
||||
options: [
|
||||
{
|
||||
name: "--id",
|
||||
description: "Id of client that is going to display the ticketbook information",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "id",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "build-info",
|
||||
description: "Show build information of this binary",
|
||||
options: [
|
||||
{
|
||||
name: ["-o", "--output"],
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "output",
|
||||
isOptional: true,
|
||||
suggestions: [
|
||||
"text",
|
||||
"json",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "completions",
|
||||
description: "Generate shell completions",
|
||||
options: [
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
args: {
|
||||
name: "shell",
|
||||
suggestions: [
|
||||
"bash",
|
||||
"elvish",
|
||||
"fish",
|
||||
"power-shell",
|
||||
"zsh",
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "generate-fig-spec",
|
||||
description: "Generate Fig specification",
|
||||
options: [
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "help",
|
||||
description: "Print this message or the help of the given subcommand(s)",
|
||||
subcommands: [
|
||||
{
|
||||
name: "init",
|
||||
description: "Initialise a Nym client. Do this first!",
|
||||
},
|
||||
{
|
||||
name: "run",
|
||||
description: "Run the Nym client with provided configuration client optionally overriding set parameters",
|
||||
},
|
||||
{
|
||||
name: "import-credential",
|
||||
description: "Import a pre-generated credential",
|
||||
},
|
||||
{
|
||||
name: "list-gateways",
|
||||
description: "List all registered with gateways",
|
||||
},
|
||||
{
|
||||
name: "add-gateway",
|
||||
description: "Add new gateway to this client",
|
||||
},
|
||||
{
|
||||
name: "switch-gateway",
|
||||
description: "Change the currently active gateway. Note that you must have already registered with the new gateway!",
|
||||
},
|
||||
{
|
||||
name: "show-ticketbooks",
|
||||
description: "Display information associated with the imported ticketbooks,",
|
||||
},
|
||||
{
|
||||
name: "build-info",
|
||||
description: "Show build information of this binary",
|
||||
},
|
||||
{
|
||||
name: "completions",
|
||||
description: "Generate shell completions",
|
||||
},
|
||||
{
|
||||
name: "generate-fig-spec",
|
||||
description: "Generate Fig specification",
|
||||
},
|
||||
{
|
||||
name: "help",
|
||||
description: "Print this message or the help of the given subcommand(s)",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
options: [
|
||||
{
|
||||
name: ["-c", "--config-env-file"],
|
||||
description: "Path pointing to an env file that configures the client",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "config_env_file",
|
||||
isOptional: true,
|
||||
template: "filepaths",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "--no-banner",
|
||||
description: "Flag used for disabling the printed banner in tty",
|
||||
},
|
||||
{
|
||||
name: ["-h", "--help"],
|
||||
description: "Print help",
|
||||
},
|
||||
{
|
||||
name: ["-V", "--version"],
|
||||
description: "Print version",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export default completion;
|
||||
```
|
||||
@@ -0,0 +1,15 @@
|
||||
```sh
|
||||
Import a pre-generated credential
|
||||
|
||||
Usage: nym-socks5-client import-credential --id <ID> <--credential-data <CREDENTIAL_DATA>|--credential-path <CREDENTIAL_PATH>>
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of client that is going to import the credential
|
||||
--credential-data <CREDENTIAL_DATA>
|
||||
Explicitly provide the encoded credential data (as base58)
|
||||
--credential-path <CREDENTIAL_PATH>
|
||||
Specifies the path to file containing binary credential data
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
@@ -0,0 +1,44 @@
|
||||
```sh
|
||||
Initialise a Nym client. Do this first!
|
||||
|
||||
Usage: nym-socks5-client init [OPTIONS] --id <ID> --provider <PROVIDER>
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of client we want to create config for
|
||||
|
||||
--gateway <GATEWAY>
|
||||
Id of the gateway we are going to connect to
|
||||
|
||||
--force-tls-gateway
|
||||
Specifies whether the client will attempt to enforce tls connection to the desired gateway
|
||||
|
||||
--latency-based-selection
|
||||
Specifies whether the new gateway should be determined based by latency as opposed to being chosen uniformly
|
||||
|
||||
--nym-apis <NYM_APIS>
|
||||
Comma separated list of rest endpoints of the API validators
|
||||
|
||||
--provider <PROVIDER>
|
||||
Address of the socks5 provider to send messages to
|
||||
|
||||
--use-reply-surbs <USE_REPLY_SURBS>
|
||||
Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs.
|
||||
|
||||
Note that some service providers might not support this.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
-p, --port <PORT>
|
||||
Port for the socket to listen on in all subsequent runs
|
||||
|
||||
--host <HOST>
|
||||
The custom host on which the socks5 client will be listening for requests
|
||||
|
||||
-o, --output <OUTPUT>
|
||||
[default: text]
|
||||
[possible values: text, json]
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
```
|
||||
@@ -0,0 +1,10 @@
|
||||
```sh
|
||||
List all registered with gateways
|
||||
|
||||
Usage: nym-socks5-client list-gateways [OPTIONS] --id <ID>
|
||||
|
||||
Options:
|
||||
--id <ID> Id of client we want to list gateways for
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,34 @@
|
||||
```sh
|
||||
Run the Nym client with provided configuration client optionally overriding set parameters
|
||||
|
||||
Usage: nym-socks5-client run [OPTIONS] --id <ID>
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
Id of client we want to create config for
|
||||
|
||||
--gateway <GATEWAY>
|
||||
Id of the gateway we want to connect to. If overridden, it is user's responsibility to ensure prior registration happened
|
||||
|
||||
--nym-apis <NYM_APIS>
|
||||
Comma separated list of rest endpoints of the API validators
|
||||
|
||||
--use-anonymous-replies <USE_ANONYMOUS_REPLIES>
|
||||
Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs.
|
||||
|
||||
Note that some service providers might not support this.
|
||||
|
||||
[possible values: true, false]
|
||||
|
||||
--provider <PROVIDER>
|
||||
Address of the socks5 provider to send messages to
|
||||
|
||||
-p, --port <PORT>
|
||||
Port for the socket to listen on
|
||||
|
||||
--host <HOST>
|
||||
The custom host on which the socks5 client will be listening for requests
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
```
|
||||
@@ -0,0 +1,19 @@
|
||||
```sh
|
||||
Queues up another upgrade for the associated daemon
|
||||
|
||||
Usage: nymvisor add-upgrade [OPTIONS] --upgrade-name <UPGRADE_NAME> <DAEMON_BINARY>
|
||||
|
||||
Arguments:
|
||||
<DAEMON_BINARY> Path to the daemon's upgrade executable
|
||||
|
||||
Options:
|
||||
--upgrade-name <UPGRADE_NAME> Name of this upgrade
|
||||
--force Overwrite existing upgrade binary / upgrade-info.json file
|
||||
--add-binary Indicate that this command should only add binary to an *existing* scheduled upgrade
|
||||
--now Force the upgrade to happen immediately
|
||||
--publish-date <PUBLISH_DATE> Specifies the publish date metadata field of this upgrade. If unset, the current time will be used
|
||||
--upgrade-time <UPGRADE_TIME> Specifies the time at which the provided upgrade will be performed (RFC3339 formatted). If left unset, the upgrade will be performed in 15min
|
||||
--upgrade-delay <UPGRADE_DELAY> Specifies delay until the provided upgrade is going to get performed. If let unset, the upgrade will be performed in 15min
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
```sh
|
||||
Show build information of this binary
|
||||
|
||||
Usage: nymvisor build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,13 @@
|
||||
```sh
|
||||
|
||||
Binary Name: nymvisor
|
||||
Build Timestamp: 2024-10-09T13:56:14.428750844Z
|
||||
Build Version: 0.1.5
|
||||
Commit SHA: fac373c1db4fa5389ba61de7943c77023467bccb
|
||||
Commit Date: 2024-10-09T14:59:40.000000000+02:00
|
||||
Commit Branch: max/new-docs-framework
|
||||
rustc Version: 1.80.0
|
||||
rustc Channel: stable
|
||||
cargo Profile: release
|
||||
|
||||
```
|
||||
@@ -0,0 +1,154 @@
|
||||
# `nymvisor` Binary Commands (Autogenerated)
|
||||
|
||||
These docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script.
|
||||
```sh
|
||||
Usage: nymvisor [OPTIONS] <COMMAND>
|
||||
|
||||
Commands:
|
||||
init Initialise a nymvisor instance with persistent Config.toml file
|
||||
run Run the associated daemon with the preconfigured settings
|
||||
build-info Show build information of this binary
|
||||
daemon-build-info Show build information of the associated daemon
|
||||
add-upgrade Queues up another upgrade for the associated daemon
|
||||
config Show configuration options being used by this instance of nymvisor
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
-c, --config-env-file <CONFIG_ENV_FILE>
|
||||
Path pointing to an env file that configures the nymvisor and overrides any preconfigured values
|
||||
-h, --help
|
||||
Print help
|
||||
-V, --version
|
||||
Print version
|
||||
```
|
||||
|
||||
### `init`
|
||||
```sh
|
||||
Initialise a nymvisor instance with persistent Config.toml file
|
||||
|
||||
Usage: nymvisor init [OPTIONS] <DAEMON_BINARY>
|
||||
|
||||
Arguments:
|
||||
<DAEMON_BINARY> Path to the daemon's executable
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
ID specifies the human readable ID of this particular nymvisor instance. Can be overridden with $NYMVISOR_ID environmental variable
|
||||
--upstream-base-upgrade-url <UPSTREAM_BASE_UPGRADE_URL>
|
||||
Sets the base url of the upstream source for obtaining upgrade information for the deaemon. It will be used fo constructing the full url, i.e. $NYMVISOR_UPSTREAM_BASE_UPGRADE_URL/$DAEMON_NAME/upgrade-info.json Can be overridden with $NYMVISOR_UPSTREAM_BASE_UPGRADE_URL environmental variable
|
||||
--upstream-polling-rate <UPSTREAM_POLLING_RATE>
|
||||
Specifies the rate of polling the upstream url for upgrade information. default: 1h Can be overridden with $NYMVISOR_UPSTREAM_POLLING_RATE
|
||||
--disable-nymvisor-logs
|
||||
If enabled, this will disable `nymvisor` logs (but not the underlying process) Can be overridden with $NYMVISOR_DISABLE_LOGS environmental variable
|
||||
--upgrade-data-directory <UPGRADE_DATA_DIRECTORY>
|
||||
Set custom directory for upgrade data - binaries and upgrade plans. If not set, the global nymvisors' data directory will be used instead. Can be overridden with $NYMVISOR_UPGRADE_DATA_DIRECTORY environmental variable
|
||||
--daemon-home <DAEMON_HOME>
|
||||
The location where the `nymvisor/` directory is kept that contains the auxiliary files associated with the underlying daemon, such as any backups or current version information. (e.g. $HOME/.nym/nym-api/my-nym-api, $HOME/.nym/mixnodes/my-mixnode, etc.). Can be overridden with $DAEMON_HOME environmental variable
|
||||
--daemon-absolute-upstream-upgrade-url <DAEMON_ABSOLUTE_UPSTREAM_UPGRADE_URL>
|
||||
Override url to the upstream source for upgrade plans for this daeamon. The Url has to point to an endpoint containing a valid [`UpgradeInfo`] json. Note: if set this takes precedence over `upstream_base_upgrade_url` Can be overridden with $DAEMON_ABSOLUTE_UPSTREAM_UPGRADE_URL environmental variable
|
||||
--allow-download-upgrade-binaries <ALLOW_DOWNLOAD_UPGRADE_BINARIES>
|
||||
If set to true, this will enable auto-downloading of new binaries using the url provided in the `upgrade-info.json` Can be overridden with $DAEMON_ALLOW_BINARIES_DOWNLOAD environmental variable [possible values: true, false]
|
||||
--enforce-download-checksum <ENFORCE_DOWNLOAD_CHECKSUM>
|
||||
If enabled nymvisor will require that a checksum is provided in the upgrade plan for the binary to be downloaded. If disabled, nymvisor will not require a checksum to be provided, but still check the checksum if one is provided. Can be overridden with $DAEMON_ENFORCE_DOWNLOAD_CHECKSUM environmental variable [possible values: true, false]
|
||||
--restart-daemon-after-upgrade <RESTART_DAEMON_AFTER_UPGRADE>
|
||||
If enabled, nymvisor will restart the subprocess with the same command-line arguments and flags (but with the new binary) after a successful upgrade. Otherwise (if disabled), nymvisor will stop running after an upgrade and will require the system administrator to manually restart it. Note restart is only after the upgrade and does not auto-restart the subprocess after an error occurs. Can be overridden with $DAEMON_RESTART_AFTER_UPGRADE environmental variable [possible values: true, false]
|
||||
--restart-daemon-on-failure
|
||||
If enabled, nymvisor will restart the subprocess with the same command-line arguments and flags after it has crashed Can be overridden with $DAEMON_RESTART_ON_FAILURE environmental variable
|
||||
--on-failure-daemon-restart-delay <ON_FAILURE_DAEMON_RESTART_DELAY>
|
||||
If `restart_on_failure` is enabled, the following value defines the amount of time `nymvisor` shall wait before restarting the subprocess. Can be overridden with $DAEMON_FAILURE_RESTART_DELAY environmental variable
|
||||
--max-daemon-startup-failures <MAX_DAEMON_STARTUP_FAILURES>
|
||||
Defines the maximum number of startup failures the subprocess can experience in a quick succession before no further restarts will be attempted and `nymvisor` will exit. Can be overridden with $DAEMON_MAX_STARTUP_FAILURES environmental variable
|
||||
--startup-period-duration <STARTUP_PERIOD_DURATION>
|
||||
Defines the length of time during which the subprocess is still considered to be in the startup phase when its failures are going to be considered in `max_startup_failures`. Can be overridden with $DAEMON_STARTUP_PERIOD_DURATION environmental variable
|
||||
--daemon-shutdown-grace-period <DAEMON_SHUTDOWN_GRACE_PERIOD>
|
||||
Specifies the amount of time `nymvisor` is willing to wait for the subprocess to undergo graceful shutdown after receiving an interrupt (for either an upgrade or shutdown of the `nymvisor` itself) Once the time passes, a kill signal is going to be sent instead. Can be overridden with $DAEMON_SHUTDOWN_GRACE_PERIOD environmental variable
|
||||
--daemon-backup-data-directory <DAEMON_BACKUP_DATA_DIRECTORY>
|
||||
Set custom backup directory for daemon data. If not set, the daemon's home directory will be used instead. Can be overridden with $DAEMON_BACKUP_DATA_DIRECTORY environmental variable
|
||||
--unsafe-skip-backup
|
||||
If enabled, `nymvisor` will perform upgrades directly without performing any backups. default: false Can be overridden with $DAEMON_UNSAFE_SKIP_BACKUP environmental variable
|
||||
-o, --output <OUTPUT>
|
||||
[default: text] [possible values: text, json]
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
|
||||
### `run`
|
||||
```sh
|
||||
Run the associated daemon with the preconfigured settings
|
||||
|
||||
Usage: nymvisor run [DAEMON_ARGS]...
|
||||
|
||||
Arguments:
|
||||
[DAEMON_ARGS]...
|
||||
|
||||
Options:
|
||||
-h, --help Print help
|
||||
```
|
||||
|
||||
### `build-info`
|
||||
```sh
|
||||
Show build information of this binary
|
||||
|
||||
Usage: nymvisor build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
Example output:
|
||||
```sh
|
||||
|
||||
Binary Name: nymvisor
|
||||
Build Timestamp: 2024-10-29T09:48:31.988049207Z
|
||||
Build Version: 0.1.8
|
||||
Commit SHA: 299552881810511273af13eb135297a4cf7a38de
|
||||
Commit Date: 2024-10-29T10:48:07.000000000+01:00
|
||||
Commit Branch: max/new-docs-framework
|
||||
rustc Version: 1.80.0
|
||||
rustc Channel: stable
|
||||
cargo Profile: release
|
||||
|
||||
```
|
||||
|
||||
### `daemon-build-info`
|
||||
```sh
|
||||
Show build information of the associated daemon
|
||||
|
||||
Usage: nymvisor daemon-build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
|
||||
### `add-upgrade`
|
||||
```sh
|
||||
Queues up another upgrade for the associated daemon
|
||||
|
||||
Usage: nymvisor add-upgrade [OPTIONS] --upgrade-name <UPGRADE_NAME> <DAEMON_BINARY>
|
||||
|
||||
Arguments:
|
||||
<DAEMON_BINARY> Path to the daemon's upgrade executable
|
||||
|
||||
Options:
|
||||
--upgrade-name <UPGRADE_NAME> Name of this upgrade
|
||||
--force Overwrite existing upgrade binary / upgrade-info.json file
|
||||
--add-binary Indicate that this command should only add binary to an *existing* scheduled upgrade
|
||||
--now Force the upgrade to happen immediately
|
||||
--publish-date <PUBLISH_DATE> Specifies the publish date metadata field of this upgrade. If unset, the current time will be used
|
||||
--upgrade-time <UPGRADE_TIME> Specifies the time at which the provided upgrade will be performed (RFC3339 formatted). If left unset, the upgrade will be performed in 15min
|
||||
--upgrade-delay <UPGRADE_DELAY> Specifies delay until the provided upgrade is going to get performed. If let unset, the upgrade will be performed in 15min
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
|
||||
### `config`
|
||||
```sh
|
||||
Show configuration options being used by this instance of nymvisor
|
||||
|
||||
Usage: nymvisor config [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
```sh
|
||||
Show configuration options being used by this instance of nymvisor
|
||||
|
||||
Usage: nymvisor config [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
```sh
|
||||
Show build information of the associated daemon
|
||||
|
||||
Usage: nymvisor daemon-build-info [OPTIONS]
|
||||
|
||||
Options:
|
||||
-o, --output <OUTPUT> [default: text] [possible values: text, json]
|
||||
-h, --help Print help
|
||||
```
|
||||
@@ -0,0 +1,48 @@
|
||||
```sh
|
||||
Initialise a nymvisor instance with persistent Config.toml file
|
||||
|
||||
Usage: nymvisor init [OPTIONS] <DAEMON_BINARY>
|
||||
|
||||
Arguments:
|
||||
<DAEMON_BINARY> Path to the daemon's executable
|
||||
|
||||
Options:
|
||||
--id <ID>
|
||||
ID specifies the human readable ID of this particular nymvisor instance. Can be overridden with $NYMVISOR_ID environmental variable
|
||||
--upstream-base-upgrade-url <UPSTREAM_BASE_UPGRADE_URL>
|
||||
Sets the base url of the upstream source for obtaining upgrade information for the deaemon. It will be used fo constructing the full url, i.e. $NYMVISOR_UPSTREAM_BASE_UPGRADE_URL/$DAEMON_NAME/upgrade-info.json Can be overridden with $NYMVISOR_UPSTREAM_BASE_UPGRADE_URL environmental variable
|
||||
--upstream-polling-rate <UPSTREAM_POLLING_RATE>
|
||||
Specifies the rate of polling the upstream url for upgrade information. default: 1h Can be overridden with $NYMVISOR_UPSTREAM_POLLING_RATE
|
||||
--disable-nymvisor-logs
|
||||
If enabled, this will disable `nymvisor` logs (but not the underlying process) Can be overridden with $NYMVISOR_DISABLE_LOGS environmental variable
|
||||
--upgrade-data-directory <UPGRADE_DATA_DIRECTORY>
|
||||
Set custom directory for upgrade data - binaries and upgrade plans. If not set, the global nymvisors' data directory will be used instead. Can be overridden with $NYMVISOR_UPGRADE_DATA_DIRECTORY environmental variable
|
||||
--daemon-home <DAEMON_HOME>
|
||||
The location where the `nymvisor/` directory is kept that contains the auxiliary files associated with the underlying daemon, such as any backups or current version information. (e.g. $HOME/.nym/nym-api/my-nym-api, $HOME/.nym/mixnodes/my-mixnode, etc.). Can be overridden with $DAEMON_HOME environmental variable
|
||||
--daemon-absolute-upstream-upgrade-url <DAEMON_ABSOLUTE_UPSTREAM_UPGRADE_URL>
|
||||
Override url to the upstream source for upgrade plans for this daeamon. The Url has to point to an endpoint containing a valid [`UpgradeInfo`] json. Note: if set this takes precedence over `upstream_base_upgrade_url` Can be overridden with $DAEMON_ABSOLUTE_UPSTREAM_UPGRADE_URL environmental variable
|
||||
--allow-download-upgrade-binaries <ALLOW_DOWNLOAD_UPGRADE_BINARIES>
|
||||
If set to true, this will enable auto-downloading of new binaries using the url provided in the `upgrade-info.json` Can be overridden with $DAEMON_ALLOW_BINARIES_DOWNLOAD environmental variable [possible values: true, false]
|
||||
--enforce-download-checksum <ENFORCE_DOWNLOAD_CHECKSUM>
|
||||
If enabled nymvisor will require that a checksum is provided in the upgrade plan for the binary to be downloaded. If disabled, nymvisor will not require a checksum to be provided, but still check the checksum if one is provided. Can be overridden with $DAEMON_ENFORCE_DOWNLOAD_CHECKSUM environmental variable [possible values: true, false]
|
||||
--restart-daemon-after-upgrade <RESTART_DAEMON_AFTER_UPGRADE>
|
||||
If enabled, nymvisor will restart the subprocess with the same command-line arguments and flags (but with the new binary) after a successful upgrade. Otherwise (if disabled), nymvisor will stop running after an upgrade and will require the system administrator to manually restart it. Note restart is only after the upgrade and does not auto-restart the subprocess after an error occurs. Can be overridden with $DAEMON_RESTART_AFTER_UPGRADE environmental variable [possible values: true, false]
|
||||
--restart-daemon-on-failure
|
||||
If enabled, nymvisor will restart the subprocess with the same command-line arguments and flags after it has crashed Can be overridden with $DAEMON_RESTART_ON_FAILURE environmental variable
|
||||
--on-failure-daemon-restart-delay <ON_FAILURE_DAEMON_RESTART_DELAY>
|
||||
If `restart_on_failure` is enabled, the following value defines the amount of time `nymvisor` shall wait before restarting the subprocess. Can be overridden with $DAEMON_FAILURE_RESTART_DELAY environmental variable
|
||||
--max-daemon-startup-failures <MAX_DAEMON_STARTUP_FAILURES>
|
||||
Defines the maximum number of startup failures the subprocess can experience in a quick succession before no further restarts will be attempted and `nymvisor` will exit. Can be overridden with $DAEMON_MAX_STARTUP_FAILURES environmental variable
|
||||
--startup-period-duration <STARTUP_PERIOD_DURATION>
|
||||
Defines the length of time during which the subprocess is still considered to be in the startup phase when its failures are going to be considered in `max_startup_failures`. Can be overridden with $DAEMON_STARTUP_PERIOD_DURATION environmental variable
|
||||
--daemon-shutdown-grace-period <DAEMON_SHUTDOWN_GRACE_PERIOD>
|
||||
Specifies the amount of time `nymvisor` is willing to wait for the subprocess to undergo graceful shutdown after receiving an interrupt (for either an upgrade or shutdown of the `nymvisor` itself) Once the time passes, a kill signal is going to be sent instead. Can be overridden with $DAEMON_SHUTDOWN_GRACE_PERIOD environmental variable
|
||||
--daemon-backup-data-directory <DAEMON_BACKUP_DATA_DIRECTORY>
|
||||
Set custom backup directory for daemon data. If not set, the daemon's home directory will be used instead. Can be overridden with $DAEMON_BACKUP_DATA_DIRECTORY environmental variable
|
||||
--unsafe-skip-backup
|
||||
If enabled, `nymvisor` will perform upgrades directly without performing any backups. default: false Can be overridden with $DAEMON_UNSAFE_SKIP_BACKUP environmental variable
|
||||
-o, --output <OUTPUT>
|
||||
[default: text] [possible values: text, json]
|
||||
-h, --help
|
||||
Print help
|
||||
```
|
||||
@@ -0,0 +1,347 @@
|
||||
use log::{debug, info};
|
||||
use std::fs::File;
|
||||
use std::io::{self, Write};
|
||||
use std::process::{Command, Output};
|
||||
use std::{fs, vec};
|
||||
|
||||
const WRITE_PATH: &str = "./autodoc-generated-markdown/";
|
||||
const COMMAND_PATH: &str = "./autodoc-generated-markdown/commands/";
|
||||
|
||||
fn main() -> io::Result<()> {
|
||||
env_logger::init();
|
||||
|
||||
// TODO if this balloons write automated way of grabbing commands from crates.
|
||||
let commands_with_subcommands = vec![
|
||||
(
|
||||
"../../target/release/nym-api",
|
||||
vec!["init", "run", "build-info"],
|
||||
),
|
||||
(
|
||||
"../../target/release/nym-client",
|
||||
vec![
|
||||
"init",
|
||||
"run",
|
||||
"import-credential",
|
||||
"list-gateways",
|
||||
"switch-gateway",
|
||||
"build-info",
|
||||
"completions",
|
||||
"generate-fig-spec",
|
||||
],
|
||||
),
|
||||
(
|
||||
"../../target/release/nym-socks5-client",
|
||||
vec![
|
||||
"init",
|
||||
"run",
|
||||
"import-credential",
|
||||
"list-gateways",
|
||||
"add-gateway",
|
||||
"build-info",
|
||||
"completions",
|
||||
"generate-fig-spec",
|
||||
],
|
||||
),
|
||||
(
|
||||
"../../target/release/nym-node",
|
||||
vec![
|
||||
"build-info",
|
||||
"bonding-information",
|
||||
"node-details",
|
||||
"migrate",
|
||||
"run",
|
||||
"sign",
|
||||
],
|
||||
),
|
||||
(
|
||||
"../../target/release/nymvisor",
|
||||
vec![
|
||||
"init",
|
||||
"run",
|
||||
"build-info",
|
||||
"daemon-build-info",
|
||||
"add-upgrade",
|
||||
"config",
|
||||
],
|
||||
),
|
||||
];
|
||||
|
||||
let commands_with_subsubcommands = vec![(
|
||||
"../../target/release/nym-cli",
|
||||
vec![
|
||||
(
|
||||
"account",
|
||||
vec!["create", "balance", "pub-key", "send", "send-multiple"],
|
||||
),
|
||||
("signature", vec!["sign", "verify"]),
|
||||
(
|
||||
"ecash",
|
||||
vec![
|
||||
"issue-ticket-book",
|
||||
"recover-ticket-book",
|
||||
"import-ticket-book",
|
||||
],
|
||||
),
|
||||
(
|
||||
"coconut",
|
||||
vec![
|
||||
"generate-freepass",
|
||||
"issue-credentials",
|
||||
"recover-credentials",
|
||||
"import-credential",
|
||||
],
|
||||
),
|
||||
("block", vec!["get", "time", "current-height"]),
|
||||
(
|
||||
"cosmwasm",
|
||||
vec![
|
||||
"upload",
|
||||
"init",
|
||||
"generate-init-message",
|
||||
"migrate",
|
||||
"execute",
|
||||
],
|
||||
),
|
||||
("tx", vec!["get", "query"]),
|
||||
(
|
||||
"vesting-schedule",
|
||||
vec!["create", "query", "vested-balance", "withdraw-vested"],
|
||||
),
|
||||
("mixnet", vec!["query", "delegators", "operators"]),
|
||||
("generate-fig", vec![""]),
|
||||
],
|
||||
)];
|
||||
|
||||
for (main_command, subcommands) in commands_with_subcommands {
|
||||
let last_word = get_last_word_from_filepath(main_command);
|
||||
debug!("now running {last_word:#?}");
|
||||
|
||||
if !fs::metadata(WRITE_PATH)
|
||||
.map(|metadata| metadata.is_dir())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
fs::create_dir_all(WRITE_PATH)?;
|
||||
}
|
||||
|
||||
let mut file = File::create(format!("{}/{}-commands.md", WRITE_PATH, last_word.unwrap()))?;
|
||||
writeln!(
|
||||
file,
|
||||
"# {} Binary Commands (Autogenerated)",
|
||||
format!("`{}`", last_word.unwrap())
|
||||
)?;
|
||||
writeln!(
|
||||
file,
|
||||
"\nThese docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script."
|
||||
)?;
|
||||
let output = Command::new(main_command).arg("--help").output()?;
|
||||
write_output_to_file(&mut file, output)?;
|
||||
|
||||
for subcommand in subcommands {
|
||||
// single file
|
||||
execute_command(&mut file, main_command, subcommand, None)?;
|
||||
// file per command
|
||||
execute_command_own_file(main_command, subcommand)?;
|
||||
}
|
||||
}
|
||||
|
||||
// nym-cli has subsubcommands so needs its own loop
|
||||
for (main_command, subcommands) in &commands_with_subsubcommands {
|
||||
let last_word = get_last_word_from_filepath(main_command);
|
||||
debug!("now running {last_word:#?}");
|
||||
let mut file = File::create(format!("{}/{}-commands.md", WRITE_PATH, last_word.unwrap()))?;
|
||||
writeln!(
|
||||
file,
|
||||
"# {} Binary Commands (Autogenerated)",
|
||||
format!("`{}`", last_word.unwrap())
|
||||
)?;
|
||||
writeln!(
|
||||
file,
|
||||
"\nThese docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script."
|
||||
)?;
|
||||
let output = Command::new(main_command).arg("--help").output()?;
|
||||
|
||||
write_output_to_file(&mut file, output)?;
|
||||
|
||||
for (subcommand, subsubcommands) in subcommands {
|
||||
writeln!(file, "\n## `{}` ", subcommand)?;
|
||||
let output = Command::new(main_command)
|
||||
.arg(subcommand)
|
||||
.arg("--help")
|
||||
.output()?;
|
||||
if !output.stdout.is_empty() {
|
||||
write_output_to_file(&mut file, output)?;
|
||||
} else {
|
||||
debug!("empty stdout - nothing to write");
|
||||
}
|
||||
for subsubcommand in subsubcommands {
|
||||
execute_command(&mut file, main_command, subcommand, Some(subsubcommand))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn get_last_word_from_filepath(filepath: &str) -> Option<&str> {
|
||||
let parts: Vec<&str> = filepath.split('/').collect();
|
||||
parts.last().copied()
|
||||
}
|
||||
|
||||
fn execute_command_own_file(main_command: &str, subcommand: &str) -> io::Result<()> {
|
||||
// this check is basically checking for the rare commands (rn just one) that start a process with no params
|
||||
// perhaps if this list grows we could just add a timeout and shunt the running and writing
|
||||
// into a thread with a timeout or something but for right now its fine / thats overkill
|
||||
if get_last_word_from_filepath(main_command).unwrap() == "nym-node" && subcommand == "run"
|
||||
|| get_last_word_from_filepath(main_command).unwrap() == "nym-api" && subcommand == "run"
|
||||
|| get_last_word_from_filepath(main_command).unwrap() == "nymvisor" && subcommand == "run"
|
||||
{
|
||||
info!("SKIPPING {} {}", main_command, subcommand);
|
||||
} else {
|
||||
let last_word = get_last_word_from_filepath(main_command);
|
||||
let output = Command::new(main_command).arg(subcommand).output()?;
|
||||
if !output.stdout.is_empty() {
|
||||
info!("creating own file for {} {}", main_command, subcommand,);
|
||||
if !fs::metadata(WRITE_PATH)
|
||||
.map(|metadata| metadata.is_dir())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
fs::create_dir_all(COMMAND_PATH)?;
|
||||
}
|
||||
let mut file = File::create(format!(
|
||||
"{}/{}-{}.md",
|
||||
COMMAND_PATH,
|
||||
last_word.unwrap(),
|
||||
subcommand
|
||||
))?;
|
||||
write_output_to_file(&mut file, output)?;
|
||||
|
||||
// execute help
|
||||
info!(
|
||||
"creating own file for {} {} --help",
|
||||
main_command, subcommand,
|
||||
);
|
||||
if !fs::metadata(COMMAND_PATH)
|
||||
.map(|metadata| metadata.is_dir())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
fs::create_dir_all(COMMAND_PATH)?;
|
||||
}
|
||||
let mut help_file = File::create(format!(
|
||||
"{}/{}-{}-help.md",
|
||||
COMMAND_PATH,
|
||||
last_word.unwrap(),
|
||||
subcommand
|
||||
))?;
|
||||
|
||||
let output = Command::new(main_command)
|
||||
.arg(subcommand)
|
||||
.arg("--help")
|
||||
.output()?;
|
||||
if !output.stdout.is_empty() {
|
||||
write_output_to_file(&mut help_file, output)?;
|
||||
} else {
|
||||
debug!("empty stdout - nothing to write");
|
||||
}
|
||||
} else {
|
||||
info!(
|
||||
"creating own file for {} {} --help",
|
||||
main_command, subcommand,
|
||||
);
|
||||
if !fs::metadata(COMMAND_PATH)
|
||||
.map(|metadata| metadata.is_dir())
|
||||
.unwrap_or(false)
|
||||
{
|
||||
fs::create_dir_all(COMMAND_PATH)?;
|
||||
}
|
||||
let mut help_file = File::create(format!(
|
||||
"{}/{}-{}-help.md",
|
||||
COMMAND_PATH,
|
||||
last_word.unwrap(),
|
||||
subcommand
|
||||
))?;
|
||||
|
||||
let output = Command::new(main_command)
|
||||
.arg(subcommand)
|
||||
.arg("--help")
|
||||
.output()?;
|
||||
write_output_to_file(&mut help_file, output)?;
|
||||
debug!("empty stdout - nothing to write");
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn execute_command(
|
||||
file: &mut File,
|
||||
main_command: &str,
|
||||
subcommand: &str,
|
||||
subsubcommand: Option<&str>,
|
||||
) -> io::Result<()> {
|
||||
// checking for the nym-cli subsubcommands
|
||||
if subsubcommand.is_some() {
|
||||
writeln!(file, "\n### `{} {}`", subcommand, subsubcommand.unwrap())?;
|
||||
|
||||
info!("executing {} {} --help ", main_command, subcommand);
|
||||
let output = Command::new(main_command)
|
||||
.arg(subcommand)
|
||||
.arg(subsubcommand.unwrap())
|
||||
.arg("--help")
|
||||
.output()?;
|
||||
if !output.stdout.is_empty() {
|
||||
write_output_to_file(file, output)?;
|
||||
} else {
|
||||
debug!("empty stdout - nothing to write");
|
||||
}
|
||||
// just subcommands
|
||||
} else {
|
||||
writeln!(file, "\n### `{}`", subcommand)?;
|
||||
|
||||
// execute help
|
||||
let output = Command::new(main_command)
|
||||
.arg(subcommand)
|
||||
.arg("--help")
|
||||
.output()?;
|
||||
if !output.stdout.is_empty() {
|
||||
write_output_to_file(file, output)?;
|
||||
} else {
|
||||
debug!("empty stdout - nothing to write");
|
||||
}
|
||||
|
||||
// then execute w/out help: the majority of functions will fail since you're not passing
|
||||
// required params but thats fine as we can just not render stderr into the final file.
|
||||
//
|
||||
// this check is basically checking for the rare commands (rn just one) that start a process with no params
|
||||
// perhaps if this list grows we could just add a timeout and shunt the running and writing
|
||||
// into a thread with a timeout or something but for right now its fine / thats overkill
|
||||
if get_last_word_from_filepath(main_command).unwrap() == "nym-node"
|
||||
|| get_last_word_from_filepath(main_command).unwrap() == "nym-api"
|
||||
|| get_last_word_from_filepath(main_command).unwrap() == "nymvisor"
|
||||
&& subcommand == "run"
|
||||
{
|
||||
info!("SKIPPING {} {}", main_command, subcommand);
|
||||
} else {
|
||||
info!("executing {} {}", main_command, subcommand);
|
||||
let output = Command::new(main_command).arg(subcommand).output()?;
|
||||
if !output.stdout.is_empty() {
|
||||
writeln!(file, "Example output:")?;
|
||||
write_output_to_file(file, output)?;
|
||||
} else {
|
||||
debug!("empty stdout - nothing to write");
|
||||
if !&output.stderr.is_empty() {
|
||||
debug!("stderr: {:#?}", String::from_utf8_lossy(&output.stderr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn write_output_to_file(file: &mut File, output: Output) -> io::Result<()> {
|
||||
writeln!(file, "```sh")?;
|
||||
file.write_all(&output.stdout)?;
|
||||
writeln!(file, "```")?;
|
||||
|
||||
if !&output.stderr.is_empty() {
|
||||
debug!("stderr: {:#?}", String::from_utf8_lossy(&output.stderr));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -1,3 +1,49 @@
|
||||
{/*
|
||||
import { MyTab } from '../../../../components/operators/nodes/node-run-command-tabs'
|
||||
import Mixnode from './snippets/mixnode-run-tab-snippet.mdx';
|
||||
import EntryGateway from './snippets/entry-gateway-run-tab-snippet.mdx';
|
||||
import ExitGateway from './snippets/exit-gateway-run-tab-snippet.mdx';
|
||||
*/}
|
||||
import { Callout } from 'nextra/components'
|
||||
import { CCallout } from '@coreui/react'
|
||||
import { Tabs } from 'nextra/components';
|
||||
import { RunTabs } from '../../../../components/operators/nodes/node-run-command-tabs2';
|
||||
import { MyTab } from '../../../../components/operators/nodes/node-run-command-tabs';
|
||||
import Mixnode from './snippets/mixnode-run-tab-snippet.mdx';
|
||||
import { VarInfo } from '../../../../components/variable-info.tsx';
|
||||
|
||||
|
||||
<CCallout type="warning">
|
||||
You can always use `--help` flag to see the commands or arguments associated with a given command.
|
||||
</CCallout>
|
||||
|
||||
<VarInfo/ >
|
||||
|
||||
<Callout type="info">
|
||||
If you are a `nym-mixnode` or `nym-gateway` operator and you are not familiar with the binary changes called *Project Smoosh*, you can read the archived [Smoosh FAQ](../archive/faq/smoosh-faq.md) page.
|
||||
</Callout>
|
||||
|
||||
## Tab version 1
|
||||
|
||||
Using `MyTab` from `'../../../../components/operators/nodes/node-run-command-tabs'`
|
||||
|
||||
|
||||
<Tabs items={[
|
||||
<code>mixnode</code>,
|
||||
<code>exit-gateway</code>,
|
||||
<code>entry-gateway</code>
|
||||
]} defaultIndex="1">
|
||||
<MyTab name="mixnode"><Mixnode/></MyTab>
|
||||
<MyTab name="exit-gateway">is a package manager for the JavaScript programming language.</MyTab>
|
||||
<MyTab name="entry-gateway">is a software packaging system.</MyTab>
|
||||
</Tabs>
|
||||
|
||||
## Tab version 2
|
||||
|
||||
Using `RunTab` from `'../../../../components/operators/nodes/node-run-command-tabs2'`
|
||||
|
||||
<RunTabs />
|
||||
|
||||
# Nym Node Setup & Run
|
||||
|
||||
This documentation page provides a guide on how to set up and run a [NYM NODE](nym-node.md), along with explanations of available flags, commands, and examples.
|
||||
@@ -269,6 +315,9 @@ In this example we run the node with custom `--id` without initialising, using `
|
||||
./nym-node run --mode mixnode --id <ID> --deny-init --accept-operator-terms-and-conditions
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
### Migrate
|
||||
|
||||
```admonish caution
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# this is a script called by the github CI and CD workflows to build all 3 docs projects
|
||||
# and move them to /dist/ in the root of the monorepo. They are rsynced to various servers
|
||||
# from there by subsequent workflow tasks.
|
||||
|
||||
# array of project dirs
|
||||
declare -a projects=("docs" "dev-portal" "operators")
|
||||
|
||||
# check you're calling from the right place
|
||||
if [ $(pwd | awk -F/ '{print $NF}') != "documentation" ]
|
||||
then
|
||||
echo "failure: please run script from documentation/"
|
||||
else
|
||||
for i in "${projects[@]}"
|
||||
do
|
||||
# cd to project dir
|
||||
cd "./$i" &&
|
||||
# little sanity checks
|
||||
echo $(pwd) && echo $(mdbook --version) &&
|
||||
# clean old book
|
||||
echo "cleaning old book"
|
||||
rm -rf ./book/
|
||||
# build book
|
||||
# mdbook test || true
|
||||
mdbook build
|
||||
# check for destination, if ! then mkdir & check again else echo thumbs up
|
||||
if [ ! -d ../../dist/docs/$i ]; then
|
||||
echo "dest doesn't exist: creating dir"
|
||||
mkdir -p ../../dist/docs/$i
|
||||
fi
|
||||
if [ -d ../../dist/docs/$i ]; then
|
||||
echo "cp destination exists, all good"
|
||||
fi
|
||||
# clean old dist/$i
|
||||
rm -rf ../../dist/docs/$i
|
||||
# move newly rendered book/ to dist
|
||||
rsync -r ./book/html/ ../../dist/docs/$i
|
||||
# sanity check
|
||||
ls -laF ../../dist/docs/
|
||||
# cd back to ../documentation/
|
||||
cd ../
|
||||
done
|
||||
# rename for server paths
|
||||
rm -rf ../dist/docs/developers
|
||||
mv ../dist/docs/dev-portal ../dist/docs/developers
|
||||
fi
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# takes one manadatory arg and one optional arg: wallet release and minimum rust versions
|
||||
# it then uses sed to bump them in the three book.toml files.
|
||||
#
|
||||
# e.g if the upcoming wallet release version was 1.2.9 you'd run this as:
|
||||
# `./bump_versions.sh "1.2.9"`
|
||||
#
|
||||
# you can also set the minumum rust version by passing an optional additional argument:
|
||||
# `./bump_versions.sh "1.2.9" "1.67"`
|
||||
|
||||
# array of project dirs
|
||||
declare -a projects=("docs" "dev-portal" "operators")
|
||||
|
||||
# check number of args passed
|
||||
if [ "$#" -lt 1 ] || [ "$#" -gt 2 ];
|
||||
then
|
||||
echo "failure: please pass at least 1 and at most 2 args: "
|
||||
echo "./bump_version.sh <new wallet_release_version> [OPTIONAL]<new minimum_rust_version>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# check you're calling from the right place
|
||||
if [ $(pwd | awk -F/ '{print $NF}') != "documentation" ]
|
||||
then
|
||||
echo "failure: please run script from documentation/"
|
||||
exit 0
|
||||
else
|
||||
## now loop through the above array sed-ing the variable values in the book.toml files
|
||||
for i in "${projects[@]}"
|
||||
do
|
||||
# sed the vars in the book.toml file for each project
|
||||
echo "setting wallet version in $i/"
|
||||
sed -i 's/wallet_release_version =.*/wallet_release_version = "'$2'"/' "$i"/book.toml
|
||||
if [ "$3" ]
|
||||
then
|
||||
echo "setting minimum rust version in $i/"
|
||||
sed -i 's/minimum_rust_version = .*/minimum_rust_version = "'$3'"/' "$i"/book.toml
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@@ -1,24 +0,0 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
/target/
|
||||
|
||||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
||||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
||||
Cargo.lock
|
||||
|
||||
# These are backup files generated by rustfmt
|
||||
**/*.rs.bk
|
||||
|
||||
# Book specific
|
||||
book
|
||||
|
||||
# OSX
|
||||
.DS_Store
|
||||
|
||||
theme/
|
||||
theme
|
||||
theme/*
|
||||
|
||||
.idea
|
||||
|
||||
notes
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,24 +0,0 @@
|
||||
# Nym Developer Portal
|
||||
Developer Portal for the Nym privacy platform built using the [mdBook](https://rust-lang.github.io/mdBook/) docs framework. Deployed version can be found [here](https://nymtech.net/developers).
|
||||
|
||||
## Contributing
|
||||
Contributions to our documentation are very welcome. Please work on your contribution in either a `feature/<feature-name>` or `chore/<chore-name>` branch from `master` and target your pull request at `master`.
|
||||
|
||||
Changes merged to `master` will be autodeployed to the production site.
|
||||
|
||||
### Adding community projects and resources
|
||||
If you have built a project with Nym or are compiling and writing resources about Nym, we want to include your work in the `community-resources/` section to share with the rest of the community! Just follow the existing formatting and add your project to the page, then put in a pull request.
|
||||
|
||||
## Variables
|
||||
There are some variables that are shared across this book, such as the current latest software version.
|
||||
|
||||
Variables are denoted in the `.md` files wrapped in `{{}}` (e.g `{{wallet_release_version}}`), and are located in the `book.toml` file under the `[preprocessor.variables.variables]` heading. If you are changing something like the software release version, minimum code versions in prerequisites, etc, **check in here first!**
|
||||
|
||||
## Building
|
||||
When working locally, it is recommended that you use `mdbook serve` to have a local version of the docs served on `localhost:3000`, with hot reloading on any changes made to files in the `src/` directory.
|
||||
|
||||
You can find other commands in the [mdBook CLI tool docs](https://rust-lang.github.io/mdBook/cli/index.html).
|
||||
|
||||
### I tried to edit files in `theme/` and they aren't taking effect / `mdbook serve` causes a looping reload on file changes after changing fields in `[preprocessor.theme]` config
|
||||
|
||||
Looping reload is a known issue with the `mdbook-theme` preprocessor used for the table of contents and layout of these docs. As outlined in the `mdbook-theme` [readme](https://github.com/zjp-CN/mdbook-theme#avoid-repeating-call-on-this-tool-when-mdbook-watch) one way to mitigate this is to set `turn-off = true` under `[preprocessor.theme]`. This means that `mdbook serve` or `mdbook watch` ignores changes to the `theme/` directory, which is the source of the looping reload. If you have changed or commented out this line, reintroduce it to remove the looping reload. If you are trying to edit the theme of the docs and want to apply the change, see [here](https://github.com/zjp-CN/mdbook-theme#avoid-repeating-call-on-this-tool-when-mdbook-watch) for more info on how to remove the block, change the theme, and reintroduce the block.
|
||||
@@ -1,118 +0,0 @@
|
||||
[book]
|
||||
title = "Nym Docs"
|
||||
authors = ["Max Hampshire, Serinko, Alexia Lorenza Martinel"]
|
||||
description = "Nym technical documentation"
|
||||
language = "en"
|
||||
multilingual = false # for the moment - ideally work on chinese, brazillian ,portugese spanish next
|
||||
src = "src"
|
||||
|
||||
[rust]
|
||||
edition = "2018"
|
||||
|
||||
#################
|
||||
# PREPROCESSORS #
|
||||
#################
|
||||
|
||||
[preprocessor.theme]
|
||||
pagetoc = true
|
||||
sidebar-width = "280px"
|
||||
content-max-width = "80%"
|
||||
root-font-size = "70%"
|
||||
# if you need to change anything in the index.hbs file you need to turn this to `false`, rebuild the book,
|
||||
# probably remove the additional `comment` that gets appended to the header, and then change this back to `true`.
|
||||
# this is because of a bug in the `mdbook-theme` plugin
|
||||
turn-off = true
|
||||
|
||||
|
||||
[preprocessor.admonish]
|
||||
command = "mdbook-admonish"
|
||||
assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install`
|
||||
|
||||
# https://gitlab.com/tglman/mdbook-variables/
|
||||
[preprocessor.variables.variables]
|
||||
minimum_rust_version = "1.66"
|
||||
wallet_release_version = "1.2.8"
|
||||
# nym-vpn related variables
|
||||
nym_vpn_releases = "https://github.com/nymtech/nym-vpn-client/releases"
|
||||
nym_vpn_form_url = "https://opnform.com/forms/nymvpn-user-research-at-37c3-yccqko-2"
|
||||
|
||||
# versions are pulled by cmdrun now
|
||||
# nym_vpn_gui_version = "0.0.6"
|
||||
# nym_vpn_cli_version = "0.0.4"
|
||||
|
||||
[preprocessor.last-changed]
|
||||
command = "mdbook-last-changed"
|
||||
renderer = ["html"]
|
||||
|
||||
# used for grabbing output of binary commands for automation https://github.com/FauconFan/mdbook-cmdrun
|
||||
[preprocessor.cmdrun]
|
||||
|
||||
# more pre-processor plugins to look into from https://github.com/rust-lang/mdBook/wiki/Third-party-plugins & https://lib.rs/keywords/mdbook-preprocessor
|
||||
# mdbook-i18n
|
||||
|
||||
#########
|
||||
# BUILD #
|
||||
#########
|
||||
|
||||
[build]
|
||||
build-dir = "book" # the directory where the output is placed
|
||||
create-missing = true # whether or not to create missing pages
|
||||
use-default-preprocessors = true # use the default preprocessors
|
||||
extra-watch-dirs = [] # directories to watch for triggering builds
|
||||
|
||||
##########
|
||||
# OUTPUT #
|
||||
##########
|
||||
|
||||
[output.html]
|
||||
theme = "themes"
|
||||
default-theme = "coal"
|
||||
preferred-dark-theme = "coal"
|
||||
curly-quotes = true
|
||||
copy-fonts = true
|
||||
no-section-label = false
|
||||
additional-css = [
|
||||
"./themes/custom.css",
|
||||
"./themes/mdbook-admonish.css",
|
||||
"./themes/pagetoc.css",
|
||||
]
|
||||
additional-js = ["./themes/pagetoc.js"]
|
||||
git-repository-url = "https://github.com/nymtech/nym"
|
||||
git-repository-icon = "fa-github"
|
||||
input-404 = "not-found.md"
|
||||
|
||||
[output.html.fold]
|
||||
enable = true # whether or not to enable section folding
|
||||
level = 0 # the depth to start folding
|
||||
|
||||
# controlling rust sample code blocks
|
||||
[output.html.playground]
|
||||
editable = false # allows editing the source code
|
||||
copyable = true # include the copy button for copying code snippets
|
||||
copy-js = true # includes the JavaScript for the code editor
|
||||
line-numbers = true # displays line numbers for editable code
|
||||
runnable = true # displays a run button for rust code
|
||||
|
||||
# options for the built in text search
|
||||
[output.html.search]
|
||||
enable = true # enables the search feature
|
||||
limit-results = 30 # maximum number of search results
|
||||
teaser-word-count = 30 # number of words used for a search result teaser
|
||||
use-boolean-and = true # multiple search terms must all match
|
||||
boost-title = 2 # ranking boost factor for matches in headers
|
||||
boost-hierarchy = 1 # ranking boost factor for matches in page names
|
||||
boost-paragraph = 1 # ranking boost factor for matches in text
|
||||
expand = true # partial words will match longer terms
|
||||
heading-split-level = 3 # link results to heading levels
|
||||
copy-js = true # include Javascript code for search
|
||||
|
||||
[output.linkcheck]
|
||||
warning-policy = "warn"
|
||||
|
||||
[output.html.redirect]
|
||||
"/faq/general-faq.html" = "https://nymtech.net/developers/faq/integrations-faq.html"
|
||||
"/tutorials/simple-service-provider/user-client.html" = "https://nymtech.net/developers/examples/custom-services.html"
|
||||
"/quickstart/socks-proxy.html" = "https://nymtech.net/developers/clients/socks5/setup.html"
|
||||
"/tutorials/matrix.html" = "https://nymtech.net/developers/archive/nym-connect.html#matrix-element-via-nymconnect"
|
||||
"/tutorials/monero.html" = "https://nymtech.net/developers/archive/nym-connect.html#monero-wallet-via-nymconnect"
|
||||
"/tutorials/telegram.html" = "https://nymtech.net/developers/archive/nym-connect.html#telegram-via-nymconnect"
|
||||
@@ -1,24 +0,0 @@
|
||||
+-----------+
|
||||
| Gateway |
|
||||
+-----------+
|
||||
^
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
+-------------------+
|
||||
| +---------------+ |
|
||||
| | Nym client | |
|
||||
| +---------------+ |
|
||||
| ^ |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| v |
|
||||
| +---------------+ |
|
||||
| | Your app code | |
|
||||
| +---------------+ |
|
||||
+-------------------+
|
||||
Your Local Machine
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
+----------+ +----------+ +----------+
|
||||
| Mix Node |<-----------> | Mix Node |<----------->| Mix Node |
|
||||
| Layer 1 | | Layer 2 | | Layer 3 |
|
||||
+----------+ +----------+ +----------+
|
||||
^ ^
|
||||
| |
|
||||
| |
|
||||
v v
|
||||
+--------------+ +-----------------+
|
||||
| Your gateway | | Service gateway |
|
||||
+--------------+ +-----------------+
|
||||
^ ^
|
||||
| |
|
||||
| |
|
||||
v v
|
||||
+-------------------+ +-------------------+
|
||||
| +---------------+ | | +---------------+ |
|
||||
| | Nym client | | | | Nym Client | |
|
||||
| +---------------+ | | +---------------+ |
|
||||
| ^ | | ^ |
|
||||
| | | | | |
|
||||
| | | | | |
|
||||
| v | | v |
|
||||
| +---------------+ | | +---------------+ |
|
||||
| | Your app code | | | | Service Code | |
|
||||
| +---------------+ | | +---------------+ |
|
||||
+-------------------+ +-------------------+
|
||||
Your Local Machine** Service Provider Machine**
|
||||
|
||||
|
||||
** note that depending on the technical setup, the Nym client running on these machines may
|
||||
be either a seperate process or embedded in the same process as the app code via one of our SDKs.
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
+----------+ +----------+ +----------+
|
||||
| Mix Node |<-----------> | Mix Node |<----------->| Mix Node |
|
||||
| Layer 1 | | Layer 2 | | Layer 3 |
|
||||
+----------+ +----------+ +----------+
|
||||
^ ^
|
||||
| |
|
||||
|<--------------------------------------------------+
|
||||
|
|
||||
v
|
||||
+--------------+
|
||||
| Your gateway |
|
||||
+--------------+
|
||||
^
|
||||
|
|
||||
|
|
||||
v
|
||||
+-------------------+
|
||||
| +---------------+ |
|
||||
| | Nym client | |
|
||||
| +---------------+ |
|
||||
| ^ |
|
||||
| | |
|
||||
| | |
|
||||
| v |
|
||||
| +---------------+ |
|
||||
| | Your app code | |
|
||||
| +---------------+ |
|
||||
+-------------------+
|
||||
Your Local Machine**
|
||||
|
||||
|
||||
** note that depending on the technical setup, the Nym client running on this machine may
|
||||
be either a seperate process or embedded in the same process as the app code via one of our SDKs.
|
||||
@@ -1,14 +0,0 @@
|
||||
+-------------------+
|
||||
| +---------------+ |
|
||||
| | Nym client | |
|
||||
| +---------------+ |
|
||||
| ^ |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| v |
|
||||
| +---------------+ |
|
||||
| | Your app code | |
|
||||
| +---------------+ |
|
||||
+-------------------+
|
||||
Your Local Machine
|
||||
@@ -1,15 +0,0 @@
|
||||
+-------------------+
|
||||
| +---------------+ |
|
||||
| | Nym client | |
|
||||
| +---------------+ |
|
||||
| ^ |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| v |
|
||||
| +---------------+ |
|
||||
| | Service code | |
|
||||
| +---------------+ |
|
||||
+-------------------+
|
||||
Service Machine
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
#
|
||||
- [Introduction](introduction.md)
|
||||
- [Clients Overview - Start Here!](clients-overview.md)
|
||||
|
||||
# SDKs
|
||||
- [Rust SDK](sdk/rust/rust.md)
|
||||
- [Message Types](sdk/rust/message-types.md)
|
||||
- [Message Helpers](sdk/rust/message-helpers.md)
|
||||
- [Troubleshooting](sdk/rust/troubleshooting.md)
|
||||
- [Examples](sdk/rust/examples.md)
|
||||
- [Simple Send](sdk/rust/examples/simple.md)
|
||||
- [Create and Store Keys](sdk/rust/examples/keys.md)
|
||||
- [Manual Storage](sdk/rust/examples/storage.md)
|
||||
- [Anonymous Replies](sdk/rust/examples/surbs.md)
|
||||
- [Use Custom Network Topology](sdk/rust/examples/custom-network.md)
|
||||
- [Socks Proxy](sdk/rust/examples/socks.md)
|
||||
- [Split Send and Receive](sdk/rust/examples/split-send.md)
|
||||
- [Testnet Bandwidth Cred](sdk/rust/examples/credential.md)
|
||||
- [Example Cargo file](sdk/rust/examples/cargo.md)
|
||||
- [Typescript SDK](sdk/typescript.md)
|
||||
|
||||
# Binaries
|
||||
- [Pre-built Binaries](binaries/pre-built-binaries.md)
|
||||
- [Building from Source](binaries/building-nym.md)
|
||||
|
||||
# Standalone Clients
|
||||
- [Websocket Client](clients/websocket-client.md)
|
||||
- [Setup & Run](clients/websocket/setup.md)
|
||||
- [Configuration](clients/websocket/config.md)
|
||||
- [Using Your Client](clients/websocket/usage.md)
|
||||
- [Examples](clients/websocket/examples.md)
|
||||
- [Socks5 Client](clients/socks5-client.md)
|
||||
- [Setup & Run](clients/socks5/setup.md)
|
||||
- [Using Your Client](clients/socks5/usage.md)
|
||||
- [Webassembly Client](clients/webassembly-client.md)
|
||||
|
||||
# Tutorials
|
||||
- [Stub: Updates Coming Soon!](./tutorials/coming-soon.md)
|
||||
|
||||
# Code Examples
|
||||
- [Custom Service Providers](examples/custom-services.md)
|
||||
- [Apps Using Network Requesters](examples/using-nrs.md)
|
||||
- [Browser only](examples/browser-only.md)
|
||||
- [Monorepo examples](examples/monorepo-examples.md)
|
||||
|
||||
# Integrations
|
||||
- [Integration Options](integrations/integration-options.md)
|
||||
[//]: # (- [Mixnet Integration](integrations/mixnet-integration.md))
|
||||
- [Payment Integration](integrations/payment-integration.md)
|
||||
|
||||
# FAQ
|
||||
- [Integrations](faq/integrations-faq.md)
|
||||
|
||||
# User Manuals
|
||||
- [NymVPN beta](nymvpn/intro.md)
|
||||
- [CLI](nymvpn/cli.md)
|
||||
---
|
||||
|
||||
# Archive
|
||||
- [NymConnect Setup](archive/nym-connect.md)
|
||||
|
||||
---
|
||||
|
||||
# Misc.
|
||||
- [Code of Conduct](coc.md)
|
||||
- [Licensing](licensing.md)
|
||||
---
|
||||
@@ -1,6 +0,0 @@
|
||||
# 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.
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# 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.
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# 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.
|
||||
|
||||
## 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.
|
||||
@@ -1,71 +0,0 @@
|
||||
# Socks5 Client
|
||||
|
||||
> The Nym Socks5 Client was built in the [building nym](../binaries/building-nym.md) section. If you haven't yet built Nym and want to run the code on this page, go there first.
|
||||
|
||||
**To install and operate `nym-socks5-client`, visit [Setup & Run](socks5/setup.md) and [Using Your Client](socks5/usage.md) pages.**
|
||||
|
||||
## Current version
|
||||
|
||||
```
|
||||
<!-- cmdrun ../../../../target/release/nym-socks5-client --version | grep "Build Version" | cut -b 21-26 -->
|
||||
```
|
||||
|
||||
## What is this client for?
|
||||
|
||||
Many existing applications are able to use either the SOCKS4, SOCKS4A, or SOCKS5 proxy protocols. If you want to send such an application's traffic through the mixnet, you can use the `nym-socks5-client` to bounce network traffic through the Nym network, like this:
|
||||
|
||||
```
|
||||
External Systems:
|
||||
+--------------------+
|
||||
|------>| Monero blockchain |
|
||||
| +--------------------+
|
||||
| +--------------------+
|
||||
|------>| Email server |
|
||||
| +--------------------+
|
||||
| +--------------------+
|
||||
|------>| RPC endpoint |
|
||||
| +--------------------+
|
||||
| +--------------------+
|
||||
|------>| Website |
|
||||
| +--------------------+
|
||||
| +--------------------+
|
||||
+----------------------------------+ |------>| etc... |
|
||||
| Mixnet: | | +--------------------+
|
||||
| * Gateway your client is | |
|
||||
| connected to | +--------------------+ |
|
||||
| * Mix nodes 1 -> 3 |<-------->| Network requester |<------+
|
||||
| * Gateway that network | +--------------------+
|
||||
| requester is connected to |
|
||||
+----------------------------------+
|
||||
^
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
v
|
||||
+-------------------+
|
||||
| +---------------+ |
|
||||
| | Nym client | |
|
||||
| +---------------+ |
|
||||
| ^ |
|
||||
| | |
|
||||
| | |
|
||||
| | |
|
||||
| v |
|
||||
| +---------------+ |
|
||||
| | Your app code | |
|
||||
| +---------------+ |
|
||||
+-------------------+
|
||||
Your Local Machine
|
||||
```
|
||||
|
||||
There are 2 pieces of software that work together to send SOCKS traffic through the mixnet: the `nym-socks5-client`, and the `nym-network-requester`.
|
||||
|
||||
The `nym-socks5-client` allows you to do the following from your local machine:
|
||||
* Take a TCP data stream from a application that can send traffic via SOCKS5.
|
||||
* Chop up the TCP stream into multiple Sphinx packets, assigning sequence numbers to them, while leaving the TCP connection open for more data
|
||||
* Send the Sphinx packets through the Nym Network. Packets are shuffled and mixed as they transit the mixnet.
|
||||
|
||||
The `nym-network-requester` then reassembles the original TCP stream using the packets' sequence numbers, and make the intended request. It will then chop up the response into Sphinx packets and send them back through the mixnet to your `nym-socks5-client`. The application will then receive its data, without even noticing that it wasn't talking to a "normal" SOCKS5 proxy!
|
||||
|
||||
Since the introduction of `nym-node` binary, `nym-network-requester` is incorporated in every node running in `exit-gateway` mode. The narrow whitelist was exchanged for a less restrictive Nym [exit policy](https://nymtech.net/.wellknown/network-requester/exit-policy.txt), where except the IPs and ports all internet access is permitted. `nym-socks5-client` users can find a full list of Network Requester addresses on [Nym Harbourmaster](https://harbourmaster.nymtech.net/) under tab called *SOCKS5 NETWORK REQUESTERS*.
|
||||
@@ -1,159 +0,0 @@
|
||||
# Setup & Run Nym Socks5 Client
|
||||
|
||||
> `nym-socks5-client` now also supports SOCKS4 and SOCKS4A protocols as well as SOCKS5.
|
||||
|
||||
The Nym socks5 client allows you to proxy traffic from a desktop application through the mixnet, meaning you can send and receive information from remote application servers without leaking metadata which can be used to deanonymise you, even if you're using an encrypted application such as Signal.
|
||||
|
||||
```admonish info
|
||||
Since the beginning of 2024 NymConnect is no longer maintained. Nym is developing a new client called [NymVPN](https://nymvpn.com), an application routing all users traffic thorugh the mixnet.
|
||||
If users want to route their traffic through socks5 we advice to use this client. If you want to run deprecated NymConnect, visit [NymConnect archive page](../../archive/nym-connect.md) with setup and application examples.
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
### Download or compile socks5 client
|
||||
|
||||
If you are using OSX or a Debian-based operating system, you can download the `nym-socks5-client` binary from our [Github releases page](https://github.com/nymtech/nym/releases).
|
||||
|
||||
If you are using a different operating system, head over to the [Building from Source](https://nymtech.net/docs/binaries/building-nym.html) page for instructions on how to build the repository from source.
|
||||
|
||||
### Initialise Socks5 Client
|
||||
|
||||
To initialise your `nym-socks5-client` you need to have an address of a Network Requester (NR). Nowadays NR is part of every Exit Gateway (`nym-node --mode exit-gateway`). The easiest way to get a NR address is to visit [harbourmaster.nymtech.net](https://harbourmaster.nymtech.net/) and open the tab called *SOCKS5 NETWORK REQUESTERS*. There you can filter the NR by Gateways identity address, and other options.
|
||||
|
||||
Use the following command to initialise `nym-socs5-client` where `<ID>` can be anything you want (it's only for local config file storage identification and never shared on the network) and `<PROVIDER>` is suplemented with a NR address:
|
||||
|
||||
```
|
||||
./nym-socks5-client init --id <ID> --provider <PROVIDER>
|
||||
```
|
||||
|
||||
~~~admonish tip
|
||||
Another option to find a NR address associated with a Gateway is to query nodes [*Self Described* API endpoint](https://validator.nymtech.net/api/v1/gateways/described) where the NR address is noted like in this example:
|
||||
```sh
|
||||
"network_requester": {
|
||||
"address": "CyuN49nkyeuiLohSpV5A1MbSqcugHLJQ95B5HooCpjv8.CguTh45Vp99QuGWZRBKpBjZDQbsJaHaXqAMGyc4Qhkzp@2w5RduXRqxKgHt1wtp4qGA4AfXaBj8TuUj1LvcPe2Ea1",
|
||||
"uses_exit_policy": true
|
||||
}
|
||||
```
|
||||
~~~
|
||||
|
||||
## Run
|
||||
|
||||
Now your client is initialised, start it with the following:
|
||||
|
||||
```
|
||||
./nym-socks5-client run --id <ID>
|
||||
```
|
||||
|
||||
## Useful commands
|
||||
|
||||
### Viewing Command `--help`
|
||||
|
||||
You can check that your binaries are properly compiled with:
|
||||
|
||||
```
|
||||
./nym-socks5-client --help
|
||||
```
|
||||
|
||||
~~~admonish example collapsible=true title="Console output"
|
||||
```
|
||||
<!-- cmdrun ../../../../../target/release/nym-socks5-client --help -->
|
||||
```
|
||||
~~~
|
||||
|
||||
You can check the necessary parameters for the available commands by running:
|
||||
|
||||
```
|
||||
./nym-socks5-client <COMMAND> --help
|
||||
```
|
||||
For example `./nym-socks5-client run --help` will return all options associated with `run` command.
|
||||
|
||||
~~~admonish example collapsible=true title="Console output"
|
||||
```
|
||||
<!-- cmdrun ../../../../../target/release/nym-socks5-client run --help -->
|
||||
```
|
||||
~~~
|
||||
|
||||
### `build-info`
|
||||
|
||||
A `build-info` command prints the build information like commit hash, rust version, binary version just like what command `--version` does. However, you can also specify an `--output=json` flag that will format the whole output as a json, making it an order of magnitude easier to parse.
|
||||
|
||||
### Flags & Arguments
|
||||
|
||||
* `--id`: A local identifier so that you can name your clients and keep track of them on your local system; it is **never** transmitted over the network.
|
||||
|
||||
* `--use-reply-surbs`: This field denotes whether you wish to send [SURBs](https://nymtech.net/docs/architecture/traffic-flow.md#private-replies-using-surbs) along with your request. It defaults to `false` and must be explicitly set to `true` to activate.
|
||||
|
||||
* `--use-anonymous-replies `: Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. While this is going to hide its actual address information, it will make the actual communication slower and consume nearly double the bandwidth as it will require sending reply SURBs.
|
||||
|
||||
* `--gateway`: By default your client will choose a random gateway to connect to. However, there are several options for choosing a gateway, if you do not want one that is randomly assigned to your client:
|
||||
|
||||
* `--latency-based-selection`: This flag will choose a gateway based on its location relative to your client. This argument means that to select a gateway, your client will:
|
||||
* fetch a list of all availiable gateways
|
||||
* send few ping messages to all of them, and measure response times.
|
||||
* create a weighted distribution to randomly choose one, favouring ones with lower latency.
|
||||
|
||||
> Note this doesn't mean that your client will pick the closest gateway to you, but it will be far more likely to connect to gateway with a 20ms ping rather than 200ms
|
||||
|
||||
## Configuring `nym-socks5-client`
|
||||
|
||||
When you initalise a client instance, a configuration directory will be generated and stored in `$HOME_DIR/.nym/socks5-clients/<YOUR_CLIENT_ID>/`.
|
||||
|
||||
```
|
||||
tree $HOME/.nym/socks5-clients/<YOUR_CLIENT_ID>
|
||||
├── config
|
||||
│ └── config.toml
|
||||
└── data
|
||||
├── ack_key.pem
|
||||
├── credentials_database.db
|
||||
├── gateways_registrations.sqlite
|
||||
├── persistent_reply_store.sqlite
|
||||
├── private_encryption.pem
|
||||
├── private_identity.pem
|
||||
├── public_encryption.pem
|
||||
└── public_identity.pem
|
||||
```
|
||||
|
||||
The `config.toml` file contains client configuration options, while the two `pem` files contain client key information.
|
||||
|
||||
The generated files contain the client name, public/private keypairs, and gateway address. The name `<YOUR_CLIENT_ID>` in the example above is just a local identifier so that you can name your clients.
|
||||
|
||||
### Configuring your client for Docker
|
||||
|
||||
By default, the native client listens to host `127.0.0.1`. However this can be an issue if you wish to run a client in a Dockerized environment, where it can be convenenient to listen on a different host such as `0.0.0.0`.
|
||||
|
||||
You can set this via the `--host` flag during either the `init` or `run` commands.
|
||||
|
||||
Alternatively, a custom host can be set in the `config.toml` file under the `socket` section. If you do this, remember to restart your client process.
|
||||
|
||||
### Automating your socks5 client with systemd
|
||||
|
||||
Create a service file for the socks5 client at `/etc/systemd/system/nym-socks5-client.service`:
|
||||
|
||||
```ini
|
||||
[Unit]
|
||||
Description=Nym Socks5 Client
|
||||
StartLimitInterval=350
|
||||
StartLimitBurst=10
|
||||
|
||||
[Service]
|
||||
User=nym # replace this with whatever user you wish
|
||||
LimitNOFILE=65536
|
||||
ExecStart=/home/nym/nym-socks5-client run --id <your_id>
|
||||
KillSignal=SIGINT
|
||||
Restart=on-failure
|
||||
RestartSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
Now enable and start your socks5 client:
|
||||
|
||||
```
|
||||
systemctl enable nym-socks5-client.service
|
||||
systemctl start nym-socks5-client.service
|
||||
|
||||
# you can always check your socks5 client has succesfully started with:
|
||||
systemctl status nym-socks5-client.service
|
||||
```
|
||||
@@ -1,33 +0,0 @@
|
||||
# Using Your Client
|
||||
|
||||
## Proxying traffic
|
||||
After completing the steps above, your local `nym-socks5-client` will be listening on `localhost:1080` ready to proxy traffic to the Network Requester set as the `--provider` when initialising.
|
||||
|
||||
When trying to connect your app, generally the proxy settings are found in `settings->advanced` or `settings->connection`.
|
||||
|
||||
Here is an example of setting the proxy connecting in Blockstream Green:
|
||||
|
||||

|
||||
|
||||
Most wallets and other applications will work basically the same way: find the network proxy settings, enter the proxy url (host: **localhost**, port: **1080**).
|
||||
|
||||
In some other applications, this might be written as **localhost:1080** if there's only one proxy entry field.
|
||||
|
||||
## Supported Applications
|
||||
|
||||
Any application which can be redirected over Socks5 proxy should work. Nym community has been successfully running over Nym Mixnet these applications:
|
||||
|
||||
- Bitcoin Electrum wallet
|
||||
- Monero wallet (GUI and CLI with monerod)
|
||||
- Telegram chat
|
||||
- Element/Matrix chat
|
||||
- Firo wallet
|
||||
- Blockstream Green
|
||||
|
||||
> DarkFi's ircd chat was previously supported: they have moved to DarkIrc: whether the existing integration work is still operational needs to be tested.
|
||||
|
||||
Keep in mind that Nym has been developing a new client **[NymVPN](https://nymvpn.com) (GUI and CLI) routing all users traffic through the Mixnet.**
|
||||
|
||||
## Further reading
|
||||
|
||||
If you want to dig more into the architecture and use of the socks5 client check out its documentation [here](https://nymtech.net/docs/clients/socks5-client.html).
|
||||
@@ -1,22 +0,0 @@
|
||||
# Webassembly Client
|
||||
|
||||
The Nym webassembly client allows any webassembly-capable runtime to build and send Sphinx packets to the Nym network, for uses in edge computing and browser-based applications.
|
||||
|
||||
This is currently packaged and distributed for ease of use via the [Nym Typescript SDK library](../sdk/typescript.md). **We imagine most developers will use this client via the SDK for ease.**
|
||||
|
||||
The webassembly client allows for the easy creation of Sphinx packets from within mobile apps and browser-based client-side apps (including Electron or similar).
|
||||
|
||||
## Building apps with Webassembly Client
|
||||
|
||||
Check out the [Typescript SDK docs](https://sdk.nymtech.net) for examples of usage.
|
||||
|
||||
There are also example applications located in the `clients/webassembly` directory in the main Nym platform codebase.
|
||||
|
||||
## Think about what you're sending!
|
||||
```admonish caution
|
||||
Think about what information your app sends. That goes for whatever you put into your Sphinx packet messages as well as what your app's environment may leak.
|
||||
```
|
||||
|
||||
Whenever you write client PEAPPs using HTML/JavaScript, we recommend that you do not load external resources from CDNs. Webapp developers do this all the time, to save load time for common resources, or just for convenience. But when you're writing 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, explicitly encoding request data in a Sphinx packet does protect you from the normal leakage that gets sent in a browser HTTP request. [There's a lot of stuff that leaks when you make an HTTP request from a browser window](https://panopticlick.eff.org/). Luckily, all that metadata and request leakage doesn't happen in Nym, because you're choosing very explicitly what to encode into Sphinx packets, instead of sending a whole browser environment by default.
|
||||
@@ -1,13 +0,0 @@
|
||||
# Websocket Client
|
||||
|
||||
> The Nym Websocket Client was built in the [building nym](../binaries/building-nym.md) section. If you haven't yet built Nym and want to run the code on this page, go there first.
|
||||
|
||||
## Current version
|
||||
```
|
||||
<!-- cmdrun ../../../../target/release/nym-client --version | grep "Build Version" | cut -b 21-26 -->
|
||||
```
|
||||
|
||||
You can run this client as a standalone process and pipe traffic into it to be sent through the mixnet. This is useful if you're building an application in a language other than Typescript or Rust and cannot utilise one of the SDKs.
|
||||
|
||||
You can find the code for this client [here](https://github.com/nymtech/nym/tree/develop/clients/native).
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
# HCPP23 - Building with Nym workshop
|
||||
|
||||
This is a *reference page*, to see the entire presentation join Max's talk at [HCPP 2023](https://resistance.hcpp.cz/) on [Satuday](https://cfp.paralelnipolis.cz/hcpp23/talk/LLPWXW/).
|
||||
|
||||
## Mixnet architecture
|
||||
|
||||
* [Mixnet motivations](https://nymtech.net/developers/infrastructure/nym.html)
|
||||
* [Mixnet architecture overview](https://nymtech.net/docs/architecture/network-overview.html)
|
||||
* [Mixnet traffic flow](https://nymtech.net/docs/architecture/traffic-flow.html)
|
||||
* [Tor + VPN comparison](https://nymtech.net/developers/infrastructure/nym-vs-others.html)
|
||||
* [Addressing system](https://nymtech.net/docs/clients/addressing-system.html)
|
||||
|
||||
## Clients
|
||||
|
||||
* [Clients overview](https://nymtech.net/docs/clients/overview.html)
|
||||
|
||||
## SDKs
|
||||
|
||||
* [Rust SDK](https://nymtech.net/docs/sdk/rust.html)
|
||||
* [Typescript SDK](https://sdk.nymtech.net/)
|
||||
|
||||
### Rust examples
|
||||
|
||||
* [Libp2p examples](https://github.com/nymtech/nym/tree/develop/sdk/rust/nym-sdk/examples)
|
||||
* [Lighthouse PoC](https://github.com/ChainSafe/lighthouse/blob/nym/USE_NYM.md)
|
||||
* [Dev tutoral: chain service](https://nymtech.net/developers/tutorials/cosmos-service/intro.html)
|
||||
* [Community: Darkfi over Nym](https://darkrenaissance.github.io/darkfi/clients/nym_outbound.html?highlight=nym#3--run)
|
||||
|
||||
### Typescript
|
||||
|
||||
* [Mixfetch NPM](https://www.npmjs.com/package/@nymproject/mix-fetch)
|
||||
* [Interactive Typescript SDK docs](https://sdk.nymtech.net)
|
||||
|
||||
@@ -1,323 +0,0 @@
|
||||
# HCPP 2023 - Securing the Lunarpunks Workshop
|
||||
|
||||
[Serinko's](https://resistance.hcpp.cz/) [workshop](ttps://cfp.paralelnipolis.cz/hcpp23/talk/LLPWXW/) will introduce ***why*** and ***how to use [Nym](https://nymtech.net) platform as a network protection*** layer when using some of our favorite privacy applications. This page serves as an accessible guide alongside the talk and it includes all the steps, pre-requisities and dependencies needed. Preferably the users interested in this setup start downloading and building the tools before the workshop or in the beginning of it. We can use the limited time for questions and addressing problems. This guide will stay online after the event just in case people were not finished and want to catch up later.
|
||||
|
||||
This page is a *how to guide* so it contains the setup only, to see the entire presentation join in at [HCPP 2023](https://resistance.hcpp.cz/) on [Sunday](https://cfp.paralelnipolis.cz/hcpp23/talk/LLPWXW/).
|
||||
|
||||
## Preparation
|
||||
|
||||
During this workshop we will introduce [NymConnect](https://nymtech.net/developers/quickstart/nymconnect-gui.html) and [Socks5 client](https://nymtech.net/docs/clients/socks5-client.html). The difference between them is that the Socks5 client does everything Nymconnect does, but it has more optionality and it's run from a commandline. NymConnect is a one-button GUI application that wraps around the `nym-socks5-client` for proxying application traffic through the Mixnet.
|
||||
|
||||
We will learn how to run through [Nym Mixnet](https://nymtech.net/docs/architecture/network-overview.html) the following applications: Electrum Bitcoin wallet, Monero wallet (desktop and CLI), Matrix (Element app) and ircd chat. For those who want to run ircd through the Mixnet, `nym-socks5-client` client is a must. For all other applications you can choose if you settle with our slick app NymConnect which does all the job in the background or you prefer Socks5 client.
|
||||
|
||||
> Any syntax in `<>` brackets is a user's/version unique variable. Exchange with a corresponding name without the `<>` brackets.
|
||||
|
||||
## NymConnect Installation
|
||||
|
||||
NymConnect application is for everyone who does not want to install and run `nym-socks5-client`. NymConnect is plug-and-play, fast and easy use. Electrum Bitcoin wallet, Monero wallet (desktop and CLI) and Matrix (Element app) connects through NymConnect automatically to the Mixnet.
|
||||
|
||||
1. [Download](https://nymtech.net/download/nymconnect) NymConnect
|
||||
2. On Linux and Mac, make executable by opening terminal in the same directory and run:
|
||||
|
||||
```sh
|
||||
chmod +x ./nym-connect_<VERSION>.AppImage
|
||||
```
|
||||
|
||||
3. Start the application
|
||||
4. Click on `Connect` button to initialise the connection with the Mixnet
|
||||
5. Anytime you'll need to setup Host and Port in your applications, click on `IP` and `Port` to copy the values to clipboard
|
||||
6. In case you have problems such as `Gateway Issues`, try to reconnect or restart the application
|
||||
|
||||
## Connect Privacy Enhanced Applications (PEApps)
|
||||
|
||||
For simplification in this guide we connect Electrum, Monero wallet and Matrix (Element) using NymConnect and ircd over `nym-socks5-client`. Of course if your choice is to run `nym-socks5-client` all these apps will connect through that and you don't need to install NymConnect.
|
||||
|
||||
```admonish info
|
||||
This guide aims to connect your favourite applications to Nym Mixnet, therefore we do not include detailed guides on how to install them, only reference to the source pages.
|
||||
```
|
||||
|
||||
### Electrum Bitcoin wallet via NymConnect
|
||||
|
||||
To download Electrum visit the [official webpage](https://electrum.org/#download). To connect to the Mixnet follow these steps:
|
||||
|
||||
1. Start and connect [NymConnect](./hcpp23-serinko.html#nymconnect-installation) (or [`nym-socks5-client`](./hcpp23-serinko.html#building-nym-platform))
|
||||
2. Start your Electrum Bitcoin wallet
|
||||
3. Go to: *Tools* -> *Network* -> *Proxy*
|
||||
4. Set *Use proxy* to ✅, choose `SOCKS5` from the drop-down and add the values from your NymConnect application
|
||||
5. Now your Electrum Bitcoin wallet runs through the Mixnet and it will be connected only if your NymConnect or `nym-socks5-client` are connected.
|
||||
|
||||

|
||||
|
||||
### Monero wallet via NymConnect
|
||||
|
||||
To download Monero wallet visit [getmonero.org](https://www.getmonero.org/downloads/). To connect to the Mixnet follow these steps:
|
||||
|
||||
1. Start and connect [NymConnect](./hcpp23-serinko.html#nymconnect-installation) (or [`nym-socks5-client`](./hcpp23-serinko.html#building-nym-platform))
|
||||
2. Start your Monero wallet
|
||||
3. Go to: *Settings* -> *Interface* -> *Socks5 proxy* -> Add values: IP address `127.0.0.1`, Port `1080` (the values copied from NymConnect)
|
||||
5. Now your Monero wallet runs through the Mixnet and it will be connected only if your NymConnect or `nym-socks5-client` are connected.
|
||||
|
||||

|
||||
|
||||
If you prefer to run Monero-CLI wallet with Monerod, please check out [this guide](https://nymtech.net/developers/tutorials/monero.html#how-can-i-use-monero-over-the-nym-mixnet).
|
||||
|
||||
### Matrix (Element) via NymConnect
|
||||
|
||||
To download Element (chat client for Matrix) visit [element.io](https://element.io/download). To connect to the Mixnet follow these steps:
|
||||
|
||||
1. Start and connect [NymConnect](./hcpp23-serinko.html#nymconnect-installation) (or [`nym-socks5-client`](./hcpp23-serinko.html#building-nym-platform))
|
||||
2. Start `element-desktop` with `--proxy-server` argument:
|
||||
|
||||
**Linux**
|
||||
|
||||
```sh
|
||||
element-desktop --proxy-server=socks5://127.0.0.1:1080
|
||||
```
|
||||
|
||||
**Mac**
|
||||
|
||||
```sh
|
||||
open -a Element --args --proxy-server=socks5://127.0.0.1:1080
|
||||
```
|
||||
|
||||
To setup your own alias or key-binding see our [*Matrix NymConnect Integration* guide](https://nymtech.net/developers/tutorials/matrix.html#optimise-setup-with-a-keybinding--alias).
|
||||
|
||||
|
||||
## Building Nym Platform
|
||||
|
||||
If you prefer to run to run `nym-socks5-client` the possibility is to download the pre-build binary or build the entire platform. To run ircd through the Mixnet `nym-socks5-client` and `nym-network-requester` are mandatory. Before you start with download and installation, make sure you are on the same machine from which you will connect to ircd.
|
||||
|
||||
We recommend to clone and build the entire platform instead of individual binaries as it offers an easier update and more options down the road, however it takes a basic command-line knowledge and more time. The [Nym platform](https://github.com/nymtech/nym) is written in Rust. For that to work we will need a few pre-requisities. If you prefer to download individual pre-build binaries, skip this part and go directly [that chapter](./hcpp23-serinko.html#pre-built-binaries).
|
||||
|
||||
### Prerequisites
|
||||
- Debian/Ubuntu: `pkg-config`, `build-essential`, `libssl-dev`, `curl`, `jq`, `git`
|
||||
|
||||
```sh
|
||||
apt install pkg-config build-essential libssl-dev curl jq git
|
||||
```
|
||||
|
||||
- Arch/Manjaro: `base-devel`
|
||||
|
||||
```sh
|
||||
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:
|
||||
|
||||
```sh
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.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 Compile Nym
|
||||
|
||||
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 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 the workshop are:
|
||||
|
||||
* [socks5 client](https://nymtech.net/docs/clients/socks5-client.html): `nym-socks5-client`
|
||||
* [network requester](https://nymtech.net/operators/nodes/network-requester-setup.html): `nym-network-requester`
|
||||
|
||||
## 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.
|
||||
|
||||
**Download:** Find the binary of your choice, right click on the binary, select *Copy Link*. This will save the binary `<URL>` to clipboard. Run the following commands on your machine:
|
||||
|
||||
```
|
||||
wget <URL> # to download the binary
|
||||
```
|
||||
|
||||
If the pre-built binaries don't work or are unavailable for your system, you will need to [build the platform](./hcpp23-serinko.html#building-nym-platform) yourself.
|
||||
|
||||
All Nym binaries must first be made executable.
|
||||
|
||||
To make a binary executable, open terminal in the same directory and run:
|
||||
|
||||
```sh
|
||||
chmod +x ./<BINARY_NAME>
|
||||
# for example: chmod +x ./nym-network-requester
|
||||
```
|
||||
|
||||
## Initialize Socks5 Client and Network Requester
|
||||
|
||||
Whether you build the entire platform or downloaded binaries, `nym-socks5-client` and `nym-network-requester` need to be initialised with `init` before being `run`.
|
||||
|
||||
In your terminal navigate to the directory where you have your `nym-socks5-client` and `nym-network-requester`. In case you built the entire platform it's in `nym/target/release`.
|
||||
|
||||
```sh
|
||||
# change directory from nym repo
|
||||
cd target/release
|
||||
```
|
||||
|
||||
**Network Requester**
|
||||
|
||||
The `init` command is usually where you pass flags specifying configuration arguments such as the gateway you wish to communicate with, the ports you wish your binary to listen on, etc.
|
||||
|
||||
The `init` command will also create the necessary keypairs and configuration files at `~/.nym/<BINARY_TYPE>/<BINARY_ID>/` if these files do not already exist. **It will NOT overwrite existing keypairs if they are present.**
|
||||
|
||||
To run [ircd](https://darkrenaissance.github.io/darkfi/clients/nym_outbound.html) through the Mixnet you need to run your own [Network Requester](https://nymtech.net/operators/nodes/network-requester-setup.html) and add known peer's domains/addresses to `~/.nym/service-providers/network-requester/<NETWORK-REQUESTER-ID>/data/allowed.list`. For all other applications `nym-socks5-client` (or NymCOnnect) is enough, no need to initialize and run `nym-network-requester`.
|
||||
|
||||
Here are the steps to initialize `nym-network-requester`:
|
||||
|
||||
```sh
|
||||
# open the directory with your binaries
|
||||
./nym-network-requester init --id <CHOOSE_ANY_NAME_AS_ID>
|
||||
```
|
||||
This will print you information about your client `<ADDRESS>`, it will look like:
|
||||
```sh
|
||||
The address of this client is: 8hUvtEyZK8umsdxxPS2BizQhEDmbNeXEPBZLgscE57Zh.5P2bWn6WybVL8QgoPEUHf6h2zXktmwrWaqaucEBZy7Vb@5vC8spDvw5VDQ8Zvd9fVvBhbUDv9jABR4cXzd4Kh5vz
|
||||
```
|
||||
|
||||
**Socks5 Client**
|
||||
|
||||
If you run `nym-socks5-client` instead of NymConnect, you can choose your `--provider` [here](https://explorer.nymtech.net/network-components/service-providers) or leave that flag empty and your client will chose one randomly. To run ircd, you will need to connect it to your `nym-network-requester` by using your `<ADDRESS>` for your `nym-socks5-client` initialisation and add a flag `--use-reply-surbs true`. Run the command in the next terminal window:
|
||||
|
||||
```sh
|
||||
# to connect to your nym-network-requester as a provider for ircd
|
||||
./nym-socks5-client init --use-reply-surbs true --id <CHOSE_ANY_NAME_AS_ID> --provider <ADDRESS>
|
||||
|
||||
# simple socks5 client init (random provider) for other apps
|
||||
./nym-socks5-client init --id <CHOSE_ANY_NAME_AS_ID>
|
||||
```
|
||||
|
||||
```admonish info
|
||||
You can reconfigure your binaries at any time by editing the config file located at `~/.nym/service-providers/<BINARY_TYPE>/<BINARY_ID>/config/config.toml` and restarting the binary process.
|
||||
```
|
||||
|
||||
**Run Clients**
|
||||
|
||||
Once you have run `init`, you can start your binary with the `run` command, accompanied by the `id` of the binary that you specified.
|
||||
|
||||
This `id` is **never** transmitted over the network, and is used to select which local config and key files to use for startup.
|
||||
|
||||
```sh
|
||||
# network requester
|
||||
./nym-network-requester run --id <ID>
|
||||
|
||||
# socks5 client (in other terminal window)
|
||||
./nym-socks5-client run --id <ID>
|
||||
```
|
||||
|
||||
**Troubleshooting**
|
||||
|
||||
In case your `nym-socks5-client` has a problem to connect to your `nym-network-requester` try to setup a firewall by running these commands:
|
||||
|
||||
```sh
|
||||
# check if you have ufw installed
|
||||
ufw version
|
||||
|
||||
# if it is not installed, install with
|
||||
sudo apt install ufw -y
|
||||
|
||||
# enable ufw
|
||||
sudo ufw enable
|
||||
|
||||
# check the status of the firewall
|
||||
sudo ufw status
|
||||
|
||||
# open firewall ports for network requester
|
||||
sudo ufw allow 22,9000/tcp
|
||||
|
||||
# re-check the ufw status
|
||||
sudo ufw status
|
||||
```
|
||||
|
||||
Restart your network requester.
|
||||
|
||||
|
||||
## ircd
|
||||
|
||||
[Dark.fi](htps://dark.fi) built a fully anonymous and p2p instance of IRC chat called [ircd](https://darkrenaissance.github.io/darkfi/misc/ircd/ircd.html). The team is just finishing their new instance of the program darkirc which we hope to see in production soon.
|
||||
|
||||
```admonish info
|
||||
It is highly recomended to install [dark.fi architecture](https://github.com/darkrenaissance/darkfi) prior to the workshop following the [documentation](https://darkrenaissance.github.io/darkfi/misc/ircd/ircd.html) so we have enough time for the network configuration.
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
Make sure to have [ircd installed](https://darkrenaissance.github.io/darkfi/misc/ircd/ircd.html) on the same machine like your `nym-socks5-client` (`nym-network-requester` can run anywhere).
|
||||
|
||||
Currently `nym-network-requester` automatically connnects only to the [whitelisted URLs](https://nymtech.net/.wellknown/network-requester/standard-allowed-list.txt). This will [change soon](https://nymtech.net/operators/faq/smoosh-faq.html) into a more opened setup. This list can be changed by an operator running a node.
|
||||
|
||||
**Edit allowed.list**
|
||||
|
||||
1. Open a text editor and add:
|
||||
```yaml
|
||||
dasman.xyz
|
||||
```
|
||||
2. Save it as `allowed.list` in `~/.nym/service-providers/network-requester/<NETWORK-REQUESTER-ID>/data/`
|
||||
3. Restart your `nym-network-requester`
|
||||
```sh
|
||||
./nym-network-requester run --id <ID>
|
||||
```
|
||||
4. Make sure both `nym-socks5-client` and `nym-network-requester` are running and connected
|
||||
|
||||
**ircd setup**
|
||||
|
||||
In case your ircd has problems to start or connect, run the following:
|
||||
|
||||
```sh
|
||||
# cd to darkfi repo
|
||||
git pull
|
||||
git checkout c4b78ead5111b0423fca3bd53cb7185acd6f0faa
|
||||
|
||||
# compile ircd
|
||||
make ircd
|
||||
|
||||
# in case of dependency error: "failed to load source for dependency `halo2_gadgets`"
|
||||
rm Cargo.lock
|
||||
make ircd
|
||||
|
||||
# remove the config file (rename it if you want to safe any values first)
|
||||
rm ~/.config/darkfi/ircd_config.toml
|
||||
|
||||
# rerun ircd to generate new config file
|
||||
./ircd
|
||||
|
||||
# add your custom values from the old config file
|
||||
```
|
||||
|
||||
5. Open `~/.config/darkfi/ircd_config.toml`
|
||||
6. Coment the line with `seeds`
|
||||
7. Add line:
|
||||
```yaml
|
||||
peers = ["nym://dasman.xyz:25552"]
|
||||
```
|
||||
8. Change `outbond_transports` to:
|
||||
```yaml
|
||||
outbond_transports = ["nym"]
|
||||
```
|
||||
9. Make sure that
|
||||
```yaml
|
||||
outbound_connections = 0
|
||||
```
|
||||
10. Save and restart `ircd`
|
||||
|
||||
Observe the ircd deamon to see that the communication is running through the mixnet.
|
||||
|
||||
## Bonus: Join hcpp23 channel
|
||||
|
||||
Now, when your Darkfi's ircd runs through Nym Mixnet, you can join public and fully anonymous channel `#hcpp23`. To do so, follow one of the two possibilities:
|
||||
|
||||
1. Run a command in your weechat:
|
||||
```sh
|
||||
/join #hcpp23
|
||||
```
|
||||
2. Open `~/.config/darkfi/ircd_config.toml` and add `"#hcpp23"` to the `autojoin = []` brackets, save and restart ircd.
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# Web3 Privacy Now - Nym for Ethereum validator privacy
|
||||
|
||||
Serinko's presentation on [Web3Privacy Now: Community 1st](https://lu.ma/web3privacynow_rome) introduces ***why network privacy matters*** for ETH 2.0 validators' security and decentralisation.
|
||||
|
||||
This page serves as an accessible list of references mentioned during the talk.
|
||||
|
||||
## References
|
||||
|
||||
### Mixnet architecture
|
||||
|
||||
* [Mixnet motivations](https://nymtech.net/developers/infrastructure/nym.html)
|
||||
* [Mixnet architecture overview](https://nymtech.net/docs/architecture/network-overview.html)
|
||||
* [Mixnet traffic flow](https://nymtech.net/docs/architecture/traffic-flow.html)
|
||||
* [Tor + VPN comparison](https://nymtech.net/developers/infrastructure/nym-vs-others.html)
|
||||
* [Addressing system](https://nymtech.net/docs/clients/addressing-system.html)
|
||||
|
||||
### Nym \<\> ETH 2.0
|
||||
|
||||
* [Chainsafe Rust libp2p Nym intergration repo](https://github.com/ChainSafe/rust-libp2p-nym)
|
||||
* [rust-libp2p-nym Transport Specification](https://hackmd.io/@nZ-twauPRISEa6G9zg3XRw/HkE8sHuns)
|
||||
* [Lighthouse PoC](https://github.com/ChainSafe/lighthouse/blob/nym/USE_NYM.md)
|
||||
* [Nym \<\> Aztec partnership](https://blog.nymtech.net/nym-partners-with-aztec-to-provide-integral-infrastructure-privacy-in-ethereum-chains-694963c55192)
|
||||
|
||||
### Rust Examples
|
||||
|
||||
* [Dev tutorial: chain service](https://nymtech.net/developers/tutorials/cosmos-service/intro.html)
|
||||
|
||||
### Clients
|
||||
|
||||
* [Clients overview](https://nymtech.net/docs/clients/overview.html)
|
||||
|
||||
### Nym Docs
|
||||
|
||||
* [Nym Developer Portal](https://nymtech.net/developers)
|
||||
* [Nym Operators Guide](https://nymtech.net/operators)
|
||||
* [Nym technical Documentation](https://nymtech.net/docs)
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# Browser only
|
||||
With the Typescript SDK you can run a Nym client in a webworker - meaning you can connect to the mixnet through the browser without having to worry about any other code than your web framework.
|
||||
|
||||
- Oreowallet have integrated `mixFetch` into their browser-extension wallet to run transactions through the mixnet.
|
||||
- [Codebase](https://github.com/oreoslabs/oreowallet-extension/tree/mixFetch)
|
||||
|
||||
- [NoTrustVerify](https://notrustverify.ch/) have set up an example application using [`mixFetch`](https://sdk.nymtech.net/examples/mix-fetch) to fetch crypto prices from CoinGecko over the mixnet.
|
||||
- [Website](https://notrustverify.github.io/mixfetch-examples/)
|
||||
- [Codebase](https://github.com/notrustverify/mixfetch-examples)
|
||||
|
||||
- There is a coconut-scheme based Credential Library playground [here](https://coco-demo.nymtech.net/). This is a WASM implementation of our Coconut libraries which generate raw Coconut credentials. Test it to create and re-randomize your own credentials. For more information on what is happening here check out the [Coconut docs](https://nymtech.net/docs/coconut.html).
|
||||
|
||||
- You can find a browser-based 'hello world' chat app [here](https://chat-demo.nymtech.net). Either open in two browser windows and send messages to yourself, or share with a friend and send messages to each other through the mixnet.
|
||||
@@ -1,21 +0,0 @@
|
||||
# Custom Services
|
||||
Custom services involve two pieces of code that communicate via the mixnet: a client, and a custom server/service. This custom service will most likely interact with the wider internet / a clearnet service on your behalf, with the mixnet between you and the service, acting as a privacy shield.
|
||||
|
||||
> The current model of relying on a Service Provider has some issues, such as additional complexity in deployment and maintenance, as well as creating potential chokepoints for app traffic. Work is going on (in the open in our [monorepo](https://github.com/nymtech/nym) ofc) to start removing this requirement as much as possible, by allowing for the creation of packet-contents in such a way that the existing Network Requester/Exit Gateway infrastructure can support network requests in a similar way to `mixFetch`. More on this as and when it is released.
|
||||
|
||||
- [Nym Zcash RPC demo](https://github.com/nymtech/nym-zcash-rpc-demo), although used to only pipe RPC traffic, is a proof of concept 'generic' mixnet piping example which exposes a TPC Socket on the client side for incoming traffic, pipes this through the mixnet, and then streams TCP packets 'out' the other side. A good example of non-app-specific traffic transport which developers could also quite easily use as a template for their own app-specific work.
|
||||
- [Codebase](https://github.com/nymtech/nym-zcash-rpc-demo)
|
||||
|
||||
- PasteNym is a private pastebin alternative. It involves a browser-based frontend utilising the Typescript SDK and a Python-based backend service communicating with a standalone Nym Websocket Client. **If you're a Python developer, start here!**.
|
||||
- [Frontend codebase](https://github.com/notrustverify/pastenym)
|
||||
- [Backend codebase](https://github.com/notrustverify/pastenym-frontend)
|
||||
|
||||
- Nostr-Nym is another application written by [NoTrustVerify](https://notrustverify.ch/), standing between mixnet users and a Nostr server in order to protect their metadata from being revealed when gossiping. **Useful for Go and Python developers**.
|
||||
- [Codebase](https://github.com/notrustverify/nostr-nym)
|
||||
|
||||
- Spook and Nym-Ethtx are both examples of Ethereum transaction broadcasters utilising the mixnet, written in Rust. Since they were written before the release of the Rust SDK, they utilise standalone clients to communicate with the mixnet.
|
||||
- [Spook](https://github.com/EdenBlockVC/spook) (**Typescript**)
|
||||
- [Nym-Ethtx](https://github.com/noot/nym-ethtx) (**Rust**)
|
||||
|
||||
- NymDrive is an early proof of concept application for privacy-enhanced file storage on IPFS. **JS and CSS**, and a good example of packaging as an Electrum app.
|
||||
- [Codebase](https://github.com/saleel/nymdrive)
|
||||
@@ -1,5 +0,0 @@
|
||||
# Monorepo examples
|
||||
As well as these examples, there are a bunch of examples for each SDK in the Nym monorepo.
|
||||
|
||||
- [Rust SDK examples](https://github.com/nymtech/nym/tree/develop/sdk/rust/nym-sdk/examples)
|
||||
- [Typescript SDK examples](https://github.com/nymtech/nym/tree/develop/sdk/typescript/examples)
|
||||
@@ -1,24 +0,0 @@
|
||||
# Apps Using Network Requesters
|
||||
These applications utilise custom app logic in the user-facing apps in order to communicate using the mixnet as a transport layer, without having to rely on custom server-side logic. Instead, they utilise existing Nym infrastructure - Network Requesters - now embeded in `nym-node` running as `exit-gateway`.
|
||||
|
||||
If you are sending 'normal' application traffic, and/or don't require and custom logic to be happening on the 'other side' of the mixnet, this is most likely the best option to take as a developer who wishes to privacy-enhance their application.
|
||||
|
||||
> Nym will soon be switching from a whitelist-based approach to a blocklist-based approach to filtering traffic. As such, it will soon be even easier for developers to utilise the mixnet, as they will not have to run their own NRs or have to add their domains to the whitelist
|
||||
|
||||
|
||||
> Nym will soon be switching from a whitelist-based approach to a blocklist-based approach to filtering traffic. As such, it will soon be even easier for developers to utilise the mixnet, as they will not have to run their own NRs or have to add their domains to the whitelist
|
||||
|
||||
<!-- I DON't THINK THIS WORKS NOW, NEED RESEARCH AND UPGRADE
|
||||
- DarkFi over Nym leverages Nym’s mixnet as a pluggable transport for DarkIRC, their p2p IRC variant. Users can anonymously connect to peers over the network, ensuring secure and private communication within the DarkFi ecosystem. Written in **Rust**.
|
||||
- [Docs](https://darkrenaissance.github.io/darkfi/clients/nym_outbound.html?highlight=nym#3--run)
|
||||
- [Github](https://github.com/darkrenaissance/darkfi/tree/master/doc)
|
||||
-->
|
||||
|
||||
|
||||
- MiniBolt is a complete guide to building a Bitcoin & Lightning full node on a personal computer. It has the capacity to run network traffic (transactions and syncing) over the mixnet, so you can privately sync your node and not expose your home IP to the wider world when interacting with the rest of the network!
|
||||
- [Docs](https://v2.minibolt.info/bonus-guides/system/nym-mixnet#proxying-bitcoin-core)
|
||||
- [Codebase](https://github.com/minibolt-guide/minibolt)
|
||||
|
||||
|
||||
- Email over Nym is a set of configuration options to set up a Network Requester to send and recieve emails over Nym, using something like Thunderbird.
|
||||
- [Codebase](https://github.com/dial0ut/nymstr-email)
|
||||
@@ -1,198 +0,0 @@
|
||||
# Integrations FAQ
|
||||
|
||||
On this page, you'll find links and frequently asked questions on how to get started on integrating your project with Nym's Mixnet and its blockchain, Nyx.
|
||||
|
||||
## Links
|
||||
### General Info
|
||||
* [Nym Website](https://nymtech.net/)
|
||||
* [Nym Mixnet Explorer](https://explorer.nymtech.net/)
|
||||
* [Nyx Block Explorer](https://nym.explorers.guru/)
|
||||
|
||||
### Codebase Info
|
||||
* [Nym Platform Monorepo](https://github.com/nymtech/nym/)
|
||||
* [Nym Project](https://github.com/nymtech/)
|
||||
|
||||
### Documentation Info
|
||||
* [Documentation](https://nymtech.net/docs/)
|
||||
* Developer Portal - you are currently viewing the Developer Portal
|
||||
|
||||
## Wallet Installation
|
||||
The Nym wallet can be downloaded [here](https://nymtech.net/download/).
|
||||
|
||||
You can find all the instructions related to setting up your wallet in the [docs](https://nymtech.net/docs/wallet/desktop-wallet.html), as well as instructions on how to build the wallet if there is not a downloadable version built for your operating system.
|
||||
|
||||
### What are the machine hardware requirements for Nym Wallet?
|
||||
About 16GB of RAM is recommended for the wallet. However you can expect an average memory usage of ~100MB.
|
||||
|
||||
|
||||
## Interacting with the Nyx blockchain
|
||||
### Where can I find information on the blockchain, such as RPC endpoints?
|
||||
You can find most information required for integration in the [Cosmos Chain Registry](https://github.com/cosmos/chain-registry/blob/master/nyx/chain.json) and [Keplr Chain Registry](https://github.com/chainapsis/keplr-chain-registry/blob/main/cosmos/nyx.json) repositories.
|
||||
|
||||
### How can I use `JSON-RPC` methods to interact with the Nyx blockchain?
|
||||
There are multiple ways to use `JSON-RPC` methods to interact with the Nyx blockchain. Which method you use will depend on the type of application you are integrating Nyx interactions into.
|
||||
|
||||
1. The standalone `nyxd` binary can be used for CLI wallets, interacting with smart contracts via the CLI, setting up RPC nodes, and even running validators. This is a version of the Cosmos Hub's `gaiad` binary compiled with Nyx chain configuration, and is written in `Go`. Instructions on setting up the `nyxd` binary can be found [here](https://nymtech.net/docs/nyx/interacting-with-chain.html). This is recommended for more complex commands. For full documentation check the [`gaiad documentation`](https://hub.cosmos.network/main/hub-overview/overview.html#).
|
||||
|
||||
2. `CosmJS` is a Typescript library allowing for developers to interact with CosmosSDK blockchains from a Javascript or Typescript project. You can find it on Github [here](https://github.com/cosmos/cosmjs) and an explainer of its functionality [in the Cosmos Developer Portal](https://tutorials.cosmos.network/tutorials/7-cosmjs/1-cosmjs-intro.html). You can find a list of example apps which use CosmJS [here](https://codesandbox.io/examples/package/@cosmjs/stargate).
|
||||
|
||||
3. The `Nym-CLI` tool, a standalone rust binary which can be built and used according to the [docs](https://nymtech.net/docs/tools/nym-cli.html) can be used in much the same way as `nyxd`. It is a bit simpler to use than the `nyxd` binary, but is not recommended for complex queries, and not all commands are currently implemented. A list of Nym CLI commands and example usage can be found [here](https://nymtech.net/docs/tools/nym-cli.html)
|
||||
|
||||
### How do I generate an address/mnemonic for users to interact with?
|
||||
**Nyxd**
|
||||
|
||||
Use the following command, replacing `your_id` with the ID you want to use for your keypair:
|
||||
```
|
||||
./nyxd keys add your_id --chain-id=nyx --gas=auto --gas-adjustment=1.4 --fees=7000unym
|
||||
```
|
||||
|
||||
**Nym-CLI**
|
||||
```
|
||||
./nym-cli account create
|
||||
```
|
||||
|
||||
Both methods will generate a keypair and log the mnemonic in the console.
|
||||
|
||||
**CosmJS**
|
||||
|
||||
You can find example code for keypair generation [here](https://tutorials.cosmos.network/tutorials/7-cosmjs/2-first-steps.html#testnet-preparation).
|
||||
|
||||
### How to get block information like block height, block hash, block time as so on?
|
||||
**Nyxd**
|
||||
|
||||
You would use one of the subcommands returned by this command:
|
||||
```
|
||||
./nyxd query tx --chain-id=nyx --gas=auto --gas-adjustment=1.4 --fees=7000unym
|
||||
```
|
||||
|
||||
**Nym-CLI**
|
||||
```
|
||||
./nym-cli block current-height
|
||||
```
|
||||
|
||||
**CosmJS**
|
||||
|
||||
`CosmJS` documentation can be found [here](https://cosmos.github.io/cosmjs/). We will be working on example code blocks soon.
|
||||
|
||||
### How to get account/address balance to check there is enough coins to withdraw?
|
||||
**Nyxd**
|
||||
```
|
||||
./nyxd query bank balances <address> --chain-id=nyx --gas=auto --gas-adjustment=1.4 --fees=7000unym
|
||||
```
|
||||
|
||||
**Nym-CLI**
|
||||
```
|
||||
./nym-cli account balance
|
||||
```
|
||||
|
||||
**CosmJS**
|
||||
|
||||
`CosmJS` documentation can be found [here](https://cosmos.github.io/cosmjs/). We will be working on example code blocks soon.
|
||||
|
||||
### How do I transfer tokens to another address?
|
||||
**Nyxd**
|
||||
```
|
||||
./nyxd tx bank send [from_key_or_address] [to_address] [amount] --chain-id=nyx --gas=auto --gas-adjustment=1.4 --fees=7000unym
|
||||
```
|
||||
|
||||
**Nym-CLI**
|
||||
```
|
||||
./nym-cli account send TARGET_ADDRESS AMOUNT
|
||||
```
|
||||
**CosmJS**
|
||||
|
||||
`CosmJS` documentation can be found [here](https://cosmos.github.io/cosmjs/). We will be working on example code blocks soon.
|
||||
|
||||
### Does the address support the inclusion of a `memo` or `destinationTag` when doing the transfer?
|
||||
Yes, it is supported.
|
||||
|
||||
### Can I use my Ledger hardware wallet to interact with the Nyx blockchain?
|
||||
Yes. Follow the instructions in the [Ledger support for Nyx documentation](https://nymtech.net/docs/nyx/ledger-live.html).
|
||||
|
||||
### Where can I find network details such as deployed smart contract addresses?
|
||||
In the [`network defaults`](https://github.com/nymtech/nym/blob/master/common/network-defaults/src/mainnet.rs) file.
|
||||
|
||||
## `NYM` Token
|
||||
The token used to reward mixnet infrastructure operators - `NYM` - is one of the native tokens of the Nyx blockchain. The other token is `NYX`.
|
||||
|
||||
`NYM` is used to incentivise the mixnet, whereas `NYX` is used to secure the Nyx blockchain via Validator staking.
|
||||
|
||||
> Integration with Nym's technology stack will most likely involve using `NYM` if you do need to interact with the Nyx blockchain and transfer tokens.
|
||||
|
||||
### I've seen an ERC20 representation of `NYM` on Ethereum - what's this and how do I use it?
|
||||
|
||||
We use the [Gravity Bridge](https://github.com/Gravity-Bridge) blockchain to bridge an ERC20 representation of `NYM` between the Cosmos ecosystem of IBC-enabled chains and Ethereum mainnet. Gravity Bridge is its own IBC-enabled CosmosSDK chain, which interacts with a smart contract deployed on Ethereum mainnet.
|
||||
|
||||
> The ERC20 representation of `NYM` **cannot** be used with the mixnet; only the native Cosmos representation is usable for staking or bonding nodes.
|
||||
|
||||
If you need to transfer tokens across the bridge, we recommend users use Cosmostation's [spacestation.zone](https://spacestation.zone/) dApp with Metamask and Keplr.
|
||||
|
||||
### What is Circulating Supply and how to find out the distribution amount?
|
||||
|
||||
Circulating supply is the total number of available `NYM`. `NYM` is currently present on the IBC-enabled Nyx blockchain, as well as in ERC20 form on Ethereum Mainnet.
|
||||
|
||||
The Validator API endpoints can be found via the [Swagger Documentation](https://validator.nymtech.net/api/swagger/index.html). The following endpoints can be called to retrieve the correct distribution amount and circulating supply within Nym.
|
||||
|
||||
Using this API endpoint returns information about the circulating supply of Nym tokens:
|
||||
|
||||
```
|
||||
/circulating-supply
|
||||
```
|
||||
Query Response:
|
||||
|
||||
{
|
||||
"total_supply": {
|
||||
"denom": "unym",
|
||||
"amount": "1000000000000000"
|
||||
},
|
||||
"mixmining_reserve": {
|
||||
"denom": "unym",
|
||||
"amount": "241105338883248"
|
||||
},
|
||||
"vesting_tokens": {
|
||||
"denom": "unym",
|
||||
"amount": "390255200928865"
|
||||
},
|
||||
"circulating_supply": {
|
||||
"denom": "unym",
|
||||
"amount": "368639460187887"
|
||||
}
|
||||
}
|
||||
|
||||
- `total_supply`- The total number of NYM tokens that have been created and can exist, including those that are currently in circulation and those that are reserved for various purposes.
|
||||
|
||||
- `mixmining_reserved`- The number of NYM tokens that are reserved for the mixnet miners who help to power the Nym network.
|
||||
|
||||
- `vesting_tokens`- The number of NYM tokens that are subject to vesting, meaning they are gradually released over time to certain stakeholders such as the team, advisors, and early investors.
|
||||
|
||||
- `circulating_supply`- The number of NYM tokens that are currently in circulation and available to be traded on the open market, which is calculated by subtracting the `mixmining_reserved` and `vesting_tokens` from the `total_supply`.
|
||||
|
||||
Using this API endpoint returns the current value of the total supply of NYM tokens:
|
||||
|
||||
```
|
||||
/circulating-supply/total-supply-value
|
||||
```
|
||||
Query Response:
|
||||
|
||||
1000000000.0
|
||||
|
||||
> The maximum number of `NYM` tokens that can ever be created is 1 billion.
|
||||
|
||||
Using this API endpoint returns the current value of the circulating supply of NYM tokens:
|
||||
|
||||
```
|
||||
/circulating-supply/circulating-supply-value
|
||||
```
|
||||
Query Response:
|
||||
|
||||
368639460.187887
|
||||
|
||||
> This refers to the present quantity of `NYM` tokens that are actively in circulation.
|
||||
|
||||
|
||||
## Sending traffic through the Nym mixnet
|
||||
### Is the mixnet free to use?
|
||||
For the moment then yes, the mixnet is free to use. There are no limits on the amount of traffic that an app can send through the mixnet.
|
||||
|
||||
### Do I need to run my own gateway to send application traffic through the mixnet?
|
||||
No, although we do recommend that apps that wish to integrate look into running some of their own infrastructure such as gateways in order to assure uptime.
|
||||
@@ -1,49 +0,0 @@
|
||||
# Rewards FAQ
|
||||
|
||||
On this page you will find important information about participation in community activities which involve NYM token rewards, such as contests, giveaways, and promotions. Before participating in any such activity, make sure to read this page carefully.
|
||||
|
||||
### Am I eligible to participate? What are the conditions?
|
||||
|
||||
Participation in any program or community activity involving NYM token rewards is only available to individuals who do not reside in locations that makes them ineligible to participate and/or receive prizes, including:
|
||||
|
||||
The USA, Central African Republic, Cuba, Iran, Iraq, Lebanon, Libya, North Korea, Somalia, South Sudan, Sudan, Syria, Venezuela, Yemen, and Russian occupied regions of Ukraine (including Crimea, and parts of Donetsk and Luhansk).
|
||||
|
||||
Be nice and play fair! Nym reserves the right to determine the final outcome of its programs and community activities and disqualify any participants without prior notice or recourse for any reason, including fraudulent behavior and failure to adhere to the [Nym Code of Conduct](https://nymtech.net/docs/coc.html).
|
||||
|
||||
### I won NYM rewards. How can I claim them?
|
||||
|
||||
First things first: congratulations! We hope you had some fun in the process. A Nym Community Manger will tag you on Telegram or Discord - send them a private message to start the claim process. You will receive your unique reward ID and detailed instructions on how to use it to claim your rewards. **Remember: we never DM you first!**
|
||||
|
||||
**Note: you have 2 weeks to claim your rewards! If we don't hear from you, your reward ID will expire.**
|
||||
|
||||
### Do I need to pass KYC?
|
||||
|
||||
Before receiving NYM token rewards, you are required to successfully complete KYC verification with Synaps, our KYC provider. You only need to do this once!
|
||||
|
||||
### This is my first time - How do I pass KYC?
|
||||
|
||||
To claim your rewards, you will be asked to provide your email address. If you haven't passed KYC yet, your email address will be added to our KYC whitelist and you will receive a welcome email from Synaps with instructions on how to start the KYC process. Once you complete KYC and provide a valid Nym wallet address, your rewards will be transferred to your wallet automatically.
|
||||
|
||||
**Note: it may take up to 2 weeks for your email address to get whitelisted. Be patient and keep an eye on your inbox!**
|
||||
|
||||
To receive your tokens, you will need a Nym wallet address. If you don't already have one, [download](https://nymtech.net/download/) the Nym wallet and create an account. You can copy your wallet address from the "receive" tab of the wallet. Make sure to keep your mnemonic safe, as losing that means losing your tokens.
|
||||
|
||||
**Tip: If you are not sure you have completed Nym KYC before, visit our KYC portal on [Synaps](https://nym-kyc.synaps.me/signup) and try to log in with your email.**
|
||||
|
||||
### I have already passed KYC on Synaps. What do I need to do next?
|
||||
|
||||
If you have successfully completed KYC on Synaps earlier and provided your Nym wallet address, you are all set - we will send you a link so you can claim your rewards.
|
||||
|
||||
**Note: after claiming your NYM rewards, it may take up to 3 weeks for the tokens to be transferred to your wallet. Be patient and keep an eye on your wallet!**
|
||||
|
||||
### I received my NYM tokens. What can I do with them?
|
||||
|
||||
We're glad you asked! The Nym network is the most robust privacy infrastructure the world has ever seen, and the NYM token is how you can access its [utility](https://www.youtube.com/watch?v=G1qrYlyFt48):
|
||||
|
||||
* As a user, [unparalleled privacy](https://www.youtube.com/watch?v=SQHF4LkX7M8) for your communications
|
||||
* As a [mix node operator](https://medium.com/nymtech/nym-mixnodes-deep-dive-d2b91917f097), rewards for your crucial role in operating our decentralized privacy infrastructure
|
||||
* As a [delegator](https://medium.com/nymtech/want-to-stake-in-nym-here-is-how-to-choose-a-mix-node-to-delegate-nym-to-c3b862add165), rewards for securing the Nym network and ensuring outstanding quality of service
|
||||
|
||||
Using the Nym network is free for now, but user fees will be introduced in the future and those will be paid in NYM tokens, so set them aside! And until then, you can contribute to running our decentralized infrastructure and earn mix mining rewards by setting up Nym mix nodes and bonding your tokens to them. You don't need to run nodes to contribute to the security and performance of the Nym network though. You can pledge your trust in someone else's node by delegating your NYM tokens to it, and receive a share of their mix mining rewards.
|
||||
|
||||
You can find out more about how staking works in [this](https://www.youtube.com/watch?v=PcNGcTwlm0I) video from our Chief Scientist Claudia Diaz and if you need help setting up your mix node, choosing one to delegate your tokens to, or anything else, our community is there to help on [Discord](https://nymtech.net/go/discord) and [Telegram](https://t.me/nymchan).
|
||||
@@ -1,106 +0,0 @@
|
||||
# Glossary
|
||||
|
||||
__Familiarise yourself with Nym's specific terms and jargon through our glossary, making your understanding of Nym technology more enjoyable and educational.__
|
||||
|
||||
## A
|
||||
**[Address](https://nymtech.net/docs/stable/integrations/addresses-in-nym/)** - A unique string of characters generated from a client keypair. Used to identify clients in the mixnet.
|
||||
|
||||
**[Ack](https://nymtech.net/docs/architecture/traffic-flow.html#acks--package-retransmission)** - Short for "acknowledgement". Whenever a hop is completed, the recieving node will send back an 'ack', so that the sending node knows that the packet was recieved.
|
||||
|
||||
**Attacker** - A person or entity who attempts to gain unauthorised access to a computer system, network, or other information resource.
|
||||
|
||||
## B
|
||||
**Binary** - Is a type of computer file that contains machine code, which is a set of instructions that a computer can execute directly. The file consists of a series of 1s and 0s, which are the two digits used in the binary number system.
|
||||
|
||||
**Blockchain** - A distributed database that maintains a continuously growing list of ordered records, called blocks.
|
||||
|
||||
## C
|
||||
**[Coconut](https://nymtech.net/docs/stable/coconut/)** - A distributed cryptographic signing scheme providing a high degree of privacy for its users.
|
||||
|
||||
**[CLI](https://nymtech.net/docs/stable/nym-cli/)** - A command-line interface (CLI) is a text-based user interface (UI) used to run programs, manage computer files and interact with the computer.
|
||||
|
||||
**Credentials** - Unique values that prove the legitimacy of a user or individual.
|
||||
|
||||
**Centralisation** - Refers to the concentration of control of an activity or organisation under a single authority, or small group of authorities.
|
||||
|
||||
**[CosmWasm](https://cosmwasm.com)** - Cosmos WebAssembly is a WebAssembly (Wasm) interpreter that is used in the Cosmos SDK, a framework for building decentralised applications (dApps) on the Cosmos network. It allows us to write smart contracts in Rust and then compile them to webassembly to be uploaded on the blockchain.
|
||||
|
||||
## D
|
||||
**DAO** - Stands for Decentralised Autonomous Organisation. A type of organisation made up of smart contracts on a blockchain. It operates on a set of rules encoded in a computer program, and is governed by the people who use it, rather than by a central authority.
|
||||
|
||||
**[Delegating NYM](https://medium.com/coinmonks/what-you-have-to-know-about-staking-and-delegating-458b6d2300a5)** - Similar to bonding but by non-operators and as proof of their trust in a node operator providing a good quality of service.
|
||||
|
||||
**Decentralisation** - Refers to the transfer of control and decision-making from a centralised entity (individual, organization, or group thereof) to a distributed network.
|
||||
|
||||
## E
|
||||
**Encryption** - The process of encoding information.
|
||||
|
||||
## G
|
||||
**[Gateways](https://blog.nymtech.net/gateways-to-privacy-51196005bf5)** - The entrance to the mixnet that encrypted packets must pass through before being forwarded to mix nodes. They also act as a sort of mailbox for messages.
|
||||
|
||||
**[Gateway Bonding](https://nymtech.net/docs/stable/run-nym-nodes/nodes/gateways/#bonding-your-gateway)** - The action of node operators to bond their stake (in the form of NYM tokens) to a Gateway in order to join the network topology and begin routing traffic through.
|
||||
|
||||
## I
|
||||
**IPFS** - Stands for InterPlanetary File System. It's a decentralised, peer-to-peer protocol for sharing and storing files. It is designed to make it easier to share and access large amounts of data in a distributed manner, without the need for a central server or authority
|
||||
|
||||
## M
|
||||
**[Metadata](https://www.opendatasoft.com/en/blog/what-is-metadata-and-why-is-it-important-data)** - A set of data that describes and gives information about other data such as IP addresses, device types, geolocations etc.
|
||||
|
||||
**[Mixnet](https://nymtech.net/docs/architecture/traffic-flow.html#mixnet-traffic-flow-1)** - A routing protocol which encrypts and mixes Sphinx packet traffic so that it cannot be determined who is communicating with whom.
|
||||
|
||||
**[Mix Nodes](https://blog.nymtech.net/nym-mixnodes-deep-dive-d2b91917f097)** - The backbone of the Nym infrastructure, that are organised in a three-layer network referred to as the mixnet that network traffic passes through. It mixes, hides and reorders traffic and are rewarded in NYM tokens for their quality of service.
|
||||
|
||||
**[Mix node Bonding](https://nymtech.net/docs/stable/run-nym-nodes/nodes/mixnodes/#bonding-your-mix-node)** - The action of node operators bonding their stake (in the form of NYM tokens) to a Mix node in order to join the network topology and begin routing traffic through.
|
||||
|
||||
## N
|
||||
**[Network Requester](https://nymtech.net/docs/stable/run-nym-nodes/nodes/requester)** - Is a binary that can be ran alongside a Nym Client on a VPS, which allows for private network requests to be made outside the mixnet from you local Nym client
|
||||
|
||||
**Nym** - The in-text name of the organisation.
|
||||
|
||||
**[Nym Typescript SDK](https://nymtech.net/docs/stable/sdk/overview)** - A Typescript software development kit which allows developers to build browser-based Mixnet application.
|
||||
|
||||
**[NYM](https://nymtech.net/docs/stable/nym-cli/#send-tokens-to-an-account)** - Natively distributed token.
|
||||
|
||||
**[Nym Wallet](https://nymtech.net/docs/stable/wallet/)** - The Nym Wallet handles all things regarding handling Nym Tokens about your Nym Node. It is a GUI application that can be downloaded and run on your machine.
|
||||
|
||||
**[Nym Technologies SA](https://nymtech.net)** - The official company name.
|
||||
|
||||
**[Nyx](https://nymtech.net/docs/stable/integrations/payment-integration-overview/)** - A CosmWasm-enabled blockchain smart contracts platform that functions as the backbone of the Nym network, used to keep track and provide the history of the NYM token's transactions.
|
||||
|
||||
## P
|
||||
**Payload** - The carrying capacity of a packet or other transmission data unit.
|
||||
|
||||
**Pledge** - The number of tokens that are put up by node operators on their nodes as their commitment to provide good quality of service and insure against future bad behaviour.
|
||||
|
||||
**Private Key** - A large numerical value that is used to decrypt data.
|
||||
|
||||
**Proof-of-Mixing** - The reward of NYM tokens is based on the good quality of service carried out by node operators.
|
||||
|
||||
**POC** - Stands for Proof of Concept. It's a demonstration that a proposed product, system, or service can be built and will work as intended. It is a way of testing whether an idea is feasible and likely to succeed.
|
||||
|
||||
**Public Key** - A large numerical value that is used to encrypt data.
|
||||
|
||||
## S
|
||||
**Sphinx** - A cryptographic message format used to relay anonymised messages within the mixnet, also used by the Lightning Network or something similar.
|
||||
|
||||
**[Socks5](https://en.wikipedia.org/wiki/SOCKS)** - An proxy protocol that exchanges network packets between a client and server through a proxy server.
|
||||
|
||||
**[Service Provider](https://nymtech.net/docs/stable/tutorials/nym-simple-websocket-tutorial/)** - Any type of app that can communicate with the mixnet via a Nym Client.
|
||||
|
||||
**[SURBs](https://nymtech.net/docs/architecture/traffic-flow.html#private-replies-using-surbs)** - Stands for 'Single Use Reply Blocks'. They are a type of crytographic construct used to facilitate secure communication between parties and are designed to allow a sender to send a message to a recipient in sucha a way that the message can only be read by the intended recipient, and cannot be read by anyone else.
|
||||
|
||||
**Sybil** - In the context of computer networks, a Sybil attach is a type of security attack in which an attacker creates multiple fake identities or "sybils" and uses them to manipulate a network thus gaining control of a network by overwhelming it.
|
||||
|
||||
## T
|
||||
**Tokenomics** - Is the study of the economic and financial aspects of a cryptocurrency or blockchain-based project. It involves the creation, distribution, and management of tokens, which are digital assets that represent a certain value of utility whithin a particular ecosystem.
|
||||
|
||||
## V
|
||||
**[Validators](https://nymtech.net/docs/stable/run-nym-nodes/nodes/validators/)** - Secures the Nyx blockchain with a staking token, defending the network from attacks.
|
||||
|
||||
**[VPS](https://en.wikipedia.org/wiki/Virtual_private_server)** - Stands for Virtual Private Server. Its a virtual machine that acts as an isolated virtual environment on a physical server operated by a cloud, web or internet hosting provider.
|
||||
|
||||
## W
|
||||
**Websocket** - A computer communications protocol that provides a full-duplex channel over a single TCP connection. It is designed to be used as a base for real-time, two-way communication between a client and a server over the web.
|
||||
|
||||
## Z
|
||||
**Zero Knowledge Proofs** - Cryptographic techniques that make it possible to prove something to be true without having to reveal the evidence.
|
||||
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 574 KiB |
|
Before Width: | Height: | Size: 494 KiB |
|
Before Width: | Height: | Size: 555 KiB |
|
Before Width: | Height: | Size: 356 KiB |
|
Before Width: | Height: | Size: 379 KiB |
|
Before Width: | Height: | Size: 232 KiB |
|
Before Width: | Height: | Size: 283 KiB |
|
Before Width: | Height: | Size: 265 KiB |