abstract fun queryStates(query: StatesQuery): List<StateRef>Query your "local" states (containing only outputs involving you) and return the hashes & indexes associated with them to probably be later inflated by fetchLedgerTransactions() or fetchStates() although because immutable you can cache them to avoid calling fetchLedgerTransactions() many times.
query - Some "where clause" like expression.Return
Zero or more matching States.