From 46d8b4ed8fdfd9ac8a4d5dd9e685e8885161a030 Mon Sep 17 00:00:00 2001 From: Shusetsu Toda Date: Wed, 12 Sep 2018 16:44:00 +0200 Subject: [PATCH 1/7] :books: Update readme for 2.0 --- README.md | 136 +++++++++++++------------------- docs/account.md | 87 +++++++++++++++++++++ docs/block.md | 30 +++++++ docs/config.md | 52 +++++++++++++ docs/copyright.md | 26 +++++++ docs/delegate.md | 30 +++++++ docs/help.md | 20 +++++ docs/message.md | 189 +++++++++++++++++++++++++++++++++++++++++++++ docs/node.md | 68 ++++++++++++++++ docs/passphrase.md | 104 +++++++++++++++++++++++++ docs/warranty.md | 26 +++++++ 11 files changed, 685 insertions(+), 83 deletions(-) create mode 100644 docs/account.md create mode 100644 docs/block.md create mode 100644 docs/config.md create mode 100644 docs/copyright.md create mode 100644 docs/delegate.md create mode 100644 docs/help.md create mode 100644 docs/message.md create mode 100644 docs/node.md create mode 100644 docs/passphrase.md create mode 100644 docs/warranty.md diff --git a/README.md b/README.md index b10d6e64..97fc2cd0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Lisk Commander allows you to communicate with a remote or local node and carry o ## Prerequisites -Lisk Commander requires [Node.js](https://nodejs.org/) as the underlying engine for code execution. Node.js is supported on most operating systems. Follow the instructions for your operating system on the [Node.js downloads page](https://nodejs.org/en/download/). We currently require Node.js versions between 6.12 and 6.14 (inclusive). NPM is automatically installed along with Node.js. +Lisk Commander requires [Node.js](https://nodejs.org/) as the underlying engine for code execution. Node.js is supported on most operating systems. Follow the instructions for your operating system on the [Node.js downloads page](https://nodejs.org/en/download/). We currently require Node.js versions above 8.3. NPM is automatically installed along with Node.js. ## Installation @@ -19,7 +19,7 @@ Lisk Commander requires [Node.js](https://nodejs.org/) as the underlying engine $ npm install --global --production lisk-commander ``` -Upon successful completion, NPM will add the `lisk-commander` executable to your PATH. +Upon successful completion, NPM will add the `lisk-commander` executable `lisk` to your PATH. ### From Source @@ -39,7 +39,7 @@ npm run build #### Adding the Lisk Commander executable to your PATH -WARNING: If you have installed Lisk Commander globally via NPM (see [Install Lisk Commander via NPM](docs:lisk-commander-installation-npm)), following the instructions in this section is not recommended as they will introduce conflicts. +WARNING: If you have installed Lisk Commander globally via NPM (see [Install Lisk Commander via NPM](https://lisk.io/documentation/lisk-commander/setup)), following the instructions in this section is not recommended as they will introduce conflicts. If you would like to add the `lisk` executable to your PATH you have two options: option 1 will install the current state of the code you are installing globally, while option 2 will only link to the code and therefore automatically reflect changes you make going forward. @@ -65,79 +65,66 @@ This will also add `lisk` to your PATH, but you won't have to repeat the process ## Usage -### Interactive use - -To run commands interactively: - -```sh -$ lisk - _ _ _ _____ _ -| | (_) | | / ____| | | -| | _ ___| | __ | | ___ _ __ ___ _ __ ___ __ _ _ __ __| | ___ _ __ -| | | / __| |/ / | | / _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` |/ _ \ '__| -| |____| \__ \ < | |___| (_) | | | | | | | | | | | (_| | | | | (_| | __/ | -|______|_|___/_|\_\ \_____\___/|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|\___|_| - -Running v1.0.0. -Type `help` to get started. - -lisk> help - - Commands: - - help [command...] Provides help for a given command. - exit Exits Lisk Commander. - env Print environmental configuration. - get [options] Get information from with parameter . - Types available: account, address, block, delegate, transaction - E.g. get delegate lightcurve - e.g. get block 5510510593472232540 - list [options] Get information from with parameters . - Types available: accounts, addresses, blocks, delegates, transactions - E.g. list delegates lightcurve tosch - E.g. list blocks 5510510593472232540 16450842638530591789 - set Set configuration to . Configuration is - persisted in `~/.lisk-commander/config.json`. -lisk> + + +```sh-session +$ lisk COMMAND +running command... +$ lisk (-v|--version|version) +lisk-commander/2.0.0 darwin-x64 node-v8.11.3 +$ lisk --help [COMMAND] +A command line interface for Lisk + +VERSION + lisk-commander/2.0.0 darwin-x64 node-v10.6.0 + +USAGE + $ lisk [COMMAND] + +COMMANDS + account Commands relating to Lisk accounts. + block Commands relating to Lisk blocks. + config Manages Lisk Commander configuration. + copyright Displays copyright notice. + delegate Commands relating to Lisk delegates. + help Displays help. + message Commands relating to user messages. + node Commands relating to Lisk node. + passphrase Commands relating to Lisk passphrases. + signature Commands relating to signatures for Lisk transactions from multisignature accounts. + transaction Commands relating to Lisk transactions. + warranty Displays warranty notice. ``` -### Non-interactive use + -To run commands and options directly from the command line: +## Commands -```sh -$ lisk get delegate lightcurve --json -``` - -## Settings + -Configuration is stored in a config file placed in the user's home directory (run `help set` to see the exact location). If this is unavailable a default configuration is used. The following settings can be updated (and will be persisted if possible): +* [`lisk account`](docs/account.md) - Commands relating to Lisk accounts. +* [`lisk block`](docs/block.md) - Commands relating to Lisk blocks. +* [`lisk config`](docs/config.md) - Manages Lisk Commander configuration. +* [`lisk copyright`](docs/copyright.md) - Displays copyright notice. +* [`lisk delegate`](docs/delegate.md) - Commands relating to Lisk delegates. +* [`lisk help`](docs/help.md) - Displays help. +* [`lisk message`](docs/message.md) - Commands relating to user messages. +* [`lisk node`](docs/node.md) - Commands relating to Lisk node. +* [`lisk passphrase`](docs/passphrase.md) - Commands relating to Lisk passphrases. +* [`lisk warranty`](docs/warranty.md) - Displays warranty notice. -| Command | Description | -| -------------------------------------------------------------------------- | ----------------------------------------------------------- | -| set name lisk | Sets name to be displayed. | -| set delimiter lisk | Sets delimiter in interactive mode. | -| set json true|false | Sets default to JSON output (true) or text output (false). | -| set pretty true|false | Sets default to formatted output when JSON output is used. | -| set api.network main|test|beta | Sets API target to the specified network. | -| set api.nodes http://localhost:4000 http://192.168.178.1:4001 | Override api.network and set specific nodes communicate to. | + ## Documentation Further information can be found on our documentation site: -* [Introduction](https://docs.lisk.io/v1.3/docs/lisk-commander-introduction) -* [Pre-Installation](https://docs.lisk.io/v1.3/docs/lisk-commander-pre-installation) -* [Installation](https://docs.lisk.io/v1.3/docs/lisk-commander-installation) - * [Install-from-NPM](https://docs.lisk.io/v1.3/docs/lisk-commander-installation-npm) - * [Install-from-Source](https://docs.lisk.io/v1.3/docs/lisk-commander-installation-source) -* [Upgrading](https://docs.lisk.io/v1.3/docs/lisk-commander-upgrading) - * [Upgrading-from-NPM](https://docs.lisk.io/v1.3/docs/lisk-commander-upgrading-npm) - * [Upgrading-from-Source](https://docs.lisk.io/v1.3/docs/lisk-commander-upgrading-source) -* [Usage](https://docs.lisk.io/v1.3/docs/lisk-commander-usage) - * [Configuration](https://docs.lisk.io/v1.3/docs/lisk-commander-usage-configuration) - * [Usage](https://docs.lisk.io/v1.3/docs/lisk-commander-usage-interactive-and-noninteractive) - * [Commands](https://docs.lisk.io/v1.3/docs/lisk-commander-usage-commands) +* [Introduction](https://lisk.io/documentation/lisk-commander) +* [Setup](https://lisk.io/documentation/lisk-commander/setup) +* [Upgrade](https://lisk.io/documentation/lisk-commander/upgrade) +* [User Guide](https://lisk.io/documentation/lisk-commander/user-guide) + * [Sensitive Inputs](https://lisk.io/documentation/lisk-commander/user-guide/sensitive-inputs) + * [Commands](https://lisk.io/documentation/lisk-commander/user-guide/commands) ## Get Involved @@ -155,27 +142,10 @@ $ npm test ## FAQ -### Why won’t Lisk Commander start with my version of Node.js? - -> You try to run Lisk Commander and it tells you `ERROR: Requires Node.js version 6.14.1, but was started with version 8.11.1.` - -Because of the sensitive nature of Lisk Commander’s functionality, we want to make absolutely sure that when our users are using Lisk Commander it behaves as expected. Currently we only perform substantial tests with a single version of Node.js, so we require our users to use that specific version to avoid unforeseen behavior discrepancies. - -In the future we would like to support a wider range of Node.js versions, but until then we recommend using a Node.js version manager, such as [nvm][], to make it easy to switch between different Node.js versions. - -### Why do I get an error regarding a config lockfile? - -> You try to run Lisk Commander and it tells you `Config lockfile at ~/.lisk-commander/config.lock found. Are you running Lisk Commander in another process?` - -When you start Lisk Commander, either in interactive or non-interactive-mode, we create a lockfile to prevent you from making changes to your configuration file. If for some reason either Lisk Commander or your computer crashes, this lockfile might not be removed, and Lisk Commander will prevent you from starting a new instance even though no Lisk Commander instance is currently running. In this case it’s safe to remove the lockfile. - -The lockfile is located in your Lisk Commander configuration directory. The error message above will give you the location of the file if you want to remove if manually, or you can run `lisk clean` and Lisk Commander will remove it for you. - ### Something else went wrong. What should I do? 1. Make sure you’re on the network you intend to be on. -1. Exit Lisk Commander (if in interactive mode) and restart. -1. Remove the configuration file (`config.json`) located in your Lisk Commander configuration directory (`~/.lisk-commander` by default). When you restart Lisk Commander the default configuration will be recreated. +1. Remove the configuration file (`config.json`) located in your Lisk Commander configuration directory (`~/.lisk` by default). When you restart Lisk Commander the default configuration will be recreated. 1. Get in contact on [Lisk Chat][] or [Gitter][]. 1. If it seems like a bug, open an issue on [GitHub][bugs]. See the [Contribution Guidelines]. diff --git a/docs/account.md b/docs/account.md new file mode 100644 index 00000000..1e9782eb --- /dev/null +++ b/docs/account.md @@ -0,0 +1,87 @@ +# `lisk account` + +Commands relating to Lisk accounts. + +* [`lisk account:create`](#lisk-account-create) +* [`lisk account:get ADDRESSES`](#lisk-account-get-addresses) +* [`lisk account:show`](#lisk-account-show) + +## `lisk account:create` + +Returns a randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address. + +``` +USAGE + $ lisk account:create + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Returns a randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address. + +EXAMPLE + account:create +``` + +## `lisk account:get ADDRESSES` + +Gets account information from the blockchain. + +``` +USAGE + $ lisk account:get ADDRESSES + +ARGUMENTS + ADDRESSES Comma-separated address(es) to get information about. + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Gets account information from the blockchain. + +EXAMPLES + account:get 3520445367460290306L + account:get 3520445367460290306L,2802325248134221536L +``` + +## `lisk account:show` + +Shows account information for a given passphrase. + +``` +USAGE + $ lisk account:show + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Shows account information for a given passphrase. + +EXAMPLE + account:show +``` diff --git a/docs/block.md b/docs/block.md new file mode 100644 index 00000000..4ccfab48 --- /dev/null +++ b/docs/block.md @@ -0,0 +1,30 @@ +# `lisk block` + +Commands relating to Lisk blocks. + +* [`lisk block:get BLOCKIDS`](#lisk-block-get-blockids) + +## `lisk block:get BLOCKIDS` + +Gets block information from the blockchain. + +``` +USAGE + $ lisk block:get BLOCKIDS + +ARGUMENTS + BLOCKIDS Comma-separated block ID(s) to get information about. + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Gets block information from the blockchain. + +EXAMPLES + block:get 17108498772892203620 + block:get 17108498772892203620,8541428004955961162 +``` diff --git a/docs/config.md b/docs/config.md new file mode 100644 index 00000000..cbac3e1d --- /dev/null +++ b/docs/config.md @@ -0,0 +1,52 @@ +# `lisk config` + +Manages Lisk Commander configuration. + +* [`lisk config:set VARIABLE [VALUES]`](#lisk-config-set-variable-values) +* [`lisk config:show`](#lisk-config-show) + +## `lisk config:set VARIABLE [VALUES]` + +Sets configuration. + +``` +USAGE + $ lisk config:set VARIABLE [VALUES] + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Sets configuration. + ... + Variables available: api.nodes, api.network, json, pretty. + +EXAMPLES + config:set json true + config:set api.network main + config:set api.nodes https://127.0.0.1:4000,http://mynode.com:7000 +``` + +## `lisk config:show` + +Prints the current configuration. + +``` +USAGE + $ lisk config:show + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Prints the current configuration. + +EXAMPLE + config:show +``` diff --git a/docs/copyright.md b/docs/copyright.md new file mode 100644 index 00000000..93e1ef1c --- /dev/null +++ b/docs/copyright.md @@ -0,0 +1,26 @@ +# `lisk copyright` + +Displays copyright notice. + +* [`lisk copyright`](#lisk-copyright) + +## `lisk copyright` + +Displays copyright notice. + +``` +USAGE + $ lisk copyright + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Displays copyright notice. + +EXAMPLE + copyright +``` diff --git a/docs/delegate.md b/docs/delegate.md new file mode 100644 index 00000000..0ef995f7 --- /dev/null +++ b/docs/delegate.md @@ -0,0 +1,30 @@ +# `lisk delegate` + +Commands relating to Lisk delegates. + +* [`lisk delegate:get USERNAMES`](#lisk-delegate-get-usernames) + +## `lisk delegate:get USERNAMES` + +Gets delegate information from the blockchain. + +``` +USAGE + $ lisk delegate:get USERNAMES + +ARGUMENTS + USERNAMES Comma-separated username(s) to get information about. + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Gets delegate information from the blockchain. + +EXAMPLES + delegate:get lightcurve + delegate:get lightcurve,4miners.net +``` diff --git a/docs/help.md b/docs/help.md new file mode 100644 index 00000000..53335f8e --- /dev/null +++ b/docs/help.md @@ -0,0 +1,20 @@ +# `lisk help` + +Displays help. + +* [`lisk help [COMMAND]`](#lisk-help-command) + +## `lisk help [COMMAND]` + +display help for lisk + +``` +USAGE + $ lisk help [COMMAND] + +ARGUMENTS + COMMAND command to show help for + +OPTIONS + --all see all commands in CLI +``` diff --git a/docs/message.md b/docs/message.md new file mode 100644 index 00000000..ce934621 --- /dev/null +++ b/docs/message.md @@ -0,0 +1,189 @@ +# `lisk message` + +Commands relating to user messages. + +* [`lisk message:decrypt SENDERPUBLICKEY NONCE [MESSAGE]`](#lisk-message-decrypt-senderpublickey-nonce-message) +* [`lisk message:encrypt RECIPIENTPUBLICKEY [MESSAGE]`](#lisk-message-encrypt-recipientpublickey-message) +* [`lisk message:sign [MESSAGE]`](#lisk-message-sign-message) +* [`lisk message:verify PUBLICKEY SIGNATURE [MESSAGE]`](#lisk-message-verify-publickey-signature-message) + +## `lisk message:decrypt SENDERPUBLICKEY NONCE [MESSAGE]` + +Decrypts a previously encrypted message from a given sender public key for a known nonce using your secret passphrase. + +``` +USAGE + $ lisk message:decrypt SENDERPUBLICKEY NONCE [MESSAGE] + +ARGUMENTS + SENDERPUBLICKEY Public key of the sender of the message. + NONCE Nonce used during encryption. + MESSAGE Encrypted message. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -m, --message=message + Specifies a source for providing a message to the command. If a string is provided directly as an argument, this + option will be ignored. The message must be provided via an argument or via this option. Sources must be one of + `file` or `stdin`. In the case of `file`, a corresponding identifier must also be provided. + Note: if both secret passphrase and message are passed via stdin, the passphrase must be the first line. + Examples: + - --message=file:/path/to/my/message.txt + - --message=stdin + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Decrypts a previously encrypted message from a given sender public key for a known nonce using your secret passphrase. + +EXAMPLE + message:decrypt bba7e2e6a4639c431b68e31115a71ffefcb4e025a4d1656405dfdcd8384719e0 + 4b800d90d54eda4d093b5e4e6bf9ed203bc90e1560bd628d dcaa605af45a4107a699755237b4c08e1ef75036743d7e4814dea7 +``` + +## `lisk message:encrypt RECIPIENTPUBLICKEY [MESSAGE]` + +Encrypts a message for a given recipient public key using your secret passphrase. + +``` +USAGE + $ lisk message:encrypt RECIPIENTPUBLICKEY [MESSAGE] + +ARGUMENTS + RECIPIENTPUBLICKEY Public key of the recipient of the message. + MESSAGE Message to encrypt. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -m, --message=message + Specifies a source for providing a message to the command. If a string is provided directly as an argument, this + option will be ignored. The message must be provided via an argument or via this option. Sources must be one of + `file` or `stdin`. In the case of `file`, a corresponding identifier must also be provided. + Note: if both secret passphrase and message are passed via stdin, the passphrase must be the first line. + Examples: + - --message=file:/path/to/my/message.txt + - --message=stdin + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Encrypts a message for a given recipient public key using your secret passphrase. + +EXAMPLE + message:encrypt bba7e2e6a4639c431b68e31115a71ffefcb4e025a4d1656405dfdcd8384719e0 "Hello world" +``` + +## `lisk message:sign [MESSAGE]` + +Signs a message using your secret passphrase. + +``` +USAGE + $ lisk message:sign [MESSAGE] + +ARGUMENTS + MESSAGE Message to sign. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -m, --message=message + Specifies a source for providing a message to the command. If a string is provided directly as an argument, this + option will be ignored. The message must be provided via an argument or via this option. Sources must be one of + `file` or `stdin`. In the case of `file`, a corresponding identifier must also be provided. + Note: if both secret passphrase and message are passed via stdin, the passphrase must be the first line. + Examples: + - --message=file:/path/to/my/message.txt + - --message=stdin + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Signs a message using your secret passphrase. + +EXAMPLE + message:sign "Hello world" +``` + +## `lisk message:verify PUBLICKEY SIGNATURE [MESSAGE]` + +Verifies a signature for a message using the signer’s public key. + +``` +USAGE + $ lisk message:verify PUBLICKEY SIGNATURE [MESSAGE] + +ARGUMENTS + PUBLICKEY Public key of the signer of the message. + SIGNATURE Signature to verify. + MESSAGE Message to verify. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -m, --message=message + Specifies a source for providing a message to the command. If a string is provided directly as an argument, this + option will be ignored. The message must be provided via an argument or via this option. Sources must be one of + `file` or `stdin`. In the case of `file`, a corresponding identifier must also be provided. + Note: if both secret passphrase and message are passed via stdin, the passphrase must be the first line. + Examples: + - --message=file:/path/to/my/message.txt + - --message=stdin + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Verifies a signature for a message using the signer’s public key. + +EXAMPLE + message:verify 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6 + 2a3ca127efcf7b2bf62ac8c3b1f5acf6997cab62ba9fde3567d188edcbacbc5dc8177fb88d03a8691ce03348f569b121bca9e7a3c43bf5c056382f + 35ff843c09 "Hello world" +``` diff --git a/docs/node.md b/docs/node.md new file mode 100644 index 00000000..6b76e818 --- /dev/null +++ b/docs/node.md @@ -0,0 +1,68 @@ +# `lisk node` + +Commands relating to Lisk node. + +* [`lisk node:forging STATUS PUBLICKEY`](#lisk-node-forging-status-publickey) +* [`lisk node:get`](#lisk-node-get) + +## `lisk node:forging STATUS PUBLICKEY` + +Updates the forging status of a node. + +``` +USAGE + $ lisk node:forging STATUS PUBLICKEY + +ARGUMENTS + STATUS (enable|disable) Desired forging status. + PUBLICKEY Public key of the delegate whose status should be updated. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -w, --password=password + Specifies a source for your secret password. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --password=prompt (default behaviour) + - --password=pass:password123 (should only be used where security is not important) + - --password=env:PASSWORD + - --password=file:/path/to/my/password.txt (takes the first line only) + - --password=stdin (takes the first line only) + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Updates the forging status of a node. + +EXAMPLES + node:forging enable 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6 + node:forging disable 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6 +``` + +## `lisk node:get` + +Gets information about a node. + +``` +USAGE + $ lisk node:get + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + --all Additionally provides information about forging status. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Gets information about a node. + +EXAMPLES + node:get + node:get --all +``` diff --git a/docs/passphrase.md b/docs/passphrase.md new file mode 100644 index 00000000..77e4c355 --- /dev/null +++ b/docs/passphrase.md @@ -0,0 +1,104 @@ +# `lisk passphrase` + +Commands relating to Lisk passphrases. + +* [`lisk passphrase:decrypt [ENCRYPTEDPASSPHRASE]`](#lisk-passphrase-decrypt-encryptedpassphrase) +* [`lisk passphrase:encrypt`](#lisk-passphrase-encrypt) + +## `lisk passphrase:decrypt [ENCRYPTEDPASSPHRASE]` + +Decrypts your secret passphrase using the password which was provided at the time of encryption. + +``` +USAGE + $ lisk passphrase:decrypt [ENCRYPTEDPASSPHRASE] + +ARGUMENTS + ENCRYPTEDPASSPHRASE Encrypted passphrase to decrypt. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -w, --password=password + Specifies a source for your secret password. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --password=prompt (default behaviour) + - --password=pass:password123 (should only be used where security is not important) + - --password=env:PASSWORD + - --password=file:/path/to/my/password.txt (takes the first line only) + - --password=stdin (takes the first line only) + + --passphrase=passphrase + Specifies a source for providing an encrypted passphrase to the command. If a string is provided directly as an + argument, this option will be ignored. The encrypted passphrase must be provided via an argument or via this option. + Sources must be one of `file` or `stdin`. In the case of `file`, a corresponding identifier must also be provided. + + Note: if both an encrypted passphrase and the password are passed via stdin, the password must be the first line. + + Examples: + - --passphrase file:/path/to/my/encrypted_passphrase.txt (takes the first line only) + - --passphrase stdin (takes the first line only) + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Decrypts your secret passphrase using the password which was provided at the time of encryption. + +EXAMPLE + passphrase:decrypt + "iterations=1000000&cipherText=9b1c60&iv=5c8843f52ed3c0f2aa0086b0&salt=2240b7f1aa9c899894e528cf5b600e9c&tag=23c0111213 + 4317a63bcf3d41ea74e83b&version=1" +``` + +## `lisk passphrase:encrypt` + +Encrypts your secret passphrase under a password. + +``` +USAGE + $ lisk passphrase:encrypt + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + -w, --password=password + Specifies a source for your secret password. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --password=prompt (default behaviour) + - --password=pass:password123 (should only be used where security is not important) + - --password=env:PASSWORD + - --password=file:/path/to/my/password.txt (takes the first line only) + - --password=stdin (takes the first line only) + + --outputPublicKey + Includes the public key in the output. This option is provided for the convenience of node operators. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Encrypts your secret passphrase under a password. + +EXAMPLE + passphrase:encrypt +``` diff --git a/docs/warranty.md b/docs/warranty.md new file mode 100644 index 00000000..30302898 --- /dev/null +++ b/docs/warranty.md @@ -0,0 +1,26 @@ +# `lisk warranty` + +Displays warranty notice. + +* [`lisk warranty`](#lisk-warranty) + +## `lisk warranty` + +Displays warranty notice. + +``` +USAGE + $ lisk warranty + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Displays warranty notice. + +EXAMPLE + warranty +``` From 94cfaf15f834b402d67e22203d34a821b45f3650 Mon Sep 17 00:00:00 2001 From: Shusetsu Toda Date: Wed, 12 Sep 2018 18:08:58 +0200 Subject: [PATCH 2/7] :books: Remove non-interactive mode --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 97fc2cd0..8b4957de 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Lisk Commander -Lisk Commander allows you to communicate with a remote or local node and carry out Lisk-related functionality using an interactive or non-interactive command line tool. +Lisk Commander allows you to communicate with a remote or local node and carry out Lisk-related functionality. [![Build Status](https://jenkins.lisk.io/buildStatus/icon?job=lisk-commander/development)](https://jenkins.lisk.io/job/lisk-commander/job/development/) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) From a18b8a484e9b500b21cf65ec2d65a083ed2baee1 Mon Sep 17 00:00:00 2001 From: Shusetsu Toda Date: Fri, 28 Sep 2018 11:16:14 +0200 Subject: [PATCH 3/7] :recycle: Fix phrase of node version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8b4957de..7e67a981 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Lisk Commander allows you to communicate with a remote or local node and carry o ## Prerequisites -Lisk Commander requires [Node.js](https://nodejs.org/) as the underlying engine for code execution. Node.js is supported on most operating systems. Follow the instructions for your operating system on the [Node.js downloads page](https://nodejs.org/en/download/). We currently require Node.js versions above 8.3. NPM is automatically installed along with Node.js. +Lisk Commander requires [Node.js](https://nodejs.org/) as the underlying engine for code execution. Node.js is supported on most operating systems. Follow the instructions for your operating system on the [Node.js downloads page](https://nodejs.org/en/download/). We currently require Node.js versions 8.3 and above. NPM is automatically installed along with Node.js. ## Installation From 9dee0805ca445a87e535f47030695e61d24a0afa Mon Sep 17 00:00:00 2001 From: Shusetsu Toda Date: Fri, 28 Sep 2018 11:17:43 +0200 Subject: [PATCH 4/7] :recycle: Fix version sample --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7e67a981..8e9772ec 100644 --- a/README.md +++ b/README.md @@ -71,12 +71,12 @@ This will also add `lisk` to your PATH, but you won't have to repeat the process $ lisk COMMAND running command... $ lisk (-v|--version|version) -lisk-commander/2.0.0 darwin-x64 node-v8.11.3 +lisk-commander/2.0.0 darwin-x64 node-v8.12.0 $ lisk --help [COMMAND] A command line interface for Lisk VERSION - lisk-commander/2.0.0 darwin-x64 node-v10.6.0 + lisk-commander/2.0.0 darwin-x64 node-v8.12.0 USAGE $ lisk [COMMAND] From fbfd6428751189e57cb39f5c3bbae4f54aedd58f Mon Sep 17 00:00:00 2001 From: Shusetsu Toda Date: Fri, 28 Sep 2018 12:11:09 +0200 Subject: [PATCH 5/7] :books: Add transaction and signature docs --- docs/node.md | 2 +- docs/signature.md | 32 +++ docs/transaction.md | 512 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 545 insertions(+), 1 deletion(-) create mode 100644 docs/signature.md create mode 100644 docs/transaction.md diff --git a/docs/node.md b/docs/node.md index 6b76e818..73fec7d0 100644 --- a/docs/node.md +++ b/docs/node.md @@ -54,7 +54,7 @@ USAGE OPTIONS -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. - --all Additionally provides information about forging status. + --forging-status Additionally provides information about forging status. --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the default behaviour in your config.json file. diff --git a/docs/signature.md b/docs/signature.md new file mode 100644 index 00000000..7bdbf46a --- /dev/null +++ b/docs/signature.md @@ -0,0 +1,32 @@ +# `lisk signature` + +Commands relating to signatures for Lisk transactions from multisignature accounts. + +* [`lisk signature:broadcast [SIGNATURE]`](#lisk-signature-broadcast-signature) + +## `lisk signature:broadcast [SIGNATURE]` + +Broadcasts a signature for a transaction from a multisignature account. + +``` +USAGE + $ lisk signature:broadcast [SIGNATURE] + +ARGUMENTS + SIGNATURE Signature to broadcast. + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Broadcasts a signature for a transaction from a multisignature account. + Accepts a stringified JSON signature as an argument, or a signature can be piped from a previous command. + If piping make sure to quote out the entire command chain to avoid piping-related conflicts in your shell. + +EXAMPLES + signature:broadcast '{"transactionId":"abcd1234","publicKey":"abcd1234","signature":"abcd1234"}' + echo '{"transactionId":"abcd1234","publicKey":"abcd1234","signature":"abcd1234"}' | lisk signature:broadcast +``` diff --git a/docs/transaction.md b/docs/transaction.md new file mode 100644 index 00000000..cb8e16e6 --- /dev/null +++ b/docs/transaction.md @@ -0,0 +1,512 @@ +# `lisk transaction` + +Commands relating to Lisk transactions. + +* [`lisk transaction:broadcast [TRANSACTION]`](#lisk-transaction-broadcast-transaction) +* [`lisk transaction:create`](#lisk-transaction-create) +* [`lisk transaction:create:transfer AMOUNT ADDRESS`](#lisk-transaction-create-transfer-amount-address) +* [`lisk transaction:create:second-passphrase`](#lisk-transaction-createsecond-passphrase) +* [`lisk transaction:create:delegate USERNAME`](#lisk-transaction-create-delegate-username) +* [`lisk transaction:create:vote`](#lisk-transaction-create-vote) +* [`lisk transaction:create:multisignature LIFETIME MINIMUM KEYSGROUP`](#lisk-transaction-create-multisignature-lifetime-minimum-keysgroup) +* [`lisk transaction:get IDS`](#lisk-transaction-get-ids) +* [`lisk transaction:sign [TRANSACTION]`](#lisk-transaction-sign-transaction) +* [`lisk transaction:verify [TRANSACTION]`](#lisk-transaction-verify-transaction) + +## `lisk transaction:broadcast [TRANSACTION]` + +Broadcasts a transaction to the network via the node specified in the current config. + +``` +USAGE + $ lisk transaction:broadcast [TRANSACTION] + +ARGUMENTS + TRANSACTION Transaction to broadcast in JSON format. + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Broadcasts a transaction to the network via the node specified in the current config. + Accepts a stringified JSON transaction as an argument, or a transaction can be piped from a previous command. + If piping make sure to quote out the entire command chain to avoid piping-related conflicts in your shell. + +EXAMPLES + broadcast transaction '{"type":0,"amount":"100",...}' + echo '{"type":0,"amount":"100",...}' | lisk transaction:broadcast +``` + +## `lisk transaction:create` + +Creates a transaction object. + +``` +USAGE + $ lisk transaction:create + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + -s, --second-passphrase=second-passphrase + Specifies a source for your second secret passphrase. For certain commands a second passphrase is necessary, in + which case Lisk Commander will prompt you for it if this option is not set. Otherwise, Lisk Commander will assume + you want to use one passphrase only. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --second-passphrase=prompt (to force a prompt even when a second passphrase is not always necessary) + - --second-passphrase='pass:my second secret passphrase' (should only be used where security is not important) + - --second-passphrase=env:SECOND_SECRET_PASSPHRASE + - --second-passphrase=file:/path/to/my/secondPassphrase.txt (takes the first line only) + - --second-passphrase=stdin (takes one line only) + + -t, --type=0|transfer|1|second-passphrase|2|vote|3|delegate|4|multisignature + (required) type of transaction to create + + --no-signature + Creates the transaction without a signature. Your passphrase will therefore not be required. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + + --unvotes=unvotes + Specifies the public keys for the delegate candidates you want to remove your vote from. Takes either a string of + public keys separated by commas, or a path to a file which contains the public keys. + Examples: + - --unvotes=publickey1,publickey2 + - --unvotes=file:/path/to/my/unvotes.txt (every public key should be on a new line) + + --votes=votes + Specifies the public keys for the delegate candidates you want to vote for. Takes either a string of public keys + separated by commas, or a path to a file which contains the public keys. + Examples: + - --votes=publickey1,publickey2 + - --votes=file:/path/to/my/votes.txt (every public key should be on a new line) + +DESCRIPTION + Creates a transaction object. + +EXAMPLES + transaction:create --type=0 100 13356260975429434553L + transaction:create --type=delegate lightcurve +``` + +## `lisk transaction:create:transfer AMOUNT ADDRESS` + +Creates a transaction which will transfer the specified amount to an address if broadcast to the network. + +``` +USAGE + $ lisk transaction:create:transfer AMOUNT ADDRESS + +ARGUMENTS + AMOUNT Amount of LSK to send. + ADDRESS Address of the recipient. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + -s, --second-passphrase=second-passphrase + Specifies a source for your second secret passphrase. For certain commands a second passphrase is necessary, in + which case Lisk Commander will prompt you for it if this option is not set. Otherwise, Lisk Commander will assume + you want to use one passphrase only. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --second-passphrase=prompt (to force a prompt even when a second passphrase is not always necessary) + - --second-passphrase='pass:my second secret passphrase' (should only be used where security is not important) + - --second-passphrase=env:SECOND_SECRET_PASSPHRASE + - --second-passphrase=file:/path/to/my/secondPassphrase.txt (takes the first line only) + - --second-passphrase=stdin (takes one line only) + + --no-signature + Creates the transaction without a signature. Your passphrase will therefore not be required. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Creates a transaction which will transfer the specified amount to an address if broadcast to the network. + +EXAMPLE + transaction:create:transfer 100 13356260975429434553L +``` + +## `lisk transaction:create:second-passphrase` + +Creates a transaction which will register a second passphrase for the account if broadcast to the network. + +``` +USAGE + $ lisk transaction:create:second-passphrase + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + -s, --second-passphrase=second-passphrase + Specifies a source for your second secret passphrase. For certain commands a second passphrase is necessary, in + which case Lisk Commander will prompt you for it if this option is not set. Otherwise, Lisk Commander will assume + you want to use one passphrase only. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --second-passphrase=prompt (to force a prompt even when a second passphrase is not always necessary) + - --second-passphrase='pass:my second secret passphrase' (should only be used where security is not important) + - --second-passphrase=env:SECOND_SECRET_PASSPHRASE + - --second-passphrase=file:/path/to/my/secondPassphrase.txt (takes the first line only) + - --second-passphrase=stdin (takes one line only) + + --no-signature + Creates the transaction without a signature. Your passphrase will therefore not be required. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Creates a transaction which will register a second passphrase for the account if broadcast to the network. + +EXAMPLE + transaction:create:second-passphrase +``` + +## `lisk transaction:create:delegate USERNAME` + +Creates a transaction which will register the account as a delegate candidate if broadcast to the network. + +``` +USAGE + $ lisk transaction:create:delegate USERNAME + +ARGUMENTS + USERNAME Username to register as a delegate. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + -s, --second-passphrase=second-passphrase + Specifies a source for your second secret passphrase. For certain commands a second passphrase is necessary, in + which case Lisk Commander will prompt you for it if this option is not set. Otherwise, Lisk Commander will assume + you want to use one passphrase only. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --second-passphrase=prompt (to force a prompt even when a second passphrase is not always necessary) + - --second-passphrase='pass:my second secret passphrase' (should only be used where security is not important) + - --second-passphrase=env:SECOND_SECRET_PASSPHRASE + - --second-passphrase=file:/path/to/my/secondPassphrase.txt (takes the first line only) + - --second-passphrase=stdin (takes one line only) + + --no-signature + Creates the transaction without a signature. Your passphrase will therefore not be required. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Creates a transaction which will register the account as a delegate candidate if broadcast to the network. + +EXAMPLE + transaction:create:delegate lightcurve +``` + +## `lisk transaction:create:vote` + +Creates a transaction which will cast votes (or unvotes) for delegate candidates using their public keys if broadcast to the network. + +``` +USAGE + $ lisk transaction:create:vote + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + -s, --second-passphrase=second-passphrase + Specifies a source for your second secret passphrase. For certain commands a second passphrase is necessary, in + which case Lisk Commander will prompt you for it if this option is not set. Otherwise, Lisk Commander will assume + you want to use one passphrase only. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --second-passphrase=prompt (to force a prompt even when a second passphrase is not always necessary) + - --second-passphrase='pass:my second secret passphrase' (should only be used where security is not important) + - --second-passphrase=env:SECOND_SECRET_PASSPHRASE + - --second-passphrase=file:/path/to/my/secondPassphrase.txt (takes the first line only) + - --second-passphrase=stdin (takes one line only) + + --no-signature + Creates the transaction without a signature. Your passphrase will therefore not be required. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + + --unvotes=unvotes + Specifies the public keys for the delegate candidates you want to remove your vote from. Takes either a string of + public keys separated by commas, or a path to a file which contains the public keys. + Examples: + - --unvotes=publickey1,publickey2 + - --unvotes=file:/path/to/my/unvotes.txt (every public key should be on a new line) + + --votes=votes + Specifies the public keys for the delegate candidates you want to vote for. Takes either a string of public keys + separated by commas, or a path to a file which contains the public keys. + Examples: + - --votes=publickey1,publickey2 + - --votes=file:/path/to/my/votes.txt (every public key should be on a new line) + +DESCRIPTION + Creates a transaction which will cast votes (or unvotes) for delegate candidates using their public keys if broadcast + to the network. + +EXAMPLE + transaction:create:vote --votes + 215b667a32a5cd51a94c9c2046c11fffb08c65748febec099451e3b164452bca,922fbfdd596fa78269bbcadc67ec2a1cc15fc929a19c462169568 + d7a3df1a1aa --unvotes + e01b6b8a9b808ec3f67a638a2d3fa0fe1a9439b91dbdde92e2839c3327bd4589,ac09bc40c889f688f9158cca1fcfcdf6320f501242e0f7088d52a + 5077084ccba +``` + +## `lisk transaction:create:multisignature LIFETIME MINIMUM KEYSGROUP` + +Creates a transaction which will register the account as a multisignature account if broadcast to the network, using the following arguments: + +``` +USAGE + $ lisk transaction:create:multisignature LIFETIME MINIMUM KEYSGROUP + +ARGUMENTS + LIFETIME Number of hours the transaction should remain in the transaction pool before becoming invalid. + MINIMUM Minimum number of signatures required for a transaction from the account to be valid. + KEYSGROUP Public keys to verify signatures against for the multisignature group. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + -s, --second-passphrase=second-passphrase + Specifies a source for your second secret passphrase. For certain commands a second passphrase is necessary, in + which case Lisk Commander will prompt you for it if this option is not set. Otherwise, Lisk Commander will assume + you want to use one passphrase only. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --second-passphrase=prompt (to force a prompt even when a second passphrase is not always necessary) + - --second-passphrase='pass:my second secret passphrase' (should only be used where security is not important) + - --second-passphrase=env:SECOND_SECRET_PASSPHRASE + - --second-passphrase=file:/path/to/my/secondPassphrase.txt (takes the first line only) + - --second-passphrase=stdin (takes one line only) + + --no-signature + Creates the transaction without a signature. Your passphrase will therefore not be required. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Creates a transaction which will register the account as a multisignature account if broadcast to the network, using + the following arguments: + 1. Number of hours the transaction should remain in the transaction pool before becoming invalid. + 2. Minimum number of signatures required for a transaction from the account to be valid. + 3. Public keys to verify signatures against for the multisignature group. + +EXAMPLE + transaction:create:multisignature 24 2 + 215b667a32a5cd51a94c9c2046c11fffb08c65748febec099451e3b164452bca,922fbfdd596fa78269bbcadc67ec2a1cc15fc929a19c462169568 + d7a3df1a1aa +``` + +## `lisk transaction:get IDS` + +Gets transaction information from the blockchain. + +``` +USAGE + $ lisk transaction:get IDS + +ARGUMENTS + IDS Comma-separated transaction ID(s) to get information about. + +OPTIONS + -j, --[no-]json Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You + can change the default behaviour in your config.json file. + +DESCRIPTION + Gets transaction information from the blockchain. + +EXAMPLES + transaction:get 10041151099734832021 + transaction:get 10041151099734832021,1260076503909567890 +``` + +## `lisk transaction:sign [TRANSACTION]` + +Sign a transaction using your secret passphrase. + +``` +USAGE + $ lisk transaction:sign [TRANSACTION] + +ARGUMENTS + TRANSACTION Transaction to sign in JSON format. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + -p, --passphrase=passphrase + Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --passphrase=prompt (default behaviour) + - --passphrase='pass:my secret passphrase' (should only be used where security is not important) + - --passphrase=env:SECRET_PASSPHRASE + - --passphrase=file:/path/to/my/passphrase.txt (takes the first line only) + - --passphrase=stdin (takes one line only) + + -s, --second-passphrase=second-passphrase + Specifies a source for your second secret passphrase. For certain commands a second passphrase is necessary, in + which case Lisk Commander will prompt you for it if this option is not set. Otherwise, Lisk Commander will assume + you want to use one passphrase only. + Source must be one of `prompt`, `pass`, `env`, `file` or `stdin`. For `pass`, `env` and `file` a corresponding + identifier must also be provided. + Examples: + - --second-passphrase=prompt (to force a prompt even when a second passphrase is not always necessary) + - --second-passphrase='pass:my second secret passphrase' (should only be used where security is not important) + - --second-passphrase=env:SECOND_SECRET_PASSPHRASE + - --second-passphrase=file:/path/to/my/secondPassphrase.txt (takes the first line only) + - --second-passphrase=stdin (takes one line only) + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + +DESCRIPTION + Sign a transaction using your secret passphrase. + +EXAMPLE + transaction:sign + '{"amount":"100","recipientId":"13356260975429434553L","senderPublicKey":null,"timestamp":52871598,"type":0,"fee":"100 + 00000","recipientPublicKey":null,"asset":{}}' +``` + +## `lisk transaction:verify [TRANSACTION]` + +Verifies a transaction has a valid signature. + +``` +USAGE + $ lisk transaction:verify [TRANSACTION] + +ARGUMENTS + TRANSACTION Transaction to verify in JSON format. + +OPTIONS + -j, --[no-]json + Prints output in JSON format. You can change the default behaviour in your config.json file. + + --[no-]pretty + Prints JSON in pretty format rather than condensed. Has no effect if the output is set to table. You can change the + default behaviour in your config.json file. + + --second-public-key=second-public-key + Specifies a source for providing a second public key to the command. The second public key must be provided via this + option. Sources must be one of `file` or `stdin`. In the case of `file`, a corresponding identifier must also be + provided. + + Note: if both transaction and second public key are passed via stdin, the transaction must be the first line. + + Examples: + - --second-public-key file:/path/to/my/message.txt + - --second-public-key 790049f919979d5ea42cca7b7aa0812cbae8f0db3ee39c1fe3cef18e25b67951 + +DESCRIPTION + Verifies a transaction has a valid signature. + +EXAMPLES + transaction:verify '{"type":0,"amount":"100",...}' + transaction:verify '{"type":0,"amount":"100",...}' + --second-public-key=647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6 +``` From 2469549c71702a3323526ba6b88eea5d0c22236f Mon Sep 17 00:00:00 2001 From: Shusetsu Toda Date: Fri, 28 Sep 2018 12:12:29 +0200 Subject: [PATCH 6/7] :books: Add link to signature and transaction docs --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8e9772ec..3c288c19 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,8 @@ COMMANDS * [`lisk message`](docs/message.md) - Commands relating to user messages. * [`lisk node`](docs/node.md) - Commands relating to Lisk node. * [`lisk passphrase`](docs/passphrase.md) - Commands relating to Lisk passphrases. +* [`lisk signature`](docs/signature.md) - Commands relating to signatures for Lisk transactions from multisignature accounts. +* [`lisk transaction`](docs/transaction.md) - Commands relating to Lisk transactions. * [`lisk warranty`](docs/warranty.md) - Displays warranty notice. From 89b51581af263903c3d7ca7c81fe503e4f1e0af0 Mon Sep 17 00:00:00 2001 From: Shusetsu Toda Date: Fri, 28 Sep 2018 18:08:03 +0200 Subject: [PATCH 7/7] :recycle: Update flag --- docs/node.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/node.md b/docs/node.md index 73fec7d0..b3b66c4a 100644 --- a/docs/node.md +++ b/docs/node.md @@ -64,5 +64,5 @@ DESCRIPTION EXAMPLES node:get - node:get --all + node:get --forging-status ```