Package: icxcli
ICON CLI toolICON supports Command Line Interface(CLI interface) for 3rd party or user services development. With this single tool, you can control all ICON functions and automate them using scripts.PrerequisiteVersionGlossaryTechnical informationGetting startedInstallationRun CLIConsole instructionsWallet operationCreate wallet fileShow wallet informationList up all assets in current walletTransfer the value to the specific address with the fee.PrerequisiteYou need Python 3.6 or later to run icxcli. You can have multiple Python versions (2.x and 3.x) installed on the same system without problems.On macOS(Sierra and after) and Ubuntu 16.04, for example, the necessary packages are:automakepkg-configvirtualenvautoconflibtoolIn Ubuntu 16.04, you can install Python 3.6.$ sudo add-apt-repository ppa:jonathonf/python-3.6
$ sudo apt update
$ sudo apt install python3.6
$ sudo apt install python3.6-dev
$ sudo apt install virtualenv
$ virtualenv -p python3.6 .venvYou can install pip3 for python 3.6 like this:$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python3.6 get-pip.pyYou can install autoconf, libtool and automake for python3.6.$ sudo apt install autoconf libtool automakeVersion0.0.4GlossaryAddress of wallet: Unique string to identify the address to transfer value. It prefixed with 'hx'.Private key: A tiny bit of code that is paired with a public key to set off algorithms to encrypt and decrypt a text for the specific address.Public key: Long alphanumeric characters that is used to encrypt data (message).Technical informationPrivate key, public key and wallet addressThere are five steps to get from  private->public -> address:Generate a private key.Derive a public key from the private key.H1 = sha3_256( Public key)  => 32 byteBitAddress = last 20 bytes of H1Address = hx || HexString(BitAddress)
ex) hxaa688d74eb5f98b577883ca203535d2aa4f0838cTested platformWe tested on window and macOS. If you find some problems on window, please send the report of the problems.Getting startedInstallationThe easiest way to install icxcli* is to use pip:$ pip install icxclior, if you are not installing in a virtualenv:$ sudo pip install icxcliIf you have the aws-cli installed and want to upgrade to the latest version you can run:$ pip install --upgrade icxcliRun CLIRun command icli in the command line.  There are many sub commands like wallet create, wallet show, asset list, transfer for ICX service. You can get the help page by adding the command help.$ icli  --help
usage:
        Normal commands:
            version
            help

        Wallet Commands:

            wallet create <file path> -p <password>
            wallet show <file path> -p <password>    | -n <network : mainnet | testnet | IP or domain>
            asset list <file path> -p <password>     | -n <network : mainnet | testnet | IP or domain>
            transfer <to> <amount> <file path> -p <password> -f <fee=10000000000000000> | -n  <network : mainnet | testnet | IP or domain>

        WARNING:

            Fee feature is the experimental feature; fee is fixed to 10000000000000000 loop for now so if you
            try to make a transaction with the modified fee, which is not 10000000000000000 loop, then you would
            not be able to make the transaction. you will be notified
            when it is possible to make a transaction with the modified fee.

        IF YOU MISS -n, icli WILL USE TESTNET.


positional arguments:
  command           wallet create, wallet show, asset list, transfer

optional arguments:
  -h, --help		show this help message and exit
  -p PASSWORD		password
  -f FEE		transaction fee
  -n NETWORK		mainnet or testnet or other IP or domainConsole instructionsCommandFunction descriptionversionShows the current software version.helpShows Help menuWallet operationCommandFunction descriptionwallet create <file path> -p <password>Create a wallet file.wallet show <file path> -p <password> -n <network>Show current wallet information.asset list <file path> -p <password> -n <network>Enumerate the asset in the wallet. (ICX, ICX token)transfer <to> <amount> <file path> -p <password> -f <fee> -n <network>Transfer the value to the specific address with the fee.WARNINGFee feature is the experimental feature;fee is fixed to 10000000000000000 loop for nowso if you try to make a transaction with the modified fee, which is not 10000000000000000 loop, then you would not be able to make the transaction. you will be notified when it is possible to make a transaction with the modified fee.Create wallet file$ icli wallet create <file path> -p <password>Create a wallet file with given wallet name, password and file path.Argumentsfile path : File path for the keystore file of the wallet.password: Password including alphabet character, number, and  special character. If the user doesn’t give password with -p, then CLI will show the prompt and user need to type the password.OutputSuccessful caseReturn 0 : Succeed to generate the keystore file for the wallet.Error casesicliwill return following error code and message.Return 121: The file path is without a file name.Return 122: The file path is wrong.Return 123: The password is wrong.Return 124: The keystore file has already existed.Return 136: User doesn't have a permission to write the file.Show wallet information$ icli wallet show <file path> -p <password> -n <network>Show wallet information.Argumentsfile path: File path for the keystore file of the wallet.password: Password including alphabet character, number, and  special character. If the user doesn’t give password with -p, then CLI will show the prompt and user need to type the password.network: 'testnet' or 'mainnet' or other IP or domain address.OutputShows the all information of wallet.Wallet addressCurrent balanceKeystore file contentsSuccessful caseReturn 0 : Print out wallet information including asset list.Error casesReturn 122: The file path is wrong.Return 123: The password is wrong.Return 126: The network is invalid.Return 133: The file is not a key store file.List up all assets in current wallet$ icli asset list <file path> -p <password> -n <network>Enumerate the list of all the assets of the wallet.Argumentsfile path : File path for the keystore file of the wallet.password: Password including alphabet character, number, and  special character. If the user doesn’t give password with -p, then CLI will show the prompt and user need to type the password.network: 'testnet' or 'mainnet' or other IP or domain address.OutputList of all assets in current wallet.Successful caseReturn 0 : Succeed to display.Error casesReturn 122: The file path is wrong.Return 123: The password is wrong.Return 126: The network is invalid.Return 133: The file is not a key store file.Transfer the value to the specific address with the fee.$ icli transfer <to> <amount> <file path> -p <password> -f <fee> -n <network>Transfer the value from  A address to B address with the fee.Argumentsto: Address of wallet to receive the asset.file path : File path for the keystore file of the wallet.password:  Password including alphabet character, number, and  special character. If the user doesn’t give password with -p, then CLI will show the prompt and user need to type the password.amount : Amount of money. (Unit:loop)fee : Transfer fee (Unit:loop)YOU SHOULD CHANGE BOTH THE UNIT OF AMOUNT AND FEE TO LOOP, ENTERING INTEGER VALUES FOR AMOUNT AND FEE NOT FLOATING NUMBERS.Unit: loopEx) 1 icx = 1018loopnetwork: 'testnet' or 'mainnet' or other IP or domain address.OutputSuccessful caseReturn 0 : Succeed to transferError casesicliwill return following error code and message.Return 122: The file path is wrong.Return 123: The password is wrong.Return 126: The network is invalid.Return 127: The wallet doesn't have enough balance.Return 128: The fee is invalid.Return 130: The wallet address is wrong.Return 133: The file is not a key store file.Return 135: The amount is not integer values.