Importing your Private Key to an Eximchain Node

In order to view your Eximchain account addresses and balance you need to be running a synced node locally.

Sync an Eximchain Node

Needs synced node running locally!

In order to import your address you need a synced node running locally before you begin. The address import will not work if you have not run the instructions above.

Exim is a fork of Geth/Quorum, their command line interfaces are very similar. A command line interface (CLI), a compiled binary, program, and client for running a full Eximchain node implemented in Go.

Import your Address

Open a new terminal at the same directory and follow the steps below depending on your platform. After you import your file we will check if it has been imported properly, as well as your account balance.

The following instructions will be shown using default settings. Note that if you modified the default data directory or store keys and chain data other than the default, you will have to set to match the file structure you chose to initiate your eximchain node using the "--datadir" subcommand.

For Windows:

  • Open Notepad
  • Paste key into notepad without any extra characters or quotations
  • Save the file as key.txt at C:\
  • Run the command
$ exim account import C:\key.txt
  • After successful import, delete the file at C:\key.txt

For Mac:

  • Open TextEdit
  • Paste key into TextEdit without any extra characters or quotations
  • Save the file as key.txt to your Desktop
  • Open Terminal, run command:
$ exim account import ~/Desktop/key.txt
  • After successful import, delete the file on your desktop.

For Linux:

  • Open text editor
  • Paste key into TextEdit without any extra characters or quotations
  • Save the file as key.txt to your home directory
  • Open Terminal, run command:
$ exim account import ~/key.txt
  • After successful import, delete the file on your desktop.

You will be prompted to enter a passphrase. This is required for decrypting your private key associated with your Eximchain address, as it allows you to use it later on for signing transactions on the blockchain. Note it down somewhere, since we will need it later.

Verify that the generated address matches the address you expected to be imported.

 

Checking your account balance

Open another terminal window in the same directory. Let's make sure the account balance matches what you would expect. Connect to the Eximchain network using the “exim attach” cmd in another terminal while your blockchain node is still running.

$ exim attach

Now that you are connected you can query the blockchain with the following commands

eth.accounts: to check your currently available accounts

eth.syncing: to make sure our state, DB is fully up to date with rest of the network to ensure the getBalance response will be based on the latest state

eth.getBalance(“<your address>”): to query the DB. 

When you input eth.accounts you should be able to see you the address of the key you imported. You can detach from the network by inputing "exit". And you can reattach by rerunning the command above.

 

Security

When importing your private key into an Eximchain node or wallet, you are NOT publishing your keystore file anywhere on the internet or the blockchain. All this import does is put your key in a specific folder so that the node or client can sign transactions on your behalf. If you are using a keystore file, your key will remain encrypted throughout. You will be asked for this password to sign transactions.

Learn how to connect to your synced Eximchain node to our wallet app here.

Was this article helpful?
0 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.