Log inGet started
World

Market Square: Currencies, Wallets and Shops Kit

README.md

bank (economyKit)

The authority that decides every change of money. Exactly one machine runs it; it keeps the wallets, checks each request against the price lists and its own copy of the wallet, applies the change whole or refuses with a reason code, writes wallets to the world's runtime data (under a namespace scoped to the world), puts back any change to them it did not make, runs two-phase sales and trades (items leave the bag first), pays income over time and per wave, and takes upkeep. It talks to the world through an injected environment, so the test suite runs the same code with fake players. Called by economyKit.economy; games do not call it directly.