Gaming sdk


Achievement is a reward for user for reaching core gameplay points. Each achevement has it's own categories.


To create your own item, first deploy the category smartcontract

  contract MyGameAchievement is AchievementCategoryNFT {
      string public override name = "Main achevements";
      string public override description = "Main game achevements";
      string public override imageUrl = "";

Once category NFT is deployed, it's address is used as category identifier. Then you need to deploy the achevement NFT

  contract MyGameFirstBossAchievement is ItemNFT {
      string public override name = "Kill first boss";
      string public override description = "Given for the first boss killing";
      string public override imageUrl = "";
      address[] public override categories = [0x5852c7605B69400a78aA85fA2Bc8f66a6B2b1295];

After contract deployment you can mint achievement for user


Request user items by categories

const userInventory = await gamingSdk.user.current.inventory.get([WEAPON_CATEGORY_NFT_ADDRESS]);

Watch new items minted

  await[WEAPON_CATEGORY_NFT_ADDRESS], (newItems) => {...});