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

💾Decoded On-Chain Types

Audience: Nexus SDK integrators (Rust).

Area: Decoded On-Chain Types.

Generated from: Nexus SDK public API at tag v2.1.1 commit 08bfe76e726922ce512d623fbc1d2e1bd786bcd4; the generated inventory is preserved and 2.1.1 binding additions are source-verified.

Before relying on rejection fields: Verify that the selected network package schema, generated bindings, and transaction effects agree before an application relies on TaskStatus::Rejected { reason }, TaskRejectedEvent, or OccurrenceWithdrawalReason::TaskRejected.

Generated binding authority

The SDK's move_bindings modules are rendered from committed normalized Move package IR by build.rs; they are the ABI and declaration-order BCS authority for SDK transaction values. The published SDK uses Move binding libraries at 0.3.0 with Sui 0.4.0 types. Keep generated package types aligned with the selected NexusObjects/NexusContext graph and do not recreate them as hand-written application mirrors.

DAG Authoring Types

sdk/src/types/dag.rs

sdk/src/types/offchain_tool_output.rs

Package and Deployment Types

NexusObjects, NexusPackages, PackageVersion, and UsTokenConfig describe the resolved deployment package graph and shared objects consumed by SDK transaction builders.

sdk/src/types/nexus_objects.rs

sdk/src/types/package.rs

sdk/src/types/tap.rs

pub const DEFAULT_PRIORITY_FEE_PERCENTAGE: u64 = 20;
pub const MIN_PRIORITY_FEE_PERCENTAGE: u64 = 10;
pub const MAX_PRIORITY_FEE_PERCENTAGE: u64 = 10_000;

sdk/src/types/priority_fee.rs

sdk/src/scheduler/model.rs

  • TaskInputs maps vertex names and input-port names to NexusData.

  • TaskSpec is created with TaskSpec::new(operation, entry_group, funding, occurrence_budget_mist) and configured with with_inputs and with_failure_policy.

  • TaskOperation::{default_dag,agent_skill} selects a published DAG or registered Agent skill.

  • SDK’s AuthorizationBindings map binds protected DAG vertex names to their recipient objects, and TaskOperation::agent_skill encodes entries for the Move authorization_bindings: VecMap<Vertex, ID> contract. When the flag is omitted, the high-level CLI supplies an empty map; 2.1.1 also accepts repeatable --authorization-binding VERTEX=OBJECT_ID values together with --agent-id and --skill-id. Bind every protected vertex and verify the intended recipient object before signing, whether the CLI or SDK/PTB path is used.

  • TaskFunding::{address,address_with_refund,agent} fixes both funding source and Task controller.

  • FailurePolicy is Continue or Pause and defaults to Continue.

  • Schedule contains insertion-ordered standalone occurrences and at most one Recurrence.

  • Recurrence::new creates an unbounded recurrence; finite applies a positive materialization limit.

  • Occurrence::{now,at_ms,after_ms} selects start intent, deadline_at_ms or deadline_after_ms selects a deadline, and with_priority_fee_percentage applies validated priority.

  • OccurrenceRef is the stable (task_id, occurrence_id) identity.

sdk/src/scheduler/receipt.rs

TransactionReference, ScheduledOccurrence, WithdrawnOccurrence, ScheduleDelta, TaskMutationReceipt, and AbortReceipt have private fields and public accessors. ScheduleDelta::scheduled is the authoritative list of occurrence IDs allocated by a transaction; callers must not assume a starting ID.

