Developer changelog

Updated type numbers for the default transaction types

SDK 2.3.7
Types
SDK 3.0.2
Types
Name

0

8

transfer

1

9

second passphrase

2

10

register delegate

3

11

cast votes

4

12

register multisignature

The networkIdentifier parameter

The new parameter networkIdentifier is introduced with Lisk SDK version 3.x.

It is now required to provide the networkIdentifier of the specific network when creating a transaction. This eliminates the possibility of transaction replays on different networks.

The networkIdentifier is required for creating a transaction object.

The network identifier is a hash value based on the following parameters:

const HelloTransaction = require('../hello_transaction');
const { EPOCH_TIME } = require('@liskhq/lisk-constants');
const {getNetworkIdentifier} = require('@liskhq/lisk-cryptography');

const networkIdentifier = getNetworkIdentifier(
    "23ce0366ef0a14a91e5fd4b1591fc880ffbef9d988ff8bebf8f3666b0c09597d",
    "Lisk",
);

const getTimestamp = () => {
    // check config file or curl localhost:4000/api/node/constants to verify your epoc time
    const millisSinceEpoc = Date.now() - Date.parse(EPOCH_TIME);
    const inSeconds = ((millisSinceEpoc) / 1000).toFixed(0);
    return  parseInt(inSeconds);
};

const tx = new HelloTransaction({
    asset: {
        hello: 'world',
    },
    networkIdentifier: networkIdentifier,
    timestamp: getTimestamp(),
});

tx.sign('creek own stem final gate scrub live shallow stage host concert they');

console.log(tx.stringify());
process.exit(0);

Updated genesis block for devnet

Due to the changes that have been introduced for the structure of transaction objects, the genesis block and it’s transactions were created new for Lisk SDK version 3.0.

New genesis account

Name Address Passphrase Description

Genesis account

11237980039345381032L

creek own stem final gate scrub live shallow stage host concert they

The genesis account holds all the tokens that are created in the devnet genesis block. It is utilized to vote for the forging genesis delegates in a convenient way during development.

Database changes

To see what has changed in the database layer of Lisk SDK 3.x, compare the 2 figures Database layer SDK 2.x and Database layer SDK 3.x

Database layer SDK 2.x
Figure 1. Database layer SDK 2.x
Database layer SDK 3.x
Figure 2. Database layer SDK 3.x

API changes

The list of API changes only comprises of the parts of the API that changed from Lisk SDK 2.x to 3.x.

To see the complete API specification for Lisk SDK 3.x, please refer to the Config reference.

Changes are grouped by the different API endpoints for the Lisk SDK.

Color legend

RED = Removed in Lisk SDK 3.x

GREEN = Added in Lisk SDK 3.x

Peers

Query

GET /peers
Parameters
Name Description Schema Default

broadhash
optional

Broadhash of the network

string (hex)

height
optional

Current height of the network

integer (int32)

httpPort
optional

HTTP port of the node or delegate

integer (int32)

ip
optional

IP of the node or delegate

string (ip)

limit
optional

Limit applied to results

integer (int32)

10

offset
optional

Offset value for results

integer (int32)

0

os
optional

OS of the node

string

protocolVersion
optional

Protocol version of the node

string (protocolVersion)

sort
optional

Fields to sort results by

enum (height:asc, height:desc, version:asc, version:desc)

"height:desc"

state
optional

Current state of the network

enum

connected

disconnected

integer

minimum: 0

maximum: 2

version
optional

Lisk version of the node

string (version)

wsPort
optional

Web socket port for the node or delegate

integer (int32)

Peer object

Name Description Schema

height
optional

Network height on the peer node. Represents the current number of blocks in the chain on the peer node.
Example : 123

integer

broadhash
optional

Broadhash on the peer node. Broadhash is established as an aggregated rolling hash of the past five blocks present in the database.
Example : 258974416d58533227c6a3da1b6333f0541b06c65b41e45cf31926847a3db1ea

string (hex)

nonce
optional

Unique Identifier for the peer. Random string.
Example : sYHEDBKcScaAAAYg

string (minLenght: 1)

optional

The port the peer node uses for HTTP requests, e.g. API calls.
Minimum value : 1
Maximum value : 65535
Example : 8000

