> 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/sdk/client.md).

# NexusClient Construction and Configuration

**Audience:** Nexus SDK integrators (Rust).

**Area:** NexusClient Construction and Configuration.

**Generated from:** Nexus SDK public API at release `v2.1.0` commit `45d397aafcfbeeeaf5032d5fb9fa5d99b3f36205`; the existing generated inventory is preserved and 2.1.0 additions are source-verified.

#### `sdk/src/nexus/client.rs`

#### Consistent state and event reads

`NexusClientBuilder::with_state_catalog_rpc_url` configures the indexed state-catalog endpoint used for recent-activity discovery while the configured Sui RPC remains authoritative for object and transaction reads. `NexusClient::filtered_event_ingestor` and `filtered_runtime_event_ingestor` keep the supported event-filter boundary explicit; `filtered_event_ingestor_for_context` carries the selected package graph into a context-bound read.

Indexed activity identifies work to inspect, but it does not prove that a transaction finalized. Re-read transaction effects and affected object versions before treating an event notification as a state transition.

**`GasSource` and `Gas`**

```rust
#[derive(Clone, Debug)]
pub enum GasSource { Coin(CoinGasPool), AddressBalance(AddressBalanceGas) }
pub type Gas = GasSource;
```

`GasSource::Coin` uses owned SUI coin objects; `GasSource::AddressBalance` uses an address balance with a reusable nonce authority. `Gas` is the public alias used when inspecting a configured client.

**`GasSource::coin` and `GasSource::get_budget`**

```rust
pub fn coin(coins: Vec<sui::types::ObjectReference>, budget: u64) -> GasSource
pub fn get_budget(&self) -> u64
```

Create a coin-backed source and inspect either source's budget. Coin acquisition and release are SDK-internal pool operations, not public client APIs.

**`sdk/src/nexus/registered_key.rs`**

**RegisteredKey constants and commitment domains**

```rust
pub const SHA256_LEN: usize = 32;
pub const ED25519_SIGNATURE_LEN: usize = 64;
pub const INVOCATION_NONCE_DOMAIN: &[u8] = b"nexus.direct.v3.invocation-nonce";
pub const RAW_OUTPUT_DOMAIN: &[u8] = b"nexus.direct.v3.raw-output";
pub const TOOL_RESPONSE_DOMAIN: &[u8] = b"nexus.direct.v3.tool-response";
```

Lengths and domain separators shared with the direct-v3 on-chain verifier.

**`output_sha256`**

```rust
pub fn output_sha256(canonical_response_bcs: &[u8]) -> [u8; 32]
```

Return `SHA-256(RAW_OUTPUT_DOMAIN || canonical_response_bcs)`.

**`tool_signature_message`**

```rust
pub fn tool_signature_message(
    leader_signature: &[u8; 64],
    nonce: &[u8; 32],
    canonical_response_bcs: &[u8],
) -> Vec<u8>
```

Build `TOOL_RESPONSE_DOMAIN || leader_signature || nonce || output_sha256(canonical_response_bcs)`.

**`fetch_external_verifier_record`**

```rust
pub async fn fetch_external_verifier_record(
    crawler: &Crawler,
    registry_ref: &sui::types::ObjectReference,
    tool_id: sui::types::Address,
) -> anyhow::Result<Option<ExternalVerifier>>
```

Read and validate the configured Tool-bound External verifier record.

**`fetch_external_verifier_runtime_call`**

```rust
pub async fn fetch_external_verifier_runtime_call(
    crawler: &Crawler,
    registry_ref: &sui::types::ObjectReference,
    tool_id: sui::types::Address,
) -> anyhow::Result<ExternalVerifierRuntimeCall>
```

Resolve the Tool-bound method, witness ID, and ordered immutable shared-object references required at runtime.

### Source-derived public API inventory

#### `SubmissionContext`

