Only this pageAll pages
Powered by GitBook
1 of 73

Elixir SDK

Loading...

DASHBOARD

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Elixir Gamer Services

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

API

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

🕴️ QUICK START GUIDE

This page will help you getting started with Elixir. You'll be up and running in a jiffy!

ℹ️ Overview

Welcome to the best ecosystem for gamers to enjoy web3 games. We are bullish on a place without friction where gamers can easily click and play any game on the platform, avoiding tedious login forms or wallet links only available for the most brilliant engineers...

We are actively building with love a combination of a developer dashboard where publishers can handle all their game info in an accessible way and a game launcher for gamers to enjoy the best games easily and socially.

You, game publishers, are the cheese to our pizza. We tried to make the integration path the smoothest possible. This is why we provided a documented onboarding guide and an API SDK in Unity and Unreal for you to integrate with us.

1. Become a Publisher

From there, you'll be able to start with your game setup:

2. Set up your Keys

All interactions against the Elixir API should be authenticated via an API Key.

More than that, we provide a development key to allow you to develop the integration locally and a production key for when you are ready to go live!

Once you have your game set up, you can generate your unique API Keys to start with the integration with Elixir Launcher:

To get started with the integration, you will find the following:

3. Upload new builds

Now that you integrated your game with the Elixir System, you are ready to upload it to our servers and start distributing it through the Launcher.

But don't panic. You'll find several options before going public so you can test that everything is working fine from the launcher side. And once everything is ready, you'll be able to handle all your game's releases smoothly:

4. Game Release

Astronauts ready, engines ready... You are ready to launch! We know this is an essential step in a game's life, and we want it to be perfect

In Elixir, you'll find some extra features that will make the experience for you and the gamers unique:

Import NFTs Collection

Your NFTs are about to be transformed into Elixir Skins, but previously, you'll need to tell us where we should look for them:

Access codes distribution

Take control of your game distribution. Generate unique access keys and distribute them as you wish:

Tournaments

Activate your community, configure and host custom tournaments for the entire Elixir community to enjoy!

First, you'll need to request access to the . To do so, you'll need to create an account in and then request access from the support team. If you are a verified publisher, you'll be granted access to the dashboard.

The complete experience

👏
Elixir Dashboard
Elixir
Add a new Game
API Keys
Unity
Unreal Engine
Elixir REST API
Version control
NFT Collections
Beta Codes
Tournaments

Version control

Uploading your Game Build

Uploading a game

Recommendations

We recommend to upload a zip file made out of selecting all the files in the Game Build instead than doing it from a folder as follows:

Handle branches

Master Branch

The Master Branch is used for public release. Once a new version of the game has been approved and a new release is on the way. Users must create a new build on Master and upload there the Game Build in a new Depot.

We recommend to upload the Game Build to the TEST branch first in order to check that everything is running correctly before making it public.

Test Branch

This branch is also used for the pre-alpha versions when a game is not released yet.

Develop Branch

Upload your build for internal testing. Check out the SDK integration and make the last adjustments before releasing the game with your audience.

Only whitelisted developer accounts will have access to this build.

This branch is used for closed beta access using . Publishers can upload every new version of the game to test it internally or with the community before making it public.

Beta Codes
Update your game

API Keys

Interact with the Elixir API with your game credentials

Overview

Each publisher can generate their Game API Keys, which are unique for each game, to interact with the Elixir API service.

You will be using your public key for:

  1. Retrieve information from Elixir about the player using your game, to get their username, avatar, wallet addresses or owned NFTs, for example.

  2. In general, the public key is considered safe to be included in your game client.

The private key on the other hand, is needed to:

  1. Sign requests that update information on Elixir, like posting tournament scores.

  2. We recommend against including your private key in any form in your distributable game clients, as it should be used primarily from your game backend.

If you lose or want to change for security reasons your keys, you will need to delete an existing key pair and generate a new one. This of course will imply you'll need to upload a new version / build of your game. This allows you to disable a game build, as all requests made using the removed key pair will be rejected by Elixir.

Environments

Every publisher will be allowed to generate key pairs for two different environments:

Development

These API Keys allow developers to access the Elixir API in development mode, and are intended to test the integration with Elixir locally. You'll use development API keys to:

  • Generate user credentials for development.

  • Use protected endpoints for development, like hidden tournaments and submitting fake scores before publishing a tournament.

Production

These API Keys grant access to the Elixir API in production mode. Switching to the Production API Key must be done when building and releasing the final build, since requests using development keys will be rejected in production.

Leaking a build with a Development API Key in the production environment will lead to request being rejected by Elixir and errors, leading to a bad user experience.

Generate your keys

Navigate to the API Keys page in the developer dashboard and generate your developer keys.

Make sure to save your private key when generating it, as you won't be able to retrieve it again. Do not share your private key with anyone and don't include in any version control system like Git, as it will be exposed in the Git history.

Please be aware that the Elixir Keys are generated in pairs, including a public key and a private key. The public key will be constantly available at the Developer Dashboard, but the Private key will not be stored in Elixir for security reasons, so please save it once generated, as we cannot show the private key back again. We don't keep it!

😄

Add a new Game

Uploading a game on the Elixir Platform is extremely easy. Let's get you onboarded.

1. Register as a Publisher

Once you have created an account, contact our team to give you access to the Publisher Dashboard.

2. Create a New Game

Sometimes, the Elixir Games team may already have created the game for you in advance. If this is your case, you can skip this point and go to point 3: "Edit a Game".

4. Set up

  • The editing process can be done in different stages: You can save the status of what you edited and continue with it later.

  • If your organization is sharing the publisher account with many members, avoid making changes simultaneously, as it may lead to overlapping errors and loss of information.

  • Once you are done with your game edit, you can proceed with point 5: "Submit your Game".

We have separated the game information into different sections:

Let's start by creating an account on the Elixir Publisher platform before uploading to the game. Registering on Elixir is quite simple. Go to the and fill in your details.

To harness the full potential of our innovative game launcher, your journey begins with the .

Once you have created a game, you will now be able to . You must be aware that,

Then a Platform manager will review the content and evaluate if it .

launcher.elixir.app
creation of a game
modify the contents
qualifies for approval

Review Guidelines

See the Elixir App policy before submitting a Game for review to avoid getting rejected.

Management

Manage all publishing sections related to your game. Handle Media, import your NFTs upload builds and much more!

Create a Game

  1. Go into the Games page and click on (+) Create

  1. Add the Game name and select a Network or select N/A if not applicable.

Please introduce the Game name and how you want it to be displayed on the platform. Avoid using non-alphanumeric characters. You can edit these fields later.

  1. Congrats! You have created your game

Add a Build

1. Your First Build

Builds in Elixir Platform are used for version control. Every new Build represents a new version of the Game. Creating a build is a simple task:

  • Choose your own version naming

  • Have control of which build you have active to perform new releases and rollbacks

Do not forget to activate the Build once everything is ready. Also, you can always de-activate it when you want to close the access to the game. Or perform a roll-back by activating older builds just by using the toggles:

2. Your First Depot

Now that you have created a Game Build. Let upload the file so you can start playing it. For this you will need to configure the Depot: A configuration file that will include information about the Game File and how to execute it.

  • Installation Path: Do not modify this path. We are planning on removing it from here for the next version.

Add a Collection

Import NFT Collections

We support collections listed on Opensea, MagicEden and Rarible

With support for Solana, Ethereum, Polygon, Binance Smart Chain, Arbitrum, ImmutableX... And more coming on board very often!

Import collections from any of the supported marketplaces is as simple as pasting the collection URL from that specific marketplace, selecting the appropriate blockchain if necessary and defining what use you intend.

  • Cross-IP: Switch on this if the imported collection is not your original artwork.

  • Coming Soon: Switch on this if the imported collections are not already playable in the game.

Opensea

Magic Eden

Set-Up

1. General

In this section, you'll have the capability to edit your game's details. These details will be presented on the Launcher Game page in the following format:

  • Name: Will be displayed in caps. Avoid entering long game names

  • Headline: Short description + call to action of the game

  • Game Info: All relevant game information for the customers

  • Description: All information about what players should expect about your game: Lore, Game Modes, Personalization, Interaction with NFTs, Tokens...

2. Media

The Media section empowers publishers to upload all the graphic content destined for display on the Game Page:

  • Game Card: Game card image. Resolution: 512 x 576 px.

  • Background Cover: Used as the background for your game. This image will be visible in the Game page. If no image is uploaded, the fallback will be the first Carousel image. Resolution 1920 x 1080 px

  • Images: Used to showcase your game. These images will be visible on the Game page: Visual Arts + Gameplay pictures. Resolution: 1920x1080 px

  • Logo: Used as the logo for your game. This image will be visible on the Game page. Resolution 256 x 356 px

  • Videos: Video trailer of the Game. Resolution: 1920 x 1080 px (mp4 or webm)

  • Publisher Icon: Company Logo. Resolution: 256 x356 px. (Removed temporarily due to refactor duties)

Here you can see the relations between the published media containers and the Launcher's Game Page:

3. Language & Social

Here you can provide more information about the Game languages supported. And also here is the place where you can add the social media links of your game.

Please be aware that we have removed the Facebook reference. This should be fixed for the next version. We apologize for the inconvenience.

4. Specifications

Here you will be able to provide useful information about the technical requirements that your game requires to be run on a PC. In case that you don't see the computer specifications that your game requires, please contact support and we will add it as soon as we can.

Launch Command: It should follow a structure like "<InstallationPath>/<route to the executable file>". See

NFT Access: NFTs from this collection provide owners with immediate, private access to your game without the use of .

Add a new Game
Version control
NFT Collections
Beta Codes
Recommendations
beta codes
Creating a new API Key, make sure to save your private key on a safe place
Game Specifications will be displayed in the Launcher as in the image below
Elixir Dev Dashboard - Import Collections
Elixir Launcher Game Page. Click image to see info
Relations between media and the Launcher's Game Page. Click to view full wide.
Your social links will be displayed in the Game Page as in the Image.

Upgrade Versions

Every new Build represents a new version of the Game. So every time that a publisher wants to release a new version of the game, it is needed to create a new build, and then activate it. When users launch Elixir, it will detect a new version is available and will prompt users to download the update before playing.

