Closed obycode closed 6 days ago
The API does not receive or store events like on data-map change
.
If that event does exist on stacks-core, I don't think this API would be an appropriate service to handle them. I'd recommend creating a new service for something like "extended-clarity-data-store" which could focus on doing that at scale.
Closing due to above.
In the stacks-node, we have an RPC endpoint to retrieve a value from a data map, but we have no way to retrieve all of the keys currently in that map. Having a list of all keys in a data map is useful in many situations, and how to get these keys is an often asked question. The solution often recommended currently is to include a list in the contract that gets updated whenever map is updated, but this adds unnecessary on-chain cost. Alternatively, the set of keys can be tracked off-chain by each user.
This seems like something that the API could probably expose, since it can track the events and store this information in the databases (maybe it already does, I'm not sure).