Blackjack
Classic 21 against the dealer, with optional side bets. Multi-action — each decision is a /game/play call.
Slug: blackjack · Type: multi-action · TS types: @jackpot-studio/jps-proto/blackjack
A round is: start (deals, debits the main wager + any side bets) → a sequence of next actions until every hand resolves → automatic settlement. Some actions debit again.
Start
Request — Query.start
| Field | Type | Notes |
|---|---|---|
amount |
string | Main wager, decimal string. |
sideBets |
object? | Optional { perfectPairs, threeCardPoker } amounts. |
{ "start": { "amount": "1.00", "sideBets": { "perfectPairs": "0.50", "threeCardPoker": "0" } } }
The response includes the state and an optional settlement — present only if the hand ends immediately (e.g. a dealt blackjack). Keep the roundId.
Next
Request — Query.next
| Field | Type | Notes |
|---|---|---|
action |
string | One of hit, stand, double, split, insurance, noInsurance. |
roundId |
string | The open round. |
{ "next": { "action": "hit", "roundId": "9f1c…" } }
The valid actions at any moment are in state.nextActions — drive your UI from that list. Additional debits:
| Action | Debit |
|---|---|
double, split |
another main wager |
insurance |
half the main wager |
next.settlement is present only on the terminal action (all hands resolved); otherwise the response just carries the updated state. The metadata.balance reflects any mid-round debit.
Settlement
When the round settles (in start or next):
| Field | Type | Notes |
|---|---|---|
results |
string[] | Per-hand outcomes. |
totalWagered |
string | Main + side + any double/split/insurance. |
payout |
string | Total credited. |
multiplier |
string | Payout ÷ total wagered. |
sideBetPayouts |
object? | { perfectPairs, threeCardPoker } — present only if a side bet was placed and paid. |
sideBetMultipliers |
object? | Matching multipliers. |
State
GameState:
| Field | Type | Notes |
|---|---|---|
active |
bool | |
currentHand |
string | Id of the hand awaiting action. |
nextActions |
string[] | Legal actions right now. |
player |
Hand[] |
One per hand (more than one after a split). |
dealer |
Hand |
Dealer's hand (hole card hidden while active). |
mainWager |
string | |
sideBets |
object | { perfectPairs, threeCardPoker }. |
Hand: { id, value, actions[], cards[] } — value is the hand total, cards use suit-symbol + rank (e.g. ♠K, ♥4).
Verify
VerifyRequest is empty. Blackjack is dealt from an infinite shoe, so the response returns the 52-card ordering the seeds produce:
// request message
{}
// response message
{ "deck": ["♦7", "♠K", "♥2", "…"] }