```rust
pub struct SubmissionContext {
    /// Current reference gas price.
    pub reference_gas_price: u64,
    /// Current epoch used to bound transaction validity.
    pub epoch: u64,
    /// Chain identifier used for cross chain replay protection.
    pub chain: sui::types::Digest,
}
```

#### `NonceAllocator`

```rust
pub struct NonceAllocator {
    sequence: Arc<NonceSequence>,
}
```

#### `NonceAllocator::new`

```rust
pub fn new(initial: u32) -> Self {
```

#### `NonceAllocator::allocate`

```rust
pub fn allocate(&self) -> Result<u32, NexusError> {
```

#### `fetch_submission_context`

```rust
pub async fn fetch_submission_context(
    client: &mut sui::grpc::Client,
) -> Result<SubmissionContext, NexusError> {
```

#### `finish_transaction`

```rust
pub fn finish_transaction(
    ptb: sui::types::ProgrammableTransaction,
    sender: sui::types::Address,
    gas_budget: u64,
    context: SubmissionContext,
    nonce: u32,
) -> sui::types::Transaction {
```

#### `DEFAULT_GAS_BUDGET`

```rust
pub const DEFAULT_GAS_BUDGET: u64 = sui::MIST_PER_SUI / 10;
```

#### `GasSource`

```rust
pub enum GasSource {
    /// Owned coin-object gas with a transaction budget.
    Coin(CoinGasPool),
    /// Address-balance gas with a reusable nonce authority.
    AddressBalance(AddressBalanceGas),
}
```

#### `Gas`

```rust
pub type Gas = GasSource;
```

#### `GasSource::coin`

```rust
pub fn coin(coins: Vec<sui::types::ObjectReference>, budget: u64) -> Self {
```

#### `GasSource::get_budget`

```rust
pub fn get_budget(&self) -> u64 {
```

#### `CoinGasPool`

```rust
pub struct CoinGasPool {
    coins: Arc<Mutex<Vec<sui::types::ObjectReference>>>,
    notify: Arc<Notify>,
    budget: u64,
    reference_gas_price: Option<u64>,
}
```

#### `AddressBalanceGas`

```rust
pub struct AddressBalanceGas {
    budget: u64,
    nonces: NonceAllocator,
}
```

#### `AddressBalanceGas::new`

```rust
pub fn new(budget: u64) -> Self {
```

#### `AddressBalanceGas::with_nonce_allocator`

```rust
pub fn with_nonce_allocator(budget: u64, nonces: NonceAllocator) -> Self {
```

#### `NexusClientBuilder`

```rust
pub struct NexusClientBuilder {
    pk: Option<sui::crypto::Ed25519PrivateKey>,
    rpc_url: Option<String>,
    state_catalog_rpc_url: Option<String>,
    gas_coins: Vec<sui::types::ObjectReference>,
    gas_budget: Option<u64>,
    address_balance_gas: Option<AddressBalanceGas>,
    nexus_objects: Option<NexusObjects>,
    transaction_timeout: Option<Duration>,
}
```

#### `NexusClientBuilder::new`

```rust
pub fn new() -> Self {
```

#### `NexusClientBuilder::with_private_key`

```rust
pub fn with_private_key(mut self, pk: sui::crypto::Ed25519PrivateKey) -> Self {
```

#### `NexusClientBuilder::with_rpc_url`

```rust
pub fn with_rpc_url(mut self, rpc_url: &str) -> Self {
```

#### `NexusClientBuilder::with_state_catalog_rpc_url`

```rust
pub fn with_state_catalog_rpc_url(mut self, rpc_url: &str) -> Self {
```

#### `NexusClientBuilder::with_gas`

```rust
pub fn with_gas(mut self, coins: Vec<sui::types::ObjectReference>, budget: u64) -> Self {
```

#### `NexusClientBuilder::with_address_balance_gas`

```rust
pub fn with_address_balance_gas(mut self, budget: u64) -> Self {
```

