Get Badge Info
Get detailed information about a badge
Retrieves detailed information about a specific badge.
Endpoint: /game/badge/info
Method: GET
{
nft: string; // Badge contract address
tokenId: string; // ID of the badge
}
{
data: {
tokenId: string; // Badge ID
owner: string; // Current owner address
metadata: { // Badge metadata
name: string;
description?: string;
image?: string;
attributes?: object[];
};
createdAt: string; // Creation timestamp
updatedAt: string; // Last update timestamp
isBurnt: boolean; // Whether the badge is burnt
}
status: string;
}
{
error: string;
details?: any;
}
Example Usage
// Setup request parameters
const timestamp = Date.now().toString();
const params = {
nft: '0x1234567890123456789012345678901234567890', // Badge contract address
tokenId: '123' // Badge ID
};
// Generate HMAC signature
const hmac = generateHmacSignature(timestamp, params, secretKey);
// Make the API request
const response = await axios.get(apiEndpoint + '/game/badge/info', {
params,
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});
// Process the response
console.log('Badge Info:', response.data.data);
Last updated