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/coreQuick 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/coreSDK 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
Phaser Shooter
Full game demo with XP progression and battle passes
Phaser 3 + TypeScriptMore Examples
Advanced usage patterns
Platform Support
Official plugins for popular game engines
Web/JSstable
Unitystable
Unrealbeta
Godotbeta
PlayCanvasstable