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

💰nexus_tool::tool_cashier

Struct ToolCashier

Shared policy directory and completed invocation inbox for one Tool.

Fields

id: sui::object::UID

Struct ToolCashierInnerV1

Version one stored layout for [ToolCashier].

Fields

tool: sui::object::IDtool_fqn: std::ascii::Stringpolicies: sui::vec_set::VecSet<std::type_name::TypeName>

Struct OverToolCashier

Authorization marker for delegated [ToolCashier] administration.

Fields

Struct ToolCashierKey

Typed key for the [ToolCashier] derived from a Tool.

Fields

Struct PolicyKey

Typed configuration key for policy witness [P].

Fields

Struct PolicyAccountKey

Canonical account slot for policy [P] and one payment beneficiary.

Fields

Struct PolicyAccount

Canonical beneficiary account containing state defined by policy [P].

Fields

id: sui::object::UIDcashier: sui::object::IDbeneficiary: nexus_interface::payment::PaymentSourceKindstate: State

Struct CashierDeposit

SUI transferred to a cashier for later owner collection.

Fields

id: sui::object::UIDfunds: sui::balance::Balance<sui::sui::SUI>

Struct CashierDepositCreatedEvent

Identifies one deposit transferred to a [ToolCashier].

Fields

cashier: sui::object::IDdeposit: sui::object::IDamount: u64

Struct PolicyAddedEvent

Records that a [ToolCashier] accepts a policy for new [Invocation] objects.

Fields

cashier: sui::object::IDpolicy: std::type_name::TypeName

Struct PolicyRemovedEvent

Records that a [ToolCashier] no longer accepts a policy.

Fields

cashier: sui::object::IDpolicy: std::type_name::TypeName

Constants

Function add_policy

Accepts configless policy witness [P].

Function add_policy_with_config

Accepts policy witness [P] and stores its typed configuration.

Function remove_policy

Stops accepting configless policy witness [P].

Existing Invocations remain valid because their material terms are stored in the exact [Invocation] objects.

Function remove_policy_with_config

Stops accepting policy witness [P] and returns its typed configuration.

Function policy_config

Returns the configuration for accepted policy witness [P].

Function policy_config_mut

Returns mutable owner access to the configuration for policy witness [P].

Function has_policy

Returns whether policy witness [P] is accepted for new invocations.

Function policies

Returns the accepted policy types for off chain discovery.

Function derive_policy_account_id

Derives the canonical policy account for [beneficiary].

Function new_policy_account

Creates the canonical policy account for [beneficiary].

Creation mutates [ToolCashier] only when the account is first claimed.

Function share_policy_account

Shares a canonical policy account.

Function policy_account_id

Returns the canonical policy account ID.

Function policy_account_cashier

Returns the cashier that created [account].

Function policy_account_beneficiary

Returns the beneficiary authorized by [account].

Function policy_account_state

Returns policy module access to the state in [account].

Function policy_account_state_mut

Returns mutable policy module access to the state in [account].

Function policy_account_uid_mut

Returns policy module access to the receiving identity of [account].

Function send_deposit

Transfers SUI to the [ToolCashier] inbox.

Function collect_deposits

Receives a batch of deposits under Tool owner authority.

Function tool_fqn

Returns the fully qualified name of the Tool served by [ToolCashier].

Function tool

Returns the stable Tool object ID served by [ToolCashier].

Function id

Returns the object ID of [ToolCashier].

Function derive_id

Derives the stable [ToolCashier] ID for a Tool ID.

Function assert_owner

Verifies exact Tool owner authority for policy module operations.

Last updated