Commands
Account
Commands relating to Lisk accounts.
Create account
This 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 behavior in your config.json file.
-n, --number=number [default: 1] Number of accounts to create.
--[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 behavior in your config.json file.
DESCRIPTION
Returns a randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address.
EXAMPLES
account:create
account:create --number=3
Example output
╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║ data 1 ║
╟───────────────╤──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ passphrase │ wool snow online hamster child sentence tunnel stuff cover crew fitness peasant ║
╟───────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ privateKey │ ac3e6de00656091ceacf44c30ce79615c6f21fcf257e81a8b0a2de5a69c007f352cf0bc29ef759fcc314825d4671bc9e83b8d1b7b660303b8e4b7f26d0b68a04 ║
╟───────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ publicKey │ 52cf0bc29ef759fcc314825d4671bc9e83b8d1b7b660303b8e4b7f26d0b68a04 ║
╟───────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ binaryAddress │ 22d2bdb53088bd8cdfceef22823ca9700c40dc46 ║
╟───────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ address │ lskp545s94uyvf2awf7hjy3p8m47zbpxwvbbpo38j ║
╚═══════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
Show account
This shows private account information for a given passphrase. It displays the lisk address, the address as binary string, the publickey and the privatekey that belong to the entered passphrase:
USAGE
$ lisk account:show
OPTIONS
-j, --[no-]json Prints output in JSON format. You can change the default behavior 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.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important)
--[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 behavior in your config.json
file.
DESCRIPTION
Shows account information for a given passphrase.
EXAMPLE
account:show
Example output
╔═══════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║ privateKey │ c235c7720eaf5d9648959537ab102a4279538b7d0b9c7f003a4ea075da121b1dae3aa408b5f95d9bb6d304de8f437faf77f8346e948020a10e52ded45a75067d ║
╟───────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ publicKey │ ae3aa408b5f95d9bb6d304de8f437faf77f8346e948020a10e52ded45a75067d ║
╟───────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ address │ lskua6qpa8uvpmkhq93a76hwyarjhstmyck3k9zpr ║
╟───────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ binaryAddress │ 86555265f0110b4ed5a8cb95dbc732e77732c474 ║
╚═══════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝
Hash onion
Creates a hash onion output to be used by a forger.
USAGE
$ lisk hash-onion
OPTIONS
-c, --count=count [default: 1000000] Total number of hashes to produce
-d, --distance=distance [default: 1000] Distance between each hashes
-j, --[no-]json Prints output in JSON format. You can change the default behavior in your
config.json file.
-o, --output=output Output file path
--[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 behavior in your
config.json file.
DESCRIPTION
Creates hash onion output to be used by forger.
EXAMPLE
hash-onion --count=1000000 --distance=2000
Help
Displays command reference.
A command line interface for Lisk
VERSION
lisk-commander/5.0.0 darwin-x64 node-v12.18.4
USAGE
$ lisk [COMMAND]
COMMANDS
account Commands relating to Lisk accounts.
hash-onion
help Displays help.
message Commands relating to user messages.
network-identifier
passphrase Commands relating to Lisk passphrases.
Message
Commands relating to user messages.
Decrypt message
Decrypts a previously encrypted message from a given sender public key for a known nonce using your secret passphrase.
Important: As the secret passphrase is a sensitive input, it can be provided using one of the methods described in the Sensitive Inputs section.
The encrypted message can be provided either directly as an argument, or by specifying a source with the |
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 behavior 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="hello world"
-p, --passphrase=passphrase
Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important)
--[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 behavior 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 --json --pretty
Example JSON output
{
"message": "My very secret message"
}
Encrypt message
This encrypts a message for a given recipient public key using your secret passphrase.
This command uses Lisk Elements passphrase module to encrypt a message you provide for a given public key using a randomly generated nonce. In order to decrypt the encrypted message later the recipient will need your public key, (in order to verify that the message came from you), including the nonce and the secret passphrase which matches the specified public key.
Important: As the secret passphrase is a sensitive input, it can be provided using one of the methods described in the Sensitive Inputs section.
The encrypted message can be provided either directly as an argument, or by specifying a source with the |
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 behavior 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="hello world"
-p, --passphrase=passphrase
Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important)
--[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 behavior 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"
Example output
╔════════════════════╤══════════════════════════════════════════════════════════════════╗
║ nonce │ 30809550cb5b6ff216ff54b15478a2fe2504b94b14c1b769 ║
╟────────────────────┼──────────────────────────────────────────────────────────────────╢
║ encryptedMessage │ 13bde81028e8ef57d901a52b2f0abec54624c761c32b625725b7be ║
╟────────────────────┼──────────────────────────────────────────────────────────────────╢
║ recipientPublicKey │ bba7e2e6a4639c431b68e31115a71ffefcb4e025a4d1656405dfdcd8384719e0 ║
╚════════════════════╧══════════════════════════════════════════════════════════════════╝
Sign message
Signs a message using your secret passphrase.
This command signs the message. Your specific passphrase is required here.
Important: As the secret passphrase is a sensitive input, it can be provided using one of the methods described in the Sensitive Inputs section.
The encrypted message can be provided either directly as an argument, or by specifying a source with the |
USAGE
$ lisk message:sign [MESSAGE]
ARGUMENTS
MESSAGE Message to sign.
OPTIONS
-j, --[no-]json
Prints output in JSON format. You can change the default behavior 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="hello world"
-p, --passphrase=passphrase
Specifies a source for your secret passphrase. Lisk Commander will prompt you for input if this option is not set.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important)
--[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 behavior in your config.json file.
DESCRIPTION
Signs a message using your secret passphrase.
EXAMPLE
message:sign "Hello world" --json
Example JSON output
{
"message":"Hello world",
"publicKey": {
"type":"Buffer",
"data":[174,58,164,8,181,249,93,155,182,211,4,222,143,67,127,175,119,248,52,110,148,128,32,161,14,82,222,212,90,117,6,125]},"signature":{"type":"Buffer","data":[125,8,61,132,237,240,197,194,37,132,91,135,229,28,139,65,9,169,236,99,139,205,84,114,202,205,50,2,188,160,94,34,20,200,78,236,113,90,31,119,174,0,21,0,63,175,149,238,219,160,55,174,156,245,85,43,208,24,20,111,116,110,180,9]
}
}
Verify message
Verifies a signature for a message using the signer’s public key.
This command verify a message after being signed with the sign message command. The public key, signature and message are required.
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 behavior 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="hello world"
--[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 behavior in your config.json file.
DESCRIPTION
Verifies a signature for a message using the signer’s public key.
EXAMPLE
message:verify 647aac1e2df8a5c870499d7ddc82236b1e10936977537a3844a6b05ea33f9ef6 2a3ca127efcf7b2bf62ac8c3b1f5acf6997cab62ba9fde3567d188edcbacbc5dc8177fb88d03a8691ce03348f569b121bca9e7a3c43bf5c056382f35ff843c09 "Hello world" --json
Example JSON output
{
"verified": true
}
Network identifier
Displays the Network identifier based on the payloadhash of the genesis block^ of the network. The Network identifier needs to be provided everytime a transaction is signed, which ensures that the transaction can only be broadcasted in the dedicated network.
USAGE
$ lisk network-identifier GENESISBLOCKID
ARGUMENTS
GENESISBLOCKID ID of genesis block from the network.
OPTIONS
-j, --[no-]json Prints output in JSON format. You can change the default behavior in your config.json file.
--community-identifier=community-identifier [default: Lisk] Unique community identifier for network.
--[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 behavior in your
config.json file.
DESCRIPTION
Creates Network identifier for the given genesis block id and community identifier.
EXAMPLE
network-identifier da3ed6a45429278bac2666961289ca17ad86595d33b31037615d4b8e8f158bba --json
Example JSON output
{ "networkIdentifier":"10f236f6d00a8f565bbe43c4ef0e3818f488bf4abefbe041155a3d019ef9a947" }
Passphrase
Commands relating to Lisk passphrases.
Decrypt passphrase
Decrypts your secret passphrase using the password which was provided at the time of encryption.
The following command listed below decrypts your secret passphrase after being encrypted with the encrypted passphrase command. The password which was used to encrypt the secret passphrase, as well as the initialisation vector (IV), which was randomly generated at the time of encryption will be required here:
Important: As the secret passphrase is a sensitive input, it can be provided using one of the methods described in the Sensitive Inputs section.
The encrypted message can be provided either directly as an argument, or by specifying a source with the |
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 behavior 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.
Examples:
- --password=pass:password123 (should only be used where security is not important)
--[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 behavior 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=23c01112134317a63bcf3d41ea74e83b&version=1" --json
Example JSON output
{
"passphrase": "minute omit local rare sword knee banner pair rib museum shadow juice"
}
Encrypt passphrase
Encrypts your secret passphrase under a password.
This command uses AES-256-CBC to encrypt your secret passphrase under a password you provide using a randomly generated initialisation vector (IV). In order to decrypt the secret passphrase later you will need both the IV and the password.
Important: As the secret passphrase is a sensitive input, it can be provided using one of the methods described in the Sensitive Inputs section.
The encrypted message can be provided either directly as an argument, or by specifying a source with the |
USAGE
$ lisk passphrase:encrypt
OPTIONS
-j, --[no-]json Prints output in JSON format. You can change the default behavior 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.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important)
-w, --password=password Specifies a source for your secret password. Lisk Commander will prompt you for input if this option is not set.
Examples:
- --password=pass:password123 (should only be used where security is not important)
--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 behavior in your config.json
file.
DESCRIPTION
Encrypts your secret passphrase under a password.
EXAMPLE
passphrase:encrypt --json
Example JSON output
{
"encryptedPassphrase":"iterations=1000000&cipherText=b472f9ad7fe2f0ca636df9d6bbacb585aeea72c0ccfe7d983b89fd864179452f184b333a150c88a82059f6bdbc327af90f000c29cd49cb608afa3ee55fc6e39ce203ab2bd381f0d400499adb&iv=ff0a48ade9dec58e65ce463c&salt=3e725655193277d49942da324fa0ed66&tag=cd6d9aabff7cac4a83b2e69386452a56&version=1"
}