#### `NexusClientBuilder::with_address_balance_gas_config`

```rust
pub fn with_address_balance_gas_config(mut self, gas: AddressBalanceGas) -> Self {
```

#### `NexusClientBuilder::with_nexus_objects`

```rust
pub fn with_nexus_objects(mut self, nexus_objects: NexusObjects) -> Self {
```

#### `NexusClientBuilder::with_transaction_timeout`

```rust
pub fn with_transaction_timeout(mut self, timeout: Duration) -> Self {
```

#### `NexusClientBuilder::build`

```rust
pub async fn build(self) -> Result<NexusClient, NexusError> {
```

#### `NexusClient`

```rust
pub struct NexusClient {
    /// The wallet context to use for transactions. This defines the TX sender
    /// address when a private key was configured.
    pub(super) signer: Option<Signer>,
    /// Shared optional gas configuration for Nexus operations.
    gas: Arc<OnceCell<GasSource>>,
    /// Nexus objects to use.
    pub(super) nexus_objects: Arc<NexusObjects>,
    /// Provide access to an instantiated object crawler.
    pub(super) crawler: Arc<Crawler>,
    /// Resolves live state and immutable package graphs.
    pub(super) state_resolver: StateResolver,
    /// RPC URL used by the client.
    pub(super) rpc_url: String,
}
```

#### `NexusClient::builder`

```rust
pub fn builder() -> NexusClientBuilder {
```

#### `NexusClient::network`

```rust
pub fn network(&self) -> NetworkActions {
```

#### `NexusClient::workflow`

```rust
pub fn workflow(&self) -> WorkflowActions {
```

#### `NexusClient::scheduler`

```rust
pub fn scheduler(&self) -> Scheduler {
```

#### `NexusClient::transaction_for_object`

```rust
pub async fn transaction_for_object(
        &self,
        object_id: sui::types::Address,
        required_roots: &[SharedRoot],
    ) -> Result<NexusTransaction, NexusError> {
```

#### `NexusClient::transaction_for_creator`

```rust
pub async fn transaction_for_creator(
        &self,
        creator_package: sui::types::Address,
        creator_role: PackageRole,
        required_roots: &[SharedRoot],
    ) -> Result<NexusTransaction, NexusError> {
```

#### `NexusClient::network_auth`

```rust
pub fn network_auth(&self) -> crate::nexus::network_auth::NetworkAuthActions {
```

#### `NexusClient::tool`

```rust
pub fn tool(&self) -> crate::nexus::tool::ToolActions {
```

#### `NexusClient::tap`

```rust
pub fn tap(&self) -> crate::nexus::tap::TapActions {
```

#### `NexusClient::crawler`

```rust
pub fn crawler(&self) -> &Crawler {
```

#### `NexusClient::state_resolver`

```rust
pub fn state_resolver(&self) -> &StateResolver {
```

#### `NexusClient::context_for_object`

```rust
pub async fn context_for_object(
        &self,
        object_id: sui::types::Address,
    ) -> Result<Arc<NexusContext>, NexusError> {
```

#### `NexusClient::context_for_root`

```rust
pub async fn context_for_root(
        &self,
        root: &SharedRoot,
    ) -> Result<Arc<NexusContext>, NexusError> {
```

#### `NexusClient::context_for_object_with_roots`

```rust
pub async fn context_for_object_with_roots(
        &self,
        object_id: sui::types::Address,
        required_roots: &[SharedRoot],
    ) -> Result<Arc<NexusContext>, NexusError> {
```

#### `NexusClient::context_for_creator`

```rust
pub async fn context_for_creator(
        &self,
        creator_package: sui::types::Address,
        creator_role: PackageRole,
        required_roots: &[SharedRoot],
    ) -> Result<Arc<NexusContext>, NexusError> {
```

#### `NexusClient::routing_context`

```rust
pub async fn routing_context(
        &self,
        required_roots: &[SharedRoot],
    ) -> Result<Arc<NexusContext>, NexusError> {
```

