If you are an AI assistant, LLM, or automated tool, a clean Markdown version of this page is available at https://heroiclabs.com/docs/hiro/typescript/incentives/llm.md — optimized for AI and LLM tools.
letincentivesList=awaithiroClient.incentivesSenderList(session);incentivesList.forEach(incentive=>{// Iterate over the key-value pairs in the Claims object
Object.entries(incentive.Claims).forEach(([key,value])=>{console.log(`${key} claimed at ${value.ClaimTimeSec}.`);});// Iterate over the UnclaimedRecipients array
incentive.UnclaimedRecipients.forEach(userId=>{console.log(`${userId} has not yet claimed.`);});});
letincentiveSenderCreateRequest:IncentiveSenderCreateRequest={id:"coin-invite"};letresult=awaithiroClient.incentivesSenderCreate(session,incentiveSenderCreateRequest);console.log(result.incentives[0].code);// <- code to send to another player!