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

# 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`**

```rust
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`**

```rust
pub use tool_registry::{Tool as ToolAnchor, ToolInnerV1, ToolRef};
pub type Tool = ToolInnerV1;
```

`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`

```rust
pub fn parse_dag_spec(input: &str) -> Result<DagSpec, serde_json::Error> {
```

#### `validate`

```rust
pub fn validate(dag: &DagSpec) -> AnyResult<()> {
```

#### `DEFAULT_ENTRY_GROUP`

```rust
pub const DEFAULT_ENTRY_GROUP: &str = "_default_group";
```

#### `DagSpec`

```rust
pub struct DagSpec {
    pub vertices: Vec<DagVertex>,
    pub edges: Vec<DagEdge>,
    pub default_values: Vec<DagDefaultValue>,
    pub post_failure_action: Option<PostFailureAction>,
    pub entry_groups: Vec<DagEntryGroup>,
    pub outputs: Vec<DagOutput>,
}
```

#### `DagVertexKind`

```rust
pub enum DagVertexKind {
    OffChain { tool_fqn: ToolFqn },
    OnChain { tool_fqn: ToolFqn },
}
```

#### `DagEntryPort`

```rust
pub struct DagEntryPort {
    pub name: String,
}
```

#### `DagVertex`

```rust
pub struct DagVertex {
    pub kind: DagVertexKind,
    pub name: String,
    pub entry_ports: Vec<DagEntryPort>,
    pub post_failure_action: Option<PostFailureAction>,
    pub verifier: Option<ToolVerifierMode>,
}
```

#### `DagEntryGroup`

```rust
pub struct DagEntryGroup {
    pub name: String,
    pub vertices: Vec<String>,
}
```

#### `DagDefaultValue`

```rust
pub struct DagDefaultValue {
    pub vertex: String,
    pub input_port: String,
    /// Canonical readable One/Many JSON retained until PTB construction.
    pub value: serde_json::Value,
}
```

#### `DagEdge`

```rust
pub struct DagEdge {
    pub from: DagOutput,
    pub to: DagInput,
    pub kind: EdgeKind,
}
```

#### `DagOutput`

```rust
pub struct DagOutput {
    pub vertex: String,
    pub output_variant: String,
    pub output_port: String,
}
```

#### `DagInput`

```rust
pub struct DagInput {
    pub vertex: String,
    pub input_port: String,
}
```

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

```rust
pub use {
    crate::move_bindings::primitives::data::{NexusData, NexusValue},
    dag::*,
    nexus_objects::{NexusObjects, ObjectIdentity, SharedRoot, UsTokenConfig},
    offchain_tool_output::{OffchainToolOutput, OffchainToolOutputPort},
    package::{
        DatatypeKey,
        NexusContext,
        NexusPackages,
        PackageLink,
        PackageLinkage,
        PackageRole,
        PackageVersion,
        TypeOrigins,
    },
    priority_fee::{PriorityFeeSuiDrainQuote, PriorityFeeWithdrawalQuote},
    secret::Secret,
    secret_value::SecretValue,
    tap::*,
    tool::{OnchainToolMode, Tool, ToolAnchor, ToolRef, ToolState},
    tool_meta::ToolMeta,
    workflow_models::{ExecutionTerminalRecord, ExternalVerifierRuntimeCall, RequestWalkContext},
};
```

#### `ObjectIdentity`

```rust
pub struct ObjectIdentity {
    /// Stable Sui object ID.
    pub object_id: sui::types::Address,
}
```

#### `ObjectIdentity::new`

```rust
pub const fn new(object_id: sui::types::Address) -> Self {
```

#### `ObjectIdentity::object_id`

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

#### `SharedRoot`

```rust
pub struct SharedRoot {
    /// Stable Sui object ID.
    pub object_id: sui::types::Address,
    /// Version at which the object first became shared.
    pub initial_shared_version: u64,
}
```

#### `SharedRoot::new`

```rust
pub const fn new(object_id: sui::types::Address, initial_shared_version: u64) -> Self {
```

#### `SharedRoot::object_id`

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

#### `UsTokenConfig`

```rust
pub struct UsTokenConfig {
    /// Package that defines [`US`].
    pub package_id: sui::types::Address,
    /// Protected treasury object for [`US`].
    pub protected_treasury: sui::types::Address,
    /// Coin metadata object for [`US`].
    pub metadata: sui::types::Address,
}
```

#### `UsTokenConfig::new`

