🪙nexus_tool::finite_credits
Struct Policy
Private construction witness for this policy.
Struct Config
Owner configured sale terms for finite credits.
Struct State
Policy state stored in one beneficiary's canonical account.
Struct CreditReserve
One prepaid unit held by an in flight [Invocation].
[CreditReserve] carries no SUI. Payment occurs when credits are purchased; this marker preserves one unit until finalization or refund.
Struct CreditsCreatedEvent
Records creation of one canonical finite credit [PolicyAccount].
Struct CreditOfferChangedEvent
Records the complete commercial offer for future credit purchases.
Constants
Function enable
Enables finite credit admission and sales.
Function buy
Purchases credits, shares the canonical policy account, and transfers prepaid SUI to the cashier inbox. The public call returns only the deposit ID.
Function buy_more
Purchases units for an existing canonical credit account.
Function close_issuance
Stops purchases and owner issuance without invalidating existing accounts.
Function open_issuance
Resumes purchases and owner issuance for canonical credit accounts.
Function update_terms
Replaces the sale terms used only for future purchases and grants.
Function offer
Returns the current finite credit offer.
Function issue
Issues credits under Tool owner authority.
Function issue_more
Adds an owner granted amount to an existing canonical credit account.
Function get_invocation
Decrements [State] and creates an [Invocation] holding one prepaid unit.
The held [CreditReserve] is a unit marker, not an execution payment reserve. The Invocation therefore records zero SUI and names [credits] as its exact accounting source.
Function restore_refund
Restores one exact refunded unit to its canonical credit account.
Function collect
Collects finalized credit Invocations and consumes their reserved units.
Function share
Shares a canonical credit [PolicyAccount] for runtime admission.
Function remaining
Returns the units currently available in [self].
Function derive_id
Derives the canonical finite credit account for [beneficiary].
Last updated

