BLOC-service

command line arguments

Start bloc-service with a configuration file so you do not have to remember all the command line arguments. Almost all of the bloc service command line arguments can be defined through the configuration file. This is the first step to do if you wish to use the bloc-service  JSON API. You can also generate a configuration file using this page.

BLOC-service command line arguments

Generate a configuration file and to start BLOC-service

BLOC-service can accept settings through a configuration file and/or command line using command line arguments. Once started with the correct configuration you will be able to use the BLOC-service RPC Wallet JSON API.

Download the file, place it next to BLOC-service and start it like this:

./BLOC-service --config-file=myconf.conf

Note: We are not saving any logs/requests on this website. Only you see the outputs.




{API}
BLOC - DAEMON

BLOC integration

Make sure you follow this instructions before getting started with BLOC

BLOC integration process may differes from other cryptocurrencies. Firstly, the coin has three separate binaries:

 

 

We also support the following official client bindings:

 

 

Please click on each of the service you would like to use to see how does it work and how to implement BLOC into your application and/or website.



{API}
BLOC - DAEMON

Getting started

Use the form below to test the integration of the BLOC-service API into your application. Make sure you have filled the connexion details at the top of this page.

This section describes BLOC-service starting process with correct arguments enabling access to the BLOC-service JSON RPC API.

 

To configure BLOC-service RPC Wallet you can use both command line and config file. Config file allows you to configure your settings only once and use --config option further.

 

Almost all of the command line options can be defined through the configuration file. If a parameter is defined in the config and was also indicated in the command line, two behaviors are possible:

 

  • If the parameter accepts one value only (e.g., --bind-address), the command line value will be used, since it has a higher priority
  • If the parameter accepts several values, then command line and configuration file values will be merged
  • If some of the options are not defined in the config, the default values will be applied

 

Notes:

 

  • Config files, where used, now use JSON formatted files instead of INI
  • Config files will be automatically upgraded to JSON and overwritten on first use
  • Config file's path is relative to current working directory, not server root.
  • Options --container-file and --container-password should ALWAYS be set (in either command line or config file mode).
  • --container-file and --log-file options are relative to --server-root. server-root default is the current working directory.

 

To start using BLOC-service you must first create a new wallet by generating a container. Container file is the only file that stores all data required to run your service. It contains user addresses and private keys required to operate them. Make sure to backup this file regularly.

 

You can also restore a wallet using private keys with the --view-key and --spend-key argument or using a 25 words phrase --mnemonic-seed.

 

A complete guide is available on this page of how to restore your wallet with BLOC-service.

 

Once you have generated your wallet you can now connect BLOC-service to a local or remote BLOCd Daemon. You can do this using the --daemon-address and --daemon-port arguments.

 

We are going to describe on this page how to generate your own config file, and start BLOC-service using it:

 

  • Windows: BLOC-service.exe --config-file=mywallet.conf

  • Mac and Linux : ./BLOC-service --config-file=mywallet.conf

You are now ready to use the bloc-service JSON RPC API to create addresses for your users, accept, send transactions and much more. Detailed description for every BLOC-service RPC Wallet API method can be found as follow:



Implementation Notes

--help

  • Display the help message and configuration settings.

Example

./BLOC-service --help

ScreenShot


Implementation Notes

-c, --config <file>

  • Specify a configuration file to start BLOC-service. This is much more simple to use if you have a particular configuration and you do not want to type all the arguments while launching BLOC-service.

Example

./BLOC-service --config=myconf.conf


Implementation Notes

--version output BLOC-service software version information

Example

./bloc-service --version

ScreenShot


Implementation Notes

--daemon-address is the daemon host to use for node operations 

Remote connection allows you to bind your BLOC-service RPC Wallet to a remote BLOC daemon BLOCd. Such type of connection allows you to start BLOC-service RPC Wallet without having to download the blockchain. Your wallet will be instantly synchronised. Always make sure that you trust the remote connection you are connecting to.

  • For local daemons use localhost or 127.0.0.1 as an IP address.
  • For remote daemons specify the remote daemon IP address.
  • (default: 127.0.0.1)

Example

./bloc-service --container-file=mycontainer --container-password=mypassword --daemon-address=IP.OF.YOUR.DAEMON --daemon-port=2086 --bind-address=0.0.0.0 --bind-port=8070 --rpc-password=RPCpassword

ScreenShot


Implementation Notes

--daemon-port is the daemon RPC port to use for node operations

Remote connection allows you to bind your BLOC-service RPC Wallet to a remote BLOC daemon BLOCd. Such type of connection allows you to start BLOC-service RPC Wallet without having to download the blockchain. Your wallet will be instantly synchronised. Always make sure that you trust the remote connection you are connecting to.

  • Default BLOC daemon port is 2086 (for RPC calls).
  • Connecting to remote nodes might require extra nodes fees while sending transaction. You will get a message while connecting to remote nodes showing the fees in use.

