Use cases
- Loyalty Program - Reward users for their continued engagement and loyalty. Users earn experience points (XP) for actions such as logging in daily, making purchases, or referring friends.
- Achievement System - Implement an achievement system where users earn XP for completing specific milestones or challenges within your application.
- Event Participation - Award XP to users for participating in special events, contests, or promotions.
Video Setup
Prerequisites
-
Setup OPENFORMAT
Before you can continue, please complete the following steps to obtain the necessary credentials:
- Go to the OPENFORMAT Dashboard
- Register for an account
- Generate an API Key
- Create a dApp
- Create a Badge (only if required)
- Supabase Table
user_id. Follow the table structure below. You will need to add the following columns: account_address, private_key and user_id.
Get Started
1
Remix this template
Clone this template in BuildShip.
2
Supabase Node Inputs
Add your Supabase
API Key and API URL to the Get Row and
Create Row node inputs.3
OPENFORMAT Node Inputs
Add your OPENFORMAT
API Key, dApp ID and Private Key into
the Reward XP Node inputs.4
Test Integration
To test the integration, click on Test and add the
user_id of your user to the body of the request. e.g.5
Generate a Leaderboard
Now that you’ve rewarded XP to a user, you can generate a leaderboard using the Leaderboard Template.
Node Inputs
Reward XP
| Key | Description |
|---|---|
API Key | Your OPENFORMAT API Key. You can find this in the Settings page of the Dashboard (String) |
dApp ID | The ID of your OPENFORMAT dApp. You can get this in the Dashboard (String, max 32 characters) |
Private Key | The Private Key of your web3 account. You can find this in the Settings page of the Dashboard. |
Action ID | A random identifier for the action that has been completed, e.g., completed_workout, completed_lesson. (String, max 32 characters) |
Amount of XP | The amount of XP to be rewarded. (Number, whole number only) |
Receiver | The address of the receiver, which will be the existing web3 account or the newly generated account. |
Await | Wait for the transaction to be confirmed on the blockchain. (Boolean, default: true) |