Node Rewards Program module doesn't have service to communicate with API.
What's the fix?
Added Node Rewards Program service.
Added prepareEnrollTransaction() which returns transfer transaction filled with an enrollment data.
Added checkEnrollmentAddress() which calls /enrollment/check/address/<address_str> and maps result to boolean.
Added checkEnrollmentStatus() which checks if a signer public key is enrolled in the current period. It fetches latest successful enrollments from /enrollment/successes/<public_key_str> and check wheter a recipient address is the current enrollment address.
Added getEnrollmentHash() which fetches codeword dependent hash from /codeword/<public_key_str>.
Added getNodePayouts() which fetches payout information for a single node from /node/<int:node_id>/payouts.
Added getNodeInfo() which fetches detailed information about a single node from /node/<node_id>.
What was the issue?
What's the fix?
prepareEnrollTransaction()
which returns transfer transaction filled with an enrollment data.checkEnrollmentAddress()
which calls/enrollment/check/address/<address_str>
and maps result toboolean
.checkEnrollmentStatus()
which checks if a signer public key is enrolled in the current period. It fetches latest successful enrollments from/enrollment/successes/<public_key_str>
and check wheter a recipient address is the current enrollment address.getEnrollmentHash()
which fetches codeword dependent hash from/codeword/<public_key_str>
.getNodePayouts()
which fetches payout information for a single node from/node/<int:node_id>/payouts
.getNodeInfo()
which fetches detailed information about a single node from/node/<node_id>
.