# Quick Start

## I want to learn

A good place to start is the [Overview](/docs/overview) section.

If you can't wait, go to [Node](/docs/node/overview), and then to either [Humanode Launcher](/docs/launcher/about) or [Humanode Distribution](/docs/distribution/about).

## I want to act now

Want a step-by-step guide on how to become a validator? Visit the page below:

{% embed url="<https://gitbook.humanode.io/mainnet-guide/>" %}


# Overview

Welcome to the Humanode documentation!

## Here is a birds-eye view of what you will find here

A central location for the information on the Humanode chains (URLs, parameters):

{% content-ref url="/pages/cSXr15XlOQO5wr97rA0g" %}
[Chains](/docs/chains)
{% endcontent-ref %}

Some key concepts for understanding Humanode blockchain:

{% content-ref url="/pages/XdepwkWQ4LQcBqci8KNT" %}
[Concepts](/docs/concepts)
{% endcontent-ref %}

For when you need help with are of the Humanode software, events, or just feel like it:

{% content-ref url="/pages/jjMCY0EA6LYN1w9MXR5T" %}
[Help & Support](/docs/help/troubleshooting)
{% endcontent-ref %}

Want to learn about the Humanode blockchain node software? Go to the Node section:

{% content-ref url="/pages/0Rt3J5rDJgdzWcJxPvMw" %}
[Node](/docs/node/overview)
{% endcontent-ref %}

If you would like to install Humanode and you don't know how to or like to use a terminal:

{% content-ref url="/pages/xjogF77EEM3no4zxSdGH" %}
[Humanode Launcher](/docs/launcher/about)
{% endcontent-ref %}

If you would like to install Humanode and you want to use our command line utility or do things manually:

{% content-ref url="/pages/gxNZSiP4niEhDAK52YH8" %}
[Humanode Distribution](/docs/distribution/about)
{% endcontent-ref %}

Want to become a validator? Visit the following section:

{% content-ref url="/pages/jgHsen97ZndDY8MBKLnd" %}
[Validators](/docs/validators/about)
{% endcontent-ref %}

To learn more about the tools we've built and the services we maintain:

{% content-ref url="/pages/glO0c4vuYksDjgUafwHa" %}
[Tools & Services](/docs/tools-and-services/polkadotjs-apps)
{% endcontent-ref %}

Want to know how we implement biometric consensus? Check out the Bioauth section:

{% content-ref url="/pages/GhPckngyNqAOr2myHU7s" %}
[Bioauth](/docs/bioauth/about-bioauth)
{% endcontent-ref %}

Interested in building smart contracts on Humanode, or interacting with EVM smart contracts on the Humanode chain?

{% content-ref url="/pages/5L88N020xqC546ckZQAk" %}
[EVM & Solidity Smart Contracts](/docs/evm/evm-compatibility)
{% endcontent-ref %}


# Concepts


# Chains

A single point with all the information on all the Humanode chains.

## About

This page is a central location with all the information on the chains.

We will keep this page up to date with our changes.

{% hint style="info" %}
The content here is designed to be human-readable, but we also have some information available in machine-readable form, see [Humanode Distribution](/docs/distribution/about). Please do not attempt to parse this page, as we do not intend to maintain compatibility when we change the contents.
{% endhint %}

## Humanode Chains

### Humanode Mainnet

#### Chain Details

For everyone.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>SS58 Format</td><td><code>5234</code></td></tr><tr><td>EVM Chain ID</td><td><code>5234</code> (<code>0x1472</code> in hex)</td></tr></tbody></table>

#### Apps, Tools and Services

For the users.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>Polkadot.js Apps</td><td><a href="https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fexplorer-rpc-ws.mainnet.stages.humanode.io#/explorer">https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fexplorer-rpc-ws.mainnet.stages.humanode.io#/explorer</a></td></tr><tr><td>Token Claims App</td><td><a href="https://token-claims.mainnet.stages.humanode.io">https://token-claims.mainnet.stages.humanode.io</a></td></tr><tr><td>EVM Playground</td><td><a href="https://evm-playground.mainnet.stages.humanode.io">https://evm-playground.mainnet.stages.humanode.io</a></td></tr><tr><td>Guide</td><td><a href="https://link.humanode.io/guide/mainnet">https://link.humanode.io/guide/mainnet</a></td></tr></tbody></table>

#### Endpoints

For the devs.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>Manifest URL</td><td><code>https://chainspec.mainnet.stages.humanode.io/latest/manifest.json</code></td></tr><tr><td>RPC URL (WebSocket)</td><td><code>wss://explorer-rpc-ws.mainnet.stages.humanode.io</code></td></tr><tr><td>RPC URL (HTTP)</td><td><code>https://explorer-rpc-http.mainnet.stages.humanode.io</code></td></tr><tr><td>Substrate API Sidecar</td><td><code>https://explorer-api-sidecar.mainnet.stages.humanode.io</code></td></tr></tbody></table>

## Testnets

{% tabs %}
{% tab title="Testnet 5" %}

#### Chain Details

For everyone.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>SS58 Format</td><td><code>14853</code></td></tr><tr><td>EVM Chain ID</td><td><code>14853</code> (<code>0x3A05</code> in hex)</td></tr></tbody></table>

#### Apps, Tools and Services

For the users.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>Telegram Faucet</td><td><a href="https://t.me/HumanodeTestnet5FaucetBot">https://t.me/HumanodeTestnet5FaucetBot</a></td></tr><tr><td>Polkadot.js Apps</td><td><a href="https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fexplorer-rpc-ws.testnet5.stages.humanode.io#/explorer">https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fexplorer-rpc-ws.testnet5.stages.humanode.io#/explorer</a></td></tr><tr><td>Token Claims App</td><td><a href="https://token-claims.testnet5.stages.humanode.io">https://token-claims.testnet5.stages.humanode.io</a></td></tr><tr><td>EVM Playground</td><td><a href="https://evm-playground.testnet5.stages.humanode.io">https://evm-playground.testnet5.stages.humanode.io</a></td></tr><tr><td>Guide</td><td>See <a href="https://link.humanode.io/guide/mainnet">mainnet guide</a>.</td></tr></tbody></table>

#### Endpoints

For the devs.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>Manifest URL</td><td><code>https://chainspec.testnet5.stages.humanode.io/latest/manifest.json</code></td></tr><tr><td>RPC URL (WebSocket)</td><td><code>wss://explorer-rpc-ws.testnet5.stages.humanode.io</code></td></tr><tr><td>RPC URL (HTTP)</td><td><code>https://explorer-rpc-http.testnet5.stages.humanode.io</code></td></tr><tr><td>Substrate API Sidecar</td><td><code>https://explorer-api-sidecar.testnet5.stages.humanode.io</code></td></tr></tbody></table>

{% endtab %}

{% tab title="Testnet 4" %}

#### Chain Details

For everyone.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>SS58 Format</td><td><code>5234</code></td></tr><tr><td>EVM Chain ID</td><td><code>5234</code></td></tr></tbody></table>

#### Apps, Tools and Services

For the users.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>Telegram Faucet</td><td><a href="https://t.me/HumanodeTestnet4FaucetBot">https://t.me/HumanodeTestnet4FaucetBot</a></td></tr><tr><td>Polkadot.js Apps</td><td><a href="https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fexplorer-rpc-ws.testnet4.stages.humanode.io#/explorer">https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fexplorer-rpc-ws.testnet4.stages.humanode.io#/explorer</a></td></tr><tr><td>Token Claims App</td><td><a href="https://token-claims.testnet4.stages.humanode.io">https://token-claims.testnet4.stages.humanode.io</a></td></tr><tr><td>EVM Playground</td><td><a href="https://evm-playground.testnet4.stages.humanode.io">https://evm-playground.testnet4.stages.humanode.io</a></td></tr><tr><td>Guide</td><td><a href="https://link.humanode.io/testnet4">https://link.humanode.io/testnet4</a></td></tr></tbody></table>

#### Endpoints

For the devs.

<table data-header-hidden><thead><tr><th width="176">Key</th><th>Value</th></tr></thead><tbody><tr><td>Manifest URL</td><td><code>https://chainspec.testnet4.stages.humanode.io/latest/manifest.json</code></td></tr><tr><td>RPC URL (WebSocket)</td><td><code>wss://explorer-rpc-ws.testnet4.stages.humanode.io</code></td></tr><tr><td>RPC URL (HTTP)</td><td><code>https://explorer-rpc-http.testnet4.stages.humanode.io</code></td></tr><tr><td>Substrate API Sidecar</td><td><code>https://explorer-api-sidecar.testnet4.stages.humanode.io</code></td></tr></tbody></table>

{% endtab %}
{% endtabs %}


# Troubleshooting

Any errors you may get, what they mean, and how to solve them. You should look both at the desktop app log and web app to find what's the issue.

Please visit our troubleshooting page:

{% embed url="<https://gitbook.humanode.io/troubleshooting>" %}


# FAQ

### How do I know my node is producing blocks?&#x20;

After successful authentication you will see "Bioauth flow - authentication complete" and  "We've obtained an auth ticket auth\_ticket" in the log few seconds after biometric authentication. \
\
You will also you see "Starting consensus session on top of parent 0x..." in the log. It happens once a 10-15 minutes.&#x20;

### I forgot to write down my mnemonic, where can I find it?&#x20;

You can find it here if you did not delete the workspace - "$HOME/.local/share/humanode-peer/chains/humanode\_testnet2/keystore".

### Why do I get "Verification failed for block xxx" ?

It's a part of consensus. All blocks should be verified. You see this if somebody tries to propose an invalid block. It's not your fault.

### Do mnemonic and address remain the same?

Yes, they remain the same.

### Can I run 2 nodes with same IP?

Yes, you can share an IP address as long as the peering ports are different.

### If we have so many human nodes, how can this blockchain be fast like BSC/AVAX/SOL?

We haven't implemented the final consensus yet, the main slowdown will likely be from it. We will launch another testnet when we're ready with this. Everything else does not contribute to the "blockchain speed" in the common sense of this term. However, we are EVM compatible chain, so we will likely be slower than DAG-based UTXO-only chains.

### Is it possible to run a node without downloading Humanode app?

We currently distribute the node only via the desktop app. Before the main net we'll have that option.


# About

This documentation is about our blockchain node software - humanode-peer.

