I was wondering if anyone could provide insight into the following:
Let's say I have a Web2 game where a character can run around, fight enemies, and eventually is able to open a chest to receive an item. Opening the chest in the game would trigger a request to some contract on chain to reward the player with an NFT that represents the item they get.
I'm struggling to understand how this can work in a secure way. Given anyone can access the on chain program and call the "open chest" function, how do people ensure that the request really came from the game, and that the player really did open the chest?
I started to go down a bit of a rabbit hole involving ZK proofs and transaction roll ups.. and thought I might ask here to see if anyone had any ideas.
Cheers