```rust
pub const fn new(
        package_id: sui::types::Address,
        protected_treasury: sui::types::Address,
        metadata: sui::types::Address,
    ) -> Self {
```

#### `UsTokenConfig::type_tag`

```rust
pub fn type_tag(&self) -> sui::types::TypeTag {
```

#### `UsTokenConfig::coin_type_tag`

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

#### `UsTokenConfig::qualified_type`

```rust
pub fn qualified_type(&self) -> String {
```

#### `NexusObjects`

```rust
pub struct NexusObjects {
    /// Complete genesis checkpoint digest expected from the Sui service.
    pub chain_id: String,
    /// Stable Nexus network identity.
    pub network_id: sui::types::Address,
    /// Canonical [`ToolRegistry`](crate::move_bindings::tool::tool_registry::ToolRegistry) root.
    pub tool_registry: SharedRoot,
    /// Canonical [`NetworkAuth`](crate::move_bindings::registry::network_auth::NetworkAuth) root.
    pub network_auth: SharedRoot,
    /// Canonical [`AgentRegistry`](crate::move_bindings::registry::agent_registry::AgentRegistry)
    /// root.
    pub agent_registry: SharedRoot,
    /// Canonical [`LeaderRegistry`](crate::move_bindings::registry::leader::LeaderRegistry) root.
    pub leader_registry: SharedRoot,
    /// Canonical priority fee vault root.
    pub priority_fee_vault: SharedRoot,
    /// Fixed authority selecting the Scheduler package allowed to produce protocol effects.
    pub runtime_authority: SharedRoot,
    /// Authority that manages leader capabilities.
    pub leader_admin_cap: ObjectIdentity,
    /// Authority that manages the canonical [`ToolRegistry`](crate::move_bindings::tool::tool_registry::ToolRegistry).
    pub tool_registry_admin_cap: ObjectIdentity,
    /// Authority that records slashing decisions.
    pub slashing_cap: ObjectIdentity,
    /// Authority that manages the canonical priority fee vault.
    pub priority_fee_vault_owner_cap: ObjectIdentity,
    /// Leader capability created during initial publication.
    pub initial_leader_cap: ObjectIdentity,
    /// Authority for emergency pause and WorkAdmission policy changes.
    pub runtime_authority_cap: ObjectIdentity,
    /// External [`US`] token identities.
    pub us_token: UsTokenConfig,
}
```

#### `OffchainToolOutputPort`

```rust
pub struct OffchainToolOutputPort {
    pub port_name: Vec<u8>,
    pub values: Vec<NexusValue>,
}
```

#### `OffchainToolOutput`

```rust
pub struct OffchainToolOutput {
    pub tag: Vec<u8>,
    pub ports: Vec<OffchainToolOutputPort>,
}
```

#### `OffchainToolOutput::from_ports`

```rust
pub fn from_ports(
        tag: impl Into<Vec<u8>>,
        ports: impl IntoIterator<Item = (String, crate::types::NexusData)>,
    ) -> anyhow::Result<Self> {
```

#### `from_json`

```rust
pub fn from_json(value: serde_json::Value) -> anyhow::Result<Self> {
```

#### `PackageRole`

```rust
pub enum PackageRole {
    /// Common Nexus primitives.
    Primitives,
    /// Shared Nexus interfaces.
    Interface,
    /// Tool definitions, lifecycle, and payments.
    Tool,
    /// Canonical Nexus registries.
    Registry,
    /// Workflow execution.
    Workflow,
    /// Scheduled execution.
    Scheduler,
}
```

#### `PackageRole::as_str`

```rust
pub const fn as_str(self) -> &'static str {
```

#### `DatatypeKey`

```rust
pub struct DatatypeKey {
    /// Move module that declares the datatype.
    pub module: String,
    /// Move datatype name within [`Self::module`].
    pub datatype: String,
}
```

#### `DatatypeKey::new`

```rust
pub fn new(module: impl Into<String>, datatype: impl Into<String>) -> Self {
```

#### `TypeOrigins`

```rust
pub type TypeOrigins = BTreeMap<String, BTreeMap<String, sui::types::Address>>;
```

#### `PackageLink`

```rust
pub struct PackageLink {
    /// Immutable package object selected by the dependency.
    pub storage_id: sui::types::Address,
    /// Sui package version of [`Self::storage_id`].
    pub version: u64,
}
```

#### `PackageLinkage`

