• Creates a new collect rewards operation for a given participation reward.

    Parameters

    • honeycomb: Honeycomb

      An instance of the Honeycomb class.

    • args: CreateCollectRewardsOperationArgs

      The arguments for collecting rewards.

    Returns Promise<{
        operation: Operation;
    }>

    An object containing the collect rewards operation.

    Example

    const honeycomb = new Honeycomb(...); // Initialize Honeycomb instance
    const participation = await honeycomb.mission(missionAddress).participations(walletAddress);
    const reward = participation[0].rewards[0]; // Assuming there is at least one participation and one reward
    const createCollectRewardsArgs: CreateCollectRewardsOperationArgs = {
    reward,
    wallet: myWalletAddress,
    programId: myCustomProgramId, // (Optional) Provide a custom program ID if needed
    };
    const { operation } = createCollectRewardsOperation(honeycomb, createCollectRewardsArgs);
    // Execute the collect rewards transaction
    await operation.send(confirmOptions);

Generated using TypeDoc