# Integration

DeBets is made of three main parts: DeBets Client App, DeBets Seamless Server and DeBets Smart Contract. The first two are involved in the process of integrating DeBets with your game server or gaming platform.

The Client App is a HTML5 application that is loaded in the website that uses DeBets, from which the games are launched. This app interacts with the player Wallet and DeBets Seamless Server, implementing DeBets Offchain Transaction Protocol which is used to sign offchain transactions on behalf of the player while games are being played.

The Seamless Server provides Seamless Wallet API which enables the integrating remote party to credit wins, deduct bets and retrieve the player balance during game play. It implements DeBets Offchain Transaction Protocol to transact with the Client App and it interacts with the blockchain to retrieve information about player deposits and to interact with DeBets Smart Contract on behalf of the integrating party.

Whether you are a game provider listing its game on DeBets or a gaming operator using DeBets as a payment solution you will have to ingtegrate DeBets Seamless Server with your gaming platform or your game server. This is a standard seamless integration which normally requires little time if you integrate with DeBets Seamless Server API or no time at all if you request DeBets to adapt to your existing API.

The integration with DeBets Client App instead depends on how DeBets is used. If you are using DeBets as a payment solution for your existing website you will have to load DeBets Client App in your website and interact with it according to its javascript API. If instead you are a game provider integrating your games into DeBets website you are requested to load an external javascript provided by DeBets in the embed page of your games. This will act as a bridge between your games and DeBets Client App, enabling it to be notified when the games are betting and request the game to update its balance.

# Gaming operator intregration

The following diagram shows all the components involved when a gaming operator integrates DeBets in order to use it as a payment solution for its website. The two parts that require integration are shown in red.

The integration consists in:

  • embedding DeBets Client App into the Website by including a <script> tag in the website's page and interact with the app using the javascript API provided by it
  • integrating DeBets Seamless server: this can be done by either adapting to the API that it provides or by requesting DeBets to provide API in the format expected by the operator's gaming platform

# Game provider integration

The integration consists in:

  • loading in the embed page of the games an external javascript provided by DeBets. The purpose of this script is twofold: detect when games are betting and request games to update the balance when a new deposit is created or when a deposit is activated
  • integrating DeBets Seamless server: this can be done by either adapting to the API that it provides or by requesting DeBets to provide API in the format expected by the game provider's game server