Managing a live blockchain game requires a robust ecosystem of architecture that is in constant communication with the Ethereum Network.
As this diagram shows, a basic blockchain interaction is a simple six-step process.
In this example, let's consider the case of a user trying to sell a sword:
Enjin's smart contract is responsible for executing transactions (commands) via the Ethereum Network on your behalf.
It is the core piece of on-chain infrastructure that creates, augments, and transacts your game's blockchain inventory.
Trusted Cloud is the main backend service of the Enjin Platform. It is a cloud-hosted service that connects games to the Ethereum blockchain.
Trusted Cloud acts as a hub, gathering requests from clients, game servers, and the Enjin Wallet, interacting with Enjin's smart contracts on Ethereum, and returning data back to the game. It also manages the link between users’ game accounts (e.g., SteamID, Xbox Live) and their blockchain identity (e.g., currently linked blockchain wallet address).
To save you having to build logic for interacting with our smart contract or the Enjin Wallet app directly, we provide a server that includes a convenient Application Programming Interface (API) to facilitate communication.
The Trusted Cloud includes better error handling and input validation than directly interacting with our smart contract would allow. It also pushes notifications about a given transaction's state to your game.
There are two separate Trusted Cloud servers: Testnet and Mainnet.
Testnet is an Ethereum test network where Ethereum and Enjin Coin do not carry any value and it’s easy to obtain any amount of either. Thus, the Testnet offers an inexpensive way for you to prototype and test out your creations before taking them to production.
Mainnet is the real Ethereum network—transactions on it cost real cryptocurrency. You should be very comfortable with your implementation on Testnet before doing anything on Mainnet.
Your game can communicate with the Trusted Cloud using the GraphQL query language.
GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more.
Every user has their own unique blockchain address and all transactions to be executed on the blockchain need to be signed (authorized) using that user's private keys.
The Enjin wallet provides a seamless signing process that makes it easy to execute complex commands via Enjin's smart contracts.
If you are unsure on how to get started with the Enjin Wallet, we highly recommend going through our connecting your Enjin Wallet guide for further information.
The Wallet Daemon is a tool that you can use to automate the authorization of transaction requests to and from the Trusted Cloud.
Without the Wallet Daemon, you would need to sign every in-game blockchain transaction via the Enjin Wallet (e.g., sending a sword to a player).
Wallet Daemon manages an Ethereum address linked to a Trusted Cloud identity. When a transaction is submitted on the Trusted Cloud, the Wallet Daemon receives that transaction, signs it, and sends it back to the Trusted Cloud.
Currently, only a console version of the Wallet Daemon is available. In the future, we will likely create a simple graphical user interface to make it easier for you to use.
If you are in need of further assistance regarding the Enjin Wallet Daemon, we recommend checking out our Wallet Daemon guides.