For Game Developers
Step-by-Step Guide:
Install the SDK
bashSalinEditnpm install @g3x/sdk
Initialize the Client
jsSalinEditimport { G3XClient } from '@g3x/sdk'; const client = new G3XClient({ nodeUrl: 'https://node.g3x.network', walletProvider: window.ethereum, });
Sync Game State (Off-Chain)
jsSalinEditclient.syncGameState({ playerId: '0x123...', action: 'move', data: { x: 10, y: 5 }, });
Finalize Match (On-Chain)
jsSalinEditclient.finalizeMatch({ matchId: 'match-123', winner: '0xabc...', rewards: ['NFT', 'Token'], });
Integrate Smart Contracts Use Solidity contracts to handle XP, rewards, NFTs, etc. Example:
rewardXP(address player, uint256 amount)
Last updated