I have what must be an incredibly simple question, but after a lot of internet searching all i've been able to find is how to do this offchain (ie with getTokenAccountBalance), but how do you do this on chain?
Is it stored in the data for the account? I was trying to find out what the structure of that was but also didn't come up with anything..
Many Thanks to anyone that can shed some light on this!