SDK Documentation

XP SDK for Games

Integrate cross-game progression, rewarded ads, and blockchain rewards into your game with just a few lines of code.

~45KB
Bundle Size
gzipped
100%
TypeScript
type-safe
3
Dependencies
minimal
5+
Platforms
supported

Installation

Choose your preferred method

Package Manager
# Using npm
npm install @xp-sdk/core

# Using pnpm
pnpm add @xp-sdk/core

# Using yarn
yarn add @xp-sdk/core

Quick Start

Up and running in minutes

# Using npm
npm install @xp-sdk/core

# Using pnpm
pnpm add @xp-sdk/core

# Using yarn
yarn add @xp-sdk/core

SDK Modules

Everything you need to build rewarding games

Authentication

Wallet connection and Immutable Passport integration

loginWithWallet()loginWithPassport()logout()getCurrentPlayer()isAuthenticated()

Ads

Rewarded video ads with XP multipliers

requestAd()showAd()cancelAd()getAvailablePlacements()on("adComplete")

Rewards

XP rewards, receipts, and on-chain verification

getBalance()verifyReceipt()claim()getHistory()getPendingRewards()

Progress

Cross-game progression, battle passes, and missions

getGlobalProgression()trackEvent()getBattlePass()getMissions()claimTierReward()

Inventory

NFT assets, items, and player loadouts

getItems()getItem()equipItem()unequipItem()getLoadout()

Leaderboards

Global and game-specific rankings

getEntries()submitScore()getPlayerRank()getLeaderboards()getSeason()

Example Demos

Working examples to get you started quickly

HTML5 Basic

Simple vanilla JS integration showing auth, ads, and rewards

HTML + JS

Phaser Shooter

Full game demo with XP progression and battle passes

Phaser 3 + TypeScript

Unity Demo

Unity plugin integration with native C# bindings

Unity + C#

More Examples

Advanced usage patterns

Platform Support

Official plugins for popular game engines

Web/JSstable
Unitystable
Unrealbeta
Godotbeta
PlayCanvasstable

Ready to integrate?

Get your API keys and start building in minutes.