> 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/move/nexus_interface/authorization.md).

# authorization

* [Struct `AgentSkillAuthorization`](#struct-agentskillauthorization)
* [Struct `AgentSkillAuthorizationInnerV1`](#struct-agentskillauthorizationinnerv1)
* [Struct `AgentVertexAuthorization`](#struct-agentvertexauthorization)
* [Struct `AgentVertexAuthorizationContext`](#struct-agentvertexauthorizationcontext)
* [Struct `AgentVertexAuthorizationStamp`](#struct-agentvertexauthorizationstamp)
* [Constants](#constants)
* [Function `agent_vertex_authorization_skill_id`](#function-agent_vertex_authorization_skill_id)
* [Function `agent_vertex_authorization_interface_version`](#function-agent_vertex_authorization_interface_version)
* [Function `agent_vertex_authorization_dag_id`](#function-agent_vertex_authorization_dag_id)
* [Function `agent_vertex_authorization_vertex`](#function-agent_vertex_authorization_vertex)
* [Function `agent_vertex_authorization_task_id`](#function-agent_vertex_authorization_task_id)
* [Function `agent_vertex_authorization_context`](#function-agent_vertex_authorization_context)
* [Function `encode_agent_vertex_authorization_context`](#function-encode_agent_vertex_authorization_context)
* [Function `agent_vertex_authorization_stamp`](#function-agent_vertex_authorization_stamp)
* [Function `agent_vertex_authorization_stamp_input_commitment`](#function-agent_vertex_authorization_stamp_input_commitment)
* [Function `worksheet_input_commitment`](#function-worksheet_input_commitment)
* [Function `authorization_matches_worksheet`](#function-authorization_matches_worksheet)
* [Function `consume_verified_for_worksheet_as_recipient`](#function-consume_verified_for_worksheet_as_recipient)
* [Function `agent_skill_authorization_agent_id`](#function-agent_skill_authorization_agent_id)
* [Function `agent_skill_authorization_skill_id`](#function-agent_skill_authorization_skill_id)
* [Function `agent_skill_authorization_interface_version`](#function-agent_skill_authorization_interface_version)
* [Function `agent_skill_authorization_grant_count`](#function-agent_skill_authorization_grant_count)
* [Function `copy_agent_skill_authorization_vertex_grant`](#function-copy_agent_skill_authorization_vertex_grant)
* [Function `destroy_agent_skill_authorization`](#function-destroy_agent_skill_authorization)

### Struct `AgentSkillAuthorization`

Scheduled skill-level authorization object.

Scheduled tasks store this keyed object as their durable authorization component. It is intentionally non-copy because it owns the copyable per-vertex grants that are copied into each scheduled execution.

```move
public struct AgentSkillAuthorization has key, store
```

<details>

<summary>Fields</summary>

`id: sui::object::UID`

</details>

#### Struct `AgentSkillAuthorizationInnerV1`

Version one stored layout for \[[`AgentSkillAuthorization`](#nexus_interface_authorization_AgentSkillAuthorization)].

The stable \[[`AgentSkillAuthorization`](#nexus_interface_authorization_AgentSkillAuthorization)] cannot contain these fields because its published layout must remain unchanged while stored data evolves.

```move
public struct AgentSkillAuthorizationInnerV1 has store
```

<details>

<summary>Fields</summary>

`agent_id: sui::object::IDskill_id: u64interface_version:` [`nexus_interface::version::InterfaceVersion`](/reference/move/nexus_interface/version.md#nexus_interface_version_InterfaceVersion)`vertex_authorization_grants: vector<`[`nexus_primitives::authorization::Grant`](/reference/move/nexus_primitives/authorization.md#nexus_primitives_authorization_Grant)`<`[`nexus_interface::authorization::AgentVertexAuthorization`](#nexus_interface_authorization_AgentVertexAuthorization)`>>`

</details>

#### Struct `AgentVertexAuthorization`

Per-vertex DAG authorization payload.

Agent identity and recipient binding are enforced by primitive provenance.

```move
public struct AgentVertexAuthorization has copy, drop, store
```

<details>

<summary>Fields</summary>

`skill_id: u64interface_version:` [`nexus_interface::version::InterfaceVersion`](/reference/move/nexus_interface/version.md#nexus_interface_version_InterfaceVersion)`dag_id: sui::object::IDvertex: std::ascii::Stringtask_id: sui::object::ID`

</details>

#### Struct `AgentVertexAuthorizationContext`

Full context bound to a worksheet, used to check that a vertex authorization matches an execution.

```move
public struct AgentVertexAuthorizationContext has copy, drop, store
```

<details>

<summary>Fields</summary>

`agent_id: sui::object::IDskill_id: u64interface_version:` [`nexus_interface::version::InterfaceVersion`](/reference/move/nexus_interface/version.md#nexus_interface_version_InterfaceVersion)`execution_id: sui::object::IDvertex: std::ascii::Stringtask_id: sui::object::ID`

</details>

#### Struct `AgentVertexAuthorizationStamp`

Execution stamp that binds vertex authorization context to exact Tool inputs.

\[[`AgentVertexAuthorizationContext`](#nexus_interface_authorization_AgentVertexAuthorizationContext)] cannot carry the input commitment without changing its published layout, so both values live in this separate worksheet stamp payload.

```move
public struct AgentVertexAuthorizationStamp has copy, drop, store
```

<details>

<summary>Fields</summary>

`context:` [`nexus_interface::authorization::AgentVertexAuthorizationContext`](#nexus_interface_authorization_AgentVertexAuthorizationContext)`input_commitment: vector<u8>`

</details>

#### Constants

```move
#[error]
const EAgentAuthorizationMismatch: vector<u8> = b"Agent authorization identity mismatch";
```

```move
const SHA256_LEN: u64 = 32;
```

#### Function `agent_vertex_authorization_skill_id`

Returns the skill ID of the vertex authorization.

```move
public fun agent_vertex_authorization_skill_id(self: &nexus_interface::authorization::AgentVertexAuthorization): u64
```

#### Function `agent_vertex_authorization_interface_version`

Returns the interface version of the vertex authorization.

```move
public fun agent_vertex_authorization_interface_version(self: &nexus_interface::authorization::AgentVertexAuthorization): nexus_interface::version::InterfaceVersion
```

#### Function `agent_vertex_authorization_dag_id`

Returns the DAG ID of the vertex authorization.

```move
public fun agent_vertex_authorization_dag_id(self: &nexus_interface::authorization::AgentVertexAuthorization): sui::object::ID
```

#### Function `agent_vertex_authorization_vertex`

Returns the vertex of the vertex authorization.

```move
public fun agent_vertex_authorization_vertex(self: &nexus_interface::authorization::AgentVertexAuthorization): std::ascii::String
```

#### Function `agent_vertex_authorization_task_id`

Returns the Task bound to the vertex authorization.

```move
public fun agent_vertex_authorization_task_id(self: &nexus_interface::authorization::AgentVertexAuthorization): sui::object::ID
```

#### Function `agent_vertex_authorization_context`

Constructs the exact context bound to a vertex authorization worksheet stamp.

```move
public fun agent_vertex_authorization_context(agent_id: sui::object::ID, skill_id: u64, interface_version: nexus_interface::version::InterfaceVersion, execution_id: sui::object::ID, vertex: std::ascii::String, task_id: sui::object::ID): nexus_interface::authorization::AgentVertexAuthorizationContext
```

#### Function `encode_agent_vertex_authorization_context`

Encodes a vertex authorization context into its BCS byte representation.

```move
public fun encode_agent_vertex_authorization_context(agent_id: sui::object::ID, skill_id: u64, interface_version: nexus_interface::version::InterfaceVersion, execution_id: sui::object::ID, vertex: std::ascii::String, task_id: sui::object::ID): vector<u8>
```

#### Function `agent_vertex_authorization_stamp`

Constructs the execution stamp stored on a Tool-result worksheet.

```move
public fun agent_vertex_authorization_stamp(context: nexus_interface::authorization::AgentVertexAuthorizationContext, input_commitment: vector<u8>): nexus_interface::authorization::AgentVertexAuthorizationStamp
```

#### Function `agent_vertex_authorization_stamp_input_commitment`

Returns the canonical 32-byte input commitment carried by the stamp.

```move
public fun agent_vertex_authorization_stamp_input_commitment(stamp: &nexus_interface::authorization::AgentVertexAuthorizationStamp): vector<u8>
```

#### Function `worksheet_input_commitment`

Authenticates the stamp against the worksheet and returns its input commitment.

```move
public fun worksheet_input_commitment(worksheet: &nexus_primitives::proof_of_uid::ProofOfUID, stamp: &nexus_interface::authorization::AgentVertexAuthorizationStamp): vector<u8>
```

#### Function `authorization_matches_worksheet`

Returns true only if the vertex authorization derives the exact execution stamp on the worksheet.

```move
public fun authorization_matches_worksheet(authorization: &nexus_interface::authorization::AgentVertexAuthorization, by: sui::object::ID, worksheet: &nexus_primitives::proof_of_uid::ProofOfUID, stamp: &nexus_interface::authorization::AgentVertexAuthorizationStamp): bool
```

#### Function `consume_verified_for_worksheet_as_recipient`

Consumes an execution-proven vertex authorization for the matching worksheet recipient.

```move
public fun consume_verified_for_worksheet_as_recipient(authorization: nexus_primitives::authorization::ProvenValue<nexus_interface::authorization::AgentVertexAuthorization>, worksheet: &nexus_primitives::proof_of_uid::ProofOfUID, recipient: &sui::object::UID, input_commitment: vector<u8>): bool
```

#### Function `agent_skill_authorization_agent_id`

Returns the agent ID of the skill authorization.

```move
public fun agent_skill_authorization_agent_id(self: &nexus_interface::authorization::AgentSkillAuthorization): sui::object::ID
```

#### Function `agent_skill_authorization_skill_id`

Returns the skill ID of the skill authorization.

```move
public fun agent_skill_authorization_skill_id(self: &nexus_interface::authorization::AgentSkillAuthorization): u64
```

#### Function `agent_skill_authorization_interface_version`

Returns the interface version of the skill authorization.

```move
public fun agent_skill_authorization_interface_version(self: &nexus_interface::authorization::AgentSkillAuthorization): nexus_interface::version::InterfaceVersion
```

#### Function `agent_skill_authorization_grant_count`

Returns the number of vertex authorization grants held by the skill authorization.

```move
public fun agent_skill_authorization_grant_count(self: &nexus_interface::authorization::AgentSkillAuthorization): u64
```

#### Function `copy_agent_skill_authorization_vertex_grant`

Returns a copy of the vertex authorization grant at the given index.

```move
public fun copy_agent_skill_authorization_vertex_grant(self: &nexus_interface::authorization::AgentSkillAuthorization, index: u64): nexus_primitives::authorization::Grant<nexus_interface::authorization::AgentVertexAuthorization>
```

#### Function `destroy_agent_skill_authorization`

Destroys a Task authorization after no execution can consume its grants.

```move
public fun destroy_agent_skill_authorization(self: nexus_interface::authorization::AgentSkillAuthorization)
```


---

# 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/move/nexus_interface/authorization.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.
