In-game NFTs (ERC721)
Custom NFT Tokens generated in-game
In-Game NFTs are ERC721 tokens that offer transparency in minting and transactions. They enable games to create virtual assets without the pain of deploying a smart contract. Developers can easily create In-Game NFTs using ZooGames API and control them securely.
Use Cases
Virtual Assets: Earn or purchase In-Game NFTs for in-game items, upgrades, or unlocking levels.
In-Game Economy: engage in player-driven economies within the game.
Reward System: Distribute NFTs as rewards for achievements, competitions, or milestones.
Social Interaction: Gift or trade NFTs, foster community engagement.
Airdrops and Promotions: Airdrop NFTs to players, attract new users or introduce special events.
Limited Edition Collectibles: Create rare NFTs for trading and collecting.
You can choose to send In-Game NFTs to either the Mirror wallet or the Primary wallet of users. Sending NFTs to the Primary wallet allows users to trade them on our official NFT store, OPENZOO.IO. Once your NFT collection is registered, you can add them to Openzoo and claim transaction royalties.
Initiating In-Game NFTs Creation
To create an In-Game NFTs token using the ZooGames API, you can follow these steps:
Send a request to the API endpoint, providing the desired Token name and symbol in the request payload.
The API will process your request and generate a new In-Game NFTs token with the specified Token name and symbol.
Upon successful creation, you will receive a response containing relevant information about the newly created token, such as its contract address and other necessary details.
You can now incorporate this In-Game NFTs token into your game environment, allowing players to interact with and own unique virtual assets.
Initialize ERC721 before using the token
POST
API_END_POINT_URL/API_KEY/erc721/create
SDK Preparation
You need to prepare for SignedSignatureFromPayload by
Installing zoo-game-sdk by npm install zoo-game-sdk
Import SDK by import * as ApiKey from 'zoo-game-sdk/src/auth/apikey/index'
Signing by SDK
let bodyMessage =JSON.stringify(payload);
let hmac = ApiKey.signData(bodyMessage, SEC_KEY);
*Use "hmac" as SignedSignatureFromPayload
Query Parameters
API_KEY*
String
API_KEY
Request Body
gameAddress*
Address
Address of Game/Project registered Primary Address
name*
String
Name of this ERC721 Token
symbol*
String
Token Symbol
You need to keep Token Address for the future usage
Batch Mint
This function empowers game developers to generate new NFT tokens on-demand, granting them flexibility and control over the in-game economy. You have the ability to mint NFTs in batches using an array.
Mint Tokens by batch
POST
API_END_POINT_URL/API_KEY/erc721/batchMint
SDK Preparation
You need to prepare for SignedSignatureFromPayload by
Installing zoo-game-sdk by npm install zoo-game-sdk
Import SDK by import * as ApiKey from 'zoo-game-sdk/src/auth/apikey/index'
Signing by SDK
let bodyMessage =JSON.stringify(payload);
let hmac = ApiKey.signData(bodyMessage, SEC_KEY);
*Use "hmac" as SignedSignatureFromPayload
Query Parameters
API_KEY*
String
API_KEY
Request Body
gameAddress*
Address
Address of Game/Project registered Primary Address
tokenAddress*
Address
Address of Token you have created or target Token to be minted
tokenIds*
Array of Number
Array of IDs to be minted ex:
[1,2,3,4,5] and must not be duplicated or ['0x00a'] as a hex number (Starting with 0x)
to*
String
The recipient primary address (tradable) or Mirror address (not tradable)
tokenJsons*
Array of Json Objects
Array of Json objects to be minted
ex:
[ {token_id: 1, name: 'NFT 1', description:'',image:'<url>'}, {token_id: 1, name: 'NFT 2', description:'',image:'<url>'} ]
Please ensure that only unique TokenIDs are used when minting NFTs, or if you are using a running number system, make sure to use the latest TokenIDs to maintain uniqueness.
Batch Burn
This function enables game developers to remove existing NFT tokens from circulation, granting them control over the in-game economy and token supply. You can burn NFTs in batches using an array, effectively eliminating them from the system and ensuring their scarcity and value.
Burn Tokens by amount from ZooGamesID
POST
API_END_POINT_URL/API_KEY/erc721/batchBurn
SDK Preparation
You need to prepare for SignedSignatureFromPayload by
Installing zoo-game-sdk by npm install zoo-game-sdk
Import SDK by import * as ApiKey from 'zoo-game-sdk/src/auth/apikey/index'
Signing by SDK
let bodyMessage =JSON.stringify(payload);
let hmac = ApiKey.signData(bodyMessage, SEC_KEY);
*Use "hmac" as SignedSignatureFromPayload
Query Parameters
API_KEY*
String
API_KEY
Request Body
gameAddress*
Address
Address of Game/Project registered Primary Address
tokenAddress*
Address
Address of Token you have created or target Token to be burnt
tokenIds*
Array of Number
Array of IDs to be burnt ex:
[1,2,3]
Please ensure that each minted NFT has a unique token ID and avoids reusing any duplicate IDs, regardless of whether the ID has been previously burned. This will ensure the uniqueness and integrity of the NFTs within the system.
Total Mint count
The Total Mint Count API retrieves the total number of operations in your collection. By making a request to this API, you can obtain the count of NFTs operations that have been minted for a specific collection, providing valuable information about the size and scale of your collection.
Token Minted Counter operation (Not NFT supply)
POST
API_END_POINT_URL/API_KEY/erc721/totalMintCount
SDK Preparation
You need to prepare for SignedSignatureFromPayload by
Installing zoo-game-sdk by npm install zoo-game-sdk
Import SDK by import * as ApiKey from 'zoo-game-sdk/src/auth/apikey/index'
Signing by SDK
let bodyMessage =JSON.stringify(payload);
let hmac = ApiKey.signData(bodyMessage, SEC_KEY);
*Use "hmac" as SignedSignatureFromPayload
Query Parameters
API_KEY*
String
API_KEY
Request Body
tokenAddress*
Address
Address of Token you have created or target Token to be checked
Get user In-Game NFTs
The Get In-Game NFTs API allows you to retrieve In-Game NFTs based on either the user's ZooGamesID or their Primary Address. You can use this API to obtain multiple NFT collections associated with a user, providing access to their owned NFTs within the game ecosystem.
Retrieve the list of In-Game items based on the ZooGamesID or Primary Address.
GET
API_END_POINT_URL/API_KEY/userInfo/nft/inGameNft/[ZooGamesID or Address]
Example:
Query Parameters
API_KEY*
String
API_KEY
ZooGamesID or Address*
String
If you use ZooGamesID it will get NFT list by linking user Addresses
If you use Address it will get NFT list by an address
collection_in*
Addresses
Contract address of NFTs
You can use comma (,) to get many collections you want.
first
Number
Limitation of the list. Default is 100
skip
Number
It's an Offset (Start from). Default is 0
Currently, this API supports retrieving the list of NFTs based on the ZooGamesID and Primary Address or any other addresses associated with the user. However, it does not provide the functionality to fetch the list of linked Secondary addresses by the ZooGamesID.
Last updated