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

⏱️nexus_tool::time_pass

Struct Policy

Private construction witness for this policy.

Fields

Struct Config

Owner configured sale terms for time passes.

Fields

issuance_enabled: boolprice_per_ms: u64minimum_duration_ms: u64maximum_duration_ms: u64

Struct State

Policy state for one inclusive start and exclusive end window.

Fields

valid_from_ms: u64valid_until_ms: u64

Struct TimePassCreatedEvent

Records creation of one canonical time pass [PolicyAccount].

Fields

tool: sui::object::IDcashier: sui::object::IDpass: sui::object::IDbeneficiary: nexus_interface::payment::PaymentSourceKindvalid_from_ms: u64valid_until_ms: u64

Struct TimePassOfferChangedEvent

Records the complete commercial offer for future time pass purchases.

Fields

cashier: sui::object::IDissuance_enabled: boolprice_per_ms: u64minimum_duration_ms: u64maximum_duration_ms: u64

Constants

Function enable

Enables time pass admission and sales.

Function buy

Purchases and shares the canonical pass while transferring prepaid SUI to the cashier. The public call returns only the deposit ID.

Function buy_more

Purchases more duration for an existing canonical time pass account.

Function close_issuance

Stops purchases and owner issuance without invalidating existing passes.

Function open_issuance

Resumes purchases and owner issuance for canonical time pass accounts.

Function update_terms

Replaces the sale terms used only for future purchases and grants.

Function offer

Returns the current time pass offer.

Function issue

Issues a time pass under Tool owner authority.

Function update_window

Replaces the validity window of an existing canonical pass.

Function get_invocation

Creates an Invocation when admission occurs inside the pass window.

Validity is evaluated at [InvocationRequest] authorization time. The start is inclusive and the end is exclusive.

Function collect

Collects finalized time pass Invocations under Tool owner authority.

Function derive_id

Derives the canonical time pass account for [beneficiary].

Function share

Shares a time pass account for concurrent admission reads.

Function window

Returns the inclusive start and exclusive end of [pass].

Last updated