Dubbz in Your Game
This section is tailored for developers aiming to incorporate Dubbz's wagering functionality seamlessly within their game's own interface.
Getting Started with "Dubbz in Your Game" Integration for Web3 Games
Integrating Dubbz wagering directly into your game provides a seamless experience for your players, enabling them to engage in wager matches without leaving your game environment. This guide is tailored specifically for web3 games, leveraging web3 wallets for user login and authentication. Here’s how you can get started with the HTTP API integration for "Dubbz in Your Game":
Important Note for Non-Web3 Games
Currently, this integration flow is optimized for web3 games, where logging into a Dubbz account is facilitated through a web3 wallet. For non-web3 games, we recommend exploring the "Your Game in Dubbz" integration. This approach bypasses the need to develop a separate interface for Dubbz account login, offering a straightforward integration path while still providing your players with Dubbz's exciting wagering experience.
Step 1: Register/Login User to Dubbz
Before players can participate in wager matches, their game accounts must be linked with Dubbz. Use the /api/v1/partner/signin
endpoint to register or log in users. This process links your game's user accounts with new or existing Dubbz accounts, ensuring a seamless integration between the platforms.
Step 2: Create Wager Match
Once users are registered, you can initiate wager matches. Use the /api/v1/partner/pvp/matches
endpoint to create a match on Dubbz, specifying match details such as the wager amount, currency, and participant information. Dubbz will return a unique identifier for the match and a message for users to sign, confirming their participation.
Step 3: User Confirms Payment
For the match to proceed, participants must confirm their consent to the match terms and authorize the use of their funds. This step involves obtaining a digital signature from each user, which is then submitted back to Dubbz using the user confirmation endpoint associated with the match. This step ensures all parties agree to the terms of the wager.
Step 4: Report Score
After the match concludes, it's crucial to report the final scores to Dubbz. Use the reporting endpoint to submit the match results. Dubbz processes the scores, determines the match outcome, and disburses winnings accordingly.
Last updated