2

How are dApp devs currently pulling in a given BigMap's values or keys? I'm pinging tzkt's API after I retrieve the BigMap’s address from the chain and I'm wondering if there's a better, and/or less centralized way to do this?

// example on Jakartanet
const response = await fetch(`https://api.jakartanet.tzkt.io/v1/bigmaps/${someBigMapId}/keys`);
1
  • Just for your info: you can spin up your own instanse of tzkt and it won't be centralized ;)
    – Groxan
    Aug 10, 2022 at 9:58

1 Answer 1

3

You can also use ../<block_id>/context/big_maps/<big_map_id>?[offset=uint]&[length=uint] to get the list of values in a big map. About keys, those are not stored in the tezos node and you need to index them or have a deterministic way to find them.

1
  • Answered my question perfectly, thank you!
    – Johnny
    Oct 12, 2022 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.