Master Node RPC Guide
A detailed guide for Masternode RPC endpoints
JSON 2.0 RPC Calls
get_quorum_state
Get the quorum state which is the list of public keys of the nodes who are voting, and the list of public keys of the nodes who are being tested.
Testnet Example
Result
Nodes have been omitted with “...” for brevity in nodes_to_test and quorum_nodes.
Inputs
Int height
The height to query the quorum state for
Outputs
String[] nodes_to_test
An array of public keys identifying service nodes which are being tested for the queried height.
String[] quorum_state
An array of public keys identifying service nodes which are responsible for voting on the queried height.
get_staking_requirement
Get the required amount of Beldex to become a Master Node at the queried height. For stagenet and testnet values, ensure the daemon is started with the --stagenet or --testnet flags respectively.
Testnet Example
Result
Inputs
Int height
The height to query the staking requirement for
Outputs
Uint64 staking_requirement
The staking requirement in Beldex atomic units for the queried height
get_master_node_key
Get the master node public key of the queried daemon. The daemon must be started in --maste-node mode otherwise this RPC command will fail.
Testnet Example
Result
Inputs
N/A
Outputs
String master_node_pubkey
The public key identifying the queried master node
get_master_nodes
Get the metadata currently associated with the queried master node public keys such as, registration height and contributors, etc. If no public key is specified, this returns all the metadata for every service node the queried daemon currently knows about.
Testnet Example
Result
Inputs
String[] master_node_pubkeys
An array of master node public keys in strings that you wish to query metadata for. If an empty array is given, this RPC command returns all master nodes it knows about.
Outputs
Entry[] master_node_states
The array of metadata for the queried master node(s)
String master_node_pubkey
The queried master node’s identifying public key
Uint64 registration_height
The height at which the registration transaction arrived on the blockchain
Uint64 last_reward_block_height
The last block height this master node received a reward. Rewards are sent to service nodes whom have been waiting longest since their last reward and are then sent to the back of the queue.
Uint64 last_reward_transaction_index
The position in the queue to receive a reward for the master nodes grouped in the last_reward_block_height.
Uint64 last_uptime_proof
Unix epoch timestamp of the last time this daemon has received a ping from the queried master node.
Contribution[] contributors
An array consisting of all the addresses that have contributed to the queried master node.
Uint64 Contribution.amount
The amount of Beldex in atomic units the contributor has staked.
Uint64 Contribution.reserved
The amount of Beldex in atomic units the contributor has reserved and must fulfill to completely contribute their part to the service node. Amount is equal to reserved once the contributor has fully contributed their part.
String Contribution.address
The Beldex address that funds must come from to fulfill the contribution requirement.
Uint64 total_contributed
The total Beldex currently contributed going towards the staking requirement.
Uint64 total_reserved
The total Beldex that has been reserved by all contributors. The remaining Beldex is open for other contributors to increase their stake towards the master node.
Uint64 portions_for_operator
The operator cut expressed as a value from 0 -> STAKING_PORTIONS (defined in beldex/src/cryptonote_config.h) which is the fee taken from the master node reward and given to the operator address before rewards are distributed to the contributors.
Uint64 operator_address
The wallet address which is the primary owner of the master node and also the address which the operator cut is sent to.
Last updated