integer (int32)

ip
optional

IPv4 address of the peer node.
Example : "127.0.0.1"

string (ip)

networkId
optional

The network identifier as per LIP-0009
Example : "11a254dc30db5eb1ce4001acde35fd5a14d62584f886d30df161e4e883220eb7"

string

os
optional

The Operating system, that the peer node runs on.
Example : "debian"

string

protocolVersion
optional

The protocol version of Lisk Core that the peer node runs on.
Example : "1.0"

string (protocolVersion)

state
required

The state of the Peer.
Example : "connected"

enum

connected

disconnected

integer

minimum: 0

maximum: 2

version
optional

The version of Lisk Core that the peer node runs on.
Example : "v0.8.0"

string (version)

wsPort
required

The port the peer node uses for websocket connections, e.g. P2P broadcasts.
Minimum value : 1
Maximum value : 65535
Example : 8001

integer (int32)

Blocks

Block object

Name Description Schema

blockSignature
optional

Derived from a SHA-256 hash of the block header, that is signed by the private key of the delegate who forged the block.
Example : "a3733254aad600fa787d6223002278c3400be5e8ed4763ae27f9a151e07"

string (signature)

confirmations
optional

Number of times that this Block has been confirmed by the network. By forging a new block on a chain, all former blocks in the chain get confirmed by the forging delegate.
Example : 200

integer

generatorAddress
optional

Lisk address of the delegate who forged the block.
Example : "12668885769632475474L"

string (address)

generatorPublicKey
required

Public key of the delegate who forged the block.
Example : "968ba2fa993ea9dc27ed740da0daf49eddd740db41b"

string (publicKey)

height
required

Height of the network, when the block was forged. The height of the networks represents the number of blocks, that have been forged on the network since the Genesis block.
Minimum value : 1
Example : 123

integer

id
required

Unique identifier of the block. Derived from the block signature.
Length : 1 - 20
Example : "6258354802676165798"

string (id)

maxHeightPreviouslyForged
optional

Largest height of any block previously forged by the generatorPublicKey as defined in the Lisk BFT Protocol. See https://github.com/LiskHQ/lips/blob/master/proposals/lip-0014.md
Example : 123

integer

maxHeightPrevoted
optional

Largest height of an ancestor block with at least 68 prevotes as defined in the Lisk BFT Protocol. See https://github.com/LiskHQ/lips/blob/master/proposals/lip-0014.md
Example : 123

integer

numberOfTransactions
required

The number of transactions processed in the block.
Example : 15

integer

payloadHash
optional

Hash of the payload of the block. The payload of a block is comprised of the transactions the block contains. For each type of transaction exists a different maximum size for the payload.
Example : "4e4d91be041e09a2e54bb7dd38f1f2a02ee7432ec9f169ba63cd1f193a733dd2"

string (hex)

payloadLength
optional

Bytesize of the payload hash.
Minimum value : 0
Example : 117

integer

previousBlockId
optional

The id of the previous block of the chain.
Example : "15918760246746894806"

string (id)

reward
required

The Lisk reward for the delegate.
Example : "50000000"

string

timestamp
required

Unix timestamp
Example : 28227090

integer

totalAmount
required

The total amount of Lisk transferred.
Example : "150000000"

string

totalFee
required

The total amount of fees associated with the block.
Example : "15000000"

string

totalForged
required

Total amount of LSK that have been forged in this Block. Consists of fees and the reward.
Example : "65000000"

string

version
optional

Versioning for future upgrades of the lisk protocol.
Minimum value : 0
Example : 0

integer

Delegates

Query

GET /delegates
Parameters
Type Name Description Schema Default

Query

address
optional

Address of an account

string (address)

Query

limit
optional

Limit applied to results

integer (int32)

10

Query

offset
optional

Offset value for results

integer (int32)

0

Query

publicKey
optional

Public key to query

string (publicKey)

Query

search
optional

Fuzzy delegate username to query

string

Query

secondPublicKey
optional

Second public key to query

string (publicKey)

Query

sort
optional

Fields to sort results by

enum

username:asc

username:desc

productivity:asc

productivity:desc

missedBlocks:asc