sdk/src/scheduler/snapshot.rs

  • TaskController distinguishes address and Agent authority.

  • TaskStatus is Active, Paused, Canceled, Rejected { reason }, or Finalized; the merged bindings expose TaskRejectedEvent and OccurrenceWithdrawalReason::TaskRejected. Rejection occurs before Execution creation, charges bounded rejection-maintenance gas from the Task reserve, and becomes closeable only after the schedule and in-flight obligations drain; verify the deployment's object state and transaction effects.

  • OccurrenceSource distinguishes standalone and recurring allocation.

  • OccurrenceStatus is Pending, Advertised, Executing, Finished, Settled, Missed, or Withdrawn.

  • TaskPointer and TaskPointerPage provide owned discovery without granting Task mutation authority.

  • ExecutionSnapshot exposes optional runtime counts when the Execution object remains available.

  • OccurrenceSnapshot exposes identity, source, timing, priority, status, optional Execution, and observed Task version.

  • TaskSnapshot exposes controller, status, failure policy, advertised occurrence, allocation/dispatch counts, and observed object version.

  • OccurrencePage, WatchOptions, and OccurrenceCost provide pagination, polling policy, and payment accounting.

All snapshot, receipt, pointer, and page fields are private; use their public accessors.

The accessor surface is intentionally explicit: OccurrenceStatus::is_terminal; TaskPointer::{task_pointer_id,task_id}; TaskPointerPage::{task_pointers,next_cursor,into_parts}; ExecutionSnapshot::{execution_id,created_at_ms,active_walks,pending_abort_walks,pending_settlement_walks,successful_walks,failed_walks,aborted_walks}; OccurrenceSnapshot::{reference,source,requested_start_time_ms,effective_start_time_ms,deadline_ms,priority_fee_percentage,dispatched_at_ms,settled_at_ms,status,execution,observed_task_version}; TaskSnapshot::{task_id,controller,status,failure_policy,advertised,allocated_occurrences,pending_occurrences,dispatched_occurrences,in_flight_occurrences,observed_version}; OccurrencePage::{occurrences,next_cursor,into_parts}; WatchOptions::{new,timeout,poll_interval}; and OccurrenceCost::{payment_id,max_budget_mist,locked_budget_mist,consumed_mist,outstanding_locks,accomplished,refunded}.

Talus Agent Package (TAP) Types

sdk/src/types/tap.rs

AgentId is a Sui address and SkillId is an Agent-local u64. The public TAP type surface also includes:

  • SkillRevisionLookupKey, WorksheetKey, SkillRecordContext, AgentRecordContext, DefaultDagExecutorTarget, AgentRegistrySnapshot, SkillRevisionContext, ActiveSkillExecutionTarget, and DefaultDagExecutorRecord for decoded registry state;

  • SkillConfig and TapPublishArtifact for authored package/DAG registration;

  • TapValidationError and SkillRevisionLookupError for deterministic validation and lookup failures;

  • tap_input_commitment_from_dag_inputs, validate_requirements, validate_execution_payment_options, payment_source_from_address, and the active-skill/default-executor resolution helpers.

Public projections include SkillRecordContext::{active,dag_binding,current_interface_revision,requirements}, AgentRecordContext::active, AgentRegistrySnapshot::{skill_revision_records,skill_revision_record,active_skill_revision_record,default_dag_executor}, SkillRevisionContext::{worksheet_key,validate}, SkillConfig::validate, and TapPublishArtifact::from_config. Standalone resolvers are resolve_active_tap_skill_revision, resolve_active_tap_skill_execution_target, and resolve_default_tap_dag_executor.

Tool Types

sdk/src/types/tool.rs

ToolAnchor is the stable object shell and ToolInnerV1 is its logical state payload. ToolAnchor::object_id returns the shell identity. Tool::{derive_id,registry_id,fqn_string,parsed_fqn,reference,description_string,registered_at_datetime,unregistered_at_datetime,unregistered_at_millis} provides Tool projections. ToolRef::{http_url_string,sui_parts,display_string} distinguishes HTTP and Sui references. OnchainToolMode is Standard or WorkflowAuthorization as derived from an on-chain Tool execute signature.

sdk/src/types/tool_meta.rs

sdk/src/types/workflow_models.rs

sdk/src/types/secret.rs and secret_value.rs

Secret<T> zeroizes its value and provides explicit expose, expose_mut, and into_zeroizing access. SecretValue is a deserializable string wrapper whose peek method borrows the value without changing its redacted Debug representation.

Generated Move ABI types, including NexusData and NexusValue, remain public under nexus_sdk::move_bindings; this page documents the SDK-authored projections and models layered on top of those generated bindings.

