Adds an api that allows the user to submit a query that contains the solution data and state reads. The api then returns a list of key and values read on the pre state reads (this is basically a list of exactly what pre state is required for an intent, super useful for debugging).
Note there is no need to return the post state reads as this can be computed offline by just applying the state mutations to this pre state.
It can also return the pre and post state slots.
The other usecase for this api is writing pint programs that are only state reads. This will allow running state read queries using pint and the front end apps can interpret the slots to get the results.
Additionally this adds a test that runs all the curl commands in the rest server README.
TODO:
[x] Add comments and docs.
[x] Consider allowing the request to choose between pre slots, post slots or both to save on data.
[x] Refactor reads into funciton
[x] Update readme of rest server to show how to use query-state-reads.
[x] Update rest server test to use query-state-reads.
[x] Add ignored test that uses curl on the path to run every rest server command to check if the readme is up to date.
Adds an api that allows the user to submit a query that contains the solution data and state reads. The api then returns a list of key and values read on the pre state reads (this is basically a list of exactly what pre state is required for an intent, super useful for debugging).
Note there is no need to return the post state reads as this can be computed offline by just applying the state mutations to this pre state.
It can also return the pre and post state slots.
The other usecase for this api is writing pint programs that are only state reads. This will allow running state read queries using pint and the front end apps can interpret the slots to get the results.
Additionally this adds a test that runs all the curl commands in the rest server
README
.TODO:
query-state-reads
.query-state-reads
.curl
on the path to run every rest server command to check if the readme is up to date.