Dynamic Reward module: Endpoint reference

This page summarizes all API endpoints specific to the Dynamic Reward and the Reward module.

The DynamicReward endpoint class inherits all the endpoints from the Reward module as well. All the aforementioned endpoints are invoked using the dynamicReward prefix.

Endpoints can be invoked as explained in the Connecting via endpoints guide.

dynamicReward_getExpectedValidatorRewards

Returns expected rewards from the DynamicReward module for the given validator.

  • Specification

  • Node CLI

  • cURL

Name Type Description Sample

validatorAddress

string

The Lisk32 address of a validator.

lskguo9kqnea2zsfo3a6qppozsxsg92nuuma3p7ad

lisk-core endpoint:invoke dynamicReward_getExpectedValidatorRewards '{"validatorAddress":"lskguo9kqnea2zsfo3a6qppozsxsg92nuuma3p7ad"}' --pretty
curl --location '127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "dynamicReward_getExpectedValidatorRewards",
    "params": {
         "validatorAddress": "lskguo9kqnea2zsfo3a6qppozsxsg92nuuma3p7ad"
    }
}'
Response
Example output
{
  "blockReward": "513775510",
  "dailyReward": "43097270400",
  "monthlyReward": "1292918112000",
  "yearlyReward": "15730503696000"
}

dynamicReward_getDefaultRewardAtHeight

Returns default reward from the Reward module based on the given height.

  • Specification

  • Node CLI

  • cURL

Name Type Description Sample

height

integer

Height of a block in the blockchain.

102

lisk-core endpoint:invoke dynamicReward_getDefaultRewardAtHeight '{"height":102}' --pretty
curl --location '127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "dynamicReward_getDefaultRewardAtHeight",
    "params": {
         "height": 102
    }
}'
Response
Example output
{
  "reward": "0"
}

dynamicReward_getRewardTokenID

Returns reward token ID from the Reward module based on the given height.

  • Specification

  • Node CLI

  • cURL

Name Type Description Sample

height

integer

Height of a block in the blockchain.

102

lisk-core endpoint:invoke dynamicReward_getRewardTokenID '{"height":102}' --pretty
curl --location '127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "dynamicReward_getRewardTokenID",
    "params": {
         "height": 102
    }
}'
Response
Example output
{
  "tokenID": "0400000000000000"
}

dynamicReward_getAnnualInflation

Returns annual inflation details from the Reward module based on the given height.

  • Specification

  • Node CLI

  • cURL

Name Type Description Sample

height

integer

Height of a block in the blockchain.

102

lisk-core endpoint:invoke dynamicReward_getAnnualInflation '{"height":102}' --pretty
curl --location '127.0.0.1:7887/rpc' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "id": "1",
    "method": "dynamicReward_getAnnualInflation",
    "params": {
         "height": 102
    }
}'
Response
Example output
{
  "tokenID": "0400000000000000",
  "rate": "0"
}