Marsd
This guide will explain how to install the marsd binary (Mars CLI) onto your system as a command-line interface tool for interacting with nodes on Mars Hub.
While marsd
is a requirement to run a full node, you don't have to run a full local node yourself to interact with the network. You can specify a remote node with the —node
flag.
With marsd
connected to a remote node you can:
- Generates keys
- Send transactions
- Deploy and interact with contracts
- and more
Setup
Login to your user account (you don't want to use root) and install some essential packages:
Install the Go programming language:
Configure related environment variables:
Compile the Mars App Daemon
Clone the mars repo, checkout and install v0.0.0:
Download the Mars Hub source code and checkout the latest stable release, which in our case is v0.0.0:
The command to compile the app is defined in Makefile. For most Cosmos apps it is make install, which will generate an executable in your $GOBIN folder.
Commands
This section describes essential commands for validators from marsd, the command line interface that connects a running marsd process.
keys
Manages Keyring commands. For a list of syntax and subcommands, see the keys subcommands.
query
Manages queries. For a list of syntax and subcommands, see the query subcommands.
start
Runs the full node application with Tendermint in or out of process. By default, the application runs with Tendermint in process:
status
Displays the status of a remote node:
tx
Retrieves a transaction by its hash, account sequence, or signature. For a list of full syntax and subcommands, see the tx subcommands.
Syntax to query by hash:
Syntax to query by account sequence:
Syntax to query by signature:
txs
Retrieves transactions that match the specified events where results are paginated:
Example: