I have a workflow such that an ATA needs to be passed into an instruction in a contract but I would like to check to see whether or not i need to initialize it first on the client (there may be instances where one is expected but has not yet been initialized).
What RPC methods should I use to whether or not the token account has been initialized and what should the workflow look like?
I assume it has something to do with provider.getAccountInfo
. If an account does not exist, what will the response look like? Would it be null or will the RPC call error out?