Managing accounts

The most convenient way to manage your account is to use a user interface, such as Lisk Desktop. However, it is possible to manage your account directly from the command-line with the CLI of a Lisk node.

The most important interactions are described below.

For more information about the available Lisk Core commands, check the CLI references for Lisk Core and Lisk SDK.

Creating a new account

  • Lisk Core

  • Lisk app

lisk-core account:create
./bin/run account:create
Example output
[
  {
   "passphrase": "meadow lesson tomato satisfy shield number zone symptom sad equip faculty piece",
   "privateKey": "9f6014a246cb91abeaec400e77a79c6ec29898c85bf934c2d176c13df58e1ef34c5b08a8eec74c79a6c6ec66ce229c03afdcb50ccd6e5c43e916875fb03b4948",
   "publicKey": "4c5b08a8eec74c79a6c6ec66ce229c03afdcb50ccd6e5c43e916875fb03b4948",
   "binaryAddress": "3fb0d5fb064d3ad6f09263eaae04e666ae4a0e52",
   "address": "lsknf295f2b4kh99jpro8q6jxnbodwpkcrrw4nwwa"
  }
]
account:create reference
Return randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address

USAGE
  $ lisk-core account:create

OPTIONS
  -c, --count=count  [default: 1] Number of accounts to create

EXAMPLES
  account:create
  account:create --count=3

Creating transactions

It is necessary for the Lisk Core node to be running, in order to sign transactions. For more information about the different ways to create and send transactions, please check the guide How to send a transaction to the network.

If you wish to create transactions without having the node running, use the --offline flag. These transactions need to be signed later with transaction:sign.

For more information on this topic, check out this guide, Creating transactions and signing them offline.

Start the node, if it is not running already:

  • Lisk Core

  • Lisk app

lisk-core start
./bin/run start

Transactions can be created by using the transaction:create command:

transaction:create reference
Create a transaction that can be broadcasted to the network. Note: fee and amount should be in Beddows!!

USAGE
  $ lisk-core transaction:create MODULEID ASSETID FEE

ARGUMENTS
  MODULEID  Registered transaction module id.
  ASSETID   Registered transaction asset id.
  FEE       Transaction fee in Beddows.

OPTIONS
  -a, --asset=asset                          Creates transaction with specific asset information.
  -d, --data-path=data-path                  Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
  -j, --json                                 Print the transaction in JSON format
  -n, --network=network                      [default: mainnet] Default network config to use. Environment variable "LISK_NETWORK" can also be used.

  -p, --passphrase=passphrase                Specifies a source for your secret passphrase. Command 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).

  -s, --sender-public-key=sender-public-key  Creates the transaction with provided sender publickey, when passphrase is not provided.

  --network-identifier=network-identifier    Network identifier defined for the network or main | test for the Lisk Network.

  --no-signature                             Creates the transaction without a signature. Your passphrase will therefore not be required.

  --nonce=nonce                              Nonce of the transaction.

  --offline                                  Specify whether to connect to a local node or not.

  --pretty                                   Prints JSON in pretty format rather than condensed.

EXAMPLES
  transaction:create 2 0 100000000 --asset='{"amount":100000000,"recipientAddress":"ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815","data":"send token"}'
  transaction:create 2 0 100000000 --asset='{"amount":100000000,"recipientAddress":"ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815","data":"send token"}' --json
  transaction:create 2 0 100000000 --offline --network mainnet --network-identifier 873da85a2cee70da631d90b0f17fada8c3ac9b83b2613f4ca5fddd374d1034b3 --nonce 1
  --asset='{"amount":100000000,"recipientAddress":"ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815","data":"send token"}'

Transfering tokens to another account

  • Lisk Core

  • Lisk app

$ lisk-core transaction:create 2 0 100000000 --asset='{"amount":100000000,"recipientAddress":"86555265f0110b4ed5a8cb95dbc732e77732c474","data":"send token"}'
? Please enter passphrase:  [hidden]
? Please re-enter passphrase:  [hidden]
$ ./bin/run transaction:create 2 0 100000000 --asset='{"amount":100000000,"recipientAddress":"86555265f0110b4ed5a8cb95dbc732e77732c474","data":"send token"}'
? Please enter passphrase:  [hidden]
? Please re-enter passphrase:  [hidden]
Example output
{"transaction":"0802100018002080c2d72f2a200fe9a3f1a21b5530f27f87a414b549e79a940bf24fdf2b2f05e7f22aeeecc86a32270880c2d72f121486555265f0110b4ed5a8cb95dbc732e77732c4741a0a73656e6420746f6b656e3a40c442cd1311808974d5f41a69dd25b2e3a516e463445a4c5eb292f0c7b7de0b33627a729da7969875d0f659fbe56f3e2ca947bc02873f8ac5a1753ac90fb15605"}