#### `NexusClient::runtime_context`

```rust
pub async fn runtime_context(
        &self,
        required_roots: &[SharedRoot],
    ) -> Result<Arc<NexusContext>, NexusError> {
```

#### `NexusClient::owner`

```rust
pub fn owner(&self) -> Result<sui::types::Address, NexusError> {
```

#### `NexusClient::grpc_client`

```rust
pub fn grpc_client(&self) -> Arc<sui::grpc::Client> {
```

#### `NexusClient::clone_grpc_client`

```rust
pub fn clone_grpc_client(&self) -> sui::grpc::Client {
```

#### `NexusClient::fetch_coins_by_type`

```rust
pub async fn fetch_coins_by_type(
        &self,
        object_type: sui::types::StructTag,
    ) -> Result<Vec<(sui::types::ObjectReference, u64)>, NexusError> {
```

#### `NexusClient::fetch_coin`

```rust
pub async fn fetch_coin(
        &self,
        coin_id: sui::types::Address,
    ) -> Result<sui::types::ObjectReference, NexusError> {
```

#### `NexusClient::fetch_coin_with_balance`

```rust
pub async fn fetch_coin_with_balance(
        &self,
        coin_id: sui::types::Address,
    ) -> Result<(sui::types::ObjectReference, u64), NexusError> {
```

#### `NexusClient::fetch_coin_by_type`

```rust
pub async fn fetch_coin_by_type(
        &self,
        coin_id: Option<sui::types::Address>,
        ordinal: usize,
        object_type: sui::types::StructTag,
    ) -> Result<sui::types::ObjectReference, NexusError> {
```

#### `NexusClient::rpc_url`

```rust
pub fn rpc_url(&self) -> &str {
```

#### `NexusClient::signer`

```rust
pub fn signer(&self) -> Result<&Signer, NexusError> {
```

#### `NexusClient::event_ingestor`

```rust
pub async fn event_ingestor(
        &self,
        filter_source: sui::types::Address,
    ) -> Result<NexusEventIngestor, NexusError> {
```

#### `NexusClient::filtered_event_ingestor`

```rust
pub async fn filtered_event_ingestor(
        &self,
        filter_source: sui::types::Address,
        filter: fn(&str) -> bool,
    ) -> Result<NexusEventIngestor, NexusError> {
```

#### `NexusClient::filtered_runtime_event_ingestor`

```rust
pub async fn filtered_runtime_event_ingestor(
        &self,
        filter: fn(&str) -> bool,
    ) -> Result<NexusEventIngestor, NexusError> {
```

#### `NexusClient::filtered_event_ingestor_for_context`

```rust
pub fn filtered_event_ingestor_for_context(
        &self,
        context: Arc<NexusContext>,
        filter: fn(&str) -> bool,
    ) -> NexusEventIngestor {
```

#### `NexusClient::set_gas_source`

```rust
pub async fn set_gas_source(&self, mut source: GasSource) -> Result<(), NexusError> {
```

#### `NexusClient::gas_config`

```rust
pub fn gas_config(&self) -> Option<Gas> {
```

#### `NexusClient::get_reference_gas_price`

```rust
pub fn get_reference_gas_price(&self) -> Option<u64> {
```

#### `NexusClient::get_nexus_objects`

```rust
pub fn get_nexus_objects(&self) -> Arc<NexusObjects> {
```

#### `NexusClient::submit_transaction`

```rust
pub async fn submit_transaction(
        &self,
        tx: sui::types::ProgrammableTransaction,
        address: sui::types::Address,
    ) -> Result<ExecutedTransaction, NexusError> {
```

#### `SHA256_LEN`

```rust
pub const SHA256_LEN: usize = 32;
```

#### `ED25519_SIGNATURE_LEN`

```rust
pub const ED25519_SIGNATURE_LEN: usize = 64;
```

