> ## Documentation Index
> Fetch the complete documentation index at: https://hedgeem-api.qeetoto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# F010 — Chip Denominations

> Chip denomination values available for betting, passed to the GDK at init and used by the chip selector UI

# F010 — Chip Denominations

| Field  | Value               |
| ------ | ------------------- |
| ID     | F010                |
| Phase  | 2 — Betting         |
| Jira   | HEDGE-50            |
| Status | TS ✅ · JS ✅ · UMA ✅ |

## Business Rule

The game provides a fixed set of chip denominations (in pence) that players can select when placing bets. The chip selector displays one chip button per denomination. Clicking a chip button sets the active stake amount for the next bet placed on any live hand.

The denominations define:

* The **minimum possible bet** (`chipsList[0]`)
* The **maximum possible bet** (`chipsList[last]`)

These bounds are communicated to the GDK at game initialisation via the `InitStatus` message.

## Denomination Sets by Version

| Version        | Denominations (pence)                          | Count | Min | Max           |
| -------------- | ---------------------------------------------- | ----- | --- | ------------- |
| JS (reference) | `[25, 50, 100, 250, 500, 1000]`                | 6     | 25p | 1000p (£10)   |
| TS             | `[25, 50, 100, 250, 500, 1000]`                | 6     | 25p | 1000p (£10)   |
| UMA            | `[50, 100, 200, 500, 1000, 2000, 5000, 10000]` | 8     | 50p | 10000p (£100) |

The UMA client uses a different denomination set configured in `platform.js`. This is a deliberate platform-level configuration, not a bug. The GDK chip selector renders one button per entry.

## JavaScript Reference

**Source:** `hedgeem-v4/odobo/src/js/buttons.js`

```javascript theme={null}
var chipValues = [25, 50, 100, 250, 500, 1000];  // pence
```

`activeBetChip` (0-indexed) tracks the currently selected chip. Clicking a chip button updates `activeBetChip` and highlights the selected chip.

## TypeScript Implementation

**Source:** `standalone_reference_client/src/scenes/GameScene.ts`

```typescript theme={null}
// Line 42
const CHIP_DENOMINATIONS = [25, 50, 100, 250, 500, 1000];  // pence
```

Six chip buttons (chip1–chip6 sprites) are created at scene init. Clicking selects the denomination; the active chip is highlighted with a `chipGlow` image.

## UMA Implementation

**Source:** `gameClient/builds/hedgeem/platform.js`

```javascript theme={null}
var CHIPS_LIST = [50, 100, 200, 500, 1000, 2000, 5000, 10000];
```

`CHIPS_LIST` is passed to the GDK in the `game:InitStatus` message:

```javascript theme={null}
{
  chipsList:       CHIPS_LIST,          // → GDK chip selector
  maxPossibleBet:  CHIPS_LIST[CHIPS_LIST.length - 1],
  minPossibleBet:  CHIPS_LIST[0],
}
```

The GDK (game.min.js) renders the chip selector UI from this list. The platform layer also exposes these values for Playwright testing via the state bridge:

```
window._chipsList  → [50, 100, 200, 500, 1000, 2000, 5000, 10000]
window._minBet     → 50
window._maxBet     → 10000
```

Set at HOLE init time (when `game:InitStatus` is sent), before the first bet.

## Acceptance Criteria

| #   | Criterion                                                                | JS  | TS  | UMA |
| --- | ------------------------------------------------------------------------ | --- | --- | --- |
| AC1 | At least 2 chip denominations are available                              | ✅   | ✅   | ✅   |
| AC2 | Denominations are in strictly ascending order                            | ✅   | ✅   | ✅   |
| AC3 | `minPossibleBet` equals the smallest denomination                        | ✅   | ✅   | ✅   |
| AC4 | `maxPossibleBet` equals the largest denomination                         | ✅   | ✅   | ✅   |
| AC5 | All denominations are positive integers                                  | ✅   | ✅   | ✅   |
| AC6 | UMA has exactly 8 denominations: `[50,100,200,500,1000,2000,5000,10000]` | N/A | N/A | ✅   |

### UMA-testable ACs (via state bridge)

| #       | UMA Criterion                                                           | Notes                                      |
| ------- | ----------------------------------------------------------------------- | ------------------------------------------ |
| AC1-UMA | `window._chipsList` is an array with ≥ 2 entries, all > 0               | Set at HOLE init with `CHIPS_LIST.slice()` |
| AC2-UMA | `window._chipsList` is in strictly ascending order                      | Each entry > previous                      |
| AC3-UMA | `window._minBet === window._chipsList[0]`                               |                                            |
| AC4-UMA | `window._maxBet === window._chipsList[window._chipsList.length - 1]`    |                                            |
| AC5-UMA | All entries in `window._chipsList` are positive integers                | No floats, no zeros                        |
| AC6-UMA | `window._chipsList` deep-equals `[50,100,200,500,1000,2000,5000,10000]` | UMA platform config                        |

## Version Parity

| Version        | Status     | Notes                                                                              |
| -------------- | ---------- | ---------------------------------------------------------------------------------- |
| JS (reference) | ✅ Verified | `chipValues = [25,50,100,250,500,1000]` in buttons.js                              |
| TS             | ✅ Verified | `CHIP_DENOMINATIONS = [25,50,100,250,500,1000]` in GameScene.ts                    |
| UMA            | ✅ Verified | `tests/features/F010-chip-denominations.spec.ts` — AC1–AC6 (UMA) pass (2026-04-15) |

## Test Coverage

Playwright spec: `tests/features/F010-chip-denominations.spec.ts` — AC1–AC6 (UMA).

Run with:

```bash theme={null}
VERSION=uma npx playwright test tests/features/F010-chip-denominations.spec.ts --project=features --workers=1
```

## Related Features

* F011 — Bet Placement (uses active chip denomination to set stake amount)
* F029 — Chip Selector UI (renders the chip buttons from this denomination list)
* F016 — Credits Wallet (balance must cover the selected chip denomination)
