♠️
RACE Protocol
NFT PresaleDiscord
  • ❤️Official Docs & Links
  • ⏳Progress Overview
  • RACE Protocol
    • 🏗️System Architecture
      • Components
      • On-chain Accounts
      • Synchronization
      • Randomization
      • Payment
    • 🎲Game Development
      • Game Handler
      • Effect
      • Event Handling
      • Race API
        • Arweave Integration
      • Race JS SDK
        • Installation and Setup
        • Key Components
          • AppClient
          • SubClient
          • Events
          • Game Context
          • Decryption Cache
        • Advanced Features
          • Getting Revealed Knowledge
          • Exiting and Detaching
          • Submitting Messages
          • Sub-game Interaction
        • Best Practices
        • API Reference
        • Troubleshooting
    • 🧪Testing
      • Race Test Kit
      • Unit Testing
      • Integration Testing
      • Additional Considerations
    • 🧱Modules & Features
      • Encryption Methods
      • Command-line Tools
      • Configuration Options
      • Blockchain Transport Implementations
    • 📃Smart Contract
      • Solana Program
    • 🔦Examples and Use Cases
      • Draw Card Game
      • Raffle Game
      • Other Examples
  • RACE Games
    • ♠️RACE Poker app
      • 🎮Start playing in minutes
        • 💰Cash and sit-n-go
        • 🏆Tournaments
      • 🎨Workshop
        • 🏆Create cash games
        • 🏨Create tourneys
      • 💡Concept introduction
      • 🏗️System architecture
      • 👾Game Flow
      • 🎲Cards shuffling
      • ☎️Communication
      • 🔐Key sharing/decryption
      • 💱Cash flow structure
    • ⚡Solfast
      • 🎲Game modes
  • RACE RESEARCH
    • 👾No-Code Development
      • Brainstorming
      • Implementation Approach
      • Project Status
    • 0️⃣Zero-Knowledge Proofs
      • Brainstorming
      • Integration steps
        • Verifiable Randomness Generation
        • Private Game State Updates
        • Verifiable Settlements
        • Private Player Actions
      • Project Status
    • 🛡️Security Audit Report
      • Executive summary
        • Introduction to Race Protocol
        • Audit Methodology
      • Findings
        • Smart Contract Security
        • WebAssembly Security
        • Client-side Security (Race SDK)
        • Server-side Security
        • Randomization and Encryption
        • On-chain Account Management
        • Synchronization Mechanisms
        • Payment Handling
      • Recommendations
      • Conclusion
  • RACE DAO
    • 😎About
    • 🫂Community
    • 🖼️NFT Collection [!]
Powered by GitBook
On this page
  • RACE JS SDK Overview
  • Benefits of Using the SDK
  • Supported Platforms and Frameworks
  1. RACE Protocol
  2. Game Development

Race JS SDK

RACE JS SDK Overview

The RACE JS SDK is a TypeScript library that empowers developers to build client-side applications for games built on the Race Protocol. It provides a convenient and powerful interface for interacting with the core components of Race, including the Transactor server and the WASM game bundle. By integrating the SDK into their game frontends, developers can leverage the security, transparency, and fairness guarantees of Race Protocol to create engaging and trustworthy web3 gaming experiences.

Benefits of Using the SDK

Using the RACE JS SDK offers several benefits for client-side integration:

  • Simplified Blockchain Interaction: The SDK abstracts away the complexities of blockchain interaction, allowing developers to focus on game logic and user experience. It handles tasks like connecting to the Transactor, sending and receiving events, and managing player profiles.

  • Secure Sandbox Environment: The SDK provides a secure sandbox environment for executing the WASM game bundle on the client side. This ensures that the game logic runs in a controlled and isolated environment, preventing malicious code from compromising the client application.

  • Efficient Event Handling: The SDK facilitates efficient event handling by offering event listeners and deserialization utilities. This allows the game UI to react to incoming events and update the displayed game state seamlessly.

  • Hidden Knowledge Decryption: The SDK handles the decryption of hidden knowledge revealed by the game handler, allowing players to see the complete game state and make informed decisions.

  • Cross-platform Compatibility: The SDK is written in TypeScript and can be used with various web3 platforms and frameworks, including React and Vue.js. This allows developers to build game frontends for different environments while utilizing the same core game logic.

Supported Platforms and Frameworks

The RACE JS SDK is primarily designed for web-based client applications and is compatible with popular web3 frameworks such as:

  • React: The SDK can be easily integrated into React applications, allowing developers to build interactive and responsive game UIs that leverage Race Protocol's functionalities.

  • Vue.js: Similarly, the SDK can be used with Vue.js to create dynamic and engaging game frontends that interact with Race games.

While the SDK is currently optimized for web platforms, its design allows for potential future extensions to support other environments, such as mobile or desktop applications.

This introduction provides a high-level overview of the RACE JS SDK and its role in Race Protocol. The following sections will delve deeper into the installation process, key concepts, and specific functionalities offered by the SDK.

PreviousArweave IntegrationNextInstallation and Setup

Last updated 1 year ago

🎲