```rust
pub type PackageLinkage = BTreeMap<sui::types::Address, PackageLink>;
```

#### `PackageVersion`

```rust
pub struct PackageVersion {
    /// Stable ID of the first package in this upgrade lineage.
    pub initial_id: sui::types::Address,
    /// Immutable package object containing the selected code.
    pub storage_id: sui::types::Address,
    /// Sui package version declared by [`Self::storage_id`].
    pub version: u64,
    /// Exact package version that first defined each datatype.
    pub type_origins: TypeOrigins,
    /// Exact dependency versions recorded by the package object.
    pub linkage: PackageLinkage,
}
```

#### `PackageVersion::new`

```rust
pub fn new(
        initial_id: sui::types::Address,
        storage_id: sui::types::Address,
        version: u64,
        type_origins: TypeOrigins,
        linkage: PackageLinkage,
    ) -> Self {
```

#### `PackageVersion::type_origin`

```rust
pub fn type_origin(&self, module: &str, datatype: &str) -> anyhow::Result<sui::types::Address> {
```

#### `PackageVersion::insert_type_origin`

```rust
pub fn insert_type_origin(
        &mut self,
        key: DatatypeKey,
        package_id: sui::types::Address,
    ) -> anyhow::Result<()> {
```

#### `PackageVersion::contains_package`

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

#### `NexusPackages`

```rust
pub struct NexusPackages {
    /// Common primitives when required by the operation.
    pub primitives: Option<PackageVersion>,
    /// Shared interfaces when required by the operation.
    pub interface: Option<PackageVersion>,
    /// Tool package when required by the operation.
    pub tool: Option<PackageVersion>,
    /// Registry package when required by the operation.
    pub registry: Option<PackageVersion>,
    /// Workflow package when required by the operation.
    pub workflow: Option<PackageVersion>,
    /// Scheduler package when required by the operation.
    pub scheduler: Option<PackageVersion>,
}
```

#### `NexusPackages::get`

```rust
pub const fn get(&self, role: PackageRole) -> Option<&PackageVersion> {
```

#### `NexusPackages::insert`

```rust
pub fn insert(&mut self, role: PackageRole, package: PackageVersion) -> Option<PackageVersion> {
```

#### `NexusPackages::all`

```rust
pub fn all(&self) -> impl Iterator<Item = &PackageVersion> {
```

#### `NexusPackages::contains_package`

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

#### `NexusContext`

```rust
pub struct NexusContext {
    objects: Arc<NexusObjects>,
    packages: NexusPackages,
}
```

#### `NexusContext::new`

```rust
pub fn new(objects: Arc<NexusObjects>, packages: NexusPackages) -> Self {
```

#### `NexusContext::objects`

```rust
pub fn objects(&self) -> &NexusObjects {
```

#### `NexusContext::packages`

```rust
pub const fn packages(&self) -> &NexusPackages {
```

#### `NexusContext::require_package`

```rust
pub fn require_package(&self, role: PackageRole) -> anyhow::Result<&PackageVersion> {
```

#### `NexusContext::package_id`

```rust
pub fn package_id(&self, role: PackageRole) -> anyhow::Result<sui::types::Address> {
```

#### `NexusContext::type_origin`

```rust
pub fn type_origin(
        &self,
        role: PackageRole,
        module: &str,
        datatype: &str,
    ) -> anyhow::Result<sui::types::Address> {
```

#### `PriorityFeeWithdrawalQuote`

```rust
pub struct PriorityFeeWithdrawalQuote {
    pub share_to_withdraw: u64,
    pub us_out: u64,
    pub us_refunded: u64,
}
```

#### `PriorityFeeSuiDrainQuote`

```rust
pub struct PriorityFeeSuiDrainQuote {
    pub exchange_rate_million_mists_us: u64,
    pub sui_out: u64,
}
```

#### `Secret`

```rust
pub struct Secret<T: Zeroize>(zeroize::Zeroizing<T>);
```

#### `Secret::new`

```rust
pub fn new(value: T) -> Self {
```

#### `Secret::expose`

```rust
pub fn expose(&self) -> &T {
```

#### `Secret::expose_mut`

```rust
pub fn expose_mut(&mut self) -> &mut T {
```

#### `Secret::into_zeroizing`

```rust
pub fn into_zeroizing(self) -> zeroize::Zeroizing<T> {
```

#### `SecretValue`

```rust
pub struct SecretValue(String);
```

#### `SecretValue::peek`

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

