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
- transfer_id: Resource-owned transfer identity.
- actor_id: source Actor.
- household_id: destination Household.
- currency_definition_id: authored currency identity.
- resource_id: runtime Resource identity.
- amount_minor_units: exact transferred amount.
- personal_balance: resulting wallet balance.
- household_balance: resulting Household balance.
- origin_id: engine-created caller identity.
- request_sequence: originating command request.
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
| ID | Type | Units | Required | Description |
|---|---|---|---|---|
actor_id | stable-id | none | yes | Actor whose personal custody supplied the transfer. |
amount_minor_units | unsigned-integer | minor-currency-units | yes | Exact amount transferred. |
currency_definition_id | string | none | yes | Authored currency definition identity. |
household_balance | unsigned-integer | minor-currency-units | yes | Household-money balance after the commit. |
household_id | stable-id | none | yes | Actor household that received the contribution. |
origin_id | string | none | yes | Engine-created caller origin ID. |
personal_balance | unsigned-integer | minor-currency-units | yes | Actor-wallet balance after the commit. |
request_sequence | unsigned-integer | none | yes | Command request that produced the transfer. |
resource_id | stable-id | none | yes | Runtime Resource identity. |
transfer_id | stable-id | none | yes | Resource-owned custody-transfer identity. |
Errors
- None
Examples
events.listen("events.money.transferred", function(event)
ui.text("Contribution", tostring(event.payload.amount_minor_units))
end)
API history
- 1.4.0: Conserved transfer fact added for Phase 16D2.