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.
Name | Type | Description | Sample |
---|---|---|---|
|
string |
The Klayr32 address of a validator. |
klyguo9kqnea2zsfo3a6qppozsxsg92nuuma3p7ad |
klayr-core endpoint:invoke dynamicReward_getExpectedValidatorRewards '{"validatorAddress":"klyguo9kqnea2zsfo3a6qppozsxsg92nuuma3p7ad"}' --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": "klyguo9kqnea2zsfo3a6qppozsxsg92nuuma3p7ad"
}
}'
Response
{
"blockReward": "513775510",
"dailyReward": "43097270400",
"monthlyReward": "1292918112000",
"yearlyReward": "15730503696000"
}
dynamicReward_getDefaultRewardAtHeight
Returns default reward from the Reward
module based on the given height.
Name | Type | Description | Sample |
---|---|---|---|
|
integer |
Height of a block in the blockchain. |
102 |
klayr-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
{
"reward": "0"
}
dynamicReward_getRewardTokenID
Returns reward token ID from the Reward
module based on the given height.
Name | Type | Description | Sample |
---|---|---|---|
|
integer |
Height of a block in the blockchain. |
102 |
klayr-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
{
"tokenID": "0400000000000000"
}
dynamicReward_getAnnualInflation
Returns annual inflation details from the Reward
module based on the given height.
Name | Type | Description | Sample |
---|---|---|---|
|
integer |
Height of a block in the blockchain. |
102 |
klayr-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
{
"tokenID": "0400000000000000",
"rate": "0"
}