WHITEPAPER
  • Siriusnet
  • 📖Whitepaper
    • Introduction
    • Gameplay
    • About us
    • Consensus
      • EVM
    • Chain Info
    • Wallet
      • Download
      • Support
        • Basic
        • How to Move Assets
    • Siriuswap
    • Siriusscan
  • 🪙TOKENOMICS
    • 1️⃣GP
    • 2️⃣TICKET
    • 3️⃣SINT
    • 4️⃣MCD
  • SDKs & APIs
    • 💻dApp
      • Build Your Siriusnet Client
      • dApp SDK
        • Guides
          • SDK Quick start
    • 🎮Games
      • SDK Documentation
        • Introduction
        • Getting Started
          • Installation
          • Configuration
        • API Reference
          • record_battle method
            • Description
            • Parameters
            • Return Value
            • Example Usage
          • get_player_battles method
            • Description
            • Parameters
            • Return Value
            • Example Usage
        • Error Handling
        • FAQ
  • 🏢COMPANY
    • Roadmap
    • Team
    • Brand asset
  • 💪COMMUNITY
    • Social Media
  • 🤙Collaborating
    • 💰Foundation
    • 💸Grants
  • 📢Policies
    • 🔏Privacy & Policy
  • 📡Notes
    • 🔏Attack address
Powered by GitBook
On this page
  1. SDKs & APIs
  2. Games
  3. SDK Documentation
  4. API Reference
  5. record_battle method

Parameters

The record_battle method in the SiriusnetSDK class takes three parameters:

  1. player_id (str): This is a unique identifier for each player. It is used to associate the battle record with a specific player on the Siriusnet Blockchain.

  2. game_id (str): This is a unique identifier for each game. It is used to associate the battle record with a specific game on the Siriusnet Blockchain.

  3. result (str): This represents the outcome of the battle. It should be a string, either 'win' or 'lose', indicating whether the player won or lost the battle.

These parameters are all required and should be provided as strings. If any of these parameters are missing or invalid, the method will likely throw an exception or return an error.

PreviousDescriptionNextReturn Value

Last updated 1 year ago

🎮