When the old build is active, users will be able to keep playing.
When a new build is activated. The players are forced to update

NFT Collections

In this guide, we show you step by step how to import NFTs collections to the Elixir Platform, to be used with your game.

Overview

You, as the game developer, would like to know which NFTs (if any) the current player of your game own, in order to adapt their game experience accordingly. We, as the Elixir platform, hold the information about registered users you care about, like their username, avatar, and wallet addresses of the blockchains your game is interested on, for example.

You can import your personal collections, or even use existing third-party NFT collections to provide Cross-IP game characters or other goodies for hodlers.

If your NFT collection has any type of staking process which involves temporarily moving the NFT out of the user wallet, we got you covered as well with our NFT Staking Support.

Beta Codes

Provide access to you players through our beta code system

Overview

Beta codes are stored in collections. You can generate collections with a lifetime or temporary access. In the picture below you can see in the left column to create new codes, in the right column to manage your existing codes.

By "importing" or defining the NFT collections your game supports in some way, Elixir will import the collection artwork and description, and will provide your game with the list of owned NFTs of the player for each of those collections via the .

User NFTs API
Elixir Dev Dashboard - Beta Codes

Tournaments

The Tournaments Tool in Elixir intends to provide a utility for games to engage with their community by allowing you to create tournaments, register player scores and retrieve a real time leaderboard.

You will be able to retrieve existing or previous tournaments, along with the leaderboards, from within your game, and update your game UI if you chose to do so. No need to create a new build for each new tournament with a hardcoded tournament ID!

Elixir will keep tournament scores for you. In order to save the scores, each game needs to define which information to save for each player. These are the score types. For example, one game may want to track the number of "kills" while other one needs to track "goals". Score types allows you to define which numeric values you want to store in Elixir. You can use multiple score types for your game.

Once you define the available score types, you will use the Tournament API with your private key to send user scores to Elixir for a specific tournament.

Use Case Example

To better understand this tool, in the following sections we'll be using an imaginary example of a FPS Zombie Survival game hosting a weekend tournament and wanting to reward the top 3 players. For this tournament, the game considers how many zombies each participant killed ("kills") and how many times they died ("deaths"), resulting in a final score that will determine their ranking position ("KD"), calculated via the number of kills/number of deaths. We will be display all three score types (kills, deaths, and KD rate) in the leaderboard, but only the KD value will be used to sort the leaderboard entries: the player with the highest SUM of KD will be the winner.

Go to production

  • Make a public tournament from Elixir Launcher.

  • Use the appropriate Production API Key in your game server / backend (private key) and optionally in the client (public key) if you want to display the available tournaments inside your game or even the actual leaderboards.

  • Upload the latest build and activate it on Version Control for the tournament.

  • Have fun, and record scores from your backend for the leaderboard to be automatically updated in Elixir Launcher. The leaderboard will be visible from the Tournament page and the Game page, while the tournament is live.

Overview

Score types are defined in the Dashboard, under s, as they defined the proper request / response messages when using the .

With tournament settings defined for your game, you'll be able to create a private (for testing / integration / QA) or public tournament.

ℹ️
Tournament Setting
Tournament API
Tournaments are created from Elixir Launcher.
Set Up
Create Tournament
🏆Tournaments API

Staking Support

Elixir can integrate your current staking platform so holders can benefit from their NFT when they stake. To support staking on your NFT Collection, you'll need to provide the support team with an API that provides the wallets and their staked NFTs following the format:

[
   wallet_id1: [nft_id1, nft_id2, nft_id3...],
   wallet_id2: [nft_id1, nft_id2, nft_id3...],
   wallet_id3: [nft_id1, nft_id2, nft_id3...],
   ...
]

Create a Beta Code

Create Beta Codes

Let's get started by generating a few fresh beta codes so you can distribute to your community. There a few fields to complete to get started:

  • Label: The collection name for this batch of beta codes. Add a name you feel familiar with to remember it.

  • Number of codes: How many different beta codes belonging to this collection.

  • Number of uses por code: How many times a code can be activated by a user.

  • Custom Name: Add your own name for the code(s). Leave it empty to the code(s) are generated code keys random.

  • Temporary Access: Enable it to add an expiry date to create a temporary access pass for your users.

Manage Beta Codes

Manage an existing collection of beta codes. You can download in CSV format the entire collection of beta codes to distribute easily to your community. You can easily copy+paste or delete any individual code. View at a glance how many codes have been activated.

Soon you'll be able to receive an email alert when you're running out of codes.

In-App Purchases

Gamers can use in-app purchases to unlock epic virtual loot such as premium content and digital assets—all without leaving the gaming action. It's secure, it's seamless, and it keeps you in the game!

Overview

Best Practices

Let gamers dive into the gameplay before deciding to make a purchase. Players are more likely to invest in premium in-game items or additional features after they've had a chance to savour the gaming experience and recognize its value.

Keep it simple with clear product names and straightforward descriptions. Easy-to-find titles and plain, direct language make it a breeze for gamers to discover and enhance their gaming arsenal

Support

Technical Assistance

Encounter any challenges or have questions about implementation? Reach out to our technical team for prompt and expert assistance. We're here to help you optimize your in-app purchase system, enabling you to focus on creating captivating gaming experiences.

24-Hour Customer Support

For gamers navigating the purchase process, our 24-hour customer support is ready to assist with any inquiries or concerns. We understand the importance of a seamless user experience, and our support team is dedicated to resolving issues promptly, ensuring gamers have a hassle-free time enjoying their games.

Refunds Policy

Concerns about refunds? We've got you covered. Our In-App Purchases service seamlessly integrates with the Stripe system and our Internal refund service for Elixir Native Wallet purchases, allowing for efficient and secure refund processes. This ensures transparency and reliability for both developers and users.

We wanted to be aligned with the ecosystem, and with this mind we implemented the standard settled by , so you don't have to do things twice.

Elixir Dev Dashboard - Create beta codes

Elevate your gaming experience with in-app purchases, ensuring a seamless and secure journey powered by the top-tier commerce and , , and the . Easily manage your gaming loot and purchases—all part of the ultimate gaming setup.

✨ - With our user-friendly overlay, integrating in-app purchases has never been smoother. Just a few simple steps, and you're ready to roll!

⚙️ - Our SDK is designed with you in mind. Seamlessly blend it into your game, enhancing the user experience without breaking a sweat.

- Our In-App purchases system allows users to pay using FIAT with or Crypto using their .

Our IAP system introduces an seamlessly integrated into the gaming interface, allowing users to make purchases without leaving the gaming environment and optimizing user engagement by simplifying the purchase process.

Matrica
overlay
payment system
Stripe
Elixir Native Wallet
Effortless Integration
Developer-Friendly SDK
🤑
Including FIAT & Crypto
Stripe
Elixir Native Wallet

Submit Product

Add a Product

  1. Click the Add a Product button on the top right to start adding products

  2. Submit a SKU, Name, Description, Price, Currencies and Image

Preferred Image Resolution of 500x500 px

  1. Click on "Save Draft" in case you want to keep editing it or "Submit" it for a review

Set Up

Create the tournament settings in the Developer Dashboard

Start setting up the tournament configuration in the developer dashboard. You'll be able to find the "Tournaments" page in the Tools area.

Visibility

Here you get to choose if you want the tournament preset config to be available for other content creators or not. You, as a game publisher, will be able to create private tournaments using these settings. Once you have tested your integration, you can make your tournament settings public so other users may create tournaments.

You will understand this better once you have gone through all the steps, but for now, all you need to understand is that it gives you control over the tournament events that can be hosted for your game.

Score Types

Define the data you'll want to save and optionally display in the tournament leaderboard. You will only be able to save scores of these specific types.

The name defines the API identifier for the score type.

The label field is the text users will see in the public leaderboard.

Use the display toggle to show this score in the leaderboard, and the final arrows to determine the display order in the leaderboard header. Fields higher in the list will appear to the left of the leaderboard, while fields down this list will appear to the right of the leaderboard.

Leaderboard Settings

Finally, select which score type will define the leaderboard sorting method, its type (Average or High Score, which the sum of all scores for a given user) and its order (Descending or Ascending). Following our example, we want the tournament leader to be the user with the highest aggregated KD scores, so we use "Highscore" for type and "Desc" for the sort order. As this is the order-defining score type, we also set it as the last score type using the Order arrows in the score type definition list.

Hint: You can set more than one Score Type to be displayed in the leaderboard. But the sorting field can only be one of them.

Create Tournament

Create the Tournament in the Elixir Launcher

Time to jump into the Elixir launcher. Even though you still need to implement it, don't worry about it. First, we will create a private Tournament for you to develop against it. Once everything is working, you can make it public and reset all mocked data.

Create a new Tournament

Navigate to the "Events" page and click "Create Event" in the upper right corner of the launcher. there you'll find all the info related to a game event.

If you don't see the "Create Event" button, please ensure you are logged in with your publisher account. Then contact support.

You'll find...

  • A switch to make it public. This switch should be disabled during the development/testing of the event and enabled once you want to "open" the tournament for the public.

Once setting up your tournament, you'll be asked to submit

  • A prize pool with the amount of USD will be given out to the winners (optional)

  • A price Description: To better explain what the tournament reward consists of. (optional)

  • An external link with the rules of the tournament. (optional)

The tournament will use your defined score types and leaderboard settings to display the tournament leaderboard.

Developer

Utilize our API to access product details, seamlessly integrate in-app purchases within your game, effectively administer content access, and securely receive transaction information signed by Elixir Store. This documentation provides guidance on implementing these features for a streamlined integration process.

The integration and utilization of the Elixir SDK Auth constitute mandatory prerequisites for engaging with the In-App Purchases system. Eligibility for leveraging the In-App Purchases system is contingent upon the association of Elixir accounts with respective internal accounts.

1. Configure your Store

2. Implement Elixir SDK

3. Handle post-payment event

Make sure to follow our and

- Common identification between Elixir Store and the game for a product.

These settings are very much coupled to your game logic and will determine the kind of requests your dev team will be sending.

A switch to set the event as a tournament. This will only be available if you have configured Tournament settings in the dashboard, and you're using the publisher account or the settings are marked as public in the developer dashboard in .

