|
1 |
| -# CLI-TOOLS |
| 1 | +# CLI-Tools |
2 | 2 |
|
3 |
| -Set of CLI tools to run as Batch jobs on phase-1 main net |
| 3 | +Set of CLI tool which are used for different purposes: |
| 4 | +- processing unbonding requests |
| 5 | +- building test staking/unbonding/withdraw phase-1 Bitcoin transactions |
| 6 | +- building Bitcon transactions timestamping files |
| 7 | + |
| 8 | +See [deployment guide](/docs/commands.md) to review all available commands. |
| 9 | + |
| 10 | +### Installation |
| 11 | + |
| 12 | +#### Prerequisites |
| 13 | + |
| 14 | +This project requires Go version 1.21 or later. |
| 15 | + |
| 16 | +Install Go by following the instructions on the official Go installation [guide](https://go.dev/doc/install). |
| 17 | + |
| 18 | +#### Download the code |
| 19 | + |
| 20 | +To get started, clone the repository to your local machine from GitHub; please |
| 21 | +use the version according to the phase-1 system guidelines -- |
| 22 | +you can find all versions in the official |
| 23 | +[releases](https://github.com/babylonchain/cli-tools/releases) page. |
| 24 | + |
| 25 | +```shell |
| 26 | +git clone https://github.com/babylonchain/cli-tools.git |
| 27 | +cd cli-tools |
| 28 | +git checkout <release-tag> |
| 29 | +``` |
| 30 | + |
| 31 | +#### Build and install the binary |
| 32 | + |
| 33 | +At the top-level directory of the project |
| 34 | + |
| 35 | +```shell |
| 36 | +make install |
| 37 | +``` |
| 38 | + |
| 39 | +The above command will build and install the `cli-tools` binary to |
| 40 | +`$GOPATH/bin`. |
| 41 | + |
| 42 | +If your shell cannot find the installed binaries, make sure `$GOPATH/bin` is in |
| 43 | +the `$PATH` of your shell. The following updates to `$PATH` can be performed to |
| 44 | +this direction: |
| 45 | + |
| 46 | +```shell |
| 47 | +export PATH=$HOME/go/bin:$PATH |
| 48 | +echo 'export PATH=$HOME/go/bin:$PATH' >> ~/.profile |
| 49 | +``` |
| 50 | + |
| 51 | +### Usage |
| 52 | + |
| 53 | +To see all available commands: |
| 54 | + |
| 55 | +```shell |
| 56 | +cli-tools --help |
| 57 | +``` |
| 58 | + |
| 59 | +Example output: |
| 60 | + |
| 61 | +```shell |
| 62 | +Set of cli tools used in phase-1 |
| 63 | + |
| 64 | +Usage: |
| 65 | + cli-tools [command] |
| 66 | + |
| 67 | +Available Commands: |
| 68 | + completion Generate the autocompletion script for the specified shell |
| 69 | + create-phase1-staking-tx create phase1 staking tx |
| 70 | + create-phase1-unbonding-request create phase1 unbonding tx |
| 71 | + create-phase1-withdaw-request create phase1 withdraw tx |
| 72 | + create-timestamp-transaction Creates a timestamp btc transaction by hashing the file input. |
| 73 | + dump-cfg dumps default confiiguration file |
| 74 | + help Help about any command |
| 75 | + process-failed-transactions tries to re-send unbonding transactions that failed to be sent to the network |
| 76 | + run-unbonding-pipeline runs unbonding pipeline |
| 77 | + |
| 78 | +Flags: |
| 79 | + --config string path to the directory with configuration file |
| 80 | + -h, --help help for cli-tools |
| 81 | + --params string path to the global params file |
| 82 | + |
| 83 | +Use "cli-tools [command] --help" for more information about a command. |
| 84 | +``` |
0 commit comments