Humanode blockchain is implemented in [Rust programming language](https://www.rust-lang.org/) and is built upon the [Substrate framework](https://substrate.io/).

A typical blockchain is a set of nodes that are each run by independent parties that don't trust each other. Humanode is similar in this matter.

Our node software is called `humanode-peer`, it is a command line app and is freely available for download to anyone.

## Overview

To check how much CPU, RAM, network bandwidth is required to run the node, or what operating system can be used, check the system requirements page:

{% content-ref url="/pages/kQP83n9OcReDDcfkq8Kr" %}
[System Requirements](/docs/node/system-requirements)
{% endcontent-ref %}

If want to learn how to install a node, go to the setup page:

{% content-ref url="/pages/4pHqw6ISkZauRG2HfJPY" %}
[Setup](/docs/node/setup)
{% endcontent-ref %}

If you want to know how you can interact with a node that is already set up, see the interaction page:

{% content-ref url="/pages/vDvlFgrOWa125VvCqlQr" %}
[Broken mention](broken://pages/vDvlFgrOWa125VvCqlQr)
{% endcontent-ref %}


# System Requirements

This page contains system requirements you should have to be able to install and run your humanode properly.

## Hardware requirements

* 4 CPU Cores
* 4 GB RAM
* 240 GB disk space
* 100 Mbps internet connection

## Supported platforms

We currently support the following platforms:

* Ubuntu 24.04 (amd64)
* macOS 12+ (both Intel and Apple Silicon)

{% hint style="warning" %}
Ubuntu 22.04 & 20.04 are NOT supported.
{% endhint %}

{% hint style="warning" %}
Windows is NOT supported, but you can use [WSL](https://learn.microsoft.com/en-us/windows/wsl/about) ([Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about)) to run the Ubuntu version. [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) is required. See [Windows](#windows) section for more info.
{% endhint %}

### Windows

If you're on Windows, you'll need to use [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/about) [v2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) ([WSL 2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions)) to run the `humanode-peer`. Native Windows binaries are not provided.

To install WSL on Windows, follow the official [guide](https://aka.ms/wslinstall) from Microsoft.

Then install the [Ubuntu 20.04 LTS](https://www.microsoft.com/en-us/p/ubuntu-2004-lts/9n6svws3rx71#activetab=pivot:overviewtab) from Microsoft Store.

## System time

One of the most common but difficult-to-find issues is that the time in your OS is not accurate. For a distributed system like blockchain, having a correctly set time is important, as the synchronization algorithms rely on it. Even a small drift from the network time will cause your node to produce invalid blocks, preventing you from properly participating in the consensus.

Therefore, please, configure your system to use [NTP](https://en.wikipedia.org/wiki/Network_Time_Protocol) for automatic time synchronization. As long as you're using an OS with correctly implemented system clocks, the timezone you are using is irrelevant, and won't affect the correctness of the consensus. However, if you have issues (i.e. you're on Windows), you should set your system time zone to [UTC](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). You can use [online clock](https://time.is) to tell if your system time is drifting from the commonly accepted time.


# Setup

How to download, install and configure the node for the Humanode blockchain.

## Installation options

The easiest way to install the node is via Humanode Launcher!

Learn more on how to install the node with the Humanode Launcher at the page below:

{% content-ref url="/pages/xjogF77EEM3no4zxSdGH" %}
[Humanode Launcher](/docs/launcher/about)
{% endcontent-ref %}

For the advanced users we also offer command line installation assisted by our CLI tool called Humanode Distribution:

{% content-ref url="/pages/gxNZSiP4niEhDAK52YH8" %}
[Humanode Distribution](/docs/distribution/about)
{% endcontent-ref %}


# CLI

This section provides information on the node's command-line interface.

## What is CLI

CLI stands for Command Line Interface.

`humanode-peer` is a command line application, and it exposes a CLI as all the other console commands do.

## General CLI layout

`humanode-peer` is an executable with multiple subcommands. If no subcommands are specified, it will run as a Humanode blockchain node (we call it "run command"). If a subcommand is specified, the relevant subcommand will be executed.

To learn about the available subcommands, flags and options use the `--help` flag:

```shell-session
$ humanode-peer --help
```

Humanode is built on top of the Substrate framework, and we reuse most of the CLI from the standard Substrate layout.

Please refer to the Substrate documentation to learn more about the standard Substrate CLI:

{% embed url="<https://docs.substrate.io/reference/command-line-tools/node-template/>" %}

## Usage

You would typically run your blockchain node with the following arguments.

```shell-session
$ humanode-peer --chain your-chainspec.json
```

For development, it is nice to use `--dev` flag:

```shell-session
$ humanode-peer --dev
```

## Run command

We have a few flags that we've added on top of the standard Substrate CLI for the run command.

For the rest of the flags, please see the Substrate documentation as referred in the  [#general-cli-layout](#general-cli-layout "mention") section.

### Bioauth flags and options

There is a list of bioauth-related options and flags.

<table><thead><tr><th width="349.5">Bioauth options</th><th>Description</th></tr></thead><tbody><tr><td><code>--robonode-url &#x3C;ROBONODE_URL></code> </td><td>The URL of robonode to authenticate with.<br>Optional, typically set in chainspec so you don't have to pass it manually.</td></tr><tr><td><code>--webapp-url &#x3C;WEBAPP_URL></code></td><td>The URL to use for the web app. Used to print the QR Code to the console.<br>Optional, typically set in chainspec so you don't have to pass it manually.</td></tr><tr><td><code>--rpc-url &#x3C;RPC_URL></code></td><td><p>The URL to pass to the web app to connect to the node RPC.</p><p>If not passed, a URL with WebSocket scheme and <code>localhost</code> path will be used.<br>Mutually exclusive with other options setting the RPC URL.</p></td></tr><tr><td><code>--rpc-url-ngrok-detect</code></td><td>Detect RPC URL from <code>ngrok</code>.<br>This will also work with Humanode WebSocket Tunnel.</td></tr><tr><td><code>--rpc-url-ngrok-detect-from &#x3C;TUNNEL_NAME></code></td><td>The tunnel name at <code>ngrok</code> to detect RPC URL from, if <code>ngrok</code> is used to detect the RPC URL.<br><br>[default: <code>command_line</code>]</td></tr><tr><td><code>--rpc-url-scheme-preference &#x3C;RPC_URL_SCHEME_PREFERENCE></code></td><td>What RPC URL scheme to prefer.<br><br>[default: <code>no-preference</code>]<br>[possible values: <code>http</code>, <code>ws</code>, <code>no-preference</code>]</td></tr><tr><td><code>--rpc-url-unset</code></td><td>Explicitly unset the RPC URL.<br>Might be useful if you want to do something exotic, but generally, you'd want the RPC URL set.</td></tr></tbody></table>


# Dev Mode

The page describes a basic approach to run humanode-peer in dev mode.

The dev chain should be specified to run the node in dev mode:

```
humanode-peer --dev
```

In development mode, the chain doesn't require any peer computers to produce and finalize blocks. If you see messages that blocks are being proposed and finalized, you have a running node.

```
... Idle (0 peers), best: #3 (0xcc78…5cb1), finalized #1 ...
... Starting consensus session on top of parent ...
... Prepared block for proposing at 4 (0 ms) ...
```

Additionally, `--tmp` flag can be passed to indicate that the node should be run as a temporary node. A temporary directory will be created to store the configuration and will be deleted at the end of the process.

```
humanode-peer --dev --tmp
```


# JSON-RPC

This section describes available JSON-RPC API interfaces.

[RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) is a [request–response](https://en.wikipedia.org/wiki/Request%E2%80%93response) concept when a computer program causes a procedure to execute in a different [address space](https://en.wikipedia.org/wiki/Address_space) (commonly on another computer on a shared network).&#x20;

In our case, we can say that RPC is a way for an external program—for example, a browser or front-end application—to communicate with the humanode peer to explore current network state and submit extrinsics.

Humanode provides several [substrate based RPCs](https://docs.substrate.io/build/custom-rpc/) to communicate with a node including [default  list of RPCs](https://polkadot.js.org/docs/substrate/rpc/) that substrate comes with.

We would like to introduce more common and useful RPCs including custom bioauth related ones.

## Chain state RPCs

Storage related RPCs allows you to explore current chain state based on provided `module` and `method`. It's done via `api.query.<module>.<method>` call.

The full list of available storage RPCs you can find [here](https://polkadot.js.org/docs/substrate/storage).

## Extrinsics RPCs

Extrinsics for particular `module` and `method` can be submitted using `api.tx.module.method` call.

The full list of available extrinsics RPCs you can find [here](https://polkadot.js.org/docs/substrate/extrinsics).

## Bioauth RPCs

Humanode team has developed bioauth related [custom RPCs](https://docs.substrate.io/build/custom-rpc/#rpc-extension-builder) with the following functionalities:

Authentication based on provided liveness data

* **interface**: `api.rpc.bioauth.authenticate`
* **jsonrpc**: `bioauth_authenticate`

Enrollment based provided liveness data.

* **interface**: `api.rpc.bioauth.enroll`
* **jsonrpc**: `bioauth_enroll`

Getting the current bioauth status.

* **interface**: `api.rpc.bioauth.status`
* **jsonrpc**: `bioauth_status`

Getting a FaceTec Session Token.

* **interface**: `api.rpc.bioauth.getFacetecSessionToken`
* **jsonrpc**: `bioauth_getFacetecSessionToken`

Getting the configuration required for the Device SDK.

* **interface**: `api.rpc.bioauth.getFacetecDeviceSdkParams`
* **jsonrpc**: `bioauth_getFacetecDeviceSdkParams`


# About

About the Humanode Launcher

## What is Humanode Launcher

Humanode Launcher is an app that facilitates the installation and management of the humanode blockchain node.

If you'd like to run a node and become a humanode, the launcher is the easiest way to get started.

{% hint style="info" %}
Want to install the node using CLI? See [Humanode Distribution](/docs/distribution/about).
{% endhint %}

## What this documentation covers

Here you can find information on installing and using the Humanode Launcher.

The UI is designed to be intuitive, but if you find yourself in trouble you can consult this guide.

## Overview

Our documentation consists of the following sections.

The first one, installation, will guide you through how to install the Humanode Launcher itself.

{% content-ref url="/pages/2pjDAKf4WBmG0pU7Xc0c" %}
[Launcher Installation](/docs/launcher/installation)
{% endcontent-ref %}


# Launcher Installation

How to install the Humanode Launcher

Install the Humanode Launcher on your local system - your desktop or your workstation.

The app itself supports running the peer locally or remotely - so if you'd like to deploy the node at the cloud, still install the desktop app on your local system, and then install the peer through the app to the remote system.

## Installing the Launcher

Please visit the Humanode Launcher downloads page:

{% embed url="<https://launcher.humanode.io/>" %}

Then follow the instructions for your specific platform.

{% tabs %}
{% tab title="Linux" %}
{% hint style="info" %}
We officially support using Humanode Launcher on **Ubuntu 20.04**, but other distros might work.
{% endhint %}

For Linux we ship DEB and RPM archives that you can install with a package manager, as well as ZIP archive if you'd like to manage the installation manually.

We also provide APT and YUM repos that allow you to receive the Humanode Launcher updates via the system package management tools - for instructions on how to use them see the [downloads website](https://launcher.humanode.io/).

To install the Launcher from a ZIP archive download the archive and unpack it. Then you can `cd` to the unpacked directory and run the `./humanode-launcher` from the terminal.
{% endtab %}

{% tab title="macOS" %}
We provide builds for both *Intel* and *Apple Silicon*. Pick the one that's appropriate for your system.

Once you download the ZIP archive for your platform - extract it, move the app to the *Applications* folder, and launch!
{% endtab %}

{% tab title="Windows" %}
For Windows, we provide an installer (a `.exe` file) and a ZIP archive.

We recommend the installer, as it provides a zero-hassle experience - just download and run it.

You can also download a ZIP in case you have issues with the installer or would like to manage the installation manually. Once downloaded, do not run the app from inside a mounted zip location because it will create inconsistencies. Instead, make sure to simply unzip the archive and run the app from there.
{% endtab %}
{% endtabs %}


# Workspace Creation

After the app is launched, you will see the **Welcome screen** with the **Create Workspace** button. Pressing this button will create a directory for the further installation of the Humanode peer. The question mark (**?**) contains useful links to our guide, discord channel and the latest version of the app.

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FGKqyRnfFvGKUQtZZGQdV%2FScreenshot%202021-12-23%20at%2016.32.04.png?alt=media\&token=a2287022-55cf-4fdd-aea8-694cffce9cd3)

After pressing **Create Workspace** you will be asked to choose where to install the node. There are two ways of installing it:

* **Start Locally** - this allows you to install and run the node from your local machine (the same system the Desktop App itself runs on).
* **Start Remotely** - this allows you to connect the app to a remote system via SSH and run the node there.

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F9qVY1u57Oi9mDsa9gS5X%2FScreenshot%202021-12-23%20at%2016.34.46.png?alt=media\&token=fe0347b4-6b31-435d-8d2f-dd521cc82641)

This is for confident users only, so proceed with these options at your own risk.

During the workspace creation process, it will prompt you on what chain to install. Choose Humanode Mainnet.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2Fz3QjHlqT1NtsDmA6Ynv4%2Fselect-the-chain_crop.png?alt=media&amp;token=c9681917-9bdb-46b8-98a5-92a45d01cf06" alt=""><figcaption></figcaption></figure>


# Remote

## Start Remotely

This option allows running the node on a remote system via an SSH connection.

You can use any remote system.

We recommend running on a cloud server, and it is preferable to using a local system, since you won't have issues with port forwarding, and the cloud system can run all the time, whereas you'll probably shut down your local system once in a while.

The downside of running in the cloud is, obviously, that the cloud VMs cost money.

This guide will walk you through the following steps:

* Creating a Virtual Machine in a cloud with a cloud provider you prefer, and
* Connecting Humanode Launcher to Virtual Machine.

If you already have a VM, then skip the [**Creating a Virtual Machine in the cloud**](#creating-a-virtual-machine-at-a-cloud-provider) section and go straight to the [**Connecting Humanode Launcher to Virtual Machine**](#connecting-humanode-launcher-to-virtual-machine).

### Creating a Virtual Machine in the cloud

To create a Virtual Machine in the cloud, follow the guide of your favorite cloud provider.&#x20;

We propose using [Scaleway](https://www.scaleway.com) or [DigitalOcean](https://www.digitalocean.com/), as they are among the easiest to set up, and also they offer a very good deal.

* [How to create an instance on Scaleway](https://www.scaleway.com/en/docs/compute/instances/how-to/create-an-instance/)
* [How to create an instance on DigitalOcean](https://docs.digitalocean.com/products/droplets/how-to/create/)

You can also use Amazon AWS, Google GCP, Azure, or any other cloud.

When prompted which OS to install, choose **Ubuntu 20.04**.

We highly recommend using SSH keys for authenticating on the VM, and Desktop App will detect and try to use the keys automatically if it detects any on your system.

### Connecting Humanode Launcher to Virtual Machine

After you've created a VM, you can press **Start Remotely**.

On this page, you'll see input fields for entering the parameters of your remote VM.

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2Fme9QGnfPk5e6LlRszZel%2FScreenshot%202021-12-23%20at%2016.37.49.png?alt=media\&token=6f9211b8-65b8-408c-9043-098581bd264f)

The standard SSH connections parameters that are given to you by the cloud provider usually look like this:

```shell-session
ssh user@host
```

where

* `user` is the username (typically `ubuntu` for our case), and
* `host` is the IP address or domain name to connect to.

Use those parameters to fill in your host and username.

For instance with a connection string `ssh ubuntu@51.15.107.249`, the inputs should look as follows:

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FhJj2C2apIdDkKl05wFo3%2FScreenshot%202021-12-23%20at%2016.38.57.png?alt=media\&token=4b88be29-599f-4838-81ad-575a708168e8)

After you press **Connect** the app will establish the connection to your VM.

After the connection is established, the Mainnet installation process will begin.

If the automatic authentication flow does not work for you, there are other authentication options available. They can be found by pressing **More connection options** and selecting **Auth Mode**:

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FdPRWvuC0KePiPs9ua2WN%2FScreenshot%202021-12-23%20at%2016.40.24.png?alt=media\&token=cfa6ef50-fe53-4115-94b1-1911cba5596a)


# Local

## Start Locally

This option allows you to install, configure, and launch the node on your local machine. We have automated system preparation steps (i.e. on Windows, Humanode Launcher will set up WSL for you). If you would rather do everything manually, the overall System Preparation can be seen [here](/docs/node/system-requirements).

The Local installation process matches on all platforms, except that on Windows there are extra steps to install WSL, as Windows can't run UNIX applications natively.


# Linux / macOS

### Installation on Linux or macOS

Once you have selected a chain and clicked **Install**, the node installation process will begin.

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FMXzzPVboOmlg6xsouITH%2Finstalling-mainnet_dialog.png?alt=media\&token=4798d605-6780-4946-adbe-e08d01b15d02)

When the progress bar fills to 100%, you will get to the Home screen.

After pressing **Continue** you will be redirected to the **Home screen** where the initial configuration begins. This screen indicates that the TestNet was successfully installed and that you now have to [configure](broken://pages/rARttMJILLE5byWlKXI0) your node before starting it. Congrats!

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FlGcVWmarRy7jgkvk5HbL%2Finstalled-not-running_crop.png?alt=media\&token=3fe44050-95cc-4b6f-ae91-308237594356)

Simply move to [Node Configuration](/docs/launcher/node-configuration)


# Windows

### Installation on Windows

Once you click **Start locally** we will analyze if the node can be installed and if your Windows machine meets all requirements. If you have an outdated [WSL](https://docs.microsoft.com/en-us/windows/wsl/about) version or do not have WSL, we will guide you through the installation process. Press **Install** to proceed:

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FCAUjCkxzHkPdugpJZnSR%2FScreenshot%202021-12-23%20at%2017.16.31.png?alt=media\&token=ce34d657-adea-4a5c-bcc2-d9eea185da17)

You will see the terminal window with the WSL installation progress.

After the installation is completed, you have **to reboot the machine by pressing "Restart".**&#x20;

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FosRJwDOkRoizW8FHl1cU%2FScreenshot%202021-12-23%20at%2017.17.39.png?alt=media\&token=1916c12b-235b-4f86-97c9-2511a873ca1d)

**After you reboot the system, the Ubuntu installation process should start so wait for it,** and then run the app, select set up locally, and select the distribution you would like to install. We recommend using Ubuntu:

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FMRpe04FIizVgeXO1HKUG%2FScreenshot%202021-12-23%20at%2017.29.43.png?alt=media\&token=808f0c0b-dae5-4484-9262-e19136ae5ed0)

Once you click **Install** the node installation process begins.

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FMXzzPVboOmlg6xsouITH%2Finstalling-mainnet_dialog.png?alt=media\&token=4798d605-6780-4946-adbe-e08d01b15d02)

When the progress bar fills to 100%, you will be redirected to the **Home screen** where the initial configuration begins. This screen indicates that the node was successfully installed and that you now have to [configure](/docs/launcher/node-configuration) your node before starting it. Congrats!


# Node Installation

After you have successfully connected to a workspace either locally or remotely, you will have to choose an installation package to download and install the node.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2Fz3QjHlqT1NtsDmA6Ynv4%2Fselect-the-chain_crop.png?alt=media&amp;token=c9681917-9bdb-46b8-98a5-92a45d01cf06" alt=""><figcaption></figcaption></figure>

Once the process is complete, you will see the node dashboard screen.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FlGcVWmarRy7jgkvk5HbL%2Finstalled-not-running_crop.png?alt=media&amp;token=3fe44050-95cc-4b6f-ae91-308237594356" alt=""><figcaption></figcaption></figure>


# Node Configuration

## Primary settings

In the settings tab you can configure your workspace.

To become a validator, the only setting you need is the mnemonic key inserted in the **KEY MANAGEMENT** section.

{% hint style="warning" %}
**Important: make sure to save your mnemonic key!**

*We'll repeat this many times in this guide because the key will be linked to your unique biometric data. If you lose the key, you will not be able to decrypt your biometric data anymore and will lose your ability to become a validator forever in the blockchain.*
{% endhint %}

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FDZhbN0ega0mp8fRTcxHa%2Fimage.png?alt=media&amp;token=0b2469e0-51a8-48c8-8e3d-bdeb61a0eb6b" alt=""><figcaption></figcaption></figure>

### Key Management

To insert the mnemonic key into your node start by pressing the **Insert mnemonic** button. You will be prompted with the following dialog where you can directly insert your mnemonic or generate it:

#### Generating a mnemonic

{% hint style="info" %}
It is safer to generate the mnemonic using your wallet. This way you are less likely to loose access to it.
{% endhint %}

To generate a mnemonic, press the **GENERATE** button. A new dialog will pop up showing you the mnemonic.

{% hint style="warning" %}
**Important: make sure to save your mnemonic!**

*We'll repeat this many times in this guide because the key will be linked to your unique biometric data. If you lose the key, you will not be able to decrypt your biometric data anymore and will lose your ability to become a validator forever in the blockchain.*
{% endhint %}

Copy the mnemonic and **save** it somewhere safe. Once closing this dialog your clipboard will be erased. This is intentionally made so that you **save** your mnemonic somewhere.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F9I7hhCJK4oemLNY182PG%2Fimage.png?alt=media&amp;token=438ea809-85ed-41de-81d9-280da316ae10" alt=""><figcaption></figcaption></figure>

#### Inserting the mnemonic

Once you have **saved** your mnemonic somewhere safe, type in or paste it into the **MNEMONIC** text box and then you can proceed to insert the mnemonic key into your node by pressing the **INSERT** button:

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2Fm0b9YhnqnFmivnj054oT%2Fimage.png?alt=media&amp;token=4fcc1192-3c0f-4479-9f0e-ad13b7f25180" alt=""><figcaption></figcaption></figure>

#### Removing the mnemonic

Once a mnemonic is inserted in the workspace, it cannot be modified. If you want to change it, you must remove the workspace and reconfigure it from scratch.

## Additional settings

### Node name

You can additionally add a name to your node that will be publicly shared with the blockchain.&#x20;

### Public URL

If you have a public URL associated with your machine, you can use that by setting the Public URL field.

### Tunnel type

When you connect to your node through the QR code described later, you are actually accessing it through a tunnel which allows your phone to properly establish a connection with your node through the networks. There are two types of tunnels available in the Humanode app:&#x20;

* Humanode WebSocket Tunnel: a tunnel provider built by the humanode team. This type of tunnel does not require any additional configuration.
* ngrok: a tunnel provider available at [https://ngrok.com](https://ngrok.com/). This type of tunnel requires additional configuration listed below.

### ngrok settings

ngrok is a free service that allows us to create a tunnel between your node and your mobile phone that you will use when scanning a QR code.

{% hint style="info" %}
ngrok is not affiliated with Humanode
{% endhint %}

You need to create an ngrok account at [ngrok.com](https://ngrok.com/) and insert your authorization key to allow the Desktop App to create ngrok tunnels for you.

{% hint style="info" %}
There is a chance that ngrok will "just work" without the key - but if it doesn't, you will have to create an account and provide your authorization key.
{% endhint %}

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FgdpG53Pk2Ab1L4vgd5Ku%2FScreenshot%202021-12-23%20at%2016.52.37.png?alt=media\&token=70c393af-84d5-4f47-a6a6-1f4f6c1b843a)

To insert an ngrok auth key, press **Insert Authorization Key**. That will open a modal window with an input field.

Copy and paste your auth key that can be found [here](https://dashboard.ngrok.com/get-started/setup).

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FJ6ghmpjYLDMNV2DsGHEE%2FScreenshot%202021-12-23%20at%2016.53.52.png?alt=media\&token=f558af37-91ad-4d9b-a45b-dd1922cc4789)

Press **Insert** to save this key. The state of the section will not be changed since we can't detect if the key was inserted or not. However, rest assured that the key is there.

If you want to start ngrok from your terminal, put a tick in **Manually start ngrok**.

### Updates

Updates section stands for checking the available peer updates. Most likely, if you just downloaded the app, you have the latest version, but in the future, make sure you regularly check for updates.&#x20;

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F3qU0vFTJ6jonS3mNe1yr%2FScreenshot%202022-03-04%20at%2019.47.07.png?alt=media\&token=136c4e4f-147b-4773-bc52-f2f09e7e0828)

You'll see the next message if there is an available update. Please stop the node before you start.&#x20;

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FPeFONhDozEbmZp6M6RKK%2FScreenshot%202022-03-04%20at%2020.07.22.png?alt=media\&token=cda1997e-6dbf-4e1c-a7db-33ba0273b8ab)

Or no updates available:

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FomdkfpD8kGWZN6TUnl4t%2FScreenshot%202022-03-04%20at%2019.47.15.png?alt=media\&token=1a1e1902-1889-4fcc-a41b-e7ae01f5a7c5)

You can start the node again when the updating process is finished:

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F3d3MOMhgnK6KpFqQCzFH%2FScreenshot_2022-03-01_at_00.36.29.png?alt=media\&token=63cbab4b-6957-4e4e-809a-69f337ab6f2f)

### Danger Zone

{% hint style="warning" %}
This section contains destructive actions and has to be used carefully.
{% endhint %}

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F91oickkJK0oz1UZek5qv%2Fimage.png?alt=media&amp;token=2f8809ff-dae4-4f34-929b-462b75b87a5a" alt=""><figcaption></figcaption></figure>


# Running the node

You can manage the node from either the **Humanode** or **Logs** screens.

We recommend you to start the node from the **Humanode** screen and then move to **Logs** to see if chain state sync is complete.

## Running the node and synching

After you are done with the **Settings** you can go to the **Humanode** screen and press **Start the node**. You will need to accept requests if they appear.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FYVDzEo4PM4hkAT9nJsg5%2Fimage.png?alt=media&amp;token=d5e9ea3b-91b3-45b9-ae8a-20578dec6611" alt=""><figcaption></figcaption></figure>

When the node is running, you will be prompted with a QR code through which you can access the web-app for your node. Scan the code and follow the instructions on your mobile phone for how to activate your bioauthentication. On the Humanode tab you can also see what are the steps required to become a validator. Once you pass all the steps, you will have to wait for the next epoch until you actually become a validator.\
The node will be running in the background until you manually stop it. If you close the Humanode Launcher, the node will keep running in background and you can reconnect to it once you reopen the app.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FLF0BW3IpQro30464vu0v%2Fimage.png?alt=media&amp;token=ea852b92-a570-40ff-815c-9937ccf9c99c" alt=""><figcaption></figcaption></figure>


# Stopping the node

In case you need to stop the node, you can use the **Stop** button on the **Humanode** screen and the **Log** screen. Pressing this button will stop your node, and you will no longer be acting as a validator in the network until you run your node again.

{% hint style="info" %}
If you close the Launcher without stopping the node, the node will continue to run in the background.
{% endhint %}


# About

## What is Humanode Distribution

Humanode Distribution is an overall system we use to deploy and distribute the [Node](/docs/node/overview) and chain configuration.

It consists of the cloud infrastructure, and certain APIs and data formats that enable mostly automatic installation of the node software and a relevant chain configuration (the right build of the `humanode-peer` for a given chain, the chainspec file, tunnel application executables, etc).

We provide the [Humanode Launcher](/docs/launcher/about) as a user-friendly way of utilizing the Humanode Distribution system, but we also ship the `humanode-distribution` CLI tool for more advanced use cases.

## What is `humanode-distribution` CLI tool

The `humanode-distribution` is a command line application that can download and install pre-assembled packages of Humanode network for a particular chain.

You have to install the `humanode-distribution` first, and then use it to download and install the node for a chain of your choice. Keep in mind you can use [Humanode Launcher](/docs/launcher/about) if you do not to work with the command line.

{% hint style="warning" %}
We advised that the Humanode Distribution system is a work in progress and the APIs are subject to change; use the `humanode-distribution` tool to interact with the system to have a somewhat stable interface for the installation process.
{% endhint %}


# Preparation

Installing the CLI tool for the Humanode Distribution.

## Github Releases

Please visit the Github Releases page for the Humanode Distribution:

{% embed url="<https://github.com/humanode-network/distribution/releases>" %}

Here is the link to the latest release:

{% embed url="<https://github.com/humanode-network/distribution/releases/latest>" %}

Download the release for your platform, unpack the archive, make the `humanode-distribution` binary executable and make sure it's available at your `PATH` (for instance, do `sudo mv humanode-distribution /usr/local/bin`).


# Node Installation

## Choosing a suitable node

Before going into the installation, select the package you want to use from the available packages for your system:

```shell-session
$ humanode-distribution list
```

{% hint style="info" %}
In versions `0.0.4` and earlier specifying the repo URL was required. In that case, use the `-r option.`
{% endhint %}

## Installing the node

Use the selected chain name (in this case we have `Humanode Mainnet`) as the `--package-display-name.`

```shell-session
$ humanode-distribution install \
    --dir humanode-mainnet \
    --package-display-name "Humanode Mainnet"
```

This command will download and verify the `Humanode Mainnet` package in the directory `humanode-mainnet`.

You can proceed to [Running the node](/docs/distribution/running-the-node) at this point.


# Manual Installation

This page describes how to install the Humanode Peer without the use of Humanode Launcher or Humnode Distribution.

## Downloading the binaries

### How it works

We have a JSON manifest that you can use to obtain the package.

### Manifest URL

Check the [Chains](/docs/chains) page for the particular chain you would like to run. We will use the Humanode Mainnet manifest in the instructions below as an example.

To download and inspect the manifest run the command below:

{% code overflow="wrap" %}

```shell-session
$ curl -sSL "https://chainspec.mainnet.stages.humanode.io/latest/manifest.json" | jq .
{
  "binaries": [
     ...
```

{% endcode %}

<details>

<summary>Sample manifest</summary>

{% code overflow="wrap" %}

```json
{
  "binaries": [
    {
      "platform": "Darwin",
      "arch": "arm64",
      "displayName": "Humanode Mainnet",
      "description": "The Humanode network.",
      "icon": "icon.png",
      "executablePath": "humanode-peer",
      "chainspecPath": "chainspec.json",
      "ngrokPath": "ngrok-wrapper",
      "humanodeWebsocketTunnelClientPath": "humanode-websocket-tunnel",
      "files": [
        {
          "subUrl": "/latest/binaries/Darwin-arm64/humanode-peer",
          "destinationSubPath": "humanode-peer",
          "sha256": "b0260fcc038706f3ebf97ef16c1e49596e262a450adca94fc06c1ceaa9272f9d"
        },
        {
          "subUrl": "/latest/chainspec.json",
          "destinationSubPath": "chainspec.json",
          "sha256": "eefac86f7a9089c3e403c5860dfb0d576af22834bee0b6e38936d597ba69afc5"
        },
        {
          "subUrl": "/latest/binaries/Darwin-arm64/ngrok",
          "destinationSubPath": "ngrok",
          "sha256": "c9e6dfec454f9faec92a13dfd3f3857de982007e3b85987bb875aa0d74ca8101"
        },
        {
          "subUrl": "/latest/binaries/Darwin-arm64/humanode-websocket-tunnel-client",
          "destinationSubPath": "humanode-websocket-tunnel-client",
          "sha256": "76d63b77f219e56065cbb183d920a2a4efbc616a82d0788cc53275cea89a5d32"
        },
        {
          "subUrl": "/latest/scripts/humanode-websocket-tunnel",
          "destinationSubPath": "humanode-websocket-tunnel",
          "sha256": "514b29731d5ae89097ac6f8158fe9529bec0076cc4fdab40d7aa7de60587fa87"
        },
        {
          "subUrl": "/latest/scripts/ngrok-wrapper",
          "destinationSubPath": "ngrok-wrapper",
          "sha256": "f5b7ba7c61cb5f70278fa7b46d1be11f29348650989a795128b5a7a81f9d5ed6"
        }
      ]
    },
    {
      "platform": "Darwin",
      "arch": "x86_64",
      "displayName": "Humanode Mainnet",
      "description": "The Humanode network.",
      "icon": "icon.png",
      "executablePath": "humanode-peer",
      "chainspecPath": "chainspec.json",
      "ngrokPath": "ngrok-wrapper",
      "humanodeWebsocketTunnelClientPath": "humanode-websocket-tunnel",
      "files": [
        {
          "subUrl": "/latest/binaries/Darwin-x86_64/humanode-peer",
          "destinationSubPath": "humanode-peer",
          "sha256": "ad8127d1139a4f1ab8c5cfa37d3f8cf052e2a35e7fcfd317382abecbc53eec58"
        },
        {
          "subUrl": "/latest/chainspec.json",
          "destinationSubPath": "chainspec.json",
          "sha256": "eefac86f7a9089c3e403c5860dfb0d576af22834bee0b6e38936d597ba69afc5"
        },
        {
          "subUrl": "/latest/binaries/Darwin-x86_64/ngrok",
          "destinationSubPath": "ngrok",
          "sha256": "80c8fb121d6c93350d84351d9516674f4e20a3e003cdd7dcb4c3e7c48b9c5b07"
        },
        {
          "subUrl": "/latest/binaries/Darwin-x86_64/humanode-websocket-tunnel-client",
          "destinationSubPath": "humanode-websocket-tunnel-client",
          "sha256": "110ef86c98a2e76a05d16518294ed2c2faeefdd3314576d7db119bcd20de5bd5"
        },
        {
          "subUrl": "/latest/scripts/humanode-websocket-tunnel",
          "destinationSubPath": "humanode-websocket-tunnel",
          "sha256": "514b29731d5ae89097ac6f8158fe9529bec0076cc4fdab40d7aa7de60587fa87"
        },
        {
          "subUrl": "/latest/scripts/ngrok-wrapper",
          "destinationSubPath": "ngrok-wrapper",
          "sha256": "f5b7ba7c61cb5f70278fa7b46d1be11f29348650989a795128b5a7a81f9d5ed6"
        }
      ]
    },
    {
      "platform": "Linux",
      "arch": "x86_64",
      "displayName": "Humanode Mainnet",
      "description": "The Humanode network.",
      "icon": "icon.png",
      "executablePath": "humanode-peer",
      "chainspecPath": "chainspec.json",
      "ngrokPath": "ngrok-wrapper",
      "humanodeWebsocketTunnelClientPath": "humanode-websocket-tunnel",
      "files": [
        {
          "subUrl": "/latest/binaries/Linux-x86_64/humanode-peer",
          "destinationSubPath": "humanode-peer",
          "sha256": "f225e89320ea31846c948e10cec5a7dcffb102ca1fa67b688b198a7aefaee494"
        },
        {
          "subUrl": "/latest/chainspec.json",
          "destinationSubPath": "chainspec.json",
          "sha256": "eefac86f7a9089c3e403c5860dfb0d576af22834bee0b6e38936d597ba69afc5"
        },
        {
          "subUrl": "/latest/binaries/Linux-x86_64/ngrok",
          "destinationSubPath": "ngrok",
          "sha256": "218d267cd1195334718bafac14bfdf1c19dc95dcf8a24aaa6a1383c21dc86e76"
        },
        {
          "subUrl": "/latest/binaries/Linux-x86_64/humanode-websocket-tunnel-client",
          "destinationSubPath": "humanode-websocket-tunnel-client",
          "sha256": "b39c88cf5e7125c852f9727e00a76626c4e817837b62bf9799f397f75b8a6dd1"
        },
        {
          "subUrl": "/latest/scripts/humanode-websocket-tunnel",
          "destinationSubPath": "humanode-websocket-tunnel",
          "sha256": "514b29731d5ae89097ac6f8158fe9529bec0076cc4fdab40d7aa7de60587fa87"
        },
        {
          "subUrl": "/latest/scripts/ngrok-wrapper",
          "destinationSubPath": "ngrok-wrapper",
          "sha256": "f5b7ba7c61cb5f70278fa7b46d1be11f29348650989a795128b5a7a81f9d5ed6"
        }
      ]
    }
  ]
}
```

{% endcode %}

</details>

### Setting up the `humanode-peer` binary

Find the binaries for your platform in the manifest. In case of Linux, it's an entry with the following subUrl:

```
/latest/binaries/Linux-x86_64/humanode-peer
```

Use the path together with the domain from the manifest URL to get the binary download link:

{% code overflow="wrap" %}

```
https://chainspec.mainnet.stages.humanode.io/latest/binaries/Linux-x86_64/humanode-peer
```

{% endcode %}

Download the `humanode-peer` binary using the obtained link:

{% code overflow="wrap" %}

```shell-session
$ curl -sSL "https://chainspec.mainnet.stages.humanode.io/latest/binaries/Linux-x86_64/humanode-peer" -o humanode-peer
```

{% endcode %}

Make the binary executable and install it into the system:

```shell-session
$ chmod +x humanode-peer
$ sudo cp humanode-peer /usr/local/bin/
```

### Downloading the chainspec file

Using the same manifest we have obtained above, find and download the `chainspec.json` file.

In our case, this is the file with the following `subPath`:

```
/latest/chainspec.json
```

Use the hostname from the manifest URL to obtain the chainspec file URL, like in the `humanode-peer` step:

<pre><code><strong>https://chainspec.mainnet.stages.humanode.io/latest/chainspec.json
</strong></code></pre>

Then download the `chainspec.json`

{% code overflow="wrap" %}

```shell-session
$ curl -sSL "https://chainspec.mainnet.stages.humanode.io/latest/chainspec.json" -o ~/chainspec.json
```

{% endcode %}

We are now ready to proceed to the next step.

### Downloading the RPC Tunnel

In the same way, you can download and use `ngrok`, `humanode-websocket-tunnel` and `ngrok-wrapper`.


# Running the node

## The distribution package

The distribution  package includes:

* `humanode-peer` - the [main binary](/docs/node/cli) to launch the humanode peer.
* `chain-spec` - the collection of information that describes a Substrate-based blockchain network. Check [the substrate source](https://docs.substrate.io/build/chain-spec/) to get more details.
* `ngrok-wrapper` - a tool that enables a proper ports forwarding in NAT (and `ngrok`-like tunnel) to connect to your node's RPC endpoint from a handheld device (i.e. phone).

## Running the peer

{% hint style="info" %}
Note that when switching from the Launcher deployment to the manual deployment inplace you might have to adjust the commands to use the same workspace layout as the Launcher.

In order to do that, add the `--base-path "$HOME/.humanode/workspaces/default/substrate-data"` option to the commands below.
{% endhint %}

### Bioauth key generation

Generate your bioauth key, the one that is used for enrolment and authentication.

```shell-session
$ humanode-peer key generate
Secret phrase:       drop find ginger chief worry trial electric sense long deer lock north
  Network ID:        substrate
  Secret seed:       0xd35f23dd8c1672467c57a55dcf8d6761dd2238fec489e1c8cf90c437b18aefce
  Public key (hex):  0xf8eb7c948e3889c3149296e5a25b25f98f4814e781968cf5876f8cab474d480f
  Account ID:        0xf8eb7c948e3889c3149296e5a25b25f98f4814e781968cf5876f8cab474d480f
  Public key (SS58): 5Hh5gnML29ZkoSgkrYCeMw8BC4tu5R6q7NgRWfXZnp1NZei3
  SS58 Address:      5Hh5gnML29ZkoSgkrYCeMw8BC4tu5R6q7NgRWfXZnp1NZei3
```

### Bioauth key import

Copy the secret phrase and import it into keystore.

```shell-session
$ humanode-peer key insert --key-type kbai --suri "$SECRET_PHRASE" \ 
      --chain chainspec.json --scheme sr25519
```

Where:

* `--key-type kbai` - bioauth key type used in the Humanode networks.
* `--suri "$SECRET_PHRASE"` - your secret phrase (i.e. mnemonic) from the previous command.
* `--chain chainspec.json` - path to the Humanode chain specification file.

### Run the tunnel

The humanode peer uses `9944` RPC endpoint by default. You are free to use any of your choices. But don't forget to explicitly specify the same port during the peer run in case using a different one from `9944`.

Run the tunnel using `ngrok-wrapper`

```shell-session
$ ngrok-wrapper 9944
```

### Run the peer

There are 2 options to run it:

* Using `--rpc-url-ngrok-detect` subcommand to automatically detect RPC URL from `ngrok-wrapper` that you have already launched before.

  ```shell-session
  $ humanode-peer --name "$NAME" --validator --chain chainspec.json \ 
        --rpc-url-ngrok-detect --rpc-cors all
  ```
* You can manually specify RPC URL from `ngrok-wrapper` output console.

  <pre class="language-shell-session"><code class="lang-shell-session"><strong>$ humanode-peer --name "$NAME" --validator --chain chainspec.json \
  </strong>      --rpc-url "$RPC_URL" --rpc-cors all
  </code></pre>

Where:

* `--name "$NAME"` - where `$NAME` is your Humanode peer name.
* `--validator` - means that you join the network as a block producer.
* `--chain chainspec.json` - a path to the file that contains Humanode chain specification.
* `--rpc-url "$RPC_URL"` - the peer's RPC URL, where `$RPC_URL` is the URL that you noted at the `ngrok-wrapper` configuration step, or your own URL if you're not using `ngrok-wrapper`.
* `--rpc-url-ngrok-detect` - to detect peer's RPC URL automatically from `ngrok-wrapper` (mutually exclusive with `--rpc-url`).

{% hint style="info" %}
We strongly recommend to use `--rpc-url-ngrok-detect` subcommand to avoid facing unexpected issues.
{% endhint %}


# About

## What is a validator

Validators are nodes that can produce blocks and that can participate in the finalization consensus.

In its essence, the Humanode network is simply a network of validator nodes running the node software.

Non-validator nodes can also exist in the network, but they do not have the ability to create new blocks or vote in the finalization of the existing DAGs.

However, any node (not just validators) can import blocks, read the chain state, participate in the gossip network, exchange transactions in the transaction pool, expose the RPC APIs, and etc.

## What are the rules

In the Humanode network, validators are required to have active authentications at the [Bioauth](/docs/bioauth/about-bioauth) system.

{% hint style="info" %}
Unlike PoW or PoS networks, validators do not need to have powerful mining equipment nor do they need to have a huge steak.
{% endhint %}

Technically, it works as follows:

1. A human enrolls an address with the bioauth system.
2. Then the node is linked to this address via session keys.
3. Then human authenticates with the bioauth system, obtains an auth ticket and provided it to the network.
4. Network validates the auth ticket, and adds the address mentioned above to the list of validators.
5. Upon expiration of the authentication or if the node does not appear offline, the network will remove the address from the list of validators.

## How do I become a validator

For a reference-level overview of the process of becoming a validator, see:

{% content-ref url="/pages/6dAPtnQURt0nwiSBrG5E" %}
[Becoming a validator](/docs/validators/becoming-a-validator)
{% endcontent-ref %}

If you need a step-by-step guide on becoming a validator, see the quick start section of this documentation:

{% content-ref url="/pages/yOEBpjBOtMaUoo6SCv6O" %}
[Quick Start](/docs)
{% endcontent-ref %}

## Validator Status Troubleshooting

To inspect and verify you validator status manually, see:

{% content-ref url="/pages/8jC4CHI1xFGcqGNSLPj7" %}
[Checking validator status](/docs/validators/check)
{% endcontent-ref %}

You can also reach out to our community and ask for help.


# Becoming a validator

## Initial setup

1. Set up a wallet and create an account you will use for your node.
   * You can use Talisman wallet or[Polkadot.js extension](/docs/tools-and-services/polkadotjs-extension) or any other compatible wallet app.
2. Get some tokens.
   * Use a faucet if you are on a testnet, see [Testnet Faucets](/docs/tools-and-services/testnet-faucets) on how to do it.
3. Insert your private key mnemonic into the node.
   * If you are using the launcher, see [Node Configuration](/docs/launcher/node-configuration#key-management) section.
   * If you are using command line interface, use `humanode-peer bioauth key insert --chain mychain.json --suri <your mnemonic>` command.

     You might have to stop your node if you have already started it.
4. Start your node.
   * If you are using the launcher, see [Running the node](/docs/launcher/running-the-node) section of the launcher documentation.
   * If you are using the CLI, see [Running the node](/docs/distribution/running-the-node) section of the distribution documentation.
5. Scan the QR code and open the web app on your phone.
   * If you are using the launcher, the QR code should appear on the dashboard automatically after you start the node.
   * If you are using the CLI, see the `humanode-peer bioauth authurl --help` and use that command with proper flags. Don't forget to set the `--chain` option properly.
6. In the web app, go to the node setup and complete the following steps

   1. Enroll (see [Enrolling](/docs/bioauth/enrolling) for more info) with your phone camera
   2. Rotate and set node keys.

   Now you have your node properly set up. You only need to do this entire procedure once, and you'll need to re-enroll if required due to operational requirements (read: if we announce it) and re-rotate and set the keys when you want to discard your old node and set up a new one.
7. Now authenticate in the web app using your phone.
8. After successful authentication, wait for the beginning of the next session after the current one, and you should find yourself in the validators list.

   Your node should start occasionally producing blocks, and you should be able to see log events signalizing that "a new block is produced".

## Maintaining the validator status

* Do not turn off your node.

  If the network detects your node went offline you will be kicked off the validators list.
* Authenticate within the same session after your authentication expired.


# Checking validator status

## Preface: inspecting the chain state

The best way to inspect the state of the chain is to use the Polkadot.js Apps explorer ([Polkadot.js apps](/docs/tools-and-services/polkadotjs-apps)). It connect directly to a node, and runs the queries without any middle-men like indexers, enabling you to directly see the state.

Use the "Developer" tab to inspect the state  or submit the transacitions (extrinsics) directly.

## Validator Status

Check the Polkadot.js Apps explorer ([Polkadot.js apps](/docs/tools-and-services/polkadotjs-apps)) to see if you completed all the steps and have become a validator.

There, navigate to `Developer` -> `Chain state` -> `session` -> `validators()`. Press **+** on the right.

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FuO0xjsnIyTT8hAihrrmW%2Fimage.png?alt=media\&token=e243fda8-7d21-4f6d-86db-e3b7e87161a2)

If you can find your address in this list - you are a validator!

## Inspecting Bioauth

To see whether you have an active bioauth on the chain, see `Developer` -> `Chain state` -> `bioauth` -> `activeAuthentications()` and find yourself in the list.

## Checking Validator Keys

To see if you need to do the set keys, see `Developer` -> `Chain state` -> `session` -> `nextKeys(AccountId32)` with your address. Those keys must match the ones that are stored in your node. If they don't match - do the "set keys" action in the web app.


# Polkadot.js apps

This page will walk you through basic possibilities to explore the Humanode networks.

As the Humanode network is implemented based on substrate framework.

{% embed url="<https://github.com/paritytech/substrate>" %}

You can easily use already implemented substrate tools to interact with the Humanode chains like creating an account, exploring the networks (blocks, extrinsics, validators, etc), submitting RPC calls, submitting extrinsics and others.

{% embed url="<https://polkadot.js.org>" %}

Polkadot-JS Apps is the native Substrate UI for interacting with a node, allowing access to all features available on substrate-based chains. This provides a view and interaction layer from a browser.

{% embed url="<https://github.com/polkadot-js/apps>" %}

This can be accessed as a hosted application via:

{% embed url="<https://polkadot.js.org/apps/>" %}

To connect the Polkadot-JS Apps to your local node, you must go into `Settings` and change the "endpoint to connect to" to `Local Node (127.0.0.1:9944)`.

Check the substrate source to get more information.

{% embed url="<https://docs.substrate.io/reference/command-line-tools/polkadot-apps/>" %}


# Polkadot.js extension

One of the options to create accounts at Humanode networks.

Polkadot.js extension allows to create Humanode account with the main basic functionality - signing transactions. It's not responsible for storing your funds (just keystore operations).

An account is essentially a keypair, but the public key is used as an address, and the private key is kept private and used to sign transactions.

Use the link to download and install it in your browser.&#x20;

{% embed url="<https://polkadot.js.org/extension/>" %}

Once installed, you’ll be prompted to accept the terms and conditions and then you’ll be able to create an account.

{% hint style="danger" %}
We don't recommend using the extension as a cold keystore to manage your accounts with your own funds.
{% endhint %}

Check the substrate docs to find more details.

{% embed url="<https://docs.substrate.io/reference/command-line-tools/polkadot-apps/#polkadot-js-extension>" %}


# Wallet Setup

To become a validator, you need to set up a wallet.

{% hint style="info" %}
You can use another substrate-compatible wallet if you know what you are doing.
{% endhint %}

### Install the polkadot.js extension

You can get the polkadot.js browser extension from here:

{% embed url="<https://polkadot.js.org/extension/>" %}

### Import the key

Import your mnemonic as a key into the polkadot.js extension.

First, open the extension. Then, press on the<img src="https://3650756084-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FULdtKGHYBrV0LyCaxWKd%2Fuploads%2FSKLtJyAhKoiJHGfZn88l%2Fimage.png?alt=media&#x26;token=29308435-023a-45ec-b0e7-94df394d7387" alt="" data-size="line">button at the menu:<br>

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FFtDH82PHTvgPn8HoHOZi%2Fimage.png?alt=media\&token=7244a5e7-8528-4f2e-9a27-f56d940a7ddb)

Press on "Import accounts from pre-existing seed", then follow the dialog to import the key.

![](https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FizQCz4PuPG2LhDrL9pXD%2Fimage.png?alt=media\&token=294ef590-0214-41f3-9b7f-5bfe66e12ee3)

In the end, you should see the address corresponding to your validator key. Use this address when getting the tokens from the faucet.


# EVM Playground

This page will walk you through available EVM related functionalities.

## About

Humanode network is an EVM-compatible chain. You are able to use Humanode network as usual EVM-based chain in the way of holding and transferring tokens, creating and calling smart contracts, using Ethereum RPC API, using external EVM tools like Metamask to hold funds, Remix IDE and Truffle software to develop your smart contracts. The main difference is that you can't run a validator node and participate in consensus logic in terms of EVM terminology.&#x20;

Check the Ethereum compatibility doc for details.

{% content-ref url="/pages/bv9XoT02S3V4xpAgE5g1" %}
[EVM Compatibility](/docs/evm/evm-compatibility)
{% endcontent-ref %}

## HMND/eHMND swap

The EVM playground currently provides just a single tool: HMND/eHMND currency swap.

This is a UI for the [HMND/eHMND swap](/docs/evm/hmnd-ehmnd-swap) functionality we have on our chain. It allows you to send your HMND to an EVM account as eHMND, or send eHMND from an EVM account to a native account.

The conversion cost is close to the usual transfer, and the cost only consists of the transaction fee - there is no charge for the conversion itself.

The UI is pretty intuitive; you need a native wallet (i.e. [Polkadot.js extension](/docs/tools-and-services/polkadotjs-extension)) to send the HMND from the native account, and an EVM wallet (i.e. MetaMask, or others) to send the eHMND from the EVM account.

## EVM accounts mapping

{% hint style="warning" %}
As of Testnet 5 this account mappings mechanism is obsolete.
{% endhint %}

Humanode Network allows two account kinds:

* Substrate Accounts and
* Ethereum Accounts.

By default, substrate account doesn't match any ethereum account that can be represented as the same account (substrate and ethereum accounts systems use different cryptographic algorithms).&#x20;

But you can create a permanent two-way binding between an ethereum account and a native substrate account with `claim_account` extrinsic.

To simplify manual process of creating and submitting `claim_account` extrinsic, Humanode provides EVM Accounts mapping tool that connects to your Polkados.js and Metamask extensions where you can chose the accounts itself that will be mapped, creates and signs `claim_account` extrinsic and submits it to the network.&#x20;

{% content-ref url="/pages/cSXr15XlOQO5wr97rA0g" %}
[Chains](/docs/chains)
{% endcontent-ref %}


# Subscan

This page describes what the Subscan Block Explorer is

## What is a Block Explorer

Blockchain ecosystems typically have a service that indexes the blocks of the chain and presents the information read from the blocks in a readable and searchable manner. This kind of service is called Block Explorer, and the main goal for such tools is to provide observability on what's happening on the chain.

## Subscan

In the Substrate ecosystem, the most advanced Block Explorer is called Subscan.

Subscan supports indexing the Humanode network. Use the link below to see the Humanode page on Subscan.

{% embed url="<https://humanode.subscan.io/>" %}


# Exchanges

This page outlines what are exchanges and what exchanges are available on Humanode network.

## What is an Exchange

In blockchain ecosystems, an exchange is a service that offers the technical system for selling and buying tokens, often from more than one chain/network.

For instance, an exchange can provide the means to buy ETH for USDT, sell BTC for USDC or buy/sell BTC/ETC pair.

## What exchanges support HMND

There are a lot of exchanges out there, and not all of them support operations with HMND on the Humanode network yet.

We have a list of known good exchanges on our website at <https://humanode.io> in the "HMND" section.

{% hint style="danger" %}
Be advised that, just like with any other popular blockchain network, there are constant ongoing fishing attacks whose goal is to mislead the users into interacting with a fraudulent attacker's fake service pretending to be the real one, instead of the actual real one.

Take extra caution to ensure you have visited the actual exchange service you intended to rather than a fishing website by carefully inspecting the URL in the web browser address bar.
{% endhint %}


# Oracles

This page outlines what oracles are and what oracles are available on Humanode network.

## What is an Oracle

Blockchain applications and smart contracts often need data that is not directly originates on the chain. For example an exchange rate of the fiat currencies that are not traded on the chain, or, another example, the temperature in a particular location at a given day in the past.

Oracles are a part of the blockchain ecosystem that provide on-chain access to such data. In particular, roughly, any piece of data that can be objectively agreed upon by multiple independent verifiers, who then are able to collectively witness and attest the correct upload of the said piece of data on chain.

## Oracles on the Humanode chain

Humanode chain has officially partnered with [Supra Oracles](https://supra.com/).

### Supra Oracles - Pull Oracle v2

{% tabs %}
{% tab title="Mainnet" %}

<table><thead><tr><th width="134">Contract</th><th>Address</th></tr></thead><tbody><tr><td>storage</td><td><code>0x58e158c74DF7Ad6396C0dcbadc4878faC9e93d57</code></td></tr><tr><td>pull</td><td><code>0x8B506d2616671b6742b968C18bEFdA1e665A9025</code></td></tr></tbody></table>
{% endtab %}

{% tab title="Testnet 5" %}

<table><thead><tr><th width="135">Contract</th><th>Address</th></tr></thead><tbody><tr><td>storage</td><td><code>0x5df499C9DB456154F81121282c0cB16b59e74C4b</code></td></tr><tr><td>pull</td><td><code>0x30484f27c5191A34587007aD380049d54DbCfAE7</code></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

Check their documentation below:

{% embed url="<https://supra.com/docs/data-feeds/pull-model/>" %}


# Testnet Faucets

Where and how to obtain Testnet HMND tokens.

## What it is

Usually, testnets are used to get more familiar with the network and test different features. In a lot of cases you need to have tokens to perform operations in the network testnets.

Faucet allows users to provide their public addresses and receive tokens to interact with testnet.

## How to use

Get testnet HMND tokens by performing the steps below:

* Go to the chains page, find the section for the testnet you are interested in, look up the Telegram Faucet entry and start a Telegram chat with the specified bot by clicking the URL.

{% content-ref url="/pages/cSXr15XlOQO5wr97rA0g" %}
[Chains](/docs/chains)
{% endcontent-ref %}

* Send the command `/gettokens` and follow the prompts.
* The bot will respond with a message that represents the status of your request.

  After the status changes to "The transaction with your tokens has been submitted: `0xa000…000`." you should have obtained the tokens.

## Example

An example of the communication session with the facuet bot:

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F5iTjoK6iJ3XqSrYnjG0p%2FScreenshot%202022-11-14%20at%2020.14.20.png?alt=media&amp;token=100c9e2a-8a65-4cea-98e6-0fc31f2422af" alt=""><figcaption></figcaption></figure>


# Substrate API Sidecar

A REST API on top of Substrate JSON-RPC API for easier interoperation.

## About

The [Substrate API Sidecar](https://github.com/paritytech/substrate-api-sidecar) is an external application that provides a more convenient HTTP API on top of the low-level JSON-RPC API that node exposes.

Humanode network can be used with Substrate API Sidecar, although some of the Humanode specific APIs are not exposed.

If you are an app developer, and you need a quick way to do some common blockchain operations (e.g. balance transfer), consider using the Substrate API Sidecar.

## Usage

{% tabs %}
{% tab title="Node.js" %}

1. Install Node.js.
2. Install the Substrate API Sidecar.

   ```shell
   npm install -g @substrate/api-sidecar
   ```
3. Run the sidecar process and connect to Humanode network.

   ```shell
   SAS_SUBSTRATE_URL=<URL> substrate-api-sidecar
   ```

   Replace `<URL>` with the right JSON-RPC URL from the [chains](/docs/chains) page, or use your own.
   {% endtab %}

{% tab title="Docker" %}

1. Install Docker.
2. Run the Substrate API Sidecar image.

   ```shell
   docker run --rm -it \
     -p 8080:8080 \
     -e "SAS_SUBSTRATE_URL=<URL>" \
     parity/substrate-api-sidecar:latest
   ```

   Replace `<URL>` with the right JSON-RPC URL from the [chains](/docs/chains) page, or use your own.
   {% endtab %}
   {% endtabs %}

You can now send the simple HTTP requests and get simple JSON responses instead of dealing with the Substrate JSON-RPC protocol specifics.

```shell
$ curl -sS 'http://127.0.0.1:8080/accounts/hmpwhPbL5XJTYPWd3Gw9dUzdWrPwx2nbMFK7CmCQTrYNSfrW4/balance-info' | jq .
{
  "at": {
    "hash": "0x50c54161a09a127324de2e7a5c10d01458b896a4eef4905243c23c5c35f17827",
    "height": "796175"
  },
  "nonce": "0",
  "tokenSymbol": "HMND",
  "free": "353780945734999999999999000",
  "reserved": "0",
  "miscFrozen": "0",
  "feeFrozen": "0",
  "locks": []
}
```


# Humanode Truffle Box

One of the ways to setup the environment for deploying and testing Ethereum smart contracts on Humanode.

## What Truffle Boxes are

A Truffle box is an example Ethereum application and/or boilerplate that puts complimentary tools and libraries into a single, sweet, easily-downloadable package, based on the [truffle ecosystem](https://trufflesuite.com/docs/). Every Truffle box comes with libraries and tools already preinstalled, code that uses those libraries and tools, external scripts (if necessary), as well as helpful README's and documentation.

Read the official documentation on the Truffle at the link below:

{% embed url="<https://trufflesuite.com/docs/truffle/>" %}

## Humanode Truffle Box

The Humanode Truffle Box is a suite of tools we have prepared for developers to work with Humanode EVM implementation in the local development environment.

The Humanode Truffle Box is available at the following repo:

{% embed url="<https://github.com/humanode-network/humanode-truffle-box>" %}

{% hint style="info" %}
You need to manually run the `humanode-peer` in [dev mode](/docs/node/cli) to use the box as we don't provide it as a part of the package.
{% endhint %}


# Humanode Token Claim

What the Humanode token claim process itself is and how to make it done.

## About

Humanode Public Sales were done on the Ethereum network.&#x20;

As a result, the Humanode mainnet genesis block includes all public addresses that were participating in the sales with the corresponding amount of HMND tokens and vesting option for each address.

Token claim is the way to prove that your are eligible to obtain your tokens that were bought during the sale. As a result of the process, the corresponding amount of tokens is sent to your wallet.

## Token Claim

As a public sale participant, you should still have access to a wallet that contains the respective private key that was used during the purchase of tokens. Otherwise, you won't be able to claim your tokens.

Technically, the token claim is the process of creating and submitting a special `claim` extrinsic to the Humanode mainnet. The extrinsic logic operates the following information:

* `token_claim_message` - [EIP-191 typed data message](https://eips.ethereum.org/EIPS/eip-191) that contains information about claiming the tokens based on provided `substrate_address` and `genesis_hash`. It allows you to double check that the extrinsic is used to claim tokens for your account.
* `substrate_address` - an initiator of the `claim` extrinsic.
* `ethereum_address` - an owner of tokens.
* `ethereum_signature` - a signature of `token_claim_message`.&#x20;

{% hint style="info" %}
You won't be able to claim the tokens using an invalid ethereum private key.
{% endhint %}

In case of a successful `claim` extrinsic submission, your tokens will be sent to provided `substrate_address`.

Humanode provides a service to make token claim easly without worrying about technical details. All that you need is just to connect your Metamask wallet with the corresponding `ethereum_address`, then connect your Polkadot.js wallet with the corresponding `subsrate_address` and click on submitting the `claim` extrinsic.

Please, check the guide to proceed with the token claim process using our service.

{% embed url="<https://gitbook.humanode.io/mainnet-guide/guide-to-claim-tokens/claiming-the-hmnd-tokens>" %}


# About Bioauth

General information about the bioauth.

## What is bioauth

Bioauth is the mechanism that ensures that every node in the Humanode Network has a signle human behind it, and that a single human can only run one node that can participate in the network blocks production, validation, and conflict resolution (consensus).

{% hint style="info" %}
Active validators in the Humanode Network are called "Humanodes".
{% endhint %}

## How does it work

Each validator in the Humanode network has to pass the bioauth.

The steps to becoming a Humanode are as follows:

1. Download and install the blockchain client for the Humanode blockchain.
2. Generate an asymmetric key pair to use as validator private and public keys.
3. Insert the private portion of your validator key into the node.
4. Launch the node and link your biometric information to the public portion of your validator key pair. At this step, we do a face scan to obtain the biometric information. After this, your biometric identity will be linked with the validator key you provided.
5. Authenticate with the network using your validator key pair and your biometric information. Another face scan is taken, and the validator key provided for the authentication is verified to match the key linked to the biometric identity.
6. Once the network acknowledges your authentication, a record associated with the public portion of your validator key pair is created, indicating that an active biometric authentication exists. The network then enables your node to participate as a validator.

Bioauth status expires after a certain period of time, after which steps 5 and 6 have to be repeated.

In case the node goes offline, the bioauth is voided ahead of the expiration time, and then steps 5 and 6 have to be repeated before the node can become a validator in the network again.

{% hint style="info" %}
[Humanode Launcher](/docs/launcher/about) facilitates the installation and running of the node, making it possible for non-tech-savvy users to become Humanodes.\
It's also very convenient to use, so you might as well give it a try!
{% endhint %}

### How to integrate <a href="#how-to-integrate" id="how-to-integrate"></a>

Integrating with the bioauth is achieved by using the special precompiles that are available on the Humanode blockchain.

The precompiles allow any EVM smart contract to check whether a certain validator key has an active bioauth or not.

Write your arbitrary smart contract and invoke the precompile to tap into the bioauth state.

Read the [technical spec of the precompiles](/docs/evm/precompiles) available on the chain.<br>


# Enrolling

How to become an eligible participant in the Humanode consensus protocol.

## About

Enrolling is a process to register your biometric fingerprint with the corresping address that is going to represent the address as an eligible participant in the Humanode consensus protocol. The consensus  doesn't allow an address to be in the validators list for blocks production and validation if the address isn't related to a human that has passed biometric verification.&#x20;

## How to do it

Your node should be already running and synced with the network. You session keys are already rotated.

{% content-ref url="/pages/0Rt3J5rDJgdzWcJxPvMw" %}
[Node](/docs/node/overview)
{% endcontent-ref %}

Make sure that your expected private key that is going to repesent you in the network is imported into keystore.

{% tabs %}
{% tab title="Launcher" %}
Check the [Node Configuration](/docs/launcher/node-configuration#inserting-the-mnemonic) section of the launcher configuration
{% endtab %}

{% tab title="CLI" %}
Check the [Running the node](/docs/distribution/running-the-node) section of manual installation.
{% endtab %}
{% endtabs %}

{% hint style="danger" %}
Keep the key secure and safety. In case of losing access to the key you won't be able to continue participation in the Humanode consensus protocol.
{% endhint %}

Scan the QR code and open the web app on your phone.

{% tabs %}
{% tab title="Launcher" %}
The QR code should appear on the dashboard.
{% endtab %}

{% tab title="CLI" %}
See the `humanode-peer bioauth authurl --help` and use that command with proper flags. Don't forget to set the `--chain` option properly.
{% endtab %}
{% endtabs %}

As a result, you should be able to see the following web page on your phone.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F9uz9upN1OPI9DTQBn1F1%2Fphoto_2022-11-14%2017.29.44.jpeg?alt=media&amp;token=05d34e19-051e-4a9b-9151-1d66540c49c1" alt=""><figcaption></figcaption></figure>

Click on **SETUP THE NODE**.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F38upE4raZXf8BNzVCvki%2Fphoto_2022-11-14%2017.29.49.jpeg?alt=media&amp;token=32362267-736f-47f3-93fa-ba74460b4cd4" alt=""><figcaption></figcaption></figure>

Click on **ENROLL**.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2Fn5Elmg6AjmgmXd4QIgq5%2Fphoto_2022-11-14%2017.29.50.jpeg?alt=media&amp;token=8d109f5f-65e6-48f2-9a6d-31e351f789ea" alt=""><figcaption></figcaption></figure>

Carefully read our notes and click on **YES, I UNDERSTAND**.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2Fu3l8GMjnHMIhncFpj3j2%2Fphoto_2022-11-14%2017.29.53.jpeg?alt=media&amp;token=242f68e8-2328-41d7-b5ff-fe14a9f90970" alt=""><figcaption></figcaption></figure>

When the biometric engine is ready you will see.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FMG9PWioU0c4hHE2KuzJp%2Fphoto_2022-11-14%2017.29.55.jpeg?alt=media&amp;token=2a5bf2a9-950a-4d0b-bc07-4fa918169c97" alt=""><figcaption></figcaption></figure>

To pass the biometric verification make sure that there is enough light and the picture is clear. Click on **I"M READY** and pass the verification.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FzC8BXWWwW1yss5BrikqP%2Fphoto_2022-11-14%2017.29.57.jpeg?alt=media&amp;token=1b16cebf-31f7-4c4a-89d2-3e802e586924" alt=""><figcaption></figcaption></figure>

Finally, if everything is ok you will get

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FCwkIUTFluipzuo6HD8Tf%2Fphoto_2022-11-14%2017.30.02.jpeg?alt=media&amp;token=58399af0-62e1-46af-845a-040808352cb4" alt=""><figcaption></figcaption></figure>

In case having errors, please check the troubleshooting page.

{% content-ref url="/pages/O18OkQAY1zOSwyAL8W9x" %}
[Troubleshooting](/docs/help/troubleshooting)
{% endcontent-ref %}


# Authenticating

How to continue taking part in the Humanode consensus protocol.

## About

Authentication is a process to continue taking part in the Humanode consensus protocol. The protocol requires periodically to pass biometric verification to check liveness behind the address. In case your node goes offline for more than 1 epoch, you should make authentication as well.&#x20;

## How to do it

Your node should be already running, synced with the network and the [Enrolling](/docs/bioauth/enrolling) is done.

Scan the QR code and open the web app on your phone.

{% tabs %}
{% tab title="Launcher" %}
The QR code should appear on the dashboard.
{% endtab %}

{% tab title="CLI" %}
See the `humanode-peer bioauth authurl --help` and use that command with proper flags. Don't forget to set the `--chain` option properly.
{% endtab %}
{% endtabs %}

As a result, you should be able to see the following web page on your phone.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2F6hsTFPvUnAth04e3pM7F%2Fphoto_2022-11-14%2017.29.44.jpeg?alt=media&amp;token=825842b2-5a12-44fc-9771-086ace9a8068" alt=""><figcaption></figcaption></figure>

Click on **AUTHENTICATE** tab.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FuXN898dknD07GdGUkskJ%2Fphoto_2022-11-14%2017.30.40.jpeg?alt=media&amp;token=93b998ab-6f87-404f-b142-90ae14a88254" alt=""><figcaption></figcaption></figure>

Then you will be prompted to pass the biometric verification.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FMG9PWioU0c4hHE2KuzJp%2Fphoto_2022-11-14%2017.29.55.jpeg?alt=media&amp;token=2a5bf2a9-950a-4d0b-bc07-4fa918169c97" alt=""><figcaption></figcaption></figure>

To pass the biometric verification make sure that there is enough light and the picture is clear. Click on **I"M READY** and pass the verification.

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FzC8BXWWwW1yss5BrikqP%2Fphoto_2022-11-14%2017.29.57.jpeg?alt=media&amp;token=1b16cebf-31f7-4c4a-89d2-3e802e586924" alt=""><figcaption></figcaption></figure>

Finally, if everything is ok you will get

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FlHIeBi2ifcL0WivBgGCn%2Fphoto_2022-11-14%2017.30.44.jpeg?alt=media&amp;token=caf2cca9-6980-4a63-afad-79645fd05d27" alt=""><figcaption></figcaption></figure>

In case having errors, please check the troubleshooting page.

{% content-ref url="/pages/O18OkQAY1zOSwyAL8W9x" %}
[Troubleshooting](/docs/help/troubleshooting)
{% endcontent-ref %}


# Robonode

Robonode is what we call an autonomous VM in a Trusted Execution Environment that holds the biometric data of the validators.

It is not accessible to external operators or local administrators and is designed to secure biometric data in such a way that they can not be extracted, viewed, or compromised in any other way.

## Robonode Swap

We will occasionally perform a scheduled robonode swap, which means that all the validators have to re-enroll and re-authenticate. We will announce this in advance.

If you have lost your private key after you have enrolled and can no longer access the network - this is your chance to enroll with a new key.


# EVM Compatibility

The page describes the basics of EVM, Smart contracts and the compatibility itself.

## What is EVM

The Ethereum Virtual Machine is the global virtual computer whose state every participant on the Ethereum network stores and agrees on. Any participant can request the execution of arbitrary code on the EVM; code execution changes the state of the EVM.

In the Humanode network, we have our own Ethereum Virtual Machine and the associated state, that is not shared with the Ethereum network. Read more in the [#further-reading](#further-reading "mention") section.

{% embed url="<https://ethereum.org/en/developers/docs/evm/>" %}

## What are Smart Contracts <a href="#smart-contracts" id="smart-contracts"></a>

A reusable snippet of code (a program) which a developer publishes into EVM state. Anyone can request that the smart contract code be executed by making a transaction request. Because developers can write arbitrary executable applications into the EVM (games, marketplaces, financial instruments, etc.) by publishing smart contracts, these are often also called [dapps, or Decentralized Apps](https://ethereum.org/en/developers/docs/dapps/).

{% embed url="<https://ethereum.org/en/developers/docs/smart-contracts/>" %}

## EVM compatibility <a href="#further-reading" id="further-reading"></a>

EVM compatibility simply means the ability to write and deploy smart contract code that is compatible with the Ethereum Virtual Machine.&#x20;

Humanode is EVM compatible chain. It means, that dapps that are run on Ethereum-like network can be easily ported into the Humanode chain without rewriting smart contracts and any business logic itself by using even the same software like Metamask, Truffle, Remix IDE, etc.&#x20;

Connect to the Humanode RPC endpoint and run your code on the Humanode network.

Check the list of available public endpoints on the chains page:

{% content-ref url="/pages/cSXr15XlOQO5wr97rA0g" %}
[Chains](/docs/chains)
{% endcontent-ref %}

As an option, you can run your node as well!

{% content-ref url="/pages/0Rt3J5rDJgdzWcJxPvMw" %}
[Node](/docs/node/overview)
{% endcontent-ref %}

In addition, humanode provides Humanode Truffle Box predefined setup to deploy and test Ethereum smart contracts on Humanode.

{% content-ref url="/pages/wsEDGrfOe6TC2gaB712z" %}
[Humanode Truffle Box](/docs/tools-and-services/humanode-truffle-box)
{% endcontent-ref %}

To learn about the technical details of how we implemented the EVM compatibility see the architecture section.

{% content-ref url="/pages/7J2Bc3TUe2KEhE0J1wPP" %}
[Architecture](/docs/evm/architecture)
{% endcontent-ref %}


# Precompiles

Documentation on the special precompiles that are available at the Humanode Network.

## Currency Swap precompile

Use this precompile to transfer the funds from your EVM account to any Native account.

<table><thead><tr><th width="150">Property</th><th width="583.1428571428571">Description</th></tr></thead><tbody><tr><td>Address</td><td><code>0x0000000000000000000000000000000000000900</code></td></tr><tr><td>Input</td><td>See contract interface.</td></tr><tr><td>Output</td><td>See contract interface.</td></tr></tbody></table>

### Contract interface

<https://github.com/humanode-network/humanode/blob/master/crates/precompile-currency-swap/CurrencySwap.sol>

```solidity
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.7.0 <0.9.0;

/**
 * @title Currency Swap Interface
 *
 * An interface enabling swapping the funds from EVM accounts to
 * native Substrate accounts.
 *
 * Address: 0x0000000000000000000000000000000000000900
 */
interface CurrencySwap {
  /**
   * Transfer the funds from an EVM account to native substrate account.
   * Selector: 76467cbd
   *
   * @param nativeAddress The native address to send the funds to.
   * @return success Whether or not the swap was successful.
   */
  function swap(bytes32 nativeAddress) external payable returns (bool success);
}
```

## Bioauth status check precompile

Use this precompile to check if the specified address has an active bioauth. Takes the validator public key (type `AccountId` in the Humanode runtime code, also known as native - or Substrate - account).

<table><thead><tr><th width="150">Property</th><th width="583.1428571428571">Description</th></tr></thead><tbody><tr><td>Address</td><td><code>0x0000000000000000000000000000000000000800</code></td></tr><tr><td>Input</td><td><code>AccountId</code> (Substrate account address); 32 bytes<br>The public key to check.</td></tr><tr><td>Output</td><td><code>bool</code>; 1 byte<br><code>1</code> if bioauth is active for the address, <code>0</code> if bioauth is inactive for the address.</td></tr></tbody></table>

### Helper Library

You can use the helper library below together with your smart contract code to simplify invoking the precompile.

```solidity
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

library bioauth {
    function isAuthenticated(bytes32 accountId) public view returns (bool result) {
        address precompile = 0x0000000000000000000000000000000000000800;
        bytes memory payload = abi.encodePacked(accountId);
        (bool success, bytes memory returnData) = precompile.staticcall(payload);
        assert(success);
        assert(returnData.length == 1);
        return (returnData[0] != 0);
    }
}
```

## EVM to native account mapping precompile

Use this precompile to find a corresponding mapped native `AccountId` for provided EVM address. This is useful to be used in combination with `Bioauth` precompile as you don't need to worry about a proper `AccountId` to do bioauth check.

Description

<table><thead><tr><th width="150">Property</th><th width="583.1428571428571">Description</th></tr></thead><tbody><tr><td>Address</td><td><code>0x0000000000000000000000000000000000000801</code></td></tr><tr><td>Input</td><td><code>evmAddress</code> (EVM address); 20 bytes</td></tr><tr><td>Output</td><td><p><code>(bool, bytes32)</code>; </p><ul><li><code>(true, 0x12..9)</code>: indicates that the evm adress has been mapped where <code>0x12..9</code> is the mapped native account itself. </li><li><code>(false, 0x00..0)</code>: indicates that the evm addres hasn't been mapped.</li></ul></td></tr></tbody></table>

### Helper Library

You can use the helper library below together with your smart contract code to simplify invoking the precompile.

```solidity
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

library evmAccounts {
    function claimedNativeAccount(bytes20 evmAddress) public view returns (bool, bytes32) {
        address precompile = 0x0000000000000000000000000000000000000801;
        bytes memory payload = abi.encodePacked(evmAddress);
        (bool success, bytes memory returnData) = precompile.staticcall(payload);
        assert(success);
        if (returnData.length == 0) {
            return (false, 0x0);
        } 
        bytes32 nativeAccount = abi.decode(returnData, (bytes32));
        return (true, nativeAccount);
    }
}
```


# Architecture

This page describes the high-level ideas behind EVM compatibility in the Humanode network.

## Components

To implement the compatibility, we implement the following:

* Ethereum Virtual Machine to execute the EVM-byte code on-chain.
* Ethereum-compatible JSON-RPC interface to allow Wallets, UIs, backends, and other off-chain components to interact with the Humanode network the same way they interact with Ethereum network.
* Ethereum block emulation layer - to present the necessary block information to the EVM and RPC interface; this is required because our native blocks are built differently from the Ethereum blocks, yet the block information is required for certain interactions with Ethereum.
* Secondary accounts system - to allow using the familiar Ethereum Wallets and Dapps with the Humanode network; see the [#evm-accounts](#evm-accounts "mention") section for more info.

## EVM accounts design

Humanode network has two parallel accounts systems: native accounts and EVM accounts.

{% hint style="info" %}
TLDR: we have decided to go against complex interleaving and emulation of the addresses, and implemented a secondary accounts system for EVM 20-byte accounts.
{% endhint %}

### The problem

Humanode native accounts are SS58-encoded 32-byte blobs, typically containing the public key of an externally owned account.

This is not compatible with EVM, which uses hex-encoded 20-byte blobs, which are either a truncated Keccak hash sum of an externally-owned account's public key, or a smart contract account's address.

To make things work, we had to decide on how we enable the EVM accounts on Humanode network.

### The solution

We have decided to add a secondary accounts system for the EVM network. It complements the native accounts system but does not replace it.

Users can have any number of native accounts and EVM accounts, and there is no mapping required (unlike with our old implementation, see [#other-potential-options](#other-potential-options "mention") section for more info).

The operations with EVM accounts and EVM smart contracts are available via the Ethereum JSON-RPC interfaces, and the operations with native accounts are available via the native (Substrate) JSON-RPC interface.

Since the account systems are separate, the currencies that the two account systems utilize are also technically separate. We call the native Humanode network currency HMND, and the EVM currency eHMND.

Two account systems can interact with each other on-chain via the interfaces we expose via pallets (from the native end) and precompiles (from the EVM end). For instance, we have implemented [HMND/eHMND swap](/docs/evm/hmnd-ehmnd-swap) to transfer the funds from native accounts to EVM accounts and vice versa.

### Other potential options

#### Testnet 2 era design

In our first design iteration on the EVM compatibility (at the time we launched Testnet 2) we implemented the account mapping system - which used a single accounts system but stored the EVM 20-byte accounts addresses in the emulated 32-byte native account addresses.

This was complicated, so we decided to change how this works.

#### Other considered solutions

... and we will write this section a bit later. Better to ship this doc early so you all can see it, isn't it?


# HMND/eHMND swap

How the HMND/eHMND swap works

{% hint style="info" %}
If you want to actually swap HMND/eHMND and not learn how it works under the hood - please go to [EVM Playground](/docs/tools-and-services/evm-playground#hmnd-ehmnd-swap).
{% endhint %}

Check this guide below. It has a fair amount of low-level info and details that explain how to perform the swap in both native to EVM and EVM to native accounts.

{% content-ref url="/spaces/hKZNwmzPYrswDUmy5yPx" %}
[Technical HMND/eHMND swap guide](https://gitbook.humanode.io/hmnd-ehmnd/)
{% endcontent-ref %}

To swap the funds from the native account to an EVM account use the **Currency Swap pallet**.

To swap the funds from the EVM account to a native account use the [Precompiles](/docs/evm/precompiles#currency-swap-precompile).

The user interface for the HMND/eHMND swap is provided as part of the [EVM Playground](/docs/tools-and-services/evm-playground).


# EVM Dev Mode & Keys

This page describes basic approach to use humanode-peer in dev mode with prefunded evm dev accounts.

Go to [Dev Mode](/docs/node/cli/dev-mode) to run the node in dev mode with prefunded evm accounts.

To inspect evm accounts used in dev mode use the command below:

```
humanode-peer evm inspect-account --dev --account-index <ACCOUNT_INDEX>
```

where `<ACCOUNT_INDEX>` is the account index used in the derivation path.

As an example,

```
humanode-peer evm inspect-account --dev --account-index 1
Address:      0x3cd0a705a2dc65e5b1e1205896baa2be8a07c6e0
Mnemonic:     bottom drive obey lake curtain smoke basket hold race lonely fit walk
Private Key:  0x8075991ce870b93a8870eca0c0f91913d12f47948ca0fd25b49c6fa7cdbeee8b
```

{% hint style="info" %}
By default, currently dev mode contains two prefunded evm accounts with `0` and `1` account indexes.
{% endhint %}

Run `humanode-peer evm inspect-account --help` to get more details.


# Sample contract: ERC20 token

Here we showcase our test ERC20 token repo to demonstrate how one would develop a contract for Humanode Network.

Take a look at the Test ERC20 repo on our Github.

{% embed url="<https://github.com/humanode-network/test-erc20>" %}

It is a Hardhat-based codebase that uses OpenZepplin libraries to implement an ERC20 token contract.

This repo provides an example of how to:

* set up your Hardhat environment to test/deploy a smart contract to the local dev Humanode Network node (the `humanode-peer --dev` command) and use the pre-funded dev EVM accounts (see `humanode-peer evm inspect-account --dev`);
* set up your Hardhat environment to test/deploy a smart contract to the Humanode Testnet or Mainnet using a private key available read from the environment variable.

We will soon be adding an example of how to deploy a  Humanode Network dev node in Github Actions to test smart contracts in CI (#soon).

{% hint style="info" %}
Note that in most cases you don't need to test your smart contract against a real Humanode Network node and just use a Hardhat Network node (or Ganache, etc) because Humanode Network is EVM compatible, and any code that works with other EVM networks should also work with Humanode Network.

One sensible reason to test against the real Humanode Network is when you rely on the precompiles that are exclusively available at the Humanode Network.
{% endhint %}


# Guide to tie your verified Discord account to your human node

Here’s a step-by-step guide on how to link your Discord account to your Humanode validator wallet address. Active participation in one person - one vote polls gets you up the validator leaderboard beyond completing all 84 epochs.

**Step 1.** First and foremost, you need to be an active validator and get bio-authenticated by getting a ‘Verified Human’ role on [Humanode Discord](https://link.humanode.io/chat). Here’s how to get the ‘Verified Human’ role: [Guide to get a Verified role](https://gitbook.humanode.io/guide-to-get-a-verified-role-for-individual-use)\
\
**Step 2.** Go to [Polkadot.js.org](https://polkadot.js.org/) explorer and sign a message to get a signature. Here’s how:

I. In [Polkadot.js.org](https://polkadot.js.org/) extension, under the Developer section.  Choose `Sign and verify`.&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfTbJbOkklqd98mfBIW0RQ8i64YPvzBTatleArHjuds8M1PSJCrDwRI-_DDwTEFw3kfq0F3LZIwquNfTp3CL8kv1c4EbRtx_bXaCIEvxKMecFBWv8pntoX6OBdszqexGu0Rd4ph?key=Rs7kwUmU2cH8lzGSdMiMvg" alt=""><figcaption></figcaption></figure>

II. Choose your mainnet validator address, replace \[username] with your Discord username and and sign the message.\
\
Note: Use the address that you are using to run the node (Sample address: `hmrpkmW4k6ZfxZEHCFBUSnhXe4ZJV7FjkFDCJAqqJCqjUFf4N`)\
\
You can get the Discord username by clicking on your profile in the bottom left of your Discord. Sample Discord username: `ilikehumanode123`&#x20;

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FAxJ0sb3ZGi2BdGxy33sj%2FFinal%20final.png?alt=media&amp;token=9965e3f3-ce47-4e94-abf7-553b84e67c59" alt=""><figcaption></figcaption></figure>

III. After successfully signing, you’ll get the signature of the supplied data. Copy this signature. Sample signature: `0x5406c81039881052df59b3e769143dccd5c6e72212805307161bb8c60ae6d21ac36afbe047f5c3d5c1d98c5584040056cd417895a0e6b02c5e6f7b74de8f5a8d`

<figure><img src="https://877635606-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrqdNEWk4W56lbUfbpyD%2Fuploads%2FY9gEUdOdJsXpCSFCQt52%2FFinal%20signin.png?alt=media&amp;token=22e15016-b4f5-4311-b5ea-06967d38e0c0" alt=""><figcaption></figcaption></figure>

IV. Now, in the [#validator-address-submissions](https://discord.gg/dErevQeY) Discord channel, fill in the form. You will need your validator address and the signature we got in the last step.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdtAuY6fX0xArsT2uETbiJ8vnrE8Agy72-k9gI7VasuBvScF4Q-6ixAKuOGRyUC6WBalCkbbF0UMggtFsusTnH0E-G04hKOs1R-Q9A43eD4vgmP_whcAbW0MsqrV29bFBYYkA2yTg?key=Rs7kwUmU2cH8lzGSdMiMvg" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeZSYso-6JjrpaY21QOnHgK7YmONYvn3wQB0cMtKiu49RK0KqDcVTG0DWtyFRwMH9mL6It5gkhfQIU9bH3wPV-vC0UlIWFGm2mRlYr2d6JGagxgVNXdd5jnCx_nZ795ZGRHHK3m?key=Rs7kwUmU2cH8lzGSdMiMvg" alt=""><figcaption></figcaption></figure>

You’re all set! Join the [#validator-polls](https://discord.gg/rSXhA9t4) channel and cast your vote.