effortlessly by adding metadata, including product name, description, price, and currency, and submit it for review. for review following our . Additionally, generate essential to facilitate the processing of Elixir Store-signed transactions. This documentation guides you through the steps required for a seamless implementation.

Incorporate in-app purchase capability seamlessly into your or game. Our testing environment within the editor enables you to replicate overlay events, facilitating in-app purchase testing without incurring charges through test accounts. Validate your implementation by thoroughly testing each aspect of your code using your game to initiate in-app purchases.

For additional testing, explore your game and in-app purchases on the internal .

Receive the purchase status and validation in your backend system. Check the Elixir Store signature and appropriately allocate the items to the respective players. This provides instructions on seamlessly implementing these backend processes for efficient handling of in-app purchases.

Tournament Settings for the Use Case described
Submiting a tournament form
Review Guidelines
Best practices
SKU
through the API
Step 1
Unity
Unreal
Develop branch
documentation
Submit your products
review guidelines
in-app purchase keys
Create your in-app purchases store

Set up your Store

Create a Game Store

  1. At the Developer dashboard, navigate to the Store

  2. Click in the (+) button to add a new store

  3. Select the Game you want to start selling products

  1. Add the Game Backend URL, then click Submit

The Server URL represents the game backend endpoint where the post-payment webhook from Elixir Store will be sent.

Client Integration

Implement SDK

The integration and utilization of the Elixir SDK Auth constitute mandatory prerequisites for engaging with the In-App Purchases system. Eligibility for leveraging the In-App Purchases system is contingent upon the association of Elixir accounts with respective internal accounts.

Following the creation of a store for your game and the upload of several products, the next step involves implementing the system within your game.

The build uploaded to Elixir needs to disable the option to log out. This measure is crucial to guarantee the security and reliability of the In-App Purchases system.

Once the Elixir SDK, including the account linking, is seamlessly integrated into your game, you are primed to commence the specific overlay integration following the SDK docs.

Test your in-app purchases

For testing the In-App Purchases system within your game, our SDK Events simulator facilitates the replication of overlay communication with the game. This approach enables the game to respond appropriately to each event, enhancing the overall user experience.

After creating a store for a game, a unique pair of will be generated in the background, that can be accessed in the section. There you can edit the server webhook endpoint and access your public key.

Initially, it is imperative to ensure the integration of . Only games with the Elixir SDK integrated will be granted access to the In-App Purchases system. This mandates the linking of the in-game user account to their Elixir Account.

API keys
Game API keys
Elixir SDK

Handle Post-Payments

Store API Keys

Generating an in-app purchase key enables Elixir to authenticate and validate requests between the client and server or server-to-server, specifically about in-app purchases. This includes authentication for Elixir Store server webhooks designed for post-payment events.

Set your server webhook

  1. Go to your Game API Keys section

  2. Scroll to the In-App Purchases Key

  3. Click on the "Edit" button and modify the input

Post-payment & Signature

To secure the server-to-server communication for in-app purchase post-payment events, we employ an RSA signature process. The client possesses the capability to validate the signed webhook received from the Elixir Store server using their public key.

Elixir Store Server Response

// 
{
  "order": {                                             // List of products purchased in the order
    "products": [
      {
        "_id": "65413fd1bb194c67b621c1ca",
        "sku": "candies-250",                            // SKU of the product
        "name": "250 Candies (Tinies)",
        "description": "",
        "imageUrl": "example",                           // Product image URL
        "status": "ACTIVE",                              // Product status
        "category": "IN_APP",                            // Product category
        "disabled": false,                               // Product is enabled
        "clientId": "tinies",                            // Client ID
        "createdAt": "2023-10-31T17:56:33.410Z",
        "updatedAt": "2023-10-31T17:56:33.410Z",
        "price": 50,                                     // Total price (considering quantity and discount)
        "baseCurrency": null,                            // Base currency used in case of a conversion (set to null if there was no conversion)
        "id": "65413fd1bb194c67b621c1ca",                // Product ID
        "quantity": 2,                                   // Quantity of the product purchased
        "unitBasePrice": 25,                             // Price of the product in unit
        "discount": 0                                    // Product discount
      }
    ],
    "userId": "6a431244-4658-4532-8a06-178e41fff0e7",    // ID of the user that did the purchase
    "totalPrice": 50,                                    // Total price of the order
    "currency": "USD",                                   // Currency of the order
    "rate": 1,                                           // Rate used in case there was a conversion of currency
    "usdAmount": 50,                                     // Total price in USD
    "usdExchangeRate": 1                                 // USD exchange rate
  },
  "signature": "0cbdec9f50e1cd4..."
}

Signature Code Sample

import { createPublicKey, createVerify } from 'crypto'

// Where message its a JSON.stringify from the order object
function verifySignature(signature: string, message: string): boolean {
  try {
    const publicKey = createPublicKey({
      key: Buffer.from(
        process.env['GAME_PUBLIC_KEY'] as string,
        'hex'
      ),
      type: 'spki',
      format: 'der',
    })
    const verifier = createVerify('rsa-sha256')
    verifier.update(message)
    verifier.end()
    const isVerified = verifier.verify(publicKey, signature, 'hex')
    return isVerified
  } catch {
    return false
  }
}

export { verifySignature }

Elixir Invisible Wallet

What is the Elixir Invisible Wallet

  1. Non-Custodial Control: Your crypto wallet is designed to be non-custodial, which means users have exclusive control over their funds. They possess the private keys, granting them ownership and authority over their cryptocurrency assets.

  2. Seamless Platform Integration: One of the most innovative aspects of these wallets is their seamless integration across the entire platform. Users don't need to undertake any specific actions to interact with their wallet. It operates effortlessly, much like using a credit card for transactions.

  3. Account Abstraction Protocol (ERC-4337): This means that when users engage in in-game purchases or perform actions that involve blockchain transactions, the game owners can cover the associated fees. This approach encourages gamers to make more in-game purchases and interact more deeply with your gaming ecosystem.

This user-friendly approach empowers users to participate fully in your gaming ecosystem, much like how they utilize a credit card for everyday transactions.

Within the Elixir ecosystem, users have the opportunity to establish their own crypto wallet. This wallet stands as a non-custodial solution, ensuring that users maintain complete control over their cryptocurrency funds. What sets these wallets apart is their integration with the Account Abstraction protocol (), a groundbreaking feature that simplifies user interactions across the entire platform.

ERC-4337

Review Guidelines

See the Elixir In-App purchases policy before submitting a product for review to avoid getting rejected.

Gas Manager

What is a Gas Manager

On the other hand, we have the Gas Managers, a pivotal role in simplifying and enhancing the user experience, particularly concerning transaction fees (gas fees) within the blockchain ecosystem.

  1. Fee Sponsorship: The Gas Manager is responsible for fee sponsorship. It is the designated entity that covers the transaction fees incurred by users when they interact with the crypto in-app purchases.

  2. Enhanced User Engagement: By sponsoring gas fees, the Gas Manager removes a significant barrier for users. Gamers can seamlessly participate in in-game activities and transactions without the need to concern themselves with the costs associated with blockchain interactions.

  3. Incentive Creation: Fee sponsorship serves as a powerful incentive mechanism. Game owners or other designated sponsors can encourage users to engage more deeply with your gaming platform by removing the financial burden of gas fees. This incentive fosters greater user participation and loyalty.

It's important to note that this feature is not a requirement for the core functionality of the system; the platform will operate seamlessly without it

Now that we disclosed all the technical details... It's time to account.

Set Up your Gas Manager

Payment Gateways

Ensuring a seamless and secure transaction experience, our platform supports FIAT payments through Stripe, leveraging credit cards for traditional transactions. Additionally, for cryptocurrency enthusiasts, our platform integrates our Elixir Native Wallet, offering a cutting-edge solution for crypto-based in-app purchases.

FIAT Purchases

We've designed a user-friendly UI that ensures a smooth payment experience for gamers. Within the game context and through the Elixir Overlay, users can effortlessly make payments using their saved card details or opt for a new payment method. This integration empowers game developers to monetize their creations while maintaining a cohesive and immersive gaming experience for their users.

Crypto Purchases

This innovative feature ensures that users remain within the game context throughout the payment process. Through our Elixir Native Wallet system, gamers have the flexibility to pay using the balance available in their wallet.

These wallets are an integral part of our Account Abstraction Protocol, providing users with significant benefits. By using their wallets, users can save on transaction fees and gain access to discounted prices on in-app purchases. This not only enhances the user experience but also incentivizes users to make more in-app purchases.

Furthermore, game owners can sponsor these fees, motivating gamers to engage more actively with in-app purchases. This sponsorship system not only benefits gamers but also creates a win-win scenario for game developers and players, fostering a more vibrant and engaging gaming ecosystem.

Handle Balances

Step 1: Allocate Credits in a Game

Similar to the Gas Manager account, a Game can have both Allocated Credits and Available Credits. It's at your discretion to allocate credits across networks as needed

  1. Click on a Game to navigate to its Game Page

  2. Click on the "Manage Game Credits" button

  3. Select or Type the amount of credits you want to allocate in that game from your available balance

Allocating a balance to a specific game will deduct that amount from your available balance. This allocation belongs to the chosen game and cannot be utilized for other games unless you decide to reallocate it.

Step 2: Distribute Credits between Networks

The credits allocated to a network will be consumed from the fees incurred by users during their interactions with crypto in-app purchases.

  1. Navigate to the Game Gas Manager page

  2. Click on the Gear button of each network

  3. Select or Type the number of credits that you want to transfer into a network from the Game's available credits.

Handle Allowlist

  • Whitelist: All users who have purchased your game will automatically be added to the whitelist. Users on the whitelist will then be eligible for gas fee sponsorship.

  • Blacklist: To prevent gas fee sponsorship for a specific wallet exhibiting malicious behaviour, you can add it to the blacklist.

Game Quests

The User Progress Reporting System plays a crucial role in enhancing user engagement and retention within the platform. By accurately tracking and updating user progress in the Quest system, the platform provides users with a compelling and rewarding experience, driving continued usage and participation.

Step 1:

Step 2:

Step 3:

Add the Stats that will progress the quests
Create a Quest
Submit User Progress

Add a Stat

