ChangeLog 3.x to 4.x
- Default transactions
- Configuration structural changes
- BigInt replaces BigNum
- applyAsset() becomes asynchronous
- The store returns account as Account instances
- Dynamic fees
- Nonce replaces the timestamp in transactions
- Updated signature of
.sign()
: network identifier and passphrase - Accounts must maintain a minimum balance
- Updated genesis block for devnet
- API changes
Default transactions
Change | Name | Type |
---|---|---|
x |
transfer transaction |
8 |
REMOVED |
second passphrase transaction |
9 |
x |
register delegate transaction |
10 |
UPDATE |
multisignature transaction |
12 |
UPDATE |
vote transaction |
13 |
ADDED |
unlock transaction |
14 |
ADDED |
proof of misbehaviour transaction |
15 |
Update: Multisignature transaction
The registration of a multisignature account has significantly changed in SDK 4.0.
Besides all mandatory properties of a transaction (type, senderPublicKey, etc.), the registration transaction needs to adhere to the following points:
-
The
asset
property needs to contain the propertymandatoryKeys
. The value of this property is an array of pairwise distinct public keys. This array must be ordered lexicographically. Once the account is registered as a multisignature account, every outgoing transaction requires a signature for every public key inmandatoryKeys
. The array may be empty. -
The
asset
property needs to contain the propertyoptionalKeys
. The value of this property is an array of pairwise distinct public keys. This array must be ordered lexicographically. Once the account is registered as a multisignature account, every outgoing transaction requires some signatures for some public keys inoptionalKeys
(the number of required signatures depends on thenumberOfSignatures
property and may also be zero). The array may be empty. -
The sets of mandatory and optional keys, specified by
mandatoryKeys
andoptionalKeys
, must be disjointed; hence their union must have at least one element and at most 64 elements. -
The asset property needs to contain the
numberOfSignatures
property.-
The value must be an integer between 1 and the total number of public keys of the account (sum of optional and mandatory keys).
-
The value must not be smaller than the length of the value of
mandatoryKeys
. -
The value specifies how many signatures are needed for every outgoing transaction from the registered multisignature account, where signatures for mandatory and optional keys are counted.
-
-
The
signatures
property of the transaction object is appended with signatures corresponding to the public keys contained inmandatoryKeys
andoptionalKeys
. All public keys must have a corresponding signature. The signatures corresponding tomandatoryKeys
are appended first, followed by those corresponding tooptionalKeys
, whereby the order of signatures is the same as the order of public keys in the respective array.
The properties lifetime
and keysgroup
are not required anymore.
The address of the multisignature account is the same as the one before the multisignature registration.
That means, this address has to be used as the recipientID
for balance transfers to this multisignature account.
Adding Sender Public Key to Transaction Objects
The senderPublicKey
property has to be provided in all transactions.
The value of this property is always the original public key of the account, i.e. the public key used for registering the multisignature account.
This is the case even if this key does not belong to either the set of mandatory or the set of optional keys.
signatures
replaces signature
Transactions in the Lisk SDK v3.x had multiple properties which can hold these signatures: signature
, signSignature
and signatures
.
The signature
and signSignature
properties were removed and only the signatures
property is kept.
This property is used to hold the signatures necessary to validate transactions.
The items of this array are byte buffers of length 64, or empty byte buffers.
For Multisignature Registration Transaction, signatures
also contains signatures corresponding to the public keys participating in the multisignature account.
Specifically, signatures
is an array composed of a signature corresponding to the senderPublicKey
followed by signatures for the public keys in mandatoryKeys
and optionalKeys
, where the order of signatures
is the same as the order of public keys in the respective array.
For other transactions, signatures
contains exactly one element.
The registration of a multisignature account is updated in the following manner shown below:
const tx = new transactions.MultisignatureTransaction({
asset: {
mandatoryKeys: [
'9d3058175acab969f41ad9b86f7a2926c74258670fe56b37c429c01fca9f2f0f',
'141b16ac8d5bd150f16b1caa08f689057ca4c4434445e56661831f4e671b7c0a',
'3ff32442bb6da7d60c1b7752b24e6467813c9b698e0f278d48c43580da972135',
],
optionalKeys: [],
numberOfSignatures: 3,
},
nonce: '2',
fee: '250000',
});
const tx = new transactions.MultisignatureTransaction({
asset: {
keysgroup: [
'9d3058175acab969f41ad9b86f7a2926c74258670fe56b37c429c01fca9f2f0f',
'141b16ac8d5bd150f16b1caa08f689057ca4c4434445e56661831f4e671b7c0a',
'3ff32442bb6da7d60c1b7752b24e6467813c9b698e0f278d48c43580da972135',
],
lifetime: 34,
min: 2,
},
networkIdentifier: '7158c297294a540bc9ac6e474529c3da38d03ece056e3fa2d98141e6ec54132d'
});
For more detailed information about the introduced changes please refer to LIP 17: Make multisignature accounts more flexible, prevent spamming, and prevent signature mutability. |
Update: Vote transaction
The voting process now has certain changes which can be seen in the code snippet below.
For more detailed information about the introduced changes please refer to LIP 23: Introduce vote locking periods and new vote weight definition.
const tx = new transactions.VoteTransaction({
asset:{
votes:[
{ delegateAddress:'11750255083444888021L', amount: '-1000000000'},
{ delegateAddress:'64373847834494888026L', amount: '3000000000'}
]
},
nonce: '2',
fee: '250000'
});
const tx = new transactions.VoteTransaction({
asset: {
votes: ['+9d3058175acab969f41ad9b86f7a2926c74258670fe56b37c429c01fca9f2f0f',
'-141b16ac8d5bd150f16b1caa08f689057ca4c4434445e56661831f4e671b7c0a',
'-3ff32442bb6da7d60c1b7752b24e6467813c9b698e0f278d48c43580da972135',
],
},
networkIdentifier: '7158c297294a540bc9ac6e474529c3da38d03ece056e3fa2d98141e6ec54132d',
});
BigInt replaces BigNum
In v4.0.0 BigInt is used to handle large numbers, such as account balances and transfer amounts.
BigInt is a built-in JavaScript object and replaces the previously used BigNum
object.
The balances of accounts are now saved as BigInt(previously string ) in the Lisk SDK v4.0.0.
|
applyAsset() becomes asynchronous
The applyAsset()
function of a custom transaction has become asynchronous, so it is necessary to adjust the function in your implementation to something similar as shown below:
The store returns account as Account instances
The accounts that are returned from the store in transactions are now returned as instances of the Account
class instead of pure objects.
Due to this, it is recommended to mutate the received account instance directly.
async applyAsset(store) {
const sender = await store.account.get(this.senderId);
sender.asset = { hello: this.asset.hello };
store.account.set(sender.address, sender);
// [...]
}
applyAsset(store) {
const sender = store.account.get(this.senderId);
const newObj = { ...sender, asset: { hello: this.asset.hello } };
store.account.set(sender.address, newObj);
// [...]
}
Dynamic fees
Static fees are replaced with dynamic fees (see: LIP 13: Replace static fee system by dynamic fee system).
The properties of custom transactions can now be updated as shown below:
-
Removed: The static
FEE
property in a custom transaction. -
Added: The static property
MIN_FEE_PER_BYTE
. This defines the minimum amount of tokens that need to paid per byte of a particular transaction type. This defaults to1000
, but can be overwritten as desired. -
Added: The static property
NAME_FEE
. This defines a specific amount of tokens that always need to be paid as a transaction fee, in addition to the fees generated by theMIN_FEE_PER_BYTE
property. This defaults to0
, but can be overwritten as desired. Among the Lisk default transactions, only one transaction has a customNAME_FEE
: the delegate registration (Type 10) and with aNAME_FEE
of1000000000
.
export abstract class BaseTransaction {
//[...]]
public static MIN_FEE_PER_BYTE = BigInt(1000);
public static NAME_FEE = BigInt(0);
//[...]]
}
The specified fee must always be equal or higher to the defined minimum fee of the corresponding transaction type:
Minimum fee of a transaction = MIN_FEE_PER_BYTE * sizeof(trs) + NAME_FEE
Nonce replaces the timestamp in transactions
The timestamp which was previously a required property has been replaced by a nonce.
Every account in the network has an individual nonce, which is a number that increments +1 each time the respective account sends a transaction to the network.
New accounts always start with a nonce equal to 0. After sending the first outgoing transaction, which should therefore include the nonce = 0, it will increment automatically +1. |
const helloTransaction = new HelloTransaction({
asset: {
hello: 'Hello SDK 4.0',
},
fee: '116000',
nonce: '0',
});
Nonces prevent transaction replays and enable users to invalidate transactions, if so required. For more information about the reasoning behind this change, check out LIP 15: Enable transaction invalidation by using nonces instead of timestamps.
Updated signature of .sign()
: network identifier and passphrase
The network identifier, which had to be specified when creating the transaction object in SDK 3.x, is now specified in the sign()
method of the created transaction instance:
const networkIdentifier = cryptography.getNetworkIdentifier(
"19074b69c97e6f6b86969bb62d4f15b888898b499777bda56a3a2ee642a7f20a",
"Lisk",
);
const passphrase = 'My secret passphrase';
helloTransaction.sign(networkIdentifier,passphrase);
Accounts must maintain a minimum balance
LIP 25: Introduce minimum balance requirement for accounts introduces a new constant minBalance
, which is defining a minimum balance for all accounts in the network.
If the minimum balance for accounts is set to a reasonable value, it prevents the network from certain spam attacks, such as the creation of many new accounts with zero balance.
This possible attack becomes more relevant with SDK v4.0.0, as the dynamic fees allow much lower fees for nearly all default transactions, and therefore the transaction fees alone are not sufficient anymore to prevent this. |
The minimum balance is a constant that is defined in the BaseTransaction
class and defaults to 0.05 tokens.
//[...]
export abstract class BaseTransaction {
MIN_REMAINING_BALANCE = BigInt('5000000'); // 0.05
//[...]
Updated genesis block for devnet
Due to the changes that have been introduced for the structure of transaction objects, the genesis block and its transactions were newly created for the Lisk SDK version 3.0.
See the new genesis block on Github: https://github.com/LiskHQ/lisk-sdk/blob/v4.0.0/sdk/src/samples/genesis_block_devnet.json
See the new devnet config: https://github.com/LiskHQ/lisk-sdk/blob/v4.0.0/sdk/src/samples/config_devnet.json
New genesis account
Name | Address | Passphrase | Description |
---|---|---|---|
Genesis account |
5059876081639179984L |
|
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. |
API changes
The list of API changes only comprises of the parts of the API that changed from Lisk SDK 3.x to 4.x. To see the complete API specification for Lisk SDK 4.x, please refer to the API reference. |
Changes are grouped by the different API endpoints for the Lisk SDK.
Accounts
Query
GET /accounts
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
address |
Address of an account. |
string (address) |
|
Query |
limit |
Limit applied to results. |
integer (int32) |
|
Query |
offset |
Offset value for results. |
integer (int32) |
|
Query |
publicKey |
Public key to query. |
string (publicKey) |
|
Query |
secondPublicKey |
Second public key to query. |
string (publicKey) |
|
Query |
sort |
Fields to sort results by. |
enum (balance:asc, balance:desc) |
|
Query |
username |
Delegate username to query. |
string (username) |
Account definition
Name | Description | Schema |
---|---|---|
address |
The Lisk address is the human readable representation of the account owners public key.
It consists of 21 numbers followed by a capital 'L' at the end. |
string (address) |
asset |
Any JSON stored in the account’s asset field. |
object |
balance |
The current balance of the account in Beddows. |
string |
delegate |
||
isDelegate |
The value indicating if the account is a delegate or not. |
boolean |
keys |
||
missedBlocks |
Total number of blocks that the delegate has missed. |
integer |
nonce |
The current nonce associated to an account for transaction processing. |
string |
producedBlocks |
Total number of blocks that the delegate has forged. |
integer |
productivity |
Productivity rate.
Percentage of successfully forged blocks (not missed), by the delegate. |
number |
publicKey |
The public key is derived from the private key of the owner of the account.
This can be used to validate that the private key belongs to the owner, but does not provide access to the owners private key. |
string (publicKey) |
secondPublicKey |
The second public key is derived from the second private key of an account, if the owner activated a second passphrase for her/his account. |
string (publicKey) |
rewards |
Total sum of block rewards that the delegate has forged. |
string |
totalVotesReceived |
The total votes received by the delegate.
Represents the total amount of Lisk (in Beddows), that the delegates voters voted for this delegate. |
string |
unlocking |
< Unlocking > array |
|
username |
If the account is a delegate, it displays the username for it. |
string |
votes |
< Vote > array |
AccountWithVotes definition
Name | Description | Schema |
---|---|---|
address |
The Lisk address of the queried account. |
string (address) |
asset |
Any JSON stored in the account’s asset field. |
object |
balance |
The balance of the queried account. |
string |
delegate |
||
publicKey |
Public key of the queried account. |
string (publicKey) |
secondPublicKey |
The second public key is derived from the second private key of an account, if the owner activated a second passphrase for her/his account. |
string (publicKey) |
username |
Username of the account, if the queried account is a delegate. |
string (username) |
votes |
List of placed votes by the queried account. |
< VoteWithDelegateProperties > array |
votesAvailable |
Number of votes that are available for the queried account.
Derives from 101(max possible votes) - votesUsed(already used votes). |
integer |
Delegates
Query
GET /delegates
Parameters
Type | Name | Description | Schema | Default | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Query |
address |
Address of an account. |
string (address) |
||||||||||||||||
Query |
limit |
Limit applied to results. |
integer (int32) |
|
|||||||||||||||
Query |
offset |
Offset value for results. |
integer (int32) |
|
|||||||||||||||
Query |
publicKey |
Public key to query. |
string (publicKey) |
||||||||||||||||
Query |
search |
Fuzzy delegate username to query. |
string |
||||||||||||||||
Query |
secondPublicKey |
Second public key to query. |
string (publicKey) |
||||||||||||||||
Query |
sort |
Fields to sort results by. |
|
|
|||||||||||||||
Query |
username |
Delegate username to query. |
string (username) |
Delegate definition
Name | Description | Schema |
---|---|---|
approval |
Percentage of the voters weight that the delegate owns in relation to the total supply of Lisk. |
number |
missedBlocks |
Total number of blocks the delegate has missed. |
integer |
producedBlocks |
Total number of blocks the delegate has forged. |
integer |
productivity |
Productivity rate.
Percentage of successfully forged blocks (not missed) by the delegate. |
number |
rewards |
Total sum of block rewards that the delegate has forged. |
string |
username |
The delegates' username.
A delegate chooses the username by registering a delegate on the Lisk network.
It is unique and cannot be changed later. |
string (username) |
voteWeight |
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. |
string |
consecutiveMissedBlocks |
Number of blocks that the delegate missed consecutively. |
integer |
isBanned |
Whether the delegate is banned or not. |
boolean |
lastForgedHeight |
Height of the block after the latest forging that was executed by the delegate. |
integer |
pomHeights |
Height of blocks where the delegate has been reported for misbehavior. |
< integer > array |
DelegateWithAccount definition (Removed)
Name | Description | Schema |
---|---|---|
account |
||
approval |
Percentage of the voters weight, that the delegate owns in relation to the total supply of Lisk. |
number |
missedBlocks |
Total number of blocks the delegate has missed. |
integer |
producedBlocks |
Total number of blocks the delegate has forged. |
integer |
productivity |
Productivity rate.
Percentage of successfully forged blocks (not missed) by the delegate. |
number |
rewards |
Total sum of block rewards that the delegate has forged. |
string |
username |
The delegates' username.
A delegate chooses the username by registering a delegate on the Lisk network.
It is unique and cannot be changed later. |
string (username) |
voteWeight |
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. |
string |
DelegateWithVoters definition
Name | Description | Schema |
---|---|---|
address |
The Lisk address of a delegate. |
string (address) |
balance |
Account balance.
Amount of Lisk the delegate account owns. |
string |
publicKey |
The public key of the delegate. |
string (publicKey) |
username |
The delegates username.
A delegate chooses the username by registering a delegate on the Lisk network.
It is unique and cannot be changed. |
string (username) |
voters |
List of accounts that voted for the queried delegate. |
< Voter > array |
votes |
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. |
integer |
votes |
Accounts which this delegate voted for. |
< Vote > array |
DelegateWithVotes definition (Removed)
Name | Description | Schema |
---|---|---|
address |
The Lisk address of the queried account. |
string (address) |
balance |
The balance of the queried account. |
string |
publicKey |
Public key of the queried account. |
string (publicKey) |
username |
Username of the account, if the queried account is a delegate. |
string (username) |
votes |
List of placed votes by the queried account. |
Vote array |
votesAvailable |
Number of votes that are available for the queried account.
Derives from 101 (max possible votes) - votesUsed(already used votes). |
integer |
votesUsed |
Number of votes that are already placed by the queried account. |
integer |
DelegatesResponse definition
Name | Description | Schema |
---|---|---|
data |
List of delegates |
DelegateWithAccount array |
data |
List of delegates. |
< Account > array |
links |
object |
|
meta |
meta
Name | Description | Schema |
---|---|---|
limit |
Default : |
integer (int32) |
limit |
Default : |
integer (int32) |
offset |
Node
Query node/transactions/state
GET /node/transactions/{state} |
|
Parameters
Type | Name | Description | Schema | Default | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Path |
state |
State of transactions to query. |
enum (pending, ready, received, validated, verified) |
|
||||||||||||
Query |
id |
Transaction ID to query. |
string (id) |
|||||||||||||
Query |
limit |
Limit applied to results. |
integer (int32) |
|
||||||||||||
Query |
offset |
Offset value for results. |
integer (int32) |
|
||||||||||||
Query |
recipientId |
Recipient’s Lisk address. |
string (address) |
|||||||||||||
Query |
senderId |
Sender’s Lisk address. |
string (address) |
|||||||||||||
Query |
senderPublicKey |
Sender’s public key. |
string (publicKey) |
|||||||||||||
Query |
sort |
Fields to sort results by. |
|
|
||||||||||||
Query |
type |
Transaction type (0-*). |
integer |
NodeStatus definition
Name | Description | Schema |
---|---|---|
chainMaxHeightFinalized |
The largest height with precommits by at least 68 delegates.
See https://github.com/LiskHQ/lips/blob/master/proposals/lip-0014.md |
integer |
currentTime |
Current time of the node in milliseconds (Unix timestamp). |
integer |
height |
Current block height of the node.
Represents the current number of blocks in the chain on the node. |
integer |
secondsSinceEpoch |
Number of seconds that have elapsed since the Lisk epoch time (Lisk timestamp). |
integer |
syncing |
True if the node is syncing with other peers. |
boolean |
unconfirmedTransactions |
Number of unprocessed transactions in the pool. |
integer |
Signatures
Signature definition (removed)
Name | Description | Schema |
---|---|---|
publicKey |
Public key of the account that intends to sign the multisignature transaction. |
string (publicKey) |
signature |
Signature to sign the transaction.
The signature can be generated locally, either by using Lisk Commander or with Lisk Elements. |
string (signature) |
transactionId |
Unique identifier of the multisignature transaction to sign. |
string (id) |
SignatureResponse definition (removed)
Signature response.
Name | Schema |
---|---|
data |
|
links |
object |
meta |
data
Name | Description | Schema |
---|---|---|
message |
Minimum length : |
string |
meta
Name | Description | Schema |
---|---|---|
status |
Acceptance status for the signature |
boolean |
MultisignatureGroup definition (removed)
Name | Description | Schema |
---|---|---|
address |
The Lisk address is the human readable representation of the accounts owners' public key.
It consists of 21 numbers followed by a capital 'L' at the end. |
string (address) |
balance |
The current balance of the account in Beddows. |
string |
lifetime |
The maximum amount of hours, that a transaction will wait for the minimum amount of signatures to be reached.
If not enough members of a multisignature group sign the transaction in the defined lifespan, the transaction will be invalid. |
integer |
members |
Account array |
|
min |
Minimum amount of signatures a transaction needs to be signed successfully by this multisignature account. |
integer |
publicKey |
The public key is derived from the private key of the owner of the account.
It can be used to validate that the private key belongs to the owner, but not provide access to the owners private key. |
string (publicKey) |
secondPublicKey |
The second public key is derived from the second private key of an account, if the owner activated a second passphrase for her/his account. |
string (publicKey) |
MultisignatureGroupsResponse definition (removed)
Name | Description | Schema |
---|---|---|
data |
List of multisignature groups. |
MultisignatureGroup array |
links |
object |
|
meta |
object |
Transactions
Query
GET /transactions
Parameters
Type | Name | Description | Schema | Default | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Query |
blockId |
Block ID to query. |
string (id) |
||||||||||
Query |
data |
Fuzzy additional data field to query. |
string (additionalData) |
||||||||||
Query |
fromTimestamp |
Starting unix timestamp. |
integer |
||||||||||
Query |
height |
Current height of the network. |
integer (int32) |
||||||||||
Query |
id |
Transaction ID to query. |
string (id) |
||||||||||
Query |
limit |
Limit applied to results. |
integer (int32) |
|
|||||||||
Query |
maxAmount |
Maximum transaction amount in Beddows. |
integer |
||||||||||
Query |
minAmount |
Minimum transaction amount in Beddows. |
integer |
||||||||||
Query |
offset |
Offset value for results. |
integer (int32) |
|
|||||||||
Query |
recipientId |
Recipients Lisk address. |
string (address) |
||||||||||
Query |
senderId |
Senders Lisk address. |
string (address) |
||||||||||
Query |
senderIdOrRecipientId |
Lisk address. |
string (address) |
||||||||||
Query |
senderPublicKey |
Senders public key. |
string (publicKey) |
||||||||||
Query |
sort |
Fields to sort results by. |
|
amount:asc |
|||||||||
Query |
type |
Transaction type (0-*). |
integer |
Fees definition (Removed)
Name | Description | Schema |
---|---|---|
dappDeposit |
Example : |
string |
dappRegistration |
Example : |
string |
dappWithdrawal |
Example : |
string |
delegate |
Example : |
string |
multisignature |
Example : |
string |
secondSignature |
Example : |
string |
send |
Example : |
string |
vote |
Example : |
string |
Transaction definition
Name | Description | Schema |
---|---|---|
asset |
object |
|
blockId |
The ID of the block which this transaction is included in. |
string (id) |
confirmations |
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. |
integer |
fee |
Transaction fee associated with this transaction. |
string |
height |
The height of the network, at the exact point in time when this transaction was included in the blockchain. |
integer |
id |
Unique identifier of the transaction.
Derived from the transaction signature. |
string (id) |
nonce |
Unique sequence of number per account. |
string |
ready |
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. |
boolean |
receivedAt |
The timestamp of the exact point in time where a node discovered a transaction for the first time. |
string (date-time) |
senderId |
Lisk Address of the Senders account. |
string (address) |
senderPublicKey |
The public key of the Senders account. |
string (publicKey) |
senderSecondPublicKey |
The second public key of the senders' account, if it exists. |
string (publicKey) |
signSignature |
Contains the second signature, if the transaction is sent from an account with the second passphrase activated. |
string (signature) |
signature |
Derived from a SHA-256 hash of the transaction object,
that is signed by the private key of the account who created the transaction. |
string (signature) |
signatures |
string (signature) array |
|
timestamp |
Time when the transaction was created.
Unix timestamp. |
integer |
signatures |
< string (signature) > array |
|
type |
Describes the Transaction type. |
integer |
TransactionRequest definition
Name | Description | Schema |
---|---|---|
asset |
Displays additional transaction data. For example, this can include the vote data or delegate username. |
|
id |
Unique identifier of the transaction.
Derived from the transaction signature. |
string (id) |
fee |
Fee for the transaction. |
string |
nonce |
Unique sequence of number per account. |
string |
senderPublicKey |
The public key of the senders' account. |
string (publicKey) |
signSignature |
Contains the second signature, if the transaction is sent from an account with a second passphrase activated. |
string (signature) |
signature |
Derived from a SHA-256 hash of the transaction object,
that is signed by the private key of the account who created the transaction. |
string (signature) |
signatures |
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 |
Time when the transaction was created.
Unix timestamp. |
integer |
signatures |
Derived from a SHA-256 hash of the transaction object, that is signed by the private key of the account who created the transaction. |
< string (signature) > array |
type |
Describes the transaction type. |
Describes the Transaction type. |
Unlocking definition (added)
Name | Description | Schema |
---|---|---|
amount |
Amount the account voted the delegate for in multiples of 10 Lisk. |
string |
delegateAddress |
Lisk address of the delegate the queried account unvoted. |
string (address) |
unvoteHeight |
Height at which the unvote should be valid. |
number |
Voters
Query
GET /voters
Description
Attention: At least *one of the filter parameters must be provided.* Returns all votes received by a delegate.
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
address |
Address of an account. |
string (address) |
|
Query |
limit |
Limit applied to results. |
integer (int32) |
|
Query |
offset |
Offset value for results. |
integer (int32) |
|
Query |
publicKey |
Public key to query. |
string (publicKey) |
|
Query |
secondPublicKey |
Second public key to query. |
string (publicKey) |
|
Query |
sort |
Fields to sort results by. |
enum (publicKey:asc, publicKey:desc, balance:asc, balance:desc, username:asc, username:desc) |
|
Query |
username |
Delegate username to query. |
string (username) |
Voter definition
Name | Description | Schema |
---|---|---|
address |
The Lisk address of the account that voted for the queried delegate. |
string (address) |
balance |
Balance of the account that voted for the queried delegate. |
string |
publicKey* |
Public key of the account that voted for the queried delegate. |
string (publicKey) |
votes |
All votes the voter for the queried delegate voted for. |
< Vote > array |
Votes
Query
GET /votes
Description
Attention: At least *one of the filter parameters must be provided.* Returns all votes placed by an account.
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query |
address |
Address of an account. |
string (address) |
|
Query |
limit |
Limit applied to results. |
integer (int32) |
|
Query |
offset |
Offset value for results. |
integer (int32) |
|
Query |
publicKey |
Public key to query. |
string (publicKey) |
|
Query |
secondPublicKey |
Second public key to query. |
string (publicKey) |
|
Query |
sort |
Fields to sort results by. |
enum (username:asc, username:desc, balance:asc, balance:desc) |
|
Query |
username |
Delegate username to query. |
string (username) |
Vote definition
Name | Description | Schema |
---|---|---|
address |
Lisk address of the delegate the queried account voted for. |
string (address) |
amount |
Amount the account voted the delegate for in multiples of 10 Lisk. |
string |
delegateAddress |
Lisk address of the delegate the queried account voted for. |
string (address) |
balance |
Balance of the delegate the queried account voted for. |
string |
publicKey |
Public key of the delegate the queried account voted for. |
string (publicKey) |
username |
Username of the delegate the queried account voted for. |
string (username) |
VoteWithDelegateProperties definition (added)
Name | Description | Schema |
---|---|---|
amount |
Amount the account voted the delegate for in multiples of 10 Lisk. |
string |
delegate |
Delegate properties of the delegate for this vote. |
object |
delegateAddress |
Lisk address of the delegate the queried account voted for. |
string (address) |