Registering a delegate

  • Lisk Core

  • Lisk app

$ lisk-core transaction:create 5 0 1000130000 --asset='{"username":"lightcurve"}'
? Please enter passphrase:  [hidden]
? Please re-enter passphrase:  [hidden]
$ ./bin/run transaction:create 5 0 1000130000 --asset='{"username":"lightcurve"}'
? Please enter passphrase:  [hidden]
? Please re-enter passphrase:  [hidden]
Example output
{"transaction":"08051000180020d08bf3dc032a20ae3aa408b5f95d9bb6d304de8f437faf77f8346e948020a10e52ded45a75067d320c0a0a6c6967687463757276653a403bcdbf92d0a138c3baebd2c71b4a4fa0e16e7dd58d99853bcf49e8900f244a6893c701f5366fe8f4b360e64f9ae7267053e1f38f6c18c07cc2e6064bcdf75204"}

How to vote/unvote delegates

A positive amount votes with the tokens for the respective delegate.

A negative amount unvotes the specified amount of tokens for a delegate.

Up to 20 votes and unvotes can be included in a single vote transaction.

  • Lisk Core

  • Lisk app

$ lisk-core transaction:create 5 1 100000000 --asset='{"votes":[{"delegateAddress":"86555265f0110b4ed5a8cb95dbc732e77732c474","amount":1000000000}]}'
? Please enter passphrase:  [hidden]
? Please re-enter passphrase:  [hidden]
$ ./bin/run transaction:create 5 1 100000000 --asset='{"votes":[{"delegateAddress":"86555265f0110b4ed5a8cb95dbc732e77732c474","amount":1000000000}]}'
? Please enter passphrase:  [hidden]
? Please re-enter passphrase:  [hidden]
Example output
{"transaction":"0805100118022080c2d72f2a200fe9a3f1a21b5530f27f87a414b549e79a940bf24fdf2b2f05e7f22aeeecc86a321e0a1c0a1486555265f0110b4ed5a8cb95dbc732e77732c4741080a8d6b9073a40d8c0cec4ce780af8bb5a883236e6826dbc0b5748f0bde07607a8de508e15b8bda3e15f942b10e034fbdacebd2b4fb035462bd0845f8616a965962c1184729a0e"}

Sending transactions to a Lisk node

  • Lisk Core

  • Lisk app

$ lisk-core transaction:send 0802100018002080c2d72f2a200fe9a3f1a21b5530f27f87a414b549e79a940bf24fdf2b2f05e7f22aeeecc86a32270880c2d72f121486555265f0110b4ed5a8cb95dbc732e77732c4741a0a73656e6420746f6b656e3a40c442cd1311808974d5f41a69dd25b2e3a516e463445a4c5eb292f0c7b7de0b33627a729da7969875d0f659fbe56f3e2ca947bc02873f8ac5a1753ac90fb15605
$ ./bin/run transaction:send 0802100018002080c2d72f2a200fe9a3f1a21b5530f27f87a414b549e79a940bf24fdf2b2f05e7f22aeeecc86a32270880c2d72f121486555265f0110b4ed5a8cb95dbc732e77732c4741a0a73656e6420746f6b656e3a40c442cd1311808974d5f41a69dd25b2e3a516e463445a4c5eb292f0c7b7de0b33627a729da7969875d0f659fbe56f3e2ca947bc02873f8ac5a1753ac90fb15605
Example output
Transaction with id: '793446f5a5dbd9fbb9b73a7855706193504f08e50eb9d955133682282321a0b0' received by node
transaction:send reference
Send transaction to the local node.

USAGE
  $ lisk-core transaction:send TRANSACTION

ARGUMENTS
  TRANSACTION  A transaction to be sent to the node encoded as hex string

OPTIONS
  -d, --data-path=data-path  Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
  --pretty                   Prints JSON in pretty format rather than condensed.

EXAMPLE
  transaction:send
  080810011880cab5ee012220fd061b9146691f3c56504be051175d5b76d1b1d0179c5c4370e18534c58821222a2408641214ab0041a7d3f7b2c290b5b834d46bdc7b7eb858151a0a73656e6420746f6b656e324028edd3601cdc35a4
  1bb23415a0d9f3c3e9cf188d9971adf18742cea39d58aa84809aa87bcfe6feaac46211c80472ad9297fd87727709f5d7e7b4134caf106b02