The stats are used to track specific user actions or achievements that contribute to quest progression. Stats serve as quantitative measures of user activity or accomplishments within games, allowing for dynamic and personalized quest objectives.

  • Games can define custom stats relevant to their gameplay mechanics and quest requirements.

  • Examples include "kills", "collectibles-found", "distance-traveled", etc.

  • Each stat corresponds to a specific user action or milestone that contributes to quest progression.

Stat Naming Convention

  • Choose descriptive and intuitive names for stats that accurately represent the associated user actions or achievements.

  • Use consistent naming conventions to facilitate easy integration and understanding across games.

Example

  • Quest Objective: Defeat 100 enemies.

  • Associated Stat: "kills"

The Stats feature in the Quest System offers a flexible and versatile framework for tracking user progress and enabling dynamic quest experiences within games. By defining custom stats and integrating them with quest objectives, game developers can create engaging and immersive gameplay scenarios that incentivize user participation and advancement.

Submit your Quest

Once you have tested your Quest, and you've confirmed that it is working fine, you should be able to submit it for review.

Then one of our content reviewers will check that the quest its working fine and will assign the appropriate amount of trophies.

After approval, your quest will be included in the Season Pass Game Quest pool for users to start enjoying!

Edit & Delete

As a Publisher, you will be able to remove or edit your DRAFT quests before submitting them for review. Once a Quest is approved, you won't be able to modify it.

Archive & Suspend

Once your Quest its approved you will be able to suspend it if you don't want that quest to be available anymore, or archive it to disable it temporarily.

Create a Quest

  1. Stat Requirement:

    • Games specify the stat(s) that users must progress to complete the quest.

    • Stats serve as quantitative measures of user activity or accomplishments within the game, such as kills, collectibles found, distance traveled, etc.

  2. Title:

    • Each quest is accompanied by a catchy and descriptive title that captures the essence of the challenge and encourages user participation.

    • Titles should be engaging and evoke curiosity or excitement to motivate users to undertake the quest.

  3. Description:

    • Quests include a clear and concise description outlining the objectives and requirements for completion.

    • Descriptions provide users with guidance on what they need to do to progress through the quest and earn rewards.

  4. Image:

    • Games provide an image to accompany each quest, enhancing visual appeal and recognition.

    • Images are displayed on the game quest card within the platform's interface, using a resolution of 500px x 400px for optimal display quality.

Example Quest

  • Title: "Dragon Slayer Challenge"

  • Description: "Embark on an epic journey to defeat the mighty dragons terrorizing the kingdom. Arm yourself with courage and skill as you venture into the dragon's lair and face formidable foes. Slay 10 dragons to prove your valor and earn exclusive rewards!"

  • Stat Requirement: "dragon_kills"

Test Your Quest

Test your implementation!

After creating a quest, you can assign it to yourself while it is in DRAFT status. This will assign your user this quest for you to test the server implementation:

  1. Click on the dropdown menu

  2. Click on "Self Assign"

Now, you should be able to see that quest in the Elixir Launcher:

  1. Open the Elixir Launcher

  2. Log in with your Publisher account

  3. Go to the Rewards Page > Quests tab

  4. Scroll to the Game Quest section, where you will find a carrousel with more than one quest containing your DRAFT quest with 0 trophies.

This quest will give 0 trophies but will allow you to test your server integration, and check that it is progressing normally. Once you have tested it, you can Submit your game for Review.

Reward Center

Welcome to the Reward Center Integration Guide!

This document provides game developers with insights on how to integrate the Reward Center into their games to enhance user engagement and provide exciting rewards for players. Let's dive in!

What is the Reward Center?

How to Integrate the Reward Center:

  • Design quests within your game that contribute to season pass progression.

  • Report user progress to the Reward Center API to update the season pass level accordingly.

Benefits for Game Developers:

  • Enhanced User Engagement: The Reward Center incentivizes players to engage more deeply with your game by offering enticing rewards and progression opportunities.

  • Retention Boost: By providing a rewarding experience, you can increase player retention and encourage long-term commitment to your game.

  • Cross-Promotion Opportunities: Integration with the Reward Center opens up opportunities for cross-promotion within the platform, exposing your game to a broader audience.

Key Components:

  1. Season Pass:

    • Users progress through the Season Pass by completing quests and achieving milestones.

    • Each level unlocks exclusive rewards, motivating players to engage with the game and the platform.

  2. Trophies:

    • Trophies are earned by completing quests, whether they are platform quests or game-specific quests.

    • They symbolize player achievements and contribute to their overall progress within the platform.

  3. Raffles:

    • Raffles provide users with the chance to win exciting prizes such as NFTs, tokens, and other gaming rewards.

    • Players can participate in raffles by redeeming tickets earned through the Season Pass or other means.

Integrating the Reward Center into your game is a fantastic way to reward players for their dedication and accomplishments, fostering a positive and rewarding gaming experience. By following the integration guidelines outlined in this document, you can create a more engaging and rewarding experience for your players while driving retention and growth for your game.

The Reward Center is a feature-rich system within our platform designed to reward users for their engagement and achievements in games. It offers various rewarding mechanisms, including the Season Pass, trophies earned in quests, and participation in raffles. Enjoy our guide through.

Help Center

Review Guidelines

Update Progress

Submit the user progress to advance in the Quest

Finally, the Progress Reporting Endpoint enables game servers to securely report user progress events to the Quest System API. This server-to-server communication ensures the integrity and authenticity of progress reports through RSA signature-based authentication.

Authentication Workflow:

  1. API Key Generation:

    • Private keys are securely stored on the game server and used to sign progress reports.

  2. RSA Signature Generation:

    • Before sending a progress report, the game server generates an RSA signature for the request payload using its private key.

    • The signature is appended to the request headers for authentication purposes.

  3. Signature Verification:

    • Upon receiving a progress report, the Quest System API server extracts the RSA signature from the request headers.

    • The API server validates the signature against the corresponding public key associated with the game server.

    • If the signature is valid, the progress report is accepted and processed. Otherwise, the request is rejected.

The Progress Reporting Endpoint facilitates secure and reliable communication between game servers and the Quest System API, ensuring the integrity and authenticity of progress reports through RSA signature-based authentication. By following the authentication workflow and adhering to the request format, game developers can seamlessly integrate progress reporting into their server-side systems, enabling users to advance in quests and earn rewards effectively.

Game developers will need to get their consisting of public and private keys.

key pairs
❓Game Quests

Unity

Integrating our Unity SDK into your game takes minutes

Getting Started
Authentication
Reference

Getting Started

1. Download and install

  • Import the package inside your workspace: Assets > Import Package > Custom Package

2. Obtain your public key

The public key is used to initialize the Elixir SDK. Try it by replacing the following line in the integration example:

Elixir.ElixirController.Instance.PrepareElixir("put you public key here")

3. Use Elixir SDK in your game

You can see a working reference by running our integration example. After inputting the public key you should be able to run the initial scene and check that you obtained your Elixir publisher user.

If you're new to the Elixir SDK, check out the detailed

Download the latest version of the SDK available .

Your public key can be obtained in the .

Understand inside your game

Discover all the available you can do with it

Use our to develop locally for a smooth integration

Integration Example
here
Click here to read more about Elixir API keys
Developer Dashboard
how the Overlay works
actions
Event Simulator

Kick-off

Get started with Elixir Gamer Service using our Unity and Unreal SDKs.

Click and play

Integrate Elixir inside your game for a smoother user experience: We believe that having a fragmented ecosystem with individual login forms creates a significant barrier for user onboarding that must be knocked down.

By integrating with Elixir Services, new players should be able to click and play your game: Our Auth Services provide user authentication and complement it with some of the Elixir features that grant easy-to-implement add-ons for your game.

Elixir Gamer Services

Merge web3 infrastructure with gaming by taking advantage of the Elixir Gamer Services:

Elixir Gaming Services SDKs

Download the latest version of our SDKs, available for Unity and Unreal engines, for easy integration with Elixir or relate to the API documentation.

. Get the Elixir user profile; access his wallet, username and profile picture to display it in your game

: Web3 is made simple. Import user NFTs inside your game and convert them to Skins, from native collections to cross-IP in any chain.

: Host Elixir tournaments inside your game, making it social and competitive.

Access E
lixir profile
NFT Gating
Elixir Tournaments
Unity
Unreal Engine
Elixir REST API

Overview

Overview

The Elixir Overlay is a feature that allows developers to integrate features like NFT purchasing and friends chat seamlessly into their game.

While the overlay is provided by Elixir Launcher in-game automatically without any additional setup requirements, to integrate all the features of the overlay in-game, some setup is required.

Initialization & Disposal

The overlay event buffer will be automatically initialized by the SDK upon a call to PrepareElixir(apiKey).

The event buffer will remain initialized until application shutdown.

Integration

Here is a minimal example:

using Elixir;
using Event = Elixir.Overlay.Event;

public class TestOverlayController : MonoBehaviour
{
	// ... we will assume that a method Log is implemented that prints
	// text on-screen.

	// To initialize simply initialize the SDK by calling PrepareElixir
	public void Init()
	{
		ElixirController.Instance.PrepareElixir("your api public key here");
		
		// after the SDK is initialized, you can assign to the delegates
		Event.OnCheckoutResult += HandleCheckoutResult;
		Event.OnOpenStateChange += HandleOpenStateChange;
	}
	
	private void HandleOpenStateChange(bool isOpen)
	{
		Log($"MOpenStateChange: {isOpen}");
	}

	private void HandleCheckoutResult(bool success, string sku)
	{
		Log($"MCheckoutResult: {success}");
	}

}
Drawing

Updates

There are two workflows that allow you to stay up to date with the latest changes in the Elixir SDK for Unity.

GitHub
Unity Asset Store (Coming Soon)

Unity Asset Store (Coming Soon)

We are currently awaiting confirmation for our submission to the Unity Asset Store.

Meanwhile, please refer to the GitHubworkflow to stay up to date with changes to the Elixir Unity SDK.

Elixir Overlay - Getting Started

GitHub

Existing Git Repositories

This workflow is for games that use git as their primary version control system.

Getting Started

