Gaming sdk


Skin is an item that can be connected to inventory items and customise them


To create your own skin, first deploy the category smartcontract

  contract MyGameSkin is InventoryCategoryNFT {
      string public override name = "Skins";
      string public override description = "Game skins";
      string public override imageUrl = "";

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

  contract MyGameWeaponSkin is SkinNFT {
      string public override name = "Weapon skin";
      string public override description = "Gold weapon skin";
      string public override imageUrl = "";
      address[] public override categories = [0xA7c81c7c10be53974510911F44AF976c7D0709D9];
      // Can be bound only to the items of this category
      address public override boundToCategory = 0x78541Ea822b32c98C00c7C1620A6cF4b65d45762;
      bool public override transferable = true;
      bool public override reboundable = true;

After contract deployment you can mint a skin for user


Skins can be rebound to other items

const userInventory = await gamingSdk.user.current.skins.rebound(SKIN_ADDRESS, BOUND_TO_ITEM_ADDRESS);