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

🧾nexus_tool::invocation

Struct ReserveKey

Typed reserve key for policy witness [P].

Fields

Struct Invocation

Exact policy authorization for one Tool invocation.

The missing [store] ability ensures that only this module can transfer or receive an [Invocation].

Fields

id: sui::object::UIDexecution_id: addressvertex_key: vector<u8>tool_id: sui::object::IDcashier_id: sui::object::IDbeneficiary: nexus_interface::payment::PaymentSourceKindpolicy: std::type_name::TypeNamesources: vector<sui::object::ID>amount: u64refund_to: std::option::Option<address>funds: sui::balance::Balance<sui::sui::SUI>

Constants

Function new_invocation

Consumes a canonical request and creates one Invocation under policy [P].

Function new_invocation_with_reserve

Creates one Invocation carrying the exact policy reserve restored on refund.

Function id

Returns the object ID of [Invocation].

Function execution_id

Returns the execution authorized by [Invocation].

Function vertex_key

Returns the runtime vertex key authorized by [Invocation].

Function tool

Returns the Tool authorized by [Invocation].

Function cashier

Returns the cashier selected by [Invocation].

Function beneficiary

Returns the payment source eligible for [Invocation].

Function refund_address

Returns the address that receives a policy reserve after refund. This accessor aborts with EInvocationMismatch when the Invocation has no configured reserve/refund recipient; callers must not use it as an optional-query API.

Function policy

Returns the policy witness type that created [Invocation].

Function sources

Returns the exact economic sources used by [Invocation].

Function amount

Returns the SUI obligation selected by [Invocation].

Function place

Places [Invocation] under its execution after consuming its exact lock receipt.

Function receive

Receives an [Invocation] owned by its execution.

Function receive_refund

Receives a refunded [Invocation] at its recorded policy account.

Function resolve

Resolves [Invocation] using the exact terminal receipt from its payment.

Finalization joins the recorded SUI and sends the completed Invocation to its cashier. Refund sends a reserved Invocation to its beneficiary or destroys an Invocation with no reserved resource.

Function collect

Receives completed Invocations created by configless policy witness [P].

Function collect_with_reserve

Receives completed Invocations and returns their exact policy reserves.

Function claim_refund

Recovers the exact policy reserve from a refunded [Invocation].

An Invocation has no [store] ability, so only the address that received the refund can supply it and only this function can unpack it.

Last updated