TRAIT ActionGate
Intro
Creating a blockchain transaction is a complex process that requires in-depth knowledge of blockchain and basics of cryptography. Also it needs access to the private keys, which imposes high security requirements.
ActionGate is a backend service run on the server of the game studio that solves both issues:
provides convenient REST API to create new blockchain transactions;
securely manages private keys used to sign the transactions;
How it works
ActionGate is the micro-service that is run on the server of the game studio. It doesn't use any database and is a very light-weight service.
When the ActionGate is launched, it receives the private keys of the AppAgent Admins. Private keys are received in the form of JSON file. This file can be configured by the regular DevOps techniques for safely storing private keys. Later private keys of AppAgent admins are used to sign the blockchain transactions.
ActionGate provides REST API for other apps of the game studio. When an app calls ActionGate API it provides information required to build & sign a TX. For example, to mint a NFT the app needs to provide: AppAgent ID, NFT Collection ID, NFT ID, owner of the NFT, name of the AppAgent Admin. Having these data the ActionGate builds a transaction and sends it to the blockchain. Client app receives the transaction hash to check the status of transaction later - this can be done via TRAIT DataGate.
Benefits
The indispensable benefit of using the ActionGate is that app developers don't need to dive into how blockchain transactions are built and signed. This saves a lot of effort and time.
Another benefit is the storing & using private keys separately from game' business logic. This significantly increases the security of private keys.
Sources
You can find sources of ActionGate on GitHub. Repo contains detailed information on how to launch and use the service.
Last updated