// Setup request parameters
const timestamp = Date.now().toString();
const params = {
nft: '0x1234567890123456789012345678901234567890' // Badge contract address
};
// Generate HMAC signature
const hmac = generateHmacSignature(timestamp, params, secretKey);
// Make the API request
const response = await axios.get(apiEndpoint + '/game/badge/count', {
params,
headers: {
apikey: apiKey,
signature: hmac,
timestamp: timestamp
}
});
// Process the response
console.log('Total Badge Count:', response.data.data.count);