Example

./bloc-service --container-file=mycontainer --container-password=mypassword --daemon-address=IP.OF.YOUR.DAEMON --daemon-port=2086 --bind-address=0.0.0.0 --bind-port=8070 --rpc-password=RPCpassword

ScreenShot


Implementation Notes

--bind-address <IP>

  • Interface for BLOC-service RPC
  • Started by default on 127.0.0.1 when running either you specified it ./BLOC-service --config=myconf.conf
  • If you want to use local only : 127.0.0.1
  • if you want to open to public : 0.0.0.0
  • More details about the JSON BLOC-service API

Example

./BLOC-service --bind-address=127.0.0.1 --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword


Implementation Notes

--bind-port <port>

Example

./BLOC-service --bind-port=8071 --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword


Implementation Notes

--rpc-password <password>

  • Specify the <password> to access the BLOC-service RPC server.

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword


Implementation Notes

--rpc-legacy-security

  • Enable legacy mode (no password for RPC).
  • WARNING: INSECURE. USE ONLY AS A LAST RESORT.

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --rpc-legacy-security


Implementation Notes

-w, --container-file <file>

  • Container file is the only file that stores all data required to run your bloc-service. It contains user addresses and private keys required to operate them.
  • This function works only coupled with --container-password and --generate-container
  • mycontainer is the container file name and a path to it (relative or absolute); path is optional in this argument, specifying only a container's name will result in new file located in the same folder as bloc-service RPC wallet

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --generate-container

ScreenShot


Implementation Notes

-p, --container-password <password>

  • Container password file is the only file that stores all data required to run your bloc-service. It contains user addresses and private keys required to operate them.
  • This function works only combined with --container-file and --generate-container
  • mypassword is a secret password for the new wallet file. Whichever you like.

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --generate-container

ScreenShot


Implementation Notes

--generate-container

To start using BLOC-service you must first generate a container. Container file is the only file that stores all data required to run your service. It contains user addresses and private keys required to operate them. Make sure to backup this file regularly

  • Generate a new container file with one wallet and exit.
  • This function works only cmobined with --container-file and --container-password
  • --generate-container option tells bloc-service to generate container file and exit.
  • If the operation was successful you will get a corresponding message with your new BLOC address.
  • At the same time BLOC-service will save your container on the local disk (in the same folder where bloc-service is located) and shut down.

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --generate-container

ScreenShot


Implementation Notes

--address

  • Start BLOC-service to display the 1st wallet address in the container and exit

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword --address

ScreenShot


Implementation Notes

--log-level #

  • Specify another log file than the original one created by BLOC-service with a level 2
  • There is 5 different level. The higher you choose, the more details you get.
  • Log level must be 0...5

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword --log-level=5

ScreenShot


Implementation Notes

--log-file <file>

  • Specify another log file than the original one created by BLOC-service
  • Default: (service.log)
  • The specified log file will be created in the same folder where BLOC-service was started

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword --log-file=testme.log

ScreenShot


Implementation Notes

--SYNC_FROM_ZERO

Force the wallet to sync from 0.

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword --SYNC_FROM_ZERO

ScreenShot


Implementation Notes

--enable-cors <domain>

  • Adds header 'Access-Control-Allow-Origin' to the RPC responses using the <domain>
  • Uses the value specified as the domain
  • Use * for all.

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword --enable-cors=*

ScreenShot


Implementation Notes

--scan-height #

  • The height to begin scanning for transactions at. This can greatly speed up wallet syncing time.
  • Default is 0

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --rpc-password=RPCpassword --scan-height=1000

ScreenShot


Implementation Notes

--server-root <path>

  • it is a common practice for daemons to set server root directory.
  • Server root is the directory where BLOC-service RPC Wallet stores all its files.
  • All relative paths in BLOC-service RPC Wallet configuration are relative to the server root directory.

Example

--server-root


Implementation Notes

--dump-config

  • Prints the current configuration of BLOC-service to the screen.

Example

./BLOC-service --dump-config


Implementation Notes

--save-config <file>

  • Save the configuration to the specified file

Example

./BLOC-service --save-config


Implementation Notes

--view-key <key>

  • Generate a wallet container with this secret view <key>

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --view-key=myviewkey --spend-key=myspendkey --generate-container


Implementation Notes

--spend-key <key>

  • Generate a wallet container with this secret spend <key>

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --view-key=myviewkey --spend-key=myspendkey --generate-container


Implementation Notes

--mnemonic-seed <seed>

  • Generate a wallet container with this Mnemonic <seed>

Example

./BLOC-service --container-file=mycontainer --container-password=mypassword --mnemonic-seed="your-mnemonic-seed" --generate-container