Desmos Network
Published in

Desmos Network

How to use Desmos Ledger App with Desmos CLI

This guide will cover how to setup Ledger Nano S/X to work with Desmos. Desmos $DSM holders can interact with their Desmos accounts securely using Ledger hardware wallet.

Download Desmos Ledger App from Ledger Live

The Desmos Ledger App can be downloaded from the Ledger Live. You can search “Desmos” in the App catalog in the Ledger Live Manager.

After the installation is done, you will see the Desmos Ledger app on your Ledger device.

Install Desmos CLI

If you are geeky enough, you can refer to the details in the Desmos documentation to build the Desmos CLI yourself.

Otherwise, you can download the prebuilt binary from Desmos Github repository by choosing your suitable OS and architecture. For example, if you are using MacOS, please download desmos-0.17.7-darwin-amd64.

Source codes and prebuilt binaries for Desmos v0.17.7

Let’s take macOS as an example.

First we download the desmos-0.17.7-darwin-amd64 file to your home folder (the folder with your name next to a home icon on Finder on Mac).

The file is not executable yet right after download. We have to make it become executable so that we can use its functions. Open Terminal and run the following 2 commands. (If you don’t know what Terminal is, you can search Terminal in Spotlight. It will bring up the Terminal application.

mv ~/desmos-0.17.7-darwin-amd64 ~/desmos
chmod +x ~/desmos

After that, the file will be executable and it has been renamed to desmos instead of the original long name desmos-0.17.7-darwin-amd64 .

Create an address with the Ledger

Choose a name that you would like to call your key. You are going to use this name and replace the <key_name>in the following command with the name you have chosen.

You can now add a key reference from your Ledger Nano S/X to your local storage by executing the following command.

~/desmos keys add <key_name> --ledger

The address will be shown on your Ledger Nano S/X. Read through the address and press both buttons to accept it. The same address will then be shown on your computer screen after the confirmation.

The key reference is now saved and you can refer it with the <key_name> you have typed before.

Receive Tokens

To receive tokens, you will need to get the address of the key reference you have saved. This can be done by executing the following command.

~/desmos keys list

It will list out the key references you get from the Ledger Nano S/X or any other keys generated in the local storage.

The key reference of the Ledger Nano S/X would looks like this.

- name: <key_name>
type: ledger
address: desmos17cgek68sjrks9pjk7cs0kx753pfra7xeucl49w
pubkey: desmospub1addwnpepqv57rgze7h8uxs0cake7s0v55haqpxh3g3uvh59765t4vtwxr7dtwx7muhm
mnemonic: ""
threshold: 0
pubkeys: []

The “address” showing here is the address you are going to receive DSM.

We are currently running a testnet with chain id morpheus-apollo-2 . Anyone with a valid DSM address can get some test tokens to play with. The denom on the testnet is udaric .

You can request some udaric by joining Desmos Discord server and ask for test tokens in the #ask-tokens channel.

To confirm if you have received the test tokens, visit Desmos Big Dipper and type your DSM address in the search box.

Send Tokens

To send tokens, you will need to connect to a fullnode. You can either run it by yourself or by connecting to an existing public RPC. We are providing a public RPC with the address for the testnet.

Execute the following command to send tokens.

~/desmos tx bank send <key_name> <to_address> <amount> --from <key_name> --chain-id morpheus-apollo-2 --gas auto --gas-prices 0.01udaric --gas-adjustment 1.4 --node

It will query the remote RPC endpoint and format a correct transaction message for you. As you have chosen to use the <key_name> you have created with the Ledger Nano S/X, the command will ask you to approve the transaction with the Ledger. Read through the content of the transaction, then press both buttons to Approve or Reject the transaction.

You can check the address on the Desmos Big Dipper again and see if the account balances have been changed.

Your Ledger Nano S/X is being setup correctly which can be used with Desmos CLI now. To learn more about other operations on Desmos including staking, claiming rewards, setting up your profile and posting social messages, please refer to the Desmos official documentation.

If you have any questions, please do not hesitate to ask them in the Desmos Discord server. The Desmos community is very helpful and friendly.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store



Forbole | Desmos | Big Dipper | Bitcoin | crypto in general