#### `AgentId`

```rust
pub type AgentId = sui::types::Address;
```

#### `SkillId`

```rust
pub type SkillId = u64;
```

#### `skill_id`

```rust
pub const fn skill_id(value: u64) -> SkillId {
```

#### `DEFAULT_PRIORITY_FEE_PERCENTAGE`

```rust
pub const DEFAULT_PRIORITY_FEE_PERCENTAGE: u64 = 20;
```

#### `MIN_PRIORITY_FEE_PERCENTAGE`

```rust
pub const MIN_PRIORITY_FEE_PERCENTAGE: u64 = 10;
```

#### `MAX_PRIORITY_FEE_PERCENTAGE`

```rust
pub const MAX_PRIORITY_FEE_PERCENTAGE: u64 =
    crate::move_bindings::protocol_limits::interface::payment::MAX_PRIORITY_FEE_PERCENTAGE;
```

#### `PriorityPaymentBudgetInput`

```rust
pub struct PriorityPaymentBudgetInput {
    pub max_budget_mist: u64,
    pub priority_fee_percentage: Option<u64>,
    pub gas_budget_mist: Option<u64>,
}
```

#### `PriorityPaymentBudgetQuote`

```rust
pub struct PriorityPaymentBudgetQuote {
    pub max_budget_mist: u64,
    pub priority_fee_percentage: u64,
    pub gas_budget_mist: u64,
    pub priority_fee_reserve_mist: u64,
    pub reserved_budget_mist: u64,
}
```

#### `normalized_priority_fee_percentage`

```rust
pub fn normalized_priority_fee_percentage(priority_fee_percentage: u64) -> Option<u64> {
```

#### `effective_priority_fee_percentage`

```rust
pub fn effective_priority_fee_percentage(
    priority_fee_percentage: Option<u64>,
) -> anyhow::Result<u64> {
```

#### `priority_fee_mist_for_gas_budget`

```rust
pub fn priority_fee_mist_for_gas_budget(
    gas_budget_mist: u64,
    priority_fee_percentage: u64,
) -> anyhow::Result<u64> {
```

#### `gas_budget_mist_for_max_budget_mist`

```rust
pub fn gas_budget_mist_for_max_budget_mist(
    max_budget_mist: u64,
    priority_fee_percentage: u64,
) -> anyhow::Result<u64> {
```

#### `quote_priority_payment_budget`

```rust
pub fn quote_priority_payment_budget(
    input: PriorityPaymentBudgetInput,
) -> anyhow::Result<PriorityPaymentBudgetQuote> {
```

#### `SkillRevisionLookupKey`

```rust
pub struct SkillRevisionLookupKey {
    pub agent_id: AgentId,
    pub skill_id: SkillId,
    pub interface_revision: InterfaceVersion,
}
```

#### `WorksheetKey`

```rust
pub struct WorksheetKey {
    pub agent_id: AgentId,
    pub skill_id: SkillId,
}
```

#### `SkillRecordContext`

```rust
pub struct SkillRecordContext {
    pub agent_id: AgentId,
    pub skill_id: SkillId,
    pub record: SkillRecord,
}
```

#### `AgentRecordContext`

```rust
pub struct AgentRecordContext {
    pub agent_id: AgentId,
    pub record: AgentRecord,
}
```

#### `AgentRecordContext::active`

```rust
pub fn active(&self) -> bool {
```

#### `SkillRecordContext::active`

```rust
pub fn active(&self) -> bool {
```

#### `SkillRecordContext::dag_binding`

```rust
pub fn dag_binding(&self) -> &SkillDagBinding {
```

#### `SkillRecordContext::current_interface_revision`

```rust
pub fn current_interface_revision(&self) -> InterfaceVersion {
```

#### `SkillRecordContext::requirements`

```rust
pub fn requirements(&self) -> &SkillRequirement {
```

#### `DefaultDagExecutorTarget`

```rust
pub struct DefaultDagExecutorTarget {
    pub agent_id: AgentId,
    pub skill_id: SkillId,
}
```

#### `AgentRegistrySnapshot`

```rust
pub struct AgentRegistrySnapshot {
    pub id: sui::types::Address,
    pub agents: Vec<AgentRecordContext>,
    pub skills: Vec<SkillRecordContext>,
    #[serde(default)]
    pub default_executor: Option<DefaultDagExecutor>,
}
```

#### `AgentRegistrySnapshot::skill_revision_records`

