Bigmap Value Table
GET https://api.tzpro.io/tables/bigmap_values?args
Lists individual bigmap values exist in a bigmap at the time of the call. Use this table to bulk-fetch large quantities of bigmap content. A better way might be to use the explorer API endpoints.
Field | Description |
---|---|
row_id uint64 | Unique row identifier. |
bigmap_id int64 | Unique on-chain id of the bigmap. |
height int64 | Height when this key was last updated. |
time datetime | Time of the latest key update. |
key_id uint64 | Short hash of the bigmap key. |
hash string | Tezos script expression hash of the key. |
key string | Hex string with Micheline encoded data for the key. |
value string | Hex string with Micheline encoded data for the value. |
curl "https://api.tzpro.io/tables/bigmap_values?bigmap_id=515&limit=1&order=desc"
import (
"context"
"blockwatch.cc/tzstats-go"
)
// create a new query object
q := tzstats.DefaultClient.NewBigmapValueQuery()
// need typs for decoding
info, err := tzstats.DefaultClient.GetBigmap(
context.Background(),
511,
tzstats.NewContractParams().WithPrim(),
)
keyType := info.MakeKeyType()
valType := info.MakeValueType()
// add filters and configure the query to list all active keys
q.WithFilter(tzstats.FilterModeEqual, "bigmap_id", 511).
WithLimit(1).
WithOrder(tzstats.OrderDesc)
// execute the query
list, err := q.Run(context.Background())
// walk bigmap updates
for _, row := range list.Rows {
// access BigmapRow structs (use TzGo Type/Value to decode binary data)
key := row.GetKey(keyType)
val := row.GetValue(valType)
}
[
[
3447263, // row_id
515, // bigmap_id
3143289717337607700, // key_id
1669888, // height
"07070a0000001600003f365276e50080856992f4382eaf5e4e6e6b93360000", // key
"00bca2f501", // value
"exprucYwnpqVYDKuUkPsoGAJ4213DjAJHef2FSqrLx66aFoyEn1Ygv" // key_hash
1630908360000 // time
]
]
Last modified 1mo ago