Source-derived public API inventory

parse_dag_spec

validate

DEFAULT_ENTRY_GROUP

DagSpec

DagVertexKind

DagEntryPort

DagVertex

DagEntryGroup

DagDefaultValue

DagEdge

DagOutput

DagInput

re-export ToolRef, ToolState, tool_meta, ToolMeta, workflow_models, ExecutionTerminalRecord, ExternalVerifierRuntimeCall, RequestWalkContext

ObjectIdentity

ObjectIdentity::new

ObjectIdentity::object_id

SharedRoot

SharedRoot::new

SharedRoot::object_id

UsTokenConfig

UsTokenConfig::new

UsTokenConfig::type_tag

UsTokenConfig::coin_type_tag

UsTokenConfig::qualified_type

NexusObjects

OffchainToolOutputPort

OffchainToolOutput

OffchainToolOutput::from_ports

from_json

PackageRole

PackageRole::as_str

DatatypeKey

DatatypeKey::new

TypeOrigins

PackageLinkage

PackageVersion

PackageVersion::new

PackageVersion::type_origin

PackageVersion::insert_type_origin

PackageVersion::contains_package

NexusPackages

NexusPackages::get

NexusPackages::insert

NexusPackages::all

NexusPackages::contains_package

NexusContext

NexusContext::new

NexusContext::objects

NexusContext::packages

NexusContext::require_package

NexusContext::package_id

NexusContext::type_origin

PriorityFeeWithdrawalQuote

PriorityFeeSuiDrainQuote

Secret

Secret::new

Secret::expose

Secret::expose_mut

Secret::into_zeroizing

SecretValue

SecretValue::peek

AgentId

SkillId

skill_id

DEFAULT_PRIORITY_FEE_PERCENTAGE

MIN_PRIORITY_FEE_PERCENTAGE

MAX_PRIORITY_FEE_PERCENTAGE

PriorityPaymentBudgetInput

PriorityPaymentBudgetQuote

normalized_priority_fee_percentage

effective_priority_fee_percentage

priority_fee_mist_for_gas_budget

gas_budget_mist_for_max_budget_mist

quote_priority_payment_budget

SkillRevisionLookupKey

WorksheetKey

SkillRecordContext

AgentRecordContext

AgentRecordContext::active

SkillRecordContext::active

SkillRecordContext::dag_binding

SkillRecordContext::current_interface_revision

SkillRecordContext::requirements

DefaultDagExecutorTarget

AgentRegistrySnapshot

AgentRegistrySnapshot::skill_revision_records

AgentRegistrySnapshot::skill_revision_record

AgentRegistrySnapshot::active_skill_revision_record

AgentRegistrySnapshot::default_dag_executor

SkillRevisionContext

SkillRevisionContext::worksheet_key

SkillRevisionContext::validate

ActiveSkillExecutionTarget

DefaultDagExecutorRecord

SkillConfig

SkillConfig::validate

TapPublishArtifact

TapPublishArtifact::from_config

tap_input_commitment_from_dag_inputs

TapValidationError

SkillRevisionLookupError

validate_requirements

validate_execution_payment_options

payment_source_from_address

resolve_active_tap_skill_revision

resolve_active_tap_skill_execution_target

resolve_default_tap_dag_executor

re-export pub, use, tool_registry, ToolAnchor, ToolInnerV1, ToolRef

ToolState

Tool

OnchainToolMode

ToolAnchor::object_id

ToolState::new

ToolState::derive_id

ToolState::registry_id

ToolState::fqn_string

ToolState::parsed_fqn

ToolState::reference

ToolState::description_string

ToolState::registered_at_datetime

ToolState::unregistered_at_datetime

ToolState::unregistered_at_millis

ToolRef::http_url_string

ToolRef::sui_parts

ToolRef::display_string

ToolMeta

ToolMeta::validate_registration

ToolMeta::meta_schema

RequestWalkContext

RequestWalkContext::skill_revision_key

ExternalVerifierRuntimeCall

ExecutionTerminalRecord

Last updated