If you are already using git as the version control system of choice for your game, you will need to add ElixirUnitySDK as a git submodule.

  1. Navigate to the Assets directory in your game

  2. Run: git submodule add git@github.com:Elixir-Games-XYZ/elixir-unity-sdk.git ElixirUnitySDK

  3. Verify that a file named .gitmodule appeared at the root of your game project folder, and that the Elixir SDK for Unity has been correctly pulled into Assets/ElixirUnitySDK

  4. This change will now be staged for a commit. Commit it by running git commit with a message. For example: git commit -m "Feat: Added Elixir SDK"

Cloning

If you do not do this when you clone your game's repository, the submodule will not be correctly initialized

Working with git submodules introduces one extra step when cloning your repository on a new machine.

  1. Clone your game as usual: git clone YOUR_GIT_REPO

  2. NEW STEP: Initialize the submodules by running: git submodule update --init --recursive

Pulling

If you do not pull changes from your repository correctly , the submodule will not be updated

To pull in all changes in your repository including changes in submodules you can run:

git pull --recurse-submodules

Updating Submodule

To fetch the latest changes from the Elixir SDK repository run the following:

git submodule update --remote

You will then be required to commit this change in order to persist the commit of the submodule that your game's repository is pointing to.

Elixir SDK for Unity is available at

https://github.com/Elixir-Games-XYZ/elixir-unity-sdk

Overlay

Overlay Actions
Event Simulator

Event Simulator

In production environments, the overlay is injected into the game by the Elixir Launcher. However, this is difficult to replicate during development. This is why we have created the Event Simulator.

The simulator allows you to test your game's integration with the Elixir Overlay event buffer without leaving Unity Editor.

You can access it in the editor's toolbar by clicking on Elixir -> Overlay Event Simulator

The simulator will open and be in the "Stopped" state. If you wish to test your integration, run the game and click on Simulate.

If everything goes well, the status of the simulator will now change from "Stopped" to "Simulating".

You can simulate connectivity with the Overlay in the Unity Editor

You will now be able to use the event simulator to see incoming and send events to the game impersonating the overlay.

events

Overlay Actions

Once initialized, the following functionality is available:

In-Game Purchasing

Checkout

Trigger checkout of an NFT payable with credit card or a crypto wallet by calling Overlay.Event.Checkout:

Overlay.Event.Checkout("MY_ITEM_SKU")

Only one checkout process can be started at a given time. Calling Checkout a second time before getting the result will interrupt a previous checkout process.

Invisible Wallet

GetWallet

The getWallet function in the SDK returns the public wallet of the user. The user might be asked to go through a verification process before the wallet is returned.

SignTypedData

Once you have built an ethereum typed data, you can ask the user to sign it by using signTypedData function in MetaKeep SDK. The function expects a non-empty reason which is shown to the user at the time of typed data signing. This API is compliant with the latest EIP-712 spec and is a drop in replacement for Metamask's signTypedData_v4 API.

The first parameter (message) should be a stringified JSON of the EIP-712 compliant payload.

Overlay.Event.SignTypedData("{ ... }", "Do Some Action")

Once initialized, the result of the checkout will be returned as an incoming message via the delegate.

The result of the operation will be returned as an incoming event via the delegate.

Once initialized, the result of the checkout will be returned as an incoming event via the delegate.

OnChekoutResult
OnGetWalletResult
OnSignTypedDataResult

SDK Events

The currently available events are:

OnOpenStateChange

Signals to the game that the overlay was either opened or closed. This is useful if you want to pause the game while the overlay is open.

OnCheckoutResult

Please note there can only be one checkout event happening at the time: Calling a new event will cancel the previous one. So the game should keep track of the latest SKU (product) involved in the checkout.

OnGetWalletResult

public delegate void OnGetWalletResultDelegate(
    string status, string ethAddress, string solAddress, string eosAddress
);

The following status values can be returned:

Status
Description

SUCCESS

Successful execution

USER_REQUEST_DENIED

SDK has been initialized with an invalid user email.

SOMETHING_WENT_WRONG

An system error occurred. Please get in touch with us if you continue seeing this error.

OnSignTypedDataResult

public delegate void OnSignTypedDataResultDelegate(
    string status, string signature, string r, string s, string v
);

The following status values can be returned:

Status
Description

SUCCESS

Successful execution

USER_REQUEST_DENIED

SDK has been initialized with an invalid user email.

SOMETHING_WENT_WRONG

An system error occurred. Please get in touch with us if you continue seeing this error.

Notifies the game when a checkout has either been completed successfully or failed. This would normally be sent by the overlay after the game has initiated a request.

Notifies the game of a result to the action. This event delegate has the following signature:

Notifies the game of a result to the action. This event's delegate has the following signature:

Checkout()
GetWallet
SignTypedData

Authentication

Cross-Platform Compatibility

Whether your game runs on PC or mobile, our system guarantees comprehensive access to all available features across all platforms.

Desktop
Mobile

Desktop

Overview

The SDK ensures that the game runs within the Elixir Launcher Environment. Upon successful verification, it retrieves user session credentials, enabling login through the Elixir Launcher account.

Failure in this verification prevents game execution, blocking access outside the Elixir Launcher and for banned users.

The latest SDK version allows owners to bypass this check, permitting execution outside the Elixir Launcher Environment.

The Elixir SDK streamlines authentication processes, simplifying the workflow for developers. Leveraging the sandbox environment alongside the development API key, the SDK emulates the launcher authentication system.

This integration allows game developers to effortlessly generate production builds, circumventing the need for development login. Instead, the credentials of the user launching the game from the Elixir launcher are seamlessly utilized. For more information have a look at the docs.

Desktop Auth

Create Gas Manager

  • Available credits: Your available balance, which remains unused when unallocated to any game, can be put to use by allocating it to one of your games.

  • Allocated credits: Your allocated balance is dedicated to specific games and will be utilized across these games as users engage with the in-app purchases of these games.

Top Up

  1. Click on the "Add Balance" button

  2. Select the number of credits you want to top up

  3. Pay using your preferred method

Add a Game

  1. Click the (+) button to add a new game

  2. Select the Game you want to add

Start

Handling Balances

Reference

GetUserData()

This endpoint retrieves OpenId information of users. It validates the JWT generated by the SDK and provides the following Elixir-specific data:

  • ElixirID: A unique, unchangeable identifier within the Elixir Platform

  • Username: The user's Elixir nickname, displayable in-game

  • Wallet: The user's wallet linked to the game's blockchain network

For games with existing User entities and account credentials, it's advised to add a "Link Account" feature. This pairs the ElixirID with your User Entity, requiring a one-time setup, enabling users to use their native game accounts when accessing through Elixir.

GetCollections()

Use this endpoint to access NFT collections specified in the Elixir Dashboard. It serves as NFT gating, allowing retrieval of all NFTs owned by the user in these collections.

GetTournaments()

Integrating this SDK provides a comprehensive tournament tool. This method enables the game client to access all Elixir tournaments available for the game. Coordination between the game backend and Elixir configuration is necessary.

Refer to the Tournaments API documentation for more information.

Mobile

The SDK offers two authentication methods for Elixir users on mobile platforms:

OTP Login

Users enter their email to receive a verification code. Once validated, they are logged into the SDK.

QR Scan

For seamless user experience, a QR code in the Elixir Launcher can be scanned using a phone camera for authentication.

In Elixir SDK's mobile oAuth implementation users stay logged in with Elixir until they choose to log out, eliminating the need for repeated logins with each game session.

Elixir REST API

Get started with Elixir in minutes

Postman

34KB
SDK v2.postman_collection.json

Elixir Auth

API

📱Mobile Auth
🖥️Desktop Auth
🧔User
👾NFTs
🏆Tournaments API

Unreal Engine

Integrating Elixir SDK into your Unreal Engine game takes just a few minutes!

Getting Started

Desktop Auth

API protocol description and utilities for Desktop integration

Launcher AUTH

Each game will receive a rei key when launched under the -rei field. This rei key will be required to get the user session JWT on a separate request. The player session will be kept alive by the Game Developer using the Get Refresh Token request. JWT will be required Bearer Token on every request.

The following methods will be used only for Elixir Launcher Games to keep a user session.

Development Only

As described above, some will notice a dependency on Elixir Launcher to test the complete integration. But for local development, we facilitate the following endpoint, restricted only for Development Keys. That allows game developers to generate verifiable reikeys for development purposes.

Use your account

Note that the reikey generated with this endpoint will grant access to the Game Owner account. So any modification applied to this account (new username, new wallet, friends...) will be accessible in development mode. This accelerates integration and removes dependencies.

Support extra accounts

You can also log in with different accounts. To do so, you'll need to ask the Support Team to whitelist any of your developers and provide you with their playerId . Two use cases can be extrapolated from this utility:

  • For those games that need to log in several users to test multiplayer features or have an anti-cheat system that uses OpenID.

  • For bugs and tickets from your community. You'll be able to log in with bugged accounts to fix the issue.

Generate Reikey

GET https://kend.elixir.app/sdk/auth/v2/dev/reikey

Please be aware that this endpoint is only accessible with a DEVELOPMENT KEY. The purpose of this endpoint is to ease an agile usage of the API, providing an endpoint that allows generating valid reikeys.

Query Parameters

Name
Type
Description

playerId

String

Player ID of an alternative user

Headers

Name
Type
Description

x-api-key*

String

Public Key available on the Developer Dashboard

{
    "code": 1,
    "success": true,
    "data": {
        "reikey": "508b12d4-1e98-4534-bfc0-6554178ebb8e",
        "playerId": "aea...5d36"
    }
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1001,
        "message": "Invalid API Key"
    }
}

Auth Endpoints

Get User Credentials

GET https://kend.elixir.app/sdk/auth/v2/session/reikey/:reikey

The reikey param will be sent by the launcher when the game is executed as a -rei field. With this endpoint, the reikey will be activated, and the user credentials will be provided. With them, the game will be able to maintain in the background the user session alive, in order to avoid bugs and impersonation.

Path Parameters

Name
Type
Description

reikey*

string

Rei key received when the game is started

Headers

Name
Type
Description

x-api-key*

string

Public Key available on the Developer Dashboard

