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
  • Installation
  • Usage
  • ES6 (import)​
  • CommonJS (require)​
  1. SDKs & APIs
  2. dApp
  3. dApp SDK
  4. Guides

SDK Quick start

PreviousGuidesNextGames

Last updated 2 years ago

The dApp SDK exists to help developers build on top of dApp. It's designed to run in any environment that can execute JavaScript (think websites, node scripts, etc.). While simple enough to use in a hackathon project, it's also robust enough to power production applications.

Installation

The easiest way to consume the SDK is via . To install it in your project, simply run yarn add @siriuswap/sdk (or npm install @siriuswap/sdk).

Usage

To run code from the SDK in your application, use an import or require statement, depending on which your environment supports. Note that the guides following this page will use ES6 syntax.

ES6 (import)

import { ChainId } from '@SIRIUSWAP/sdk'
console.log(`The chainId of mainnet is ${ChainId.MAINNET}.`)

Copy

CommonJS (require)

const SIRIUSWAP = require('@siriuswap/sdk')
console.log(`The chainId of mainnet is ${SIRIUSWAP.ChainId.MAINNET}.`)

💻
npm
​
​