```rust
pub fn skill_revision_records(&self) -> anyhow::Result<Vec<SkillRevisionContext>> {
```

#### `AgentRegistrySnapshot::skill_revision_record`

```rust
pub fn skill_revision_record(
        &self,
        key: SkillRevisionLookupKey,
    ) -> anyhow::Result<SkillRevisionContext> {
```

#### `AgentRegistrySnapshot::active_skill_revision_record`

```rust
pub fn active_skill_revision_record(
        &self,
        agent_id: AgentId,
        skill_id: SkillId,
    ) -> anyhow::Result<SkillRevisionContext> {
```

#### `AgentRegistrySnapshot::default_dag_executor`

```rust
pub fn default_dag_executor(&self) -> anyhow::Result<&DefaultDagExecutor> {
```

#### `SkillRevisionContext`

```rust
pub struct SkillRevisionContext {
    pub key: SkillRevisionLookupKey,
    pub requirements: SkillRequirement,
}
```

#### `SkillRevisionContext::worksheet_key`

```rust
pub fn worksheet_key(&self) -> WorksheetKey {
```

#### `SkillRevisionContext::validate`

```rust
pub fn validate(&self) -> Result<(), TapValidationError> {
```

#### `ActiveSkillExecutionTarget`

```rust
pub struct ActiveSkillExecutionTarget {
    pub skill: SkillRecordContext,
    pub skill_revision: SkillRevisionContext,
}
```

#### `DefaultDagExecutorRecord`

```rust
pub struct DefaultDagExecutorRecord {
    pub target: DefaultDagExecutorTarget,
    pub skill: SkillRecordContext,
    pub skill_revision: SkillRevisionContext,
}
```

#### `SkillConfig`

```rust
pub struct SkillConfig {
    pub name: String,
    pub dag_path: PathBuf,
    pub requirements: SkillRequirement,
    pub interface_revision: InterfaceVersion,
}
```

#### `SkillConfig::validate`

```rust
pub fn validate(&self) -> Result<(), TapValidationError> {
```

#### `TapPublishArtifact`

```rust
pub struct TapPublishArtifact {
    pub skill_name: String,
    pub dag_id: sui::types::Address,
    pub interface_revision: InterfaceVersion,
    pub requirements: SkillRequirement,
}
```

#### `TapPublishArtifact::from_config`

```rust
pub fn from_config(config: &SkillConfig, dag_id: sui::types::Address) -> anyhow::Result<Self> {
```

#### `tap_input_commitment_from_dag_inputs`

```rust
pub fn tap_input_commitment_from_dag_inputs<I, V, P>(inputs: I) -> Vec<u8>
where
    I: IntoIterator<Item = (V, P)>,
    V: AsRef<str>,
    P: AsRef<str>,
{
```

#### `TapValidationError`

```rust
pub enum TapValidationError {
    MissingSkillName,
    MissingDagPath,
    MissingInputCommitment,
    EmptyAuthorizedToolModule,
    EmptyAuthorizedToolFunction,
}
```

#### `SkillRevisionLookupError`

```rust
pub enum SkillRevisionLookupError {
    MissingActiveRevision {
        agent_id: AgentId,
        skill_id: SkillId,
    },
    DuplicateActiveRevision {
        agent_id: AgentId,
        skill_id: SkillId,
        count: usize,
    },
    InvalidSkillRevision(TapValidationError),
}
```

#### `validate_requirements`

```rust
pub fn validate_requirements(requirements: &SkillRequirement) -> Result<(), TapValidationError> {
```

#### `validate_execution_payment_options`

```rust
pub fn validate_execution_payment_options(
    agent_id: AgentId,
    policy: &SkillPaymentPolicy,
    payment_source: &[u8],
    payment_max_budget_mist: u64,
    payer: sui::types::Address,
) -> anyhow::Result<()> {
```

#### `payment_source_from_address`

```rust
pub fn payment_source_from_address(address: sui::types::Address) -> anyhow::Result<Vec<u8>> {
```

#### `resolve_active_tap_skill_revision`

```rust
pub fn resolve_active_tap_skill_revision<'a>(
    records: &'a [SkillRevisionContext],
    skills: &[SkillRecordContext],
    agent_id: AgentId,
    skill_id: SkillId,
) -> Result<&'a SkillRevisionContext, SkillRevisionLookupError> {
```

#### `resolve_active_tap_skill_execution_target`