{
    "code": 1,
    "success": true,
    "data": {
        "token": "eyJhbGciOiJIU...",
        "tokenExpiry": 1703311143769,
        "tokenLifeMS": 31557600000,
        "refreshToken": "be3...388",
        "user": {
            "_id": "aea...d36",
            "status": "ACTIVE",
            "banReason": ""
        }
    }
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1000,
        "message": "Not an activable reikey"
    }
}

Refresh User token

POST https://kend.elixir.app/sdk/auth/v2/session/refresh

Each JWT will have an expiration time, to extend the session it will be required to ask for a new token. To do so, it will be needed the refresh token and the last active jwt. For example, if the game makes 3 times a request to this service, the jwt to provide for the third call will be the jwt and refreshToken received in the second one. If the refreshToken is lost, it will be necessary to generate a new reikey. As time expiry may change several times, we recommend requesting a refreshToken few seconds after the tokenExpiry timestamp is reached.

Headers

Name
Type
Description

x-api-key*

string

Public Key available on the Developer Dashboard

Request Body

Name
Type
Description

refreshToken*

String

Latest refresh token alive

reikey

Stirng

Reikey used to launch the game

{
    "code": 1,
    "success": true,
    "data": {
        "token": "ey...",
        "tokenExpiry": 1703311143769,
        "tokenLifeMS": 31557600000,
        "refreshToken": "be...8",
        "user": {
            "_id": "aea...36",
            "status": "ACTIVE",
            "banReason": ""
        }
    }
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1000,
        "message": "Not an activable reikey"
    }
}

Close Session

POST https://kend.elixir.app/sdk/auth/v2/session/closerei/:reikey

This endpoint should be executed when the user closes the game: It will terminate the session credentials (jwt and reikey). The usage of this endpoint is similar to a refresh token endpoint, but jsut requires a valid JWT as an authorization header.

Path Parameters

Name
Type
Description

reikey*

String

Reikey used to launch the game

Headers

Name
Type
Description

x-api-key*

string

Public Key available on the Developer Dashboard

Authorization*

string

"Bearer + JWT"

{
    "code": 1,
    "success": true,
    "data": {
        "closed": true
    }
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1001,
        "message": "Invalid API Key"
    }
}

Getting Started

To get started, either clone or download the latest release from the GitHub repository into the "Plugins" folder of your Unreal project.

Once you have the SDK plugin situated in your project's "Plugins" folder, proceed to the appropriate getting started guide.

C++ Project

This guide assumes you are implementing the Elixir SDK in a C++ project and have already cloned the Elixir SDK plugin into your "Plugins" folder.

Step 1: Prepare Elixir

The first step to integrating Elixir is to assign your SDK public key by running:

It is highly recommended to manage API keys through some sort of persisted settings system, such as the built in Unreal Engine UDeveloperSettings class, as you will find yourself having to frequently switch between development API keys for testing and production API keys for building a release.

Step 2: Initialize Elixir

The second step of Elixir integration is calling the InitElixir function. The function receives a UElixirSubsystem::FCallback.

The completion callback can execute any logic that should happen after initializing the SDK:

It is advisable to initialize the SDK as early as possible in your game workflow

The initialization process will take care of the following:

  • Log in the user automatically via provided context from Elixir Launcher (in production) or a freshly generated token (in development).

  • Initialize connection to the Elixir Overlay event buffer

  • Set up a timer to refresh the authentication token automatically in the background

You are now ready to use the Elixir SDK!

C++ Project
Blueprints Project
UElixirSubsystem::GetInstance()->PrepareElixir(ElixirApiKey);
UElixirSubsystem::FCallback CompleteCallback;
CompleteCallback.BindDynamic(this, &UMyClass::OnElixirInitComplete);
UElixirSubsystem::GetInstance()->InitElixir(CompleteCallback);
void UMyClass::OnElixirInitComplete(const bool bSuccess)
{
    // this code will run after the SDK has either been successfully initialized
    // or an error has been encountered
}

RSA Signature

Overview

The emitter uses the private key to generate a signature for the message. Then sends the message, the signature and his public key. With this information, the receiver can validate that the message was signed by the emitter identified by his public key and that the content in the message hasn't been modified.

In our implementation of the RSA signature, we follow a tweaked version, where the emitter needs to generate a signature for the body that he wants to send along with a timestamp, separated between a "." this timestamp makes the signature valid just for a limited period.

Data that I want to send = "Hello! Im George" 
Timestamp = 1672188588

Message = "Hello! Im George".1672188588

→ Sign Message ""Hello! Im George".1672188588" using my private key → Signature 

Send Signature, Message and Timestamp

Extra Tools

Verify Signature

To test the signature implementation, we facilitate this endpoint that you can call via code, or via Postman with the signature that you generated to see if its well implemented before introducing it in the application.

Verify Signature

POST https://kend.elixir.app/sdk/v2/signature/verify

Validates the generated signature so the signing process can be tested.

Headers

Name
Type
Description

x-api-key*

String

Public Key obtained in the developer dashboard

x-api-signature*

String

Generated RSA signature

x-api-token*

String

Timestamp used in the API Signature

Request Body

Name
Type
Description

{}*

Object

An object containing the message that wants to be signed

{
  "code": 1, 
  "success": true, 
  "data": <Req.Body> // Data will include body sent in the request
}

Example implementations

The process is based on a pair of keys, mathematically linked, consisting of a private key and a public key.

🔢Node.js Example
🔢C# Example

Blueprints Project

This guide assumes you are implementing the Elixir SDK in a C++ or Blueprint project and have already cloned the Elixir SDK plugin into your "Plugins" folder.

Prepare & Init Elixir

To integrate the Elixir SDK into your blueprint project you must execute the "Prepare Elixir" node, which will connect your public API key to the SDK and the "Init Elixir" node.

You would normally want to do this in either your game state or your level blueprint, as they get initialized early and only get destroyed once the level is unloaded.

The initialization process will take care of the following:

  • Log in the user automatically via provided context from Elixir Launcher (in production) or a freshly generated token (in development).

  • Initialize connection to the Elixir Overlay event buffer

  • Set up a timer to refresh the authentication token automatically in the background

On Complete Event

The "Init Elixir" node will provide a delegate for a completion event. You can bind a custom event to that delegate using the "Create Event" node, and execute the logic of your choice upon either a successful or failed initialization.

You are now ready to use the Elixir SDK!

Using Elixir Functions

You can easily find all the relevant Elixir functionality by looking for the "Get Elixir Subsystem" node.

Once found, extend a connection from its' pin and type "Elixir" to see a list of all available nodes to interact with the SDK.

An example integration of Elixir SDK in a Level Blueprint
A simple example integration where we print the result of the initialization on screen
GitHub - Elixir-Games-XYZ/elixir-unreal-sdkGitHub

NFTs

Obtain the user nfts and allow to play with them!

Blockchain Support

Solana

✅

Ethereum

✅

Polygon

✅

Immutable X

✅

Avalanche

✅

Arbitrum

✅

Sui

🔜

Near

🔜

Wax

🔜

NFT Gating

User NFTs

GET https://kend.elixir.app/sdk/v2/nfts/user

Retrieve an array with the collections and the tokens owned by the given user

Headers

Name
Type
Description

x-api-key*

String

Public Key obtained in the developer dashboard

authorization*

String

Bearer <JWT>

{
    "code": 1,
    "success": true,
    "data": [
        {
            "collectionName": "Chronos Travelers",
            "collection": "chronos-travelers",
            "image": "https://i.seadn.io/gcs/files/681b8b0af65f6ed6e49927b8c3d0d427.png?w=500&auto=format",
            "nfts": [
                {
                    "tokenId": "14",
                    "name": "Traveler",
                    "image": "https://chronospublic.s3.eu-west-2.amazonaws.com/travelers/redgenesis.gif",
                    "attributes": [
                        {
                            "trait_type": "Quantum Power",
                            "value": "321",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Rarity",
                            "value": "Mythic"
                        },
                        {
                            "trait_type": "Strength",
                            "value": "0"
                        },
                        {
                            "trait_type": "Defense",
                            "value": "1"
                        },
                        {
                            "trait_type": "Dexterity",
                            "value": "5"
                        },
                        {
                            "trait_type": "Intelligence",
                            "value": "1"
                        },
                        {
                            "trait_type": "Constitution",
                            "value": "1"
                        },
                        {
                            "trait_type": "Endurance",
                            "value": "1"
                        },
                        {
                            "trait_type": "Soul",
                            "value": "1"
                        },
                        {
                            "trait_type": "Strength Scaling",
                            "value": "88",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Defense Scaling",
                            "value": "95",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Dexterity Scaling",
                            "value": "73",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Intelligence Scaling",
                            "value": "69",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Constitution Scaling",
                            "value": "53",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Endurance Scaling",
                            "value": "55",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Soul Scaling",
                            "value": "53",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Scaling Score",
                            "value": "69",
                            "display_type": "boost_percentage"
                        },
                        {
                            "trait_type": "Starting Level",
                            "value": "10",
                            "display_type": "number"
                        },
                        {
                            "trait_type": "Skill Tree Type",
                            "value": "14",
                            "display_type": "number"
                        }
                    ]
                }
            ]
        }
    ]
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1001,
        "message": "Invalid initialization vector"
    }
}

User

Obtaining Elixir User information

Overview

The user info provides information about the user's public profile in Elixir. This endpoint can validate the Elixir JWT as an OpenID system. Besides, the game can get the wallets of the user in case they are needed.

Userinfo/Open ID

GET https://kend.elixir.app/sdk/v2/userinfo

Method to provide all Elixir User-related info. Works as an OpenId to validate the user JWT.

Headers

User Friend List

GET https://kend.elixir.app/sdk/v2/friends/

Get the Friend List for a given user. Friend information is provided so it can be displayed with avatars. Each friend ElixirId is available on the friendId field

Headers

C# Example

C# Example of RSA signature implementation with signature verify

Learn more about adding custom settings to Unreal Engine

After that the game involves using the Elixir Dashboard, you will be able to use this endpoint, as NFT gating, to obtain all the NFTs that the user owns for these collections.

Name
Type
Description
Name
Type
Description
importing all NFT collections

x-api-key*

String

Public Key available on the Developer Dashboard

authorization*

String

A string containing the JWT as follows: "Bearer <jwt>"

