# Milestone Eligibility Check

A helper function to verify the Player's on-chain video metrics against a Quest's milestone video metric thresholds.&#x20;

{% code overflow="wrap" fullWidth="true" %}

```typescript
const {eligible, completed, toComplete, error, errorMessage } = await newDispatch.playerMilestoneEligibilityCheck(
    "0x0106",
    1,
    1,
    factoryQuestData);
```

{% endcode %}

**Player Milestone Eligibility Check Props:**

{% code overflow="wrap" fullWidth="true" %}

```typescript
/* Player's profile address. */
playerProfile: `0x${string}`;

/* Quest Id. */
questId: number;

/* Milestone Id. */
milestone: number;

/* Kinora Quest Data Address. */
kinoraQuestDataAddress: `0x${string}`;
```

{% endcode %}

**Result Object:**

<pre class="language-typescript" data-overflow="wrap" data-full-width="true"><code class="lang-typescript"><strong>/* A boolean for if the player is eligible or not. */
</strong>eligible?: boolean;

/* An array including all completed activity for each video. */
completed?: PlayerVideoActivity[];

/* An array including all to be completed activity for each video. */
toComplete?: PlayerVideoActivity[];

/* Boolean to indicate whether an error was encountered during joining. */
error: boolean;

/* Message of the encountered error. */
errorMessage?: string;
</code></pre>

**PlayerVideoActivity Object:**

{% code overflow="wrap" fullWidth="true" %}

```typescript
/* Player metrics for the included milestone video. */
secondaryCollectOnComment: number;
secondaryCollectOnQuote: number;
secondaryCommentOnQuote: number;
secondaryCommentOnComment: number;
secondaryMirrorOnComment: number;
secondaryMirrorOnQuote: number;
secondaryQuoteOnComment: number;
secondaryQuoteOnQuote: number;
secondaryReactOnQuote: number;
secondaryReactOnComment: number;
hasReacted: boolean;
hasQuoted: boolean;
hasMirrored: boolean;
hasCommented: boolean;
hasBookmarked: boolean;
duration: number;
avd: number;
playCount: number;
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://codex.irrevocable.dev/sdk-reference/dispatch/milestone-eligibility-check.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
