Probably for a different PR: would it make sense to store this info in the database somehow? Like for every input note we could have "consumed by" field which would be set to account ID which consumed the note and null otherwise.
I guess the difficulty here would be to figure out when to fill this field (e.g., when a transaction is submitted to the node, or when it is recorded on chain).
Originally posted by @bobbinth in https://github.com/0xPolygonMiden/miden-client/issues/325#issuecomment-2099305918