missedBlocks:desc

producedBlocks:asc

producedBlocks:desc

rank:asc

rank:desc

voteWeight:asc

voteWeight:desc

"rank:asc"

"voteWeight:desc"

Query

username
optional

Delegate username to query

string (username)

Delegate

Name Description Schema

approval
optional

Percentage of the voters weight, that the delegate owns in relation to the total supply of Lisk.
Example : 14.22

number

missedBlocks
optional

Total number of blocks the delegate has missed.
Example : 427

integer

producedBlocks
optional

Total number of blocks the delegate has forged.
Example : 20131

integer

productivity
optional

Productivity rate. Percentage of successfully forged blocks (not missed) by the delegate.
Example : 96.41

number

rewards
optional

Total sum of block rewards that the delegate has forged.
Example : "510000000"

string

username
required

The delegates' username. A delegate chooses the username by registering a delegate on the Lisk network. It is unique and cannot be changed later.
Example : "isabella"

string (username)

voteWeight
required

The voters weight of the delegate. Represents the total amount of Lisk (in Beddows) that the delegates' voters own. The voters weight decides which rank the delegate gets in relation to the other delegates and their voters weights.
Example : "1081560729258"

string

vote
required

The voters weight of the delegate. Represents the total amount of Lisk (in Beddows) that the delegates' voters own. The voters weight decides which rank the delegate gets in relation to the other delegates and their voters weights.
Example : "1081560729258"

string

rank
required

The voters weight of the delegate. Rank of the delegate. The rank is defined by the voters weight/ approval of a delegates, in relation to all other delegates.
Example : 70

integerOrNull

DelegateWithAccount

Name Description Schema

account
required

Account

approval
optional

Percentage of the voters weight, that the delegate owns in relation to the total supply of Lisk.
Example : 14.22

number

missedBlocks
optional

Total number of blocks the delegate has missed.
Example : 427

integer

producedBlocks
optional

Total number of blocks the delegate has forged.
Example : 20131

integer

productivity
optional

Productivity rate. Percentage of successfully forged blocks (not missed) by the delegate.
Example : 96.41

number

rewards
optional

Total sum of block rewards that the delegate has forged.
Example : "510000000"

string

username
required

The delegates' username. A delegate chooses the username by registering a delegate on the Lisk network. It is unique and cannot be changed later.
Example : "isabella"

string (username)

voteWeight
required

The voters weight of the delegate. Represents the total amount of Lisk (in Beddows) that the delegates' voters own. The voters weight decides which rank the delegate gets in relation to the other delegates and their voters weights.
Example : "1081560729258"

string

vote
required

The voters weight of the delegate. Represents the total amount of Lisk (in Beddows) that the delegates' voters own. The voters weight decides which rank the delegate gets in relation to the other delegates and their voters weights.
Example : "1081560729258"

string

rank
required

The voters weight of the delegate. Rank of the delegate. The rank is defined by the voters weight/ approval of a delegates, in relation to all other delegates.
Example : 70

integerOrNull

Node

Query node/status/forging

GET /node/status/forging
Parameters
Name Description Schema

forging
optional

Forging status to filter

boolean

publicKey
optional

Public key to query

string (publicKey)

Query node/transactions/state

GET /node/transactions/{state}
Parameters
Type Name Description Schema Default

Path

state
required

State of transactions to query

enum (pending, ready, received, validated, verified)

"verified"

Query

id
optional

Transaction id to query

string (id)

Query

limit
optional

Limit applied to results

integer (int32)

10

Query

offset
optional

Offset value for results

integer (int32)

0

Query

recipientId
optional

Recipient’s Lisk address

string (address)

Query

recipientPublicKey
optional

Recipient’s public key

string (publicKey)

Query

senderId
optional

Sender’s Lisk address

string (address)

Query

senderPublicKey
optional

Sender’s public key

string (publicKey)

Query

sort
optional

Fields to sort results by

enum (amount:asc, amount:desc, fee:asc, fee:desc, type:asc, type:desc, timestamp:asc, timestamp:desc)

"amount:desc"

Query

type
optional

Transaction type (0-*)

integer

NodeConstants object

Name Description Schema

build
required

