Doing this in Typescript is pretty straightforward by making an RPC call or getOrCreateAssociatedAccount
, but I am wondering if there is a way to do this program side as well without using Anchor.
For example, say I want my program to mint some tokens to a user - but I'll also want the program to create the token account if it does not already exist before minting. Does this check have to be handled on the client side or can I implement the program side as well?