# Sentry Wallet Functionality

In the Xai ecosystem, a Sentry Wallet plays a crucial role in the interaction between the Sentry Nodes and the Referee Smart Contract. The Sentry Wallet acts as an intermediary agent responsible for submitting assertions to the Referee on behalf of the associated Sentry. This is facilitated through specific functions in the Referee contract that can only be called by the owner of a Sentry Key or addresses they have approved on this contract.

The Sentry Wallet can submit an assertion to a challenge by calling the \`submitAssertionToChallenge\` function in the Referee contract. This function checks if the challenge is open for submissions and if the Sentry Key hasn't already been submitted for this challenge. If these conditions are met, the sentry's assertion is submitted to the challenge.

The Sentry Wallet can also claim a reward for a successful assertion by calling the \`claimReward\` function in the Referee contract. This function checks if the challenge is closed for submissions. If this conditions is met and the assertion is valid for a payout, a reward is sent to the Sentry owner.

In summary, the Sentry Wallet serves as a messenger facilitating the interaction between the node and the Referee, thereby ensuring the smooth operation of the Xai network.


---

# 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://xai-foundation.gitbook.io/xai-network/about-xai/sentry-keys-explained/sentry-wallet-functionality.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.
