> For the complete documentation index, see [llms.txt](https://docs.talus.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.talus.network/talus-docs-v2.1.0/reference/move/nexus_interface/distributed_event.md).

# nexus\_interface::distributed\_event

* [Struct `DistributedEventWrapper`](#struct-distributedeventwrapper)
* [Function `emit`](#function-emit)
* [Function `inner`](#function-inner)
* [Function `deadline_ms`](#function-deadline_ms)
* [Function `requested_at_ms`](#function-requested_at_ms)
* [Function `task_id`](#function-task_id)
* [Function `leaders`](#function-leaders)

### Struct `DistributedEventWrapper`

Wraps an event of type `T` with the metadata the Leader network uses to assign and time its off-chain pickup: deadline, request timestamp, task ID, and the ordered set of candidate leaders.

```move
public struct DistributedEventWrapper<T: copy, drop> has copy, drop
```

<details>

<summary>Fields</summary>

`event: T`[`deadline_ms`](#nexus_interface_distributed_event_deadline_ms)`: u64`[`requested_at_ms`](#nexus_interface_distributed_event_requested_at_ms)`: u64`[`task_id`](#nexus_interface_distributed_event_task_id)`: sui::object::ID`[`leaders`](#nexus_interface_distributed_event_leaders)`: vector<sui::object::ID>`

</details>

#### Function `emit`

Emits an event with the metadata required for distributed Leader pickup.

```move
public fun emit<T: copy, drop>(event: T, deadline_ms: u64, requested_at_ms: u64, task_id: sui::object::ID, leaders: vector<sui::object::ID>)
```

#### Function `inner`

Returns the wrapped event.

```move
public fun inner<T: copy, drop>(wrapper: &nexus_interface::distributed_event::DistributedEventWrapper<T>): &T
```

#### Function `deadline_ms`

Returns the per-Leader pickup interval in milliseconds.

```move
public fun deadline_ms<T: copy, drop>(wrapper: &nexus_interface::distributed_event::DistributedEventWrapper<T>): u64
```

#### Function `requested_at_ms`

Returns the request timestamp in milliseconds.

```move
public fun requested_at_ms<T: copy, drop>(wrapper: &nexus_interface::distributed_event::DistributedEventWrapper<T>): u64
```

#### Function `task_id`

Returns the Task ID used to correlate the request.

```move
public fun task_id<T: copy, drop>(wrapper: &nexus_interface::distributed_event::DistributedEventWrapper<T>): sui::object::ID
```

#### Function `leaders`

Returns the ordered Leader candidates for the request.

```move
public fun leaders<T: copy, drop>(wrapper: &nexus_interface::distributed_event::DistributedEventWrapper<T>): &vector<sui::object::ID>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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 following URL with the `ask` and `goal` query parameters:

```
GET https://docs.talus.network/talus-docs-v2.1.0/reference/move/nexus_interface/distributed_event.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