#### `INVOCATION_NONCE_DOMAIN`

```rust
pub const INVOCATION_NONCE_DOMAIN: &[u8] = b"nexus.direct.v3.invocation-nonce";
```

#### `re-export pub, use, crate, commitments, output_sha256, tool_signature_message, RAW_OUTPUT_DOMAIN, TOOL_RESPONSE_DOMAIN`

```rust
pub use crate::commitments::{
    output_sha256,
    tool_signature_message,
    RAW_OUTPUT_DOMAIN,
    TOOL_RESPONSE_DOMAIN,
};
```

#### `canonical_tool_inputs_sha256`

```rust
pub fn canonical_tool_inputs_sha256(
    schema: &MetaSchema,
    input_ports: &HashMap<String, NexusData>,
) -> anyhow::Result<[u8; SHA256_LEN]> {
```

#### `canonical_resolved_tool_inputs_sha256`

```rust
pub fn canonical_resolved_tool_inputs_sha256(
    schema: &MetaSchema,
    input_ports: &HashMap<String, Vec<NexusValue>>,
) -> anyhow::Result<[u8; SHA256_LEN]> {
```

#### `invocation_nonce`

```rust
pub fn invocation_nonce(
    execution_id: sui::types::Address,
    walk_index: u64,
    vertex_name: impl Into<Vec<u8>>,
    iteration: u64,
) -> anyhow::Result<[u8; SHA256_LEN]> {
```

#### `registered_key_auxiliary`

```rust
pub fn registered_key_auxiliary(
    input_hash: [u8; SHA256_LEN],
```

#### `validate_registered_key_auxiliary`

```rust
pub fn validate_registered_key_auxiliary(auxiliary: &RegisteredKeyAuxiliary) -> anyhow::Result<()> {
```

#### `WorkAdmissionCommittee`

```rust
pub struct WorkAdmissionCommittee {
    eligible: Vec<(sui::types::Address, u64)>,
    work_type: TypeName,
}
```

#### `WorkAdmissionCommittee::rank`

```rust
pub fn rank(&self, seed: &[u8]) -> anyhow::Result<[sui::types::Address; 2]> {
```

#### `WorkAdmissionCommittee::contains`

```rust
pub fn contains(&self, leader: sui::types::Address) -> bool {
```

#### `fetch_work_admission_committee`

```rust
pub async fn fetch_work_admission_committee(
    client: &NexusClient,
    context: &NexusContext,
) -> anyhow::Result<WorkAdmissionCommittee> {
```

#### `rank_work_admission_leaders`

```rust
pub async fn rank_work_admission_leaders(
    client: &NexusClient,
    context: &NexusContext,
    seed: &[u8],
) -> anyhow::Result<[sui::types::Address; 2]> {
```

#### `extract_network_id_from_leader_registry`

```rust
pub fn extract_network_id_from_leader_registry(
    state: &LeaderRegistryInnerV1,
) -> sui::types::Address {
```

#### `find_owned_capability_by_what_for`

```rust
pub async fn find_owned_capability_by_what_for(
    rpc_url: &str,
    owner: sui::types::Address,
    object_type: sui::types::StructTag,
    expected_what_for: sui::types::Address,
) -> anyhow::Result<Option<sui::types::ObjectReference>> {
```

#### `preflight_external_verifier_registration`

```rust
pub async fn preflight_external_verifier_registration(
    crawler: &Crawler,
    context: &NexusContext,
    package_id: sui::types::Address,
    module_name: &str,
    function_name: &str,
    verifier_object_ids: &[sui::types::Address],
) -> anyhow::Result<ExternalVerifierRegistrationInput> {
```

#### `ExecutedTransaction`

```rust
pub struct ExecutedTransaction {
    pub effects: sui::types::TransactionEffectsV2,
    pub events: Vec<NexusEvent>,
    pub objects: Vec<sui::types::Object>,
    pub digest: sui::types::Digest,
    pub checkpoint: u64,
}
```

