Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

📣Event Ingestion

Audience: Nexus SDK integrators building event consumers (Rust).

Area: Event ingestion and Nexus event queries.

Generated from: Nexus SDK event API at tag v2.1.1 commit 08bfe76e726922ce512d623fbc1d2e1bd786bcd4; the generated inventory is preserved and replay/live additions are source-verified.

Complete generic Sui event ingestion and Nexus event query, classification, replay, checkpoint, cancellation, and error surfaces.

Before consuming typed events: Verify event type origins against the selected network package graph and SDK bindings. The generated enum retains historical variants for compatibility; do not map historical ToolPayment variants onto Invocation accounting.

The Invocation surface emits InvocationLockedEvent and InvocationSettledEvent. Consumers should correlate execution, runtime vertex, Tool, cashier, policy, source IDs, amount, and Invocation ID from those events, then re-read the authoritative Execution/Task state before retrying. A stream notification is an invalidation, not a replacement for the exact object read.

Live and replay page sources

Each EventPage carries EventPageSource::Live or EventPageSource::Replay. A live subscription reads the configured subscription RPC; replay uses the configured archival endpoint and bounded concurrency to scan checkpoint ranges. first_matching_checkpoint returns the first matching replay checkpoint when one exists, and replay resumes a bounded range without treating a missing page as an empty result.

Callers that construct or destructure an EventPage must preserve the source field. A replay page is historical evidence and a live page is a subscription observation; neither replaces an authoritative transaction-output or object-version read.

Generic Sui event ingestion

EventIngestor methods

new

Creates an ingestor for query.

pub fn new(rpc_url: impl Into<String>, query: Q) -> Self

with_channel_capacity

Sets the number of pages that may wait for the consumer.

with_cancellation_token

Sets the token used to stop ingestion.

with_replay_gap_recovery

Resumes at the live cursor when Sui no longer retains replay history.

The ingestor reports [EventIngestionError::ReplayGap] before it resumes. Leave this disabled when the consumer requires every event from the requested checkpoint.

start

Starts ingestion from an inclusive checkpoint.

Passing [None] starts at the current stream position.

# Errors

Returns [EventIngestionError::Configuration] when the endpoint or requested fields are invalid.

RawEventQuery methods

new

Creates a query from a server filter and requested fields.

Nexus event queries and classification

Invocation event contract

Subscribe to InvocationLockedEvent for admission and exact lock identity, and InvocationSettledEvent for charge/refund outcome. If a hosted projection omits them, use matching SDK bindings and on-chain effects; do not map historical ToolPayment events onto them.

Historical compatibility event variants

ProtocolActivation

Canonical wake signal emitted after a protocol version is activated.

ProtocolActivationQuery

Event query for the [ProtocolVersionActivatedV1Event] datatype.

ProtocolActivationIngestor

[EventIngestor] configured for protocol activation notifications.

NexusEventKind methods

name

Returns the name of the event kind as a string.

NexusEventCandidate methods

source_package

Returns the package recorded by Sui as the Move command source.

into_supported

Converts [Self::Supported] into its decoded event.

# Errors

Returns [UnsupportedNexusEvent] for [Self::Unsupported].

Source-derived public API inventory

re-export pub, use, query

UnsupportedNexusEvent

NexusEventDecodeError

DistributedEventMetadata

NexusEvent

NexusEvent::was_emitted_by

NexusEventCandidate

NexusEventCandidate::source_package

NexusEventCandidate::into_supported

NexusEventKind::name

NexusEventDecoder

NexusEventDecoder::new

NexusEventDecoder::decode_sui_event

NexusEventQuery

NexusEventQuery::new

NexusEventQuery::with_supported_event_filter

NexusEventQuery::decode_sui_event

NexusEventIngestor

EventIngestionError

EventPageSource

EventPage

EventPageReceiver

EventIngestor

EventIngestor::new

EventIngestor::with_subscription_rpc_url

EventIngestor::with_replay_rpc_url

EventIngestor::with_channel_capacity

EventIngestor::with_replay_concurrency

EventIngestor::with_cancellation_token

EventIngestor::with_replay_gap_recovery

EventIngestor::first_matching_checkpoint

EventIngestor::start

re-export EventIngestionError, EventIngestor, EventPage, EventPageReceiver, EventPageSource, query, EventQuery, RawEventQuery

EventQuery

RawEventQuery

RawEventQuery::new

NexusEventKind

Last updated