// Setup request parameters
const timestamp = Date.now().toString();
const chain = '43114'; // Avalanche C-Chain
const contract = '0x1234567890123456789012345678901234567890'; // Badge contract address
const tokenId = '123'; // Badge ID
// Generate HMAC signature
const hmac = generateHmacSignature(timestamp, {}, secretKey);
// Make the API request
const response = await axios.get(`${apiEndpoint}/game/badge/isBurnt/${chain}/${contract}/${tokenId}`, {
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});
// Process the response
console.log('Is Badge Burnt:', response.data.data.isBurnt);