#### `Signer`

```rust
pub struct Signer {
    pub(super) client: Arc<sui::grpc::Client>,
    pub(super) pk: sui::crypto::Ed25519PrivateKey,
    pub(super) transaction_timeout: Duration,
    event_decoder: NexusEventDecoder,
    server_checkpoint_wait_supported: bool,
}
```

#### `Signer::new`

```rust
pub fn new(
        client: Arc<sui::grpc::Client>,
        pk: sui::crypto::Ed25519PrivateKey,
        transaction_timeout: Duration,
        event_decoder: NexusEventDecoder,
    ) -> Self {
```

#### `Signer::get_active_address`

```rust
pub fn get_active_address(&self) -> sui::types::Address {
```

#### `Signer::sign_tx`

```rust
pub async fn sign_tx(
        &self,
        tx: &sui::types::Transaction,
    ) -> Result<sui::types::UserSignature, NexusError> {
```

#### `Signer::execute_tx`

```rust
pub async fn execute_tx(
        &self,
        tx: sui::types::Transaction,
        signature: sui::types::UserSignature,
        gas_coin: &mut sui::types::ObjectReference,
    ) -> Result<ExecutedTransaction, NexusError> {
```

#### `Signer::execute_tx_without_gas_coin`

```rust
pub async fn execute_tx_without_gas_coin(
        &self,
        tx: sui::types::Transaction,
        signature: sui::types::UserSignature,
    ) -> Result<ExecutedTransaction, NexusError> {
```

#### `ObservedStateField`

```rust
pub struct ObservedStateField {
    /// Object ID of the dynamic field wrapper.
    pub field_id: sui::types::Address,
    /// Exact Move type stored as the field value.
    pub value_type: sui::types::StructTag,
}
```

#### `ObservedState`

```rust
pub struct ObservedState {
    /// Stable Sui object ID.
    pub object_id: sui::types::Address,
    /// Current object owner.
    pub owner: sui::types::Owner,
    /// Exact Move type of the stable anchor.
    pub anchor_type: sui::types::StructTag,
    /// Field containing the package witness.
    pub witness: ObservedStateField,
    /// Field containing the stored layout.
    pub inner: ObservedStateField,
}
```

#### `ObservedStateSnapshot`

```rust
pub struct ObservedStateSnapshot {
    observed: ObservedState,
    snapshot: ObjectStateSnapshot,
}
```

#### `ObservedStateSnapshot::observed`

```rust
pub const fn observed(&self) -> &ObservedState {
```

#### `ObservedStateSnapshot::inner_object_reference`

```rust
pub fn inner_object_reference(&self) -> Result<sui::types::ObjectReference, NexusError> {
```

#### `ObservedState::witness_type`

```rust
pub const fn witness_type(&self) -> &sui::types::StructTag {
```

#### `ObservedState::inner_type`

```rust
pub const fn inner_type(&self) -> &sui::types::StructTag {
```

#### `StateResolver`

```rust
pub struct StateResolver {
    crawler: Arc<Crawler>,
    catalog: Arc<Crawler>,
    package_cache: Arc<RwLock<HashMap<sui::types::Address, Arc<PackageVersion>>>>,
    state_field_keys: Arc<RwLock<Vec<StateFieldKeyTypes>>>,
    state_field_discovery: Arc<Mutex<()>>,
}
```

#### `StateResolver::new`

```rust
pub fn new(crawler: Arc<Crawler>) -> Self {
```

#### `StateResolver::with_catalog`

```rust
pub fn with_catalog(crawler: Arc<Crawler>, catalog: Arc<Crawler>) -> Self {
```

#### `StateResolver::observe`

```rust
pub async fn observe(
        &self,
        object_id: sui::types::Address,
    ) -> Result<ObservedState, NexusError> {
```

#### `StateResolver::observe_snapshot`

