sc_economy_v1.apply
Apply one bounded signed local-wallet delta with expected-balance compare and nonzero owner/session idempotency key. Identical replay returns the first receipt; changed replay is BAD_ARG. No receipt eviction or automatic save/payout.
Signature
Section titled “Signature”sco_result (*)(sco_plugin *, const sc_economy_request *, sc_economy_receipt *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sc_economy_v1.apply |
| Record ID | sc-economy-v1-apply |
| Service | game.economy |
| Table | sc_economy_v1 |
| Version macro | SC_ECONOMY_SERVICE_VERSION |
| Packed table version | 65536 |
| Since / availability | size >= 24; 1.0 |
| Complete member extent (x64 bytes) | 24 |
| Table size (x64 bytes) | 32 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*apply)(sco_plugin* self, const sc_economy_request* request, sc_economy_receipt* out);
Apply one bounded signed local-wallet delta with expected-balance compare and nonzero owner/session idempotency key. Identical replay returns the first receipt; changed replay is BAD_ARG. No receipt eviction or automatic save/payout.
Results and failures
Section titled “Results and failures”OK on success; BAD_ARG invalid/short input or released handle; UNAVAILABLE absent backend/unsafe admission; NOT_FOUND unknown IDs; TOO_MANY bounded quota; FAILED refused progression/provider failure; CRASHED latches restart required. Outputs untouched on failure.
Absent capability
Section titled “Absent capability”Missing table: query_service NOT_FOUND; absent method/backend or unsafe admission: UNAVAILABLE.
Ownership
Section titled “Ownership”Caller-owned copied buffers; no allocation transfer. Mutations scoped to live plugin and current offline session.
Thread affinity
Section titled “Thread affinity”Game thread only; WRONG_THREAD before backend access.
Callback context
Section titled “Callback context”Backend callbacks synchronous on game thread; pointers valid only during call.
Reentrancy
Section titled “Reentrancy”Recursive calls and Stop/replacement during callbacks refused (FAILED).
Cleanup and cancellation
Section titled “Cleanup and cancellation”Consumers unload before Stop. Released owners lose mutation authority. No automatic persistence or replay of uncertain effects. Native faults permanently close admission until process restart.
Language mappings
Section titled “Language mappings”Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.
| Language | Catalogue status | Source evidence / wrapper tokens |
|---|---|---|
| c | direct | include/sc_economy.h(*apply) |
| cpp | direct | include/sc_economy.h(*apply) |
| csharp | unsupported | docs/design/offline-missions.mdC# and Lua bindings are unsupported |
| lua | unsupported | docs/design/offline-missions.mdC# and Lua bindings are unsupported |
Examples
Section titled “Examples”None identified in the catalogue; this is not proof none can exist.
ABI pins prove layout, not semantic behavior or a live game session.