aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/types.go')
-rw-r--r--internal/casino/types.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/casino/types.go b/internal/casino/types.go
index 75d041b..d000375 100644
--- a/internal/casino/types.go
+++ b/internal/casino/types.go
@@ -171,6 +171,17 @@ type Wallet interface {
// credit could not be persisted (the game must not report a win that
// is not durable).
PayCredits(amount int) error
+ // ResolveStakes marks every outstanding stake for this player as
+ // settled: the round resolved (won, lost, pushed, or forfeited), so
+ // startup recovery must no longer refund it. A stake whose wager
+ // record remains open at restart is refunded by recovery.
+ ResolveStakes()
+ // RefundOutstanding returns every outstanding stake to the player
+ // (chips as chips, credits through the durable payout path) and
+ // resolves the stakes. It reports the amounts returned. An error
+ // means the refund could not be made durable: the stakes remain open
+ // and startup recovery completes the refund.
+ RefundOutstanding() (chips, credits int, err error)
}
type EventType string