The build number. Consists of v + the date and time of the build of the node.
Example : "v09:54:35 12/04/2017"

string

commit
required

The last commit that was added to the codebase.
Length : 40
Example : "7199d4b67c3575d5f99d1c29436a02977eeb01a7"

string

epoch
required

Timestamp of first block on the network.
Example : "2016-05-24T17:00:00.000Z"

string (date-time)

fees
required

Fees

milestone
required

The Reward, each forger will get for forging a block at the current slot. After a certain amount of slots, the reward will be reduced.
Example : "500000000"

string

nethash
required

Describes the network. The nethash describes e.g. the Mainnet or the Testnet, that the node is connecting to.

string

nonce
required

Unique identifier of the node. Random string.
MinLenght: 16, MaxLength: 16, Example: cJmXK66xxz644d67

string

networkId
required

Unique identifier for the network. The networkId that the node is connecting to, see LIP-0009 for more details.
Example : "ed14889723f24ecc54871d058d98ce91ff2f973192075c0155ba2b7b70ad2511"

string

protocolVersion
optional

The Lisk Core protocol version, that the node is running on.
Example : "1.0"

string (protocolVersion)

reward
required

The reward a delegate will get for forging a block. Dependant on the slot height.
Example : "500000000"

string

supply
required

Total supply of LSK in the network.
Example : "10575384500000000"

string

version
required

The Lisk Core version, that the node is running on.
Example : "v0.8.0"

string (version)

NodeStatus object

Name Description Schema

chainMaxHeightFinalized
required

The largest height with precommits by at least 68 delegates. See https://github.com/LiskHQ/lips/blob/master/proposals/lip-0014.md
Example : 123

integer

broadhash
required

Broadhash is established as an aggregated rolling hash of the past five blocks present in the database. Broadhash consensus serves a vital function for the Lisk network in order to prevent forks. It ensures that a majority of available peers agree that it is acceptable to forge.
minLength: 64, maxLength: 64
Example : 258974416d58533227c6a3da1b6333f0541b06c65b41e45cf31926847a3db1ea

string

consensus
required

Percentage of the connected peers, that have the same broadhash as the querying node.
minimum: 0, maximum: 100, Example : 95

integer

loaded
required

True if the blockchain loaded.
Example : true

boolean

networkHeight
required

Current block height of the network. Represents the current number of blocks in the chain on the network.
Example : 123

integer

transactions
required

Transactions known to the node.

object

currentTime
required

Current time of the node in miliseconds, (Unix timestamp).
Example : 1533558858128

integer

height
required

Current block height of the node. Represents the current number of blocks in the chain on the node.
Minimum value : 1
Example : 123

integer

secondsSinceEpoch
required

Number of seconds that have elapsed since the Lisk epoch time, (Lisk timestamp).
Example : 1533558858

integer

syncing
required

True if the node syncing with other peers.
Example : false

boolean

Transactions

Query

GET /transactions
Parameters
Type Name Description Schema Default

Query

blockId
optional

Block id to query

string (id)

Query

data
optional

Fuzzy additional data field to query

string (additionalData)

Query

fromTimestamp
optional

Starting unix timestamp

integer

Query

height
optional

Current height of the network

integer (int32)

Query

id
optional

Transaction id to query

string (id)

Query

limit
optional

Limit applied to results

integer (int32)

10

Query

maxAmount
optional

Maximum transaction amount in Beddows

integer

Query

minAmount
optional

Minimum transaction amount in Beddows

integer

Query

offset
optional

Offset value for results

integer (int32)

0

Query

recipientId
optional

Recipient’s Lisk address

string (address)

Query

recipientPublicKey
optional

Recipient’s public key

string (publicKey)

Query

senderId
optional

Sender’s Lisk address

string (address)

Query

senderIdOrRecipientId
optional

Lisk address

string (address)

Query

senderPublicKey
optional

Sender’s public key

string (publicKey)

Query

sort
optional

Fields to sort results by

enum (amount:asc, amount:desc, fee:asc, fee:desc, type:asc, type:desc, timestamp:asc, timestamp:desc)

"amount:asc"

Query

toTimestamp
optional

Ending unix timestamp

integer

Query

type
optional