{
    "code": 1,
    "success": true,
    "data": {
        "sub": "aea...36",
        "wallets": [
            "BINANCE:0xB...8",
            "SOLANA:Eb...1w"
        ],
        "nickname": "rega",
        "picture": "https://...",
        "status": "ACTIVE",
        "email": "user@email.com",
        "email_verified": true,
        "aud": "game:production",
        "iss": "gameId",
        "iat": 1675127300,
        "exp": 1675386500
    }
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1001,
        "message": "The argument 'encoding' is invalid for data of length 1151. Received 'hex'"
    }
}

x-api-key*

String

Public Key available on the Developer Dashboard

authorization*

String

A string containing the JWT as follows: "Bearer <jwt>"

{
    "code": 1,
    "success": true,
    "data": [
        {
            "friendId": "9ce7916c-de8e-44c8-b4aa-455385c601a6",
            "username": "sniper-4015",
            "name": "Sniper",
            "avatar": "https://d1udajbuf50cfc.cloudfront.net/avatar/9ce7916c-de8e-44c8-b4aa-455385c601a6/1675145810918_screenshot_2023_01_18_at_14_52_08_png",
            "isVerifiedNFTAvatar": false,
            "friendStatus": "ACCEPTED",
            "status": "OFFLINE",
            "playStatus": {
                "playing": false
            }
        },
        {
            "friendId": "a2a1f018-c836-4041-bd2d-95a7c4734d36",
            "username": "gunner-8634",
            "name": "Gunner",
            "avatar": "https://d1udajbuf50cfc.cloudfront.net/avatar/aea1f008-c8a6-4041-bd2d-95a7c4735d36/greenie.gif",
            "isVerifiedNFTAvatar": true,
            "friendStatus": "ACCEPTED",
            "status": "OFFLINE",
            "playStatus": {
                "playing": false
            }
        }
    ]
}
using System;
using System.IO;
using System.Net;
using System.Security.Cryptography; using System.Text;
using System.Threading.Tasks;
namespace Elixir {
public static class EndPoints {
static string baseURL = "https://kend.elixir.app";

// Verifies a signature against the signature verification endpoint
public static async Task<string> SignatureVerify(string body) {
 try {
  // Compose URL
  WebRequest request = WebRequest.Create($"{baseURL}/sdk/v2/signature/verify"); // Use POST
  request.Method = "POST";
  // Get Epoch time in milliseconds.
  string timeStamp = (System.DateTime.UtcNow - new System.DateTime(1970, 1, 1)).TotalMilliseconds.ToString();
  // Calculate body signature
  string signature = Crypto.SignFromFile(body, timeStamp, "key.pem");
  // Set headers
  request.Headers["content-type"] = "application/json";
  request.Headers["x-api-token"] = timeStamp;
  // Public key
  request.Headers["x-api-key"] = File.ReadAllText("public.key");
  // Signature
  request.Headers["x-api-signature"] = signature;
  // Body to binary
  var data = Encoding.UTF8.GetBytes(body);
  // Set request content length.
  request.ContentLength = data.Length;
  // Write data to request.
  Stream newStream = request.GetRequestStream();
  newStream.Write(data, 0, data.Length);
  // Wait for response
  WebResponse response = await request.GetResponseAsync();
  // Read response data
  var reader = new StreamReader(response.GetResponseStream(), ASCIIEncoding.UTF8); 
  return reader.ReadToEnd();
 } catch(Exception e) { 
  return e.Message;
 }
}


internal static class Crypto {
// Sign message reading PK from file
public static string SignFromFile(string body, string timeStamp, string file) {
  return Sign(body, timeStamp, File.ReadAllText(file)); 
}
// Sign message given in body, with the given timestamp and private key
public static string Sign(string body, string timeStamp, string privateKey) {
  RSACryptoServiceProvider provider = GetRSA(privateKey);
  byte[] signature = provider.SignData(Encoding.UTF8.GetBytes($"{body}.{timeStamp}"), CryptoConfig.CreateFromName("SHA256"));
  StringBuilder hex = new StringBuilder(signature.Length * 2); 
  foreach (byte b in signature) hex.AppendFormat("{0:x2}", b); 
  return hex.ToString();
}

const string KEY_HEADER = "-----BEGIN PRIVATE KEY-----";
const string KEY_FOOTER = "-----END PRIVATE KEY-----";

internal static RSACryptoServiceProvider GetRSA(string pem) {
  string keyFormatted = pem;
  int cutIndex = keyFormatted.IndexOf(KEY_HEADER);
  keyFormatted = keyFormatted.Substring(cutIndex, keyFormatted.Length - cutIndex); 
  cutIndex = keyFormatted.IndexOf(KEY_FOOTER);
  keyFormatted = keyFormatted.Substring(0, cutIndex + KEY_FOOTER.Length); keyFormatted = keyFormatted.Replace(KEY_HEADER, "");
  keyFormatted = keyFormatted.Replace(KEY_FOOTER, "");
  keyFormatted = keyFormatted.Replace("\r", "");
  keyFormatted = keyFormatted.Replace("\n", ""); keyFormatted = keyFormatted.Trim();

  byte[] privateKeyRaw = System.Convert.FromBase64String(keyFormatted); 
  RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); 
  rsa.ImportPkcs8PrivateKey(new ReadOnlySpan<byte>(privateKeyRaw), out _); 
return rsa;
}

Node.js Example

node.js example of RSA signature

const { createSign, createVerify } = require('crypto')
/** *
* @param {string} privateKey
* @param {number} token
* @param {string | object} data
* @returns 
*/
function signRSARequest ( 
   privateKey,
   token = Date.now(), 
   data = {}
){
   const info = JSON.stringify(data) 
try {
   const signer = createSign('rsa-sha256' ) 
   signer.update(`${info}.${token}`)
   return signer.sign(privateKey, 'hex')

 } catch (err) {
   throw new Error(`Could not perform signature: ${err.message}`)
}

Mobile Auth

Authentification request in order to get user credentials

OTP Login

The OTP login is based on a single login without a password. This kind of login is based on two steps:

  1. A request to provide the sign-in code to the user via email

  2. A second endpoint to verify the code.

Refresh Token

The login endpoint will provide several fields for the user session. The most important one is the accessToken as JWT that will represent the user identity on each request. This accessToken has an expiration time to protect the user's identity when he is out of the platform. If the user interacts with the platform, the session needs to be refreshed to get a new accessToken The API uses a refreshToken to prevent users from entering the OTP Login several times: The client needs to save the refreshToken obtained from the Login and use it to refresh the user access token (JWT) This way, the client can save the last valid refreshToken for the future and obtain the user credentials. Avoiding the login step.

OTP Login Request

POST https://kend.elixir.app/sdk/auth/v2/signin/otp-login

In this request, the user must submit his email address, the server will then validate the address and, if every check is passed, send an email with the code to it. The client must save the transaction id in order to verify the code in the next step.

Headers

Name
Type
Description

x-api-key*

String

Public Key obtained in the developer dashboard

Request Body

Name
Type
Description

email*

String

User email provided in the input

{
    "code": 1,
    "success": true,
    "data": {
        "transactionId": "0306d0b1-bb5c-4a9b-aa55-8b56fe659168"
    }
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1001,
        "message": "Invalid API Key"
    }
}

OTP Login Verify

POST https://kend.elixir.app/sdk/auth/v2/signin/otp-verify

This endpoint completes the process of the OTP Login. Here the user must provide the code so the API can validate it for the current transaction id.

Headers

Name
Type
Description

x-api-key*

String

Public Key obtained in the developer dashboard

Request Body

Name
Type
Description

transactionId*

String

OTP Login transaction id from the request

code*

String

Code from user input

{
    "code": 1,
    "success": true,
    "data": {
        "token": "eyJhbGciOiJIU...",
        "tokenExpiry": 1678126661453,
        "tokenLifeMS": 30000000000,
        "refreshToken": "210...5bc",
        "user": {
            "_id": "6d3...5d",
            "status": "ACTIVE",
            "banReason": null
        },
        "newAccount": false // True if its a register
    }
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1001,
        "message": "Invalid API Key"
    }

Refresh Session

POST https://kend.elixir.app/sdk/auth/v2/session/refresh

The client will use the refreshToken obtained at the login verification and will use it on this request to extend the user access token. When the client does not have a valid access token, this request will provide the corresponding credentials for the given refreshToken.

Headers

Name
Type
Description

x-api-key*

String

Public Key obtained in the developer dashboard

Request Body

Name
Type
Description

refreshToken*

String

Refresh token

{
    "code": 1,
    "success": true,
    "data": {
        "token": "eyJhbGciOiJIUzUxMi...",
        "tokenExpiry": 1678138840184,
        "tokenLifeMS": 30000000000,
        "refreshToken": "31e...c95",
        "user": {
            "_id": "aea...36",
            "status": "ACTIVE",
            "banReason": ""
        }
    }
}

{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": "INVALID_REFRESH_TOKEN"
    }
}

Sign Out

POST https://kend.elixir.app/sdk/auth/v2/session/signout

This endpoint allows the user to remove the current session from the client.

Headers

Name
Type
Description

x-api-key*

String

Public Key obtained in the developer dashboard

authorization*

String

"Bearer <JWT>"

{
    "code": 1,
    "success": true,
    "data": {
        "message": "Session closed successfully for this device"
    }
}

  {
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1000,
        "message": "Invalid Credentials!"
    }
}

QR Verify

POST https://kend.elixir.app/sdk/auth/v2/signin/qr-verify

Obtain the user credentials by scanning QR code available on Elixir > My Account > Security

Headers

Name
Type
Description

x-api-key*

String

Public Key obtained in the developer dashboard

Request Body

Name
Type
Description

qrValue*

String

Value obtained from scanning the QR code


{
    "code": 1,
    "success": true,
    "data": {
        "token": "eyJhbGciOiJIU...",
        "tokenExpiry": 1703309445119,
        "tokenLifeMS": 31557600000,
        "refreshToken": "5fb...38e"
    }
}
{
    "code": -1,
    "success": false,
    "error": {
        "status": 400,
        "code": 1000,
        "message": "Invalid Credentials!"
    }
}

Tournaments API

Game implementation of the tournaments tool.

We have defined two core endpoints: get tournaments and submit scores.

Client Side: Get Tournaments