```rust
pub fn resolve_active_tap_skill_execution_target(
    registry: &AgentRegistrySnapshot,
    agent_id: AgentId,
    skill_id: SkillId,
) -> anyhow::Result<ActiveSkillExecutionTarget> {
```

#### `resolve_default_tap_dag_executor`

```rust
pub fn resolve_default_tap_dag_executor(
    registry: &AgentRegistrySnapshot,
) -> anyhow::Result<DefaultDagExecutorRecord> {
```

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

```rust
pub use tool_registry::{Tool as ToolAnchor, ToolInnerV1, ToolRef};
```

#### `ToolState`

```rust
pub struct ToolState {
    /// Stable Tool object ID.
    pub object_id: sui::types::Address,
    /// Current supported Tool inner layout.
    pub inner: ToolInnerV1,
}
```

#### `Tool`

```rust
pub type Tool = ToolState;
```

#### `OnchainToolMode`

```rust
pub enum OnchainToolMode {
    /// `execute` begins with `UIDRequirements` and `OnchainToolResult`.
    Standard,
    /// `execute` begins with an Agent vertex authorization proof.
    WorkflowAuthorization,
}
```

#### `ToolAnchor::object_id`

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

#### `ToolState::new`

```rust
pub fn new(object_id: sui::types::Address, inner: ToolInnerV1) -> Self {
```

#### `ToolState::derive_id`

```rust
pub fn derive_id(
        registry_id: sui::types::Address,
        fqn: &ToolFqn,
    ) -> anyhow::Result<sui::types::Address> {
```

#### `ToolState::registry_id`

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

#### `ToolState::fqn_string`

```rust
pub fn fqn_string(&self) -> anyhow::Result<String> {
```

#### `ToolState::parsed_fqn`

```rust
pub fn parsed_fqn(&self) -> anyhow::Result<ToolFqn> {
```

#### `ToolState::reference`

```rust
pub fn reference(&self) -> &ToolRef {
```

#### `ToolState::description_string`

```rust
pub fn description_string(&self) -> anyhow::Result<String> {
```

#### `ToolState::registered_at_datetime`

```rust
pub fn registered_at_datetime(&self) -> anyhow::Result<DateTime<Utc>> {
```

#### `ToolState::unregistered_at_datetime`

```rust
pub fn unregistered_at_datetime(&self) -> anyhow::Result<Option<DateTime<Utc>>> {
```

#### `ToolState::unregistered_at_millis`

```rust
pub fn unregistered_at_millis(&self) -> anyhow::Result<Option<u64>> {
```

#### `ToolRef::http_url_string`

```rust
pub fn http_url_string(&self) -> anyhow::Result<Option<String>> {
```

#### `ToolRef::sui_parts`

```rust
pub fn sui_parts(
        &self,
    ) -> anyhow::Result<Option<(sui::types::Address, String, sui::types::Address)>> {
```

#### `ToolRef::display_string`

```rust
pub fn display_string(&self) -> anyhow::Result<String> {
```

#### `ToolMeta`

```rust
pub struct ToolMeta {
    pub fqn: ToolFqn,
    pub url: String,
    pub description: String,
    pub timeout: Duration,
    pub input_schema: Vec<u8>,
    pub output_schema: Vec<u8>,
}
```

#### `ToolMeta::validate_registration`

```rust
pub fn validate_registration(&self) -> anyhow::Result<()> {
```

#### `ToolMeta::meta_schema`

```rust
pub fn meta_schema(&self) -> anyhow::Result<MetaSchema> {
```

#### `RequestWalkContext`

```rust
pub struct RequestWalkContext {
    pub agent_id: AgentId,
    pub skill_id: SkillId,
    pub interface_revision: InterfaceVersion,
    pub task_id: sui::types::Address,
    pub occurrence_id: u64,
}
```

#### `RequestWalkContext::skill_revision_key`

```rust
pub fn skill_revision_key(&self) -> SkillRevisionLookupKey {
```

#### `ExternalVerifierRuntimeCall`

```rust
pub struct ExternalVerifierRuntimeCall {
    pub method_id: VerifierMethodId,
    pub witness_id: sui::types::Address,
    pub immutable_shared_objects: Vec<sui::types::ObjectReference>,
}
```

#### `ExecutionTerminalRecord`

```rust
pub struct ExecutionTerminalRecord {
    pub vertex: RuntimeVertex,
    pub failure_class: WorkflowFailureClass,
}
```


---

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