🕷️Crawler Reads
Audience: Nexus SDK integrators (Rust).
Area: Crawler reads.
Generated from: Nexus SDK crawler API at release v2.1.0 commit 45d397aafcfbeeeaf5032d5fb9fa5d99b3f36205; the generated inventory is preserved and 2.1.0 read helpers are source-verified.
Complete public Crawler types and methods for typed object, metadata, transaction, owned-object, dynamic-field, versioned-state, package, and table-vector reads.
Transaction-consistent reads and recovery
ObjectUpdateReference identifies the exact object version, owner, type, digest, and previous transaction. TransactionUpdate reads the transaction effects and events for a digest. Use these helpers together: a notification or indexed activity record identifies work to inspect, while the configured Sui RPC establishes the exact object and transaction result.
TransactionStateOutput<T> carries the decoded data value together with the stable parent object_id and the field_ref written by that transaction. It does not contain a transaction view; correlate it with the caller's ExecutedTransaction or TransactionUpdate when transaction effects or events are needed. transaction_output_object and get_transaction_output_object select an object from a transaction's output; transaction_shared_initial_version extracts a shared object's initial version for a consistent follow-up read. Treat ObjectNotFound or an incomplete transaction result as evidence requiring classification, not proof that prior state never existed.
Public types
Crawler methods
new
pub fn new(client: Arc<sui::grpc::Client>) -> Selfget_package
Fetch a published Move package descriptor for ABI inspection.
pub async fn get_package(&self, package_id: sui::types::Address) -> anyhow::Result<sui::grpc::Package>get_object
Fetch an object by its ID and deserialize its Move struct contents from BCS.
get_optional_object
Fetch an object when present.
# Errors
Returns an error for transport and decoding failures. A missing object returns
Ok(None).
get_objects
Fetch many objects by their IDs in batch and deserialize Move struct contents from BCS.
get_optional_objects
Fetches many objects that may no longer exist.
Each result corresponds to the identifier at the same position in
object_ids. A missing object produces [None].# Errors
Returns an error when the RPC response is malformed, a present object has the wrong identity, or transport or decoding fails.
get_chain_id
Fetch the connected RPC's chain identifier in the 8-hex-char form Sui's Move builder uses for
[environments]lookups (the same valuesui client chain-identifierprints). The gRPC service-info call returns the genesis checkpoint digest base58-encoded; we decode it and hex-encode the first four bytes to derive the short identifier.
get_object_metadata
Fetch an object's metadata only, omitting its content.
get_object_update_reference
Fetch the update reference for the latest or a historical object version. Unlike [
Self::get_object_metadata], this includes the transaction digest that produced the requested version.
get_transaction_update
Fetch and decode the effects and events for one transaction digest
get_objects_metadata
Fetch many objects' metadata only in batch, omitting their content.
fetch_coins_for_address_by_type
Fetch every coin owned by
ownerwith the exact requested Move struct tag.The state service applies owner and type filters. Returned objects are validated again so callers never receive a reference whose address owner or type differs from the request.
get_owned_objects
Fetch owned objects of a specific type for an owner and deserialize BCS contents.
get_object_owned_objects
Fetch exact-type objects owned by another object and deserialize their BCS contents.
get_owned_object_page
Fetch one RPC page of objects owned by an address with an exact type.
The address owner and type of every returned object are validated after the state service applies the same filters.
# Errors
Returns an error when
limitis zero, the RPC request fails, the response violates its owner or type filter, or an object cannot be decoded.
get_object_owned_object_page
Fetch one RPC page of exact-type objects owned by another object.
Unlike [
Crawler::get_owned_object_page], this requires every returned object to have the exactOwner::Object(parent_id)owner. Address and consensus-address ownership are rejected.
get_dynamic_fields
Fetch all dynamic fields for a given parent table object and parse them into a
HashMap<K, V>.
get_dynamic_field_refs_matching_key
Fetch dynamic field references whose BCS names decode as
K.This is the right shape for heterogeneous dynamic field parents: inspect names first, then fetch the selected field object with the expected value type.
get_dynamic_field_value_by_id
Fetch a dynamic field object by field ID and decode only its value.
get_dynamic_field_by_key
Fetch the dynamic field selected by one typed key.
The field object identifier is derived from
parent_id,key, andkey_type, so sibling fields are not enumerated.key_typemust be the canonical Move [sui::types::TypeTag] forK. An absent field returns [None].# Errors
Returns an error when the key cannot be encoded, the object request fails, or the field identity, key, or value is invalid.
get_dynamic_fields_by_keys
Fetch values for the distinct dynamic field keys requested from one parent.
Field identities are derived from
parent_id,key_type, and each BCS encoded key. Unlike [Crawler::get_dynamic_fields], the amount of work is independent of unrelated fields stored under the parent.Missing fields are omitted from the returned [
HashMap]. Duplicate keys produce one object request.# Errors
Returns an error when a key cannot be encoded, an RPC response has an unexpected identity, or a present field cannot be decoded and validated.
get_dynamic_field_page_matching_types
Fetch one RPC page of dynamic fields matching a key and value type.
Fields from other namespaces are skipped. The returned cursor is the unmodified cursor supplied by Sui for the requested page.
# Errors
Returns an error when
limitis zero, the RPC request fails, or a matching field object cannot be decoded.
get_dynamic_field_object_values
Fetch dynamic field values from their field objects without decoding key names. This is useful for singleton dynamic fields whose on-chain name encoding is package-version dependent.
get_dynamic_field_values
Fetch all dynamic-field values for a parent object without attempting to decode keys.
get_dynamic_object_fields
Fetch all dynamic object fields for a parent object id without requiring a local dynamic-object-map wrapper.
get_dynamic_object_field_by_key
Fetch the dynamic object field selected by one typed key.
The method derives and reads the Sui wrapper field, then fetches only the child object named by that wrapper.
key_typemust be the canonical Move [sui::types::TypeTag] forK. Unlike [Crawler::get_dynamic_object_fields], it does not enumerate sibling fields. A missing wrapper returnsOk(None).# Errors
Returns an error when the wrapper key cannot be encoded, either object request fails, the wrapper or child identity is invalid, the child is absent, or a returned value cannot be decoded and validated.
get_dynamic_object_field_refs_matching_key
Fetch dynamic object fields for a parent and keep only entries whose key BCS decodes as
K. Parents may legitimately contain several child namespaces with unrelated key types.
get_dynamic_object_field_child_ids
Fetch all dynamic object field child IDs for a parent object.
get_table_vec
Fetch every item in a [
TableVec] by its contiguous index key.The request derives the fields for
0..parent.size_u64()directly and returns values in index order.# Errors
Returns an error when an index field cannot be fetched, validated, or decoded, or when any expected index is absent.
DynamicFieldPage methods
data
Returns the decoded values in RPC order.
next_cursor
Returns the opaque cursor for the next RPC page.
into_parts
Separates the decoded values from the opaque next page cursor.
OwnedObjectPage methods
data
Returns the decoded objects in RPC order.
next_cursor
Returns the opaque cursor for the next RPC page.
into_parts
Separates the decoded objects from the opaque next page cursor.
Response methods
is_shared
Check if the object is shared.
is_immutable
Check if the object is immutable.
get_initial_version
Get initial version of the object if it's shared or current version otherwise.
object_ref
Set methods
new
into_inner
inner
inner_mut
is_empty
Map methods
new
from_map
into_inner
into_map
inner
inner_mut
Source-derived public API inventory
Crawler
DynamicObjectFieldReference
DynamicFieldReference
DynamicFieldMetadata
ObjectMetadata
DynamicFieldPage
DynamicFieldPage::data
DynamicFieldPage::next_cursor
DynamicFieldPage::into_parts
OwnedObjectPage
OwnedObjectPage::data
OwnedObjectPage::next_cursor
OwnedObjectPage::into_parts
ObjectUpdateReference
TransactionUpdate
Crawler::new
Crawler::with_state_catalog
Crawler::observe_object_metadata
Crawler::get_dynamic_field_metadata
Crawler::get_package
Crawler::get_object
Crawler::get_optional_object
Crawler::get_objects
Crawler::get_optional_objects
Crawler::get_chain_id
Crawler::get_chain_digest
Crawler::get_object_metadata
Crawler::get_object_update_reference
Crawler::get_transaction_update
Crawler::get_transaction_objects
Crawler::transaction_output_object
Crawler::transaction_shared_initial_version
Crawler::get_transaction_output_object
Crawler::get_objects_metadata
Crawler::fetch_coins_for_address_by_type
Crawler::get_owned_objects
Crawler::get_object_owned_objects
Crawler::get_owned_object_page
Crawler::get_object_owned_object_page
Crawler::get_dynamic_fields
Crawler::get_dynamic_field_refs_matching_key
Crawler::get_dynamic_field_value_by_id
Crawler::get_dynamic_field_by_key
Crawler::get_dynamic_fields_by_keys
Crawler::get_dynamic_field_page_matching_types
Crawler::get_dynamic_field_object_values
Crawler::get_dynamic_field_values
Crawler::get_dynamic_object_fields
Crawler::get_dynamic_object_field_by_key
Crawler::get_dynamic_object_field_refs_matching_key
Crawler::get_dynamic_object_field_child_ids
Crawler::get_table_vec
Response
TransactionStateOutput
Response::is_shared
Response::is_immutable
Response::get_initial_version
Response::object_ref
Set
Set::new
Set::into_inner
Set::inner
Set::inner_mut
Set::is_empty
Map
Map::new
Map::from_map
Map::into_inner
Map::into_map
Map::inner
Map::inner_mut
Last updated