The first part of the implementation takes place on the game client/backend side. This first endpoint will provide the active tournaments for your game, given an API Key.

The most critical element will be the _id field, as it will define which tournament you want to submit the player's score to in the second part of the implementation.

Please notice that you'll only be able to access private tournaments and submit scores using a Development API Key.

We recommend adding the active tournament with a visible component in the game so that the player can select and play to it (or instead set it as default).

Get Tournaments

GET https://kend.elixir.app/sdk/v2/tournaments/

Retrieves all the tournaments for a given API Key.

Query Parameters

Headers

Server Side: Submit Score

This second part of the implementation is the most critical one. Here you'll submit each player score, which will affect its ranking and be displayed in the leaderboard.

Given the critical nature of this functionality, we need to insist on the importance of calling this method from the Game Server or Backend.

You won't be able to submit a score to a public event with a Development API Key

To implement this accurately, the game developer must never expose his private key. And this should be done server-side, not client-side!

You can submit multiple scores for each player. The scores will be grouped by the defined userId or externalUserId you provide with each score, and the total aggregate result will be displayed in the leaderboard.

Submit Score

POST https://kend.elixir.app/sdk/v2/tournaments/:tournamentId/submit

Headers

Request Body

Additional Tournament Info

If you want to extract the best out of the Elixir Tournaments feature, including these two endpoints will make you stand out:

Tournament Leaderboard

You can access the tournament leaderboard via API to display it inside your game. Apart from the general ranking, you will have access to the player rank. In case you want to display it on your client or if you want to know the winners and assign rewards for a finished tournament.

Get Leaderboard

GET https://kend.elixir.app/sdk/v2/tournaments/:tournamentId/leaderboard

Obtain the total ranking for the tournament based on the sorting method you configured in the Dashboard. If you provide the player JWT, their rank will be included outside of the paginated entries.

Path Parameters

Headers

Request Body

Tournament Scores

As a verifiable source, this endpoint will provide all scores given a tournament and a specific period. This way, game developers can contrast their data against the data in Elixir to avoid malicious activity and fake scores.

Get Scores

GET https://kend.elixir.app/sdk/v2/tournaments/:tournamentId/scores

Return the total tournament scores by user

Headers

Request Body

Game Quests

Discover the API to support Quests inside your Game and take the best out of the Season Pass!

The Quest System API serves as the backbone for enabling games to seamlessly integrate and participate in the platform's Quest system. This API provides a standardized interface for game developers to report user progress.

This endpoint is protected with an RSA signature system, adding an extra layer of security to prevent unauthorized users from submitting progress reports without verification.

  • The endpoint requires all requests to be signed with RSA signatures generated using private keys known only to authorized game developers.

  • Upon receiving a progress report request, the API server verifies the authenticity and integrity of the request by validating the RSA signature against the corresponding public key associated with the game developer.

This robust security measure mitigates the risk of unauthorized data manipulation and maintains the reliability of the Quest System API, fostering trust and confidence among game developers and platform users alike.

Submit Game Stat

POST https://kend.elixir.app/sdk/v2/game-stats

Submit game stat to progress an Elixir Quests. This endpoint is protected using the Elixir RSA Signature.

Headers

Request Body

Easily Add Custom 'Project Settings' to Unreal Engine (.INI)Tom Looman

After completing the ; For the implementation on the game side, we tried to make it in the simple but most secure way. Please, make sure to use the Development API key during the development and testing of your integration to work with a private tournament and avoid having test data in production. This key will only work for private tournaments.

Name
Type
Description
Name
Type
Description

We have chosen to be extra cautious and secure it with an using your private API key. We use this signature method to be sure that the score is sent from a verified server and reduces vulnerabilities and exploits of malicious agents. This provides reliability to the leaderboards displayed in Elixir.

Saves a user scores for a specific tournament. Either userId or externalUserId must be provided. userId represents the Elixir user Id, and will be linked to the Elixir account of the player to display their preferred username and avatar in the leaderboard, so we encourage you to use the User Info endpoint to retrieve the elixir Id of each player for the best looking tournament page. The format of the scores must follow the scoreTypes defined on : { "scoreType": <scoreType>, "value": Number}

Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description
Name
Type
Description

filter

ALL or ACTIVE

Filter between ALL events or ACTIVE events. Default: "ACTIVE"

x-api-key*

String

Public Key available on the Developer Dashboard

{
"code": 1, 
"success": true, 
"data": [{
    "_id": // Unique identifier of the event (ID),
    "name": // Name of the event (STRING),
    "gameId": // ID,
    "description": // text,
    "createdAt": // Date of creation of the tournament (2022-12-13T12:45:17.281Z) "modifiedAt": Date of latest modification(ISO),
    "startsAt": // Starting date of the event(ISO),
    "endsAt": // Ending Date of the event(ISO),
    "repeatEvery": null,
    "location": // URL where the tournament is happening (String), 
    "eventUrl": // URL to redirect to the event (String),
    "userId": // Creator of the event (ID),
    "imageUrl": // URL with the image of the event (String),
    "prizePool": // Amount of USD in the prize pool (Number),
    "type": // Indicator if it is a "tournament" or just an "event",
    "visibility": // Indicator if the tournament is visible for the public (public/private), "rules": URL to the rules of the tournament (String),
    "prizeDescription": // Short description of the price (String),
    "settingsId": // Setting selected for the tournament (ID),
    "leaderboard": // Object containing the current leaderboard
} ]
}

x-api-key*

String

Public Key obtained in the developer dashboard

x-api-token*

String

Timestamp used in the API Signature

x-api-signature*

String

Generated RSA signature

Content-Type

String

'application/json'

userId

String

Elixir User Id.

externalUserId

String

Your unique identifier for that user. (displayed if not linked to Elixir)

scores*

Array

An Array of individual scores, with each element being an object of the shape { "scoreType": "<name>", "value": <number>}

{
  "code": 1, 
  "success": true, 
  "data": {
     "_id": "7e410239-5113-4e8c-bad2-fd018fb5cc64", 
     "tournamentId": "ad092f92-ce73-49df-a59f-1b423ad57463", 
     "externalUserId": "sniper-4431",
     "userId": "123",
     "scores": {
         "kills": 6, 
         "deaths": 2, 
         "kd": 3
    },
  "createdAt": "2022-12-15T00:48:32.084Z" 
  }
}

tournamentId*

String

ID of the tournament

x-api-key*

String

Public Key obtained in the developer dashboard

authorization

String

Bearer JWT

startDate

Date

Starting date that you want to consider for the leaderboard.

endDate

Date

Ending date that you want to consider for the leaderboard. (f.e. "2022-12-31")

limit

Int

The number of entries you want to display. Intended for pagination (Default: 10)

skip

Int

The number of entries you want to skip. Intended for pagination (Default: 0)

{
    "code": 1,
    "success": true,
    "data": {
            "entries": [{
                "_id": "rega",
                "rank": 1,
                "avatarUrl": null,
                "scores": [
                    {
                        "scoreType": "kills",
                        "value": 5
                    }
                ]
            },
            {
                "_id": "09142dc7-283d-400a-b073-9a20955cb92d",
                "rank": 2,
                "avatarUrl": null,
                "name": "Groundbreaker",
                "username": "groundbreaker-1433",
                "scores": [
                    {
                        "scoreType": "kills",
                        "value": 10
                    }
                ]
            }
        ],
        "totalEntries": 2,
        "tournamentId": "ee39d5e1-b578-4409-8383-ceef384e7e8d",
        "userRank": {
            "_id": "09142dc7-283d-400a-b073-9a20955cb92d",
            "rank": 2,
            "avatarUrl": null,
            "name": "Groundbreaker",
            "username": "groundbreaker-1433",
            "scores": [
                {
                    "scoreType": "kills",
                    "value": 10
                }
            ]
    }
}

x-api-key*

String

Public Key obtained in the developer dashboard

startDate

Date

Starting date that you want to consider for the calculation of the scores

endDate

Date

Ending date that you want to consider for the calculation of the scores. (f.e. "2022-12-31")

{
    "code": 1,
    "success": true,
    "data": [
        {
            "_id": "ff60d00d-9c35-4c76-93e4-4848473d8268",
            "tournamentId": "ee39d5e1-b578-4409-8383-ceef384e7e8d",
            "externalUserId": "sniper",
            "userId": null,
            "scores": {
                "kills": 5
            },
            "createdAt": "2023-01-11T14:52:31.394Z"
        },
        {
            "_id": "6ab6833d-6f96-47f9-8fd6-86212b3bfe4a",
            "tournamentId": "ee39d5e1-b578-4409-8383-ceef384e7e8d",
            "externalUserId": "Groundbreaker",
            "userId": "09142dc7-283d-400a-b073-9a20955cb92d",
            "scores": {
                "kills": 10
            },
            "createdAt": "2023-01-11T14:54:02.832Z"
        }
    ]
}

x-api-key*

String

Public Key available on the Developer Dashboard

x-api-signature*

String

Generated RSA signature

x-api-token*

String

Timestamp used in the API Signature

Content-Type*

String

'application/json'

stat*

String

increment*

Number

userId

String

Elixir ID

{
"code": 1, 
"success": true, 
"data": {}
}
required steps
RSA Signature
your tournament settings
RSA signature

How To

Link Elixir account to a game API account

If you already have an account management API for your game and you would like to link the Elixir Launcher account to the game account and use the game account as main, you can do this simply via a Token Exchange flow.

What is Token Exchange?

Token exchange is an extension to the OAuth 2.0 protocol that allows one token to be obtained by providing another valid token.

You can read more about it here:

The process at a glance

Simply put, Elixir Launcher will provide the game with a JWT token for the associated account and the game will send it to the game's account service and receive a game main account JWT token in return.

The JWT token provided by Elixir Launcher often includes an email which can be used to automatically link both accounts without further interaction from the user. Only in the event of the email not matching the one used in the game API would you need to require additional authentication with the game account service to know which account to link to.

How do I implement it?

Below is a sequence diagram of the process of linking an Elixir account to a main game API account.

RSA Signature
🔐
Link Elixir account to a game API account
Import NFTs from Opensea
OAuth 2.0 Token Exchange
Logo
Create Beta Codes
Logo
Logo