Transaction type (0-*)

integer

Transactionrequest

Name Description Schema

asset
required

Displays additional transaction data. For example, this can include the vote data or delegate username.

asset

amount
required

Amount of Lisk to be transferred in this transaction.

string

fee
required

Transaction fee associated with this transaction.

string

recipientId
required

Lisk Address of the Recipients' account.

string (address)

id
required

Unique identifier of the transaction. Derived from the transaction signature.
Length : 1 - 20
Example : "222675625422353767"

string (id)

senderPublicKey
required

The public key of the sender’s account.
Example : "2ca9a7143fc721fdc540fef893b27e8d648d2288efa61e56264edf01a2c23079"

string (publicKey)

signSignature
optional

Contains the second signature, if the transaction is sent from an account with second passphrase activated.
Example : "2821d93a742c4edf5fd960efad41a4def7bf0fd0f7c09869aed524f6f52bf9c974c205"

string (signature)

signature
required

Derived from a SHA-256 hash of the transaction object, that is signed by the private key of the account who created the transaction.
Example : "2821d93a742c4edf5fd960efad41a4def7bf0fd0f7c09869aed5254006591aa759784c205"

string (signature)

signatures
optional

If the transaction is a multisignature transaction, all signatures of the members of the corresponding multisignature group will be listed here.

string (signature) array

timestamp
required

Time when the transaction was created. Unix timestamp.
Example : 28227090

integer

type
required

Describes the transaction type.
Minimum value : 0

integer

Transaction asset

Name Description Schema

amount
optional

Amount of Lisk to be transferred in this transaction.
Example : "150000000"

string

recipientId
optional

Lisk address of the Recipients' account.
Example : "12668885769632475474L"

string (address)

Transaction object

Name Description Schema

asset
required

object

amount
required

Amount of Lisk to be transferred in this transaction.

string

recipientId
required

Lisk Address of the Recipients' account.

string (address)

blockId
optional

The Id of the block, this transaction is included in.
Length : 1 - 20
Example : "6258354802676165798"

string (id)

confirmations
optional

Number of times that this transaction has been confirmed by the network. By forging a new block on a chain, all former blocks and their contained transactions in the chain get confirmed by the forging delegate.
Minimum value : 0

integer

fee
required

Transaction fee associated with this transaction.
Example : "1000000"

string

height
optional

The height of the network, at the moment where this transaction was included in the blockchain.
Minimum value : 1

integer

id
required

Unique identifier of the transaction. Derived from the transaction signature.
Length : 1 - 20
Example : "222675625422353767"

string (id)

ready
optional

Only present in transactions sent from a multisignature account, or transactions type 4 (multisignature registration). False, if the minimum amount of signatures to sign this transaction has not been reached yet. True, if the minimum amount of signatures has been reached.
Example : false

boolean

receivedAt
optional

The timestamp of the moment, where a node discovered a transaction for the first time.

string (date-time)

senderId
optional

Lisk Address of the Senders' account.
Example : "12668885769632475474L"

string (address)

senderPublicKey
required

The public key of the sender’s account.
Example : "2ca9a7143fc721fdc540fef893b27e8d648d2288efa61e56264edf01a2c23079"

string (publicKey)

recipientPublicKey

The public key of the recipient’s account.

string (publicKey)

senderSecondPublicKey
optional

The second public key of the sender’s account, if it exists.
Example : "2ca9a7143fc721fdc540fef893b27e8d648d2288efa61e56264edf01a2c23079"

string (publicKey)

signSignature
optional

Contains the second signature, if the transaction is sent from an account with second passphrase activated.
Example : "2821d93a742c4edf5fd960efad41a4def7bf0fd0f7c09869aed524f6f526591aa759784c205"

string (signature)

signature
required

Derived from a SHA-256 hash of the transaction object, that is signed by the private key of the account who created the transaction.
Example : "2821d93a742c4edf5fd960efad41a4def7bf0fd0f7c09006591aa759784c205"

string (signature)

signatures
optional

string (signature) array

timestamp
required

Time when the transaction was created. Unix timestamp.
Example : 28227090

integer

type
required

Describes the transaction type.

Minium

Maximum

0

7

Minimum value : 0

integer