When using a VaultNamedParameterizedQuery in a flow, it always returns a ResultSet with a List<StateAndRef> where T is a ContractState. This gives you access to the contract state itself, the notary name, notary key, encumbrance group, and a state ref. However, it would be great if one could get more information about the state like the recorded timestamp and a consumed timestamp or flag.