Explanation of using the Proof of Server and Verifier
Sadly, one of the limitations of the blockchains is that, one transaction can be executed by only one account only. Therefore, you let to do the transaction to the user.
But what if you want to send the data from the server backend.
For example, for his activity in the game, user could claim a free NFT.
But the parameters of the depends on the large amount of activity, thats kept
on the server side.
How we do it? Fortunately for us, smartcontract has ecrecover function. How we do it? Before user makes a transaction onto the blockchain, he calls the server API to get the signature of data. Signature prooves that the data is from the backend.
One thing, that we find out is that, its hard for Game developers to work with the signatures. It requires more advanced knowledge of the smartcontracts beyond the blockchain general theory.
Seascape SDK provides two modules to work with Server Proofs plus dependency module.
Verifier - Verify if the generated message is valid or not.
Proof of Server - Generate the signature of the data that users can use for Verifier module or in smartcontracts.
SmartcontractDataType - Converter between blockchain data types and JS/TS types.
The following three pages will explain each of the modules.