event · events.money

Money transferred

Reports a conserved currency transfer only after Resource commits both custody changes.

events.money.transferred(transfer_id, actor_id, household_id, currency_definition_id, resource_id, amount_minor_units, personal_balance, household_balance, origin_id, request_sequence)
Stable ID
events.money.transferred
Owner
game.resource-economy
Authority
read_only
Timing
post_commit
Availability
active-session
Side effects
none
Determinism
ordered after the Resource commit and before command completion
Introduced
1.4.0

Usage

Listen for completed money transfers. Treat the payload as a detached fact; query again when preparing a later revision-checked command.

Parameters

Returns

An immutable event published after both custody quantities and transfer history commit.

Cost

One bounded retained event and one callback delivery per subscribed package.

Fields

IDTypeUnitsRequiredDescription
actor_idstable-idnoneyesActor whose personal custody supplied the transfer.
amount_minor_unitsunsigned-integerminor-currency-unitsyesExact amount transferred.
currency_definition_idstringnoneyesAuthored currency definition identity.
household_balanceunsigned-integerminor-currency-unitsyesHousehold-money balance after the commit.
household_idstable-idnoneyesActor household that received the contribution.
origin_idstringnoneyesEngine-created caller origin ID.
personal_balanceunsigned-integerminor-currency-unitsyesActor-wallet balance after the commit.
request_sequenceunsigned-integernoneyesCommand request that produced the transfer.
resource_idstable-idnoneyesRuntime Resource identity.
transfer_idstable-idnoneyesResource-owned custody-transfer identity.

Errors

Examples

events.listen("events.money.transferred", function(event)
    ui.text("Contribution", tostring(event.payload.amount_minor_units))
end)

API history

Related symbols

Project references