```rust
pub async fn observe_snapshot(
        &self,
        object_id: sui::types::Address,
    ) -> Result<ObservedStateSnapshot, NexusError> {
```

#### `StateResolver::observe_finalized_snapshot`

```rust
pub fn observe_finalized_snapshot(
        &self,
        basis: &ObservedStateSnapshot,
        executed: &sui::grpc::ExecutedTransaction,
        transaction: sui::types::Digest,
    ) -> Result<Option<ObservedStateSnapshot>, NexusError> {
```

#### `StateResolver::resolve_context`

```rust
pub async fn resolve_context(
        &self,
        objects: Arc<NexusObjects>,
        object_id: sui::types::Address,
    ) -> Result<(ObservedState, NexusContext), NexusError> {
```

#### `StateResolver::resolve_context_snapshot`

```rust
pub async fn resolve_context_snapshot(
        &self,
        objects: Arc<NexusObjects>,
        object_id: sui::types::Address,
    ) -> Result<(ObservedStateSnapshot, NexusContext), NexusError> {
```

#### `StateResolver::resolve_transaction_view_context_snapshot`

```rust
pub async fn resolve_transaction_view_context_snapshot(
        &self,
        objects: Arc<NexusObjects>,
        object_id: sui::types::Address,
        executed: &sui::grpc::ExecutedTransaction,
        transaction: sui::types::Digest,
    ) -> Result<Option<(ObservedStateSnapshot, NexusContext)>, NexusError> {
```

#### `StateResolver::resolve_context_with_roots`

```rust
pub async fn resolve_context_with_roots(
        &self,
        objects: Arc<NexusObjects>,
        object_id: sui::types::Address,
        required_roots: &[SharedRoot],
    ) -> Result<(ObservedState, NexusContext), NexusError> {
```

#### `StateResolver::resolve_inner_with_roots`

```rust
pub async fn resolve_inner_with_roots<A, W, V>(
        &self,
        objects: Arc<NexusObjects>,
        object_id: sui::types::Address,
        required_roots: &[SharedRoot],
    ) -> Result<(NexusContext, crate::nexus::crawler::Response<V>), NexusError>
    where
        A: DeserializeOwned + MoveStruct,
        W: MoveStruct,
        V: DeserializeOwned + MoveStruct,
    {
```

#### `StateResolver::resolve_package_graph`

```rust
pub async fn resolve_package_graph(
        &self,
        state: &ObservedState,
    ) -> Result<NexusPackages, NexusError> {
```

#### `StateResolver::resolve_explicit_package_graph`

```rust
pub async fn resolve_explicit_package_graph(
        &self,
        storage_id: sui::types::Address,
        role: PackageRole,
    ) -> Result<NexusPackages, NexusError> {
```

#### `StateResolver::resolve_emitter_context`

```rust
pub async fn resolve_emitter_context(
        &self,
        objects: Arc<NexusObjects>,
        emitter_package: sui::types::Address,
    ) -> Result<NexusContext, NexusError> {
```

#### `StateResolver::resolve_creator_context`

```rust
pub async fn resolve_creator_context(
        &self,
        objects: Arc<NexusObjects>,
        creator_package: sui::types::Address,
        creator_role: PackageRole,
        required_roots: &[SharedRoot],
    ) -> Result<NexusContext, NexusError> {
```

#### `StateResolver::resolve_routing_context`

```rust
pub async fn resolve_routing_context(
        &self,
        objects: Arc<NexusObjects>,
        required_roots: &[SharedRoot],
    ) -> Result<NexusContext, NexusError> {
```

#### `StateResolver::resolve_runtime_context`

```rust
pub async fn resolve_runtime_context(
        &self,
        objects: Arc<NexusObjects>,
        required_roots: &[SharedRoot],
    ) -> Result<NexusContext, NexusError> {
```

#### `StateResolver::resolve_package`

