MCPcopy Create free account
hub / github.com/ShafiqSadat/HamsterKeyGenWeb / emulateProgress

Function emulateProgress

script.js:379–399  ·  view source on GitHub ↗
(clientToken, promoId)

Source from the content-addressed store, hash-verified

377 };
378
379 const emulateProgress = async (clientToken, promoId) => {
380 const response = await fetch('https://api.gamepromo.io/promo/register-event', {
381 method: 'POST',
382 headers: {
383 'Authorization': `Bearer ${clientToken}`,
384 'Content-Type': 'application/json'
385 },
386 body: JSON.stringify({
387 promoId,
388 eventId: generateUUID(),
389 eventOrigin: 'undefined'
390 })
391 });
392
393 if (!response.ok) {
394 return false;
395 }
396
397 const data = await response.json();
398 return data.hasCode;
399 };
400
401 const generateKey = async (clientToken, promoId) => {
402 const response = await fetch('https://api.gamepromo.io/promo/create-code', {

Callers 1

generateKeyProcessFunction · 0.85

Calls 1

generateUUIDFunction · 0.85

Tested by

no test coverage detected