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
  • Step 1: Import the SDK
  • Step 2: Instantiate the SDK
  • Step 3: Verify the Configuration
  1. SDKs & APIs
  2. Games
  3. SDK Documentation
  4. Getting Started

Configuration

Once you've successfully installed the Siriusnet Blockchain SDK, the next step is to configure it for use in your project. This involves setting up the connection to the Siriusnet Blockchain and providing the necessary API keys.

Here's a step-by-step guide on how to configure:

Step 1: Import the SDK

First, you need to import the SDK into your project. Depending on the language you're using, this could look something like this:

from siriusnet_sdk import SiriusnetSDK

Step 2: Instantiate the SDK

Next, you need to create an instance of the SDK. This is typically done by calling the constructor and passing in the necessary configuration parameters.

sdk = SiriusnetSDK(api_key='your_api_key')

In this example, you need to replace 'your_api_key' it with your actual API key.

Step 3: Verify the Configuration

Finally, you should verify that the SDK is correctly configured and can connect to the Siriusnet Blockchain. You can do this by calling a method that interacts with the blockchain and checking that it doesn't throw any errors.

try:
    sdk.get_player_battles('test_player_id')
    print("SDK is correctly configured!")
except Exception as e:
    print("There was a problem with the SDK configuration: ", e)

In this example, we're calling the get_player_battles method with a test player ID. If the SDK is correctly configured, this should return without throwing any errors.

PreviousInstallationNextAPI Reference

Last updated 1 year ago

🎮