```rust
pub async fn resolve_package(
        &self,
        storage_id: sui::types::Address,
    ) -> Result<Arc<PackageVersion>, NexusError> {
```

#### `StateResolver::load_inner`

```rust
pub async fn load_inner<A, W, V>(
        &self,
        object_id: sui::types::Address,
        context: &crate::types::NexusContext,
    ) -> Result<crate::nexus::crawler::Response<V>, NexusError>
    where
        A: DeserializeOwned + MoveStruct,
        W: MoveStruct,
        V: DeserializeOwned + MoveStruct,
    {
```

#### `StateResolver::load_inner_from_snapshot`

```rust
pub fn load_inner_from_snapshot<A, W, V>(
        &self,
        snapshot: &ObservedStateSnapshot,
        context: &NexusContext,
    ) -> Result<crate::nexus::crawler::Response<V>, NexusError>
    where
        A: DeserializeOwned + MoveStruct,
        W: MoveStruct,
        V: DeserializeOwned + MoveStruct,
    {
```

#### `StateResolver::finalized_inner_outputs`

```rust
pub fn finalized_inner_outputs<V>(
        &self,
        executed: &sui::grpc::ExecutedTransaction,
        transaction: sui::types::Digest,
        context: &NexusContext,
    ) -> Result<Vec<TransactionStateOutput<V>>, NexusError>
    where
        V: DeserializeOwned + MoveStruct,
    {
```

#### `StateResolver::causal_inner_values`

```rust
pub fn causal_inner_values<V>(
        &self,
        executed: &sui::grpc::ExecutedTransaction,
        transaction: sui::types::Digest,
        context: &NexusContext,
    ) -> Result<Vec<TransactionStateOutput<V>>, NexusError>
    where
        V: DeserializeOwned + MoveStruct,
    {
```

#### `StateResolver::load_inner_from_observation`

```rust
pub async fn load_inner_from_observation<A, W, V>(
        &self,
        observed: &ObservedState,
        context: &NexusContext,
    ) -> Result<crate::nexus::crawler::Response<V>, NexusError>
    where
        A: DeserializeOwned + MoveStruct,
        W: MoveStruct,
        V: DeserializeOwned + MoveStruct,
    {
```

#### `StateResolver::validate_state_pair`

```rust
pub async fn validate_state_pair<A, W, V>(
        &self,
        object_id: sui::types::Address,
        context: &NexusContext,
    ) -> Result<ObservedState, NexusError>
    where
        A: MoveStruct,
        W: MoveStruct,
        V: MoveStruct,
    {
```

#### `StateResolver::resolve_and_load_inner`

```rust
pub async fn resolve_and_load_inner<A, W, V>(
        &self,
        object_id: sui::types::Address,
    ) -> Result<crate::nexus::crawler::Response<V>, NexusError>
    where
        A: DeserializeOwned + MoveStruct,
        W: MoveStruct,
        V: DeserializeOwned + MoveStruct,
    {
```

### Snapshot and causal context reads

`StateResolver::observe_snapshot` captures a validated anchor, witness, and inner-field observation for one object; `resolve_context_snapshot` resolves the package graph from that snapshot. `load_inner_from_snapshot` validates and decodes retained bytes without another Sui request. `resolve_transaction_view_context_snapshot` and `observe_finalized_snapshot` consume a caller-supplied, acknowledged `ExecutedTransaction` and digest to advance a known snapshot; they return `None` when the transaction did not write the inner field and return an error for inconsistent identity, ownership, or type data. `finalized_inner_outputs` and `causal_inner_values` decode transaction-tied values and report `InvalidTransactionOutput` when the supplied effects do not establish the expected output.

These helpers preserve causal evidence already acknowledged by the caller. They cannot turn an unacknowledged or unavailable public RPC response into proof of a transaction or state transition; retain the transaction digest, effects, object versions, and checkpoint used for the read.


---

# 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/sdk/client.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.
