Rights Table

GET https://api.tzpro.io/tables/rights?args
List detailed rights for baking (all priorities 0..63) and endorsing. This table is extended with future data from cycle n+5 at the start of a new cycle N. During a cycle, rights for each block are updated according to actual baker, priority and endorsers.

HTTP Response

Field
Description
row_id uint64
Unique row identifier.
cycle int64
Cycle this right relates to.
account_id uint64
Unique row_id of the baker who owns this right.
baking_rights hex
Bitset for round 0 baking rights.
endorsing_rights hex
Bitset for round endorsing rights.
blocks_baked hex
Bitset for blocks baked.
blocks_endorsed hex
Bitset for blocks endorsed.
seeds_required hex
Bitset for block seed nonce commitments where the baker is required to publish a nonce_revelation in the next cycle.
seeds_revealed hex
Bitset for actually revealed seed nonces.
address hash
Address of the baker who owns this right.
height int64
Block height at cycle start.

Example Request

curl "https://api.tzpro.io/tables/rights?address=tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m&cycle=154&limit=1"
import (
"context"
"blockwatch.cc/tzstats-go"
)
// create a new query object
q := tzstats.DefaultClient.NewRightsQuery()
// add filters and configure the query
q.WithFilter(tzstats.FilterModeEqual, "address", "tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m").
WithFilter(tzstats.FilterModeEqual, "cycle", 154).
Limit(1)
// execute the query
list, err := q.Run(context.Background())
// process rights
if _, row := range list.Rows {
}

Example Response (comments added for explanation)

[
[
60555268, // row_id
154, // cycle
278469, // account_id
"0000000000000200..", // baking_rights
"fff777b7774cfb2f..", // endorsing_rights
"0000000000000200..", // blocks_baked
"fff777b7774cfb2f..", // blocks_endorsed
"4000000000004000..", // seeds_required
"4000000000004000..", // seeds_revealed
"tz2TSvNTh2epDMhZHrw73nV9piBX7kLZ9K9m", // address
630785 // cycle start height
]
]