Using Blackcoin From The Command Line

Using Blackcoin From The Command Line

Using Blackcoin from the command line is not that difficult, but it will take practice, and an understanding of some fundamental tools.

.bashrc

The first trick is to put blackmore-cli in your .bashrc file with an alias blkc.

If you don't already know about it, learn about .bashrc here.

Here's two concrete use cases:

  1. You just don't want to type out /location/to/blackmore-cli <command> every time. Simple.
  2. If you use a non-default datadir with cookie authentication, you need to run the blackmore-cli command with the -datadir=<location>... it would be insane to type that every time...
    You might do this if your systemd blackmore.service uses ProtectHome=true, for example. Learn more
    In this case your alias should look something like this: alias 'blkc=/usr/local/bin/blackmore-cli -datadir=/var/lib/.blackmore/'

jq

Next you should learn to use jq!

blackmore-cli and blackmored communicate with json formatted data, so to work with that data you will need to parse it in order to pass it into your scripts.

Scripts

You might want to copy and understand these simple scripts for Blackcoin. Play with each line in your command line and get a feel for how the data is constructed and used.

If you can use jq and write simple bash scripts you should be able to figure out pretty much anything you like with blackmore-cli help and a bit of experimentation.

Full Tutorial

This awesome Tutorial for Bitcoin, with exception for the Lightning and Segwit stuff, can be easily adapted to Blackcoin. It offers a step by step guide to take you from novice to advanced user!


Need Help?

BlackcoinNL supported chatrooms:

Other commonly used Blackcoin Social Media: