API state is the state the is not part of the proof and is used to respond to api queries on the app.
API state should be updated in it's own stream separately to the main app stream.
API state can be derived from Blocks, AppState and in the future AppLogs. These 3 things need to be kept around in a cache so that the API state can be derived.
Cache
The dev needs to be able to pass in their own cache type. This should be used by the state transition helper to cache the block and any logs.
On state update
We also need a helper that returns a reference to the block that only runs after the state transition but before the next state transition. Need sync and async versions. Should take state as well.
API state is the state the is not part of the proof and is used to respond to api queries on the app.
API state should be updated in it's own stream separately to the main app stream.
API state can be derived from
Blocks,AppStateand in the futureAppLogs. These 3 things need to be kept around in a cache so that the API state can be derived.Cache
The dev needs to be able to pass in their own cache type. This should be used by the state transition helper to cache the block and any logs.
On state update
We also need a helper that returns a reference to the block that only runs after the state transition but before the next state transition. Need sync and async versions. Should take state as well.