Snippets

nerva-project NERVA CLI: Getting Started

Created by nerva-project last modified

NERVA CLI: Getting Started

Firstly, if you are new to NERVA, welcome. You have made the decision to be part of cryptrocurrency and community that aims to change the mindset of the crypto community and the evolution of cryptonote based coins. Taking the power back from big pools and GPU rigs and giving it back to the people. Where anyone with a computer and some time can mine a coin. Truly decentralized and forever ASIC and GPU resistant. This is a small, yet ambitious project and your help and support really means a lot to the developers and community.

This document will outline the basics on getting started with the NERVA CLI tools.

Background

NERVA consists of 2 main components

  • nervad
  • nerva-wallet-cli

We will discuss the function and usage of both of these programs to mine and manage your XNV

nervad

nervad is the NERVA daemon. This is your node, your connection to the NERVA network. nervad manages your network connections, blockchain and is the mining software you use to mine NERVA To start your node, you simply execute nervad and wait for it to synchronize the blockchain. You will get a message saying SYNCHRONIZED OK. When you receive this message, you are now participating in the NERVA network and can start mining and managing your funds

nerva-wallet-cli

nerva-wallet-cli is the wallet program for NERVA. nerva-wallet-cli manages your balances, accounts and transfers of funds.

As you can see, both tools are required to successfully use the NERVA blockchain.

Getting started

Starting the software

The easiest way is simply to execute nervad without any command line options, then execute nerva-wallet-cli, again without any command line options. This will connect you to the NERVA mainnet and begin synchronizing your blockchain. If you are on Linux, you can optionally use the --detach flag and open both in a single command line

./nervad --detach & ./nerva-wallet-cli

Creating a new wallet

When you start the nerva-wallet-cli, you will be asked to enter your wallet name. If this is your first run, what you enter here will be the name of your new wallet file. So enter a wallet name and press ENTER to continue.

Assuming you do not have a wallet file already, you will be asked to confirm that you want to create this wallet. Type Y and press ENTER to continue.

You will then be prompted to enter a password for the wallet. Please select a password comprised ONLY of alphanumeric characters and press ENTER.

NOTE: DO NOT use special characters. Only lower and upper case letters and numbers. Depending on your OS or in Linux depending on the shell you use, some special characters are not handled properly and will corrupt your new wallet.

You will then be prompted to confirm the password. Type the same password again and press ENTER to continue.

Next select a language. This is the language for your wallets 25 word mnemonic seed. Type the number that corresponds with your language of choice and press ENTER to continue.

Your wallet file will now be created and nerva-wallet-cli will initialize.

BACKUP!!

This is not optional. A backup MUST be carried out on all new wallets.
Please refer to the document Backup and Protect Your Wallet for more information.

Synchronizing

Synchronizing refers to the daemon keeping an up to date copy of the blockchain on your computer. Your daemon must have a full copy of the blockchain to work properly. You cannot mine and your wallet balance will not be accurate unless the blockchain is synchronized.

There are a couple of ways to tell if you are synchronized. In the daemon, you will receive a message saying SYNCHRONIZED OK when you have completed synchronization. The wallet will also tell you you are synchronized in the prompt at the bottom of the terminal. It will say Out of Sync if you are not yet synchronized. You can type the command refresh into the wallet to refresh that status.

When you are synchronized, you are ready to continue

Common uses

Now that you have a wallet and are synchronized with the blockchain, it is time to look at some of the common tasks you may perform with the NERVA toolset

Mining

Mining is the process of validating transactions on the blockchain. The reward for your work is paid out in the NERVA (XNV). If you are first to unlock the block, you get the coins. Mining is done in nervad. There are 2 ways to start mining NERVA

You can start the miner after nervad has started by typing the command

start_mining <address> <threads>

Or you can start nervad to mine automatically by launching nervad with the following command

./nervad --start-mining <address> --mining-threads <threads>

Where <address> is your NERVA wallet address and <threads> is the number of CPU threads to use for mining.

Transferring XNV

No currency is complete without a way to spend it. nerva-wallet-cli provides the machanics to transfer funds to other accounts.

The most basic way to send funds is to use the command

transfer <address> <amount>

Where address is the address to send XNV to and amount is the amount to send. After you press ENTER, you will be informed of the fee and asked to confirm. Confirm the transaction to send.

There are other options when it comes to sending XNV. The following command includes some of the optional features

transfer <priority> <address> <amount> -p <payment_id>

Additional to address and amount, you now also have a priority which specifies the importance of the transaction and a payment_id which may optionally be required by the receiving party. There are 4 priority levels

  • default
  • low
  • medium
  • high

Higher priority transactions are processed before lower priority transactions, however they cost more in fees. In most cases, the default priority (automatically set when you omit the priority) is suitable. Transaction fees collected are placed into the next block and included as part of the block reward for the miner of the next block.

The payment ID is an optional identifier used to label a transaction. This is most often used to distinguish who is sending funds to a particular wallet. For example, exchanges listing NERVA have only one address, and use the payment ID to determine which user is depositing funds to the exchange. Quite often, an integrated address will be used. Such addresses are used by TradeOgre and Altex exchange. An integrated address is an address where the wallet address and payment id are combined. So you would use it like a single address without payment ID. You can distinguish a regular address and an integrated address as a regular wallet address begins with NV and an integrated address begins with Ni

Checking node status

In nervad, type the following command

status

This will produce an output such as

Height: 93582/93582 (100.0%) on mainnet, mining at 607 H/s, net hash 365.58 kH/s, v6, up to date, 8(out)+0(in) connections, uptime 0d 5h 35m 18s

This shows you the height, network you are connected to, hash rate, number of connections and uptime. This comprises most information a user might require about the NERVA network.

Comments (0)