Jumpstart: TRAIT backend services
Intro
TRAIT Blockchain was built to achieve the max performance and security and operates with raw binary data. To integrate gaming applications with the TRAIT you can use two indispensable services with REST API.
DataGate
TRAIT DataGate is a backend service that provides all blockchain data that a gaming application may need:
historical data such as history of token transfers / blocks / transactions / events;
current state of blockchain such as token balances or metadata of tokens;
You can hop on the DataGate API portal and test it out: TRAIT DataGate API Docs
The screencast below demonstrates how to get information about tokens and transfers we made in the previous section.
TODO Screencast with using of DataGate API via DataGate API portal.
ActionGate
TRAIT ActionGate is the backend service that builds new transactions and sends them to the blockchain. It's open source and shall be launched on your server.
ActionGate provides REST API that works as following:
receive information about transaction that needs to be built;
build a transaction. Result is the binary data;
Sign the transaction with the key of AppAgent admin;
Send transaction to the blockchain;
ActionGate encapsulates all intricate details of building blockcahin transactions so that you don't need to dive into this. Also ActionGate manages private keys of your AppAgent Admin - it greatly increases security.
The screencast below demonstrates how to launch and use ActionGate.
TODO screencast: launch ActionGate in AWS Lambda, open SwaggerUI, make a Clearing transaction to mint tokens, set meta. See the token in the TRAIT wallet.
Quick References
Last updated