How to use Ledger Nano S with XDC Network.
By: Xinfin Xdc Hybrid Blockchain Network
Tags: Xdc, Ledgerwallet, Ledger Nano S, Xinfin, Wallet

How to use Ledger Nano S with XDC Network.

Now, Store $XDC in the Ledger Nano S.

Ledger Nano S is a Hardware Wallet. Hardware wallets are the cryptocurrency wallets which stores the private keys of securely providing complete isolation between private keys and computer and smartphones which are easy to hack.

Before You Begin :

Initialize your device.

Make sure the latest firmware is installed.

Ledger Live is installed and ready to use

Installing the XinFin application :

Open manager in Ledger Live Connect and Unlock Ledger Nano S. Allow the Ledger Manager by pressing both buttons at the same time. In the app catalog, find the XinFin App. Click the Install Button. The app will be installed int the device.

Installing XinFin Companion Application :

To install the XinFin Companion app, make sure node and npm are installed.

>node -v

v12.16.3

>npm -v

6.14.5

To install the XinFin Companion app, use the following command.

>npm install -g @xinfin/js-companion

To confirm that companion app is installed, use the following command:

>js-companion -h

XinFin Companion



This is a companion app for XinFin Ledger App.--publicKey -p To get the Public Key from App.

--signMessage -m To sign a Personal Message with Public Key.

--getVersion -v To get version of Application.

--signTx -t To send a transaction.

--help -h For Help

Using the XinFin App with XinFin companion App :

Install the XinFin companion app in your device. To confirm that companion app is installed, use the following command:

>js-companion -h

XinFin Companion



This is a companion app for XinFin Ledger App.--publicKey -p To get the Public Key from App.

--signMessage -m To sign a Personal Message with Public Key.

--getVersion -v To get version of Application.

--signTx -t To send a transaction.

--help -h For Help

Connect the Ledger Nano S and open the XinFin app. To confirm that the device is connected and the correct app is open, use the following command:

>js-companion -v

BOLOS App Version : 1.0.0

If you get an error, the device may not be connected properly or the correct app may not be open.

Getting Address from Ledger Nano S :

Open the XinFin Ledger App and make sure companion app is installed. Use the following code in terminal

>js-companion -p

? Please enter index 0

{

publicKey: '04dd0311000486bde8687d53835485736b126bb6f1dfc2be0379bc29460201e276f7bd8595322785b20e78ae4b741ae33bd5209865d21cf4321a43bbcf14b73081',

address: 'xdc2A40FAC3D69370C88b3c9C03dF428f23fb3149d9',

chainCode: '859e3845bd15a04b6d2cd99371126ca55148de7b84b29f0ffa42dba35999fb8e'

}

The display on the Ledger App shall display “Verify Address”. To verify the address, press the right button to compare the address.

Press both buttons simultaneously to “Approve” or “Reject”.

Signing Message from Ledger Nano S :

Open the XinFin Ledger App and make sure companion app is installed. Use the following code in terminal

>js-comapnion -m

? Please enter index of public key 0

? Enter Message to be signed "Welcome to the tutorial"

Message Hash : 8f22a9e8161f342e7b8bdd634705f8020c86047254dc4e3061d9b0fe7b235e9a

To verify the message, compare the message hash with one displayed in the device.

Press both buttons simultaneously to “Sign Message” or “Reject”.

The signature will be displayed on the console if the message is signed.

Sending Transaction from Ledger Nano S :

Open the XinFin Ledger App and make sure companion app is installed. Use the following code in terminal

>js-companion -t

? Please enter index of public key 0

? gasPrice(gwei) : 10

? gasLimit : 21000

? Receipient xdcdc2c4b448b87d6755174096306cd47c47cc552f2

? Amount(XDC) : 1

Review and Confirm Transaction in Ledger Device

The device will display the following information regarding the transaction :

Amount.

Address of Recipient.

Max Fee.

Verify the details and press both buttons to “Accept and Send” the transaction or “Reject” the transaction.

If the Transaction is accepted, the transaction is Broadcasted. The transaction hash will be displayed on the console.

{

blockHash: '0xde0f6d7bef6021223b0912ed16c6d810fba866120eab05fcf95ab42539c2eb30',

blockNumber: 13838667,

contractAddress: null,

cumulativeGasUsed: 21000,

from: 'xdc2a40fac3d69370c88b3c9c03df428f23fb3149d9',

gasUsed: 21000,

logs: [],

logsBloom: '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',

status: true,

to: 'xdcdc2c4b448b87d6755174096306cd47c47cc552f2',

transactionHash: '0x91e9067db5e23f0ccaa7933b08eae0bcd7278163589daceec9c080c7d185ad9c',

transactionIndex: 0

}

Final Notes :

If you encounter any problems or have any queries regarding the XinFin app or companion app, please join the Telegram Group and let us know.

Useful link:

Steps to Setup Masternode on XinFin MainNet

XinFin Mobile Wallet

XinFin Web Wallet

Steps to resign master node

Step by step guide to issue your own token on the XinFin network

Step by step guide to swap token on XinFin network

Guide to setup node with one click installer

Follow XinFin on:

Twitter | LinkedIn | Telegram | Reddit | YouTube | Github | Facebook