Appearance
playSKPK cage grant + a CHIP_TOKEN-parameterized fund path — the beta play chip goes end-to-end
2026-07-17
The PMF beta runs on playSKPK — a perpetual, no-backing play-money chip, granted directly rather than bought or wrapped. This change ships the off-chain leg that makes it playable end-to-end, and makes the whole Solana cage able to run on playSKPK without disturbing the real-money path.
The grant endpoint. solana-bank gained POST /api/grant — the route the chip-claim-board's game-server engine calls to mint playSKPK to a player's linked wallet. It is service-key only (it mints money; a browser JWT must never reach it — the eligibility policy lives in the claim board, the cage just mints what it's told). It is idempotent on-chain: the game-server-supplied claimId seeds the grant_marker PDA, so a replay reverts "already in use" and the route answers { ok, idempotent: true } having minted nothing — the same no-double-mint floor the payout and rake markers use. The cage keypair is the grant authority; feePayer covers fees + the marker/ATA rent; chips convert to base units at the boundary. One solana_admin.grant span carries idempotent.hit + error.code.
One chip mint per deploy, selected by CHIP_TOKEN. The cage's chip mint used to be hardcoded to the real-money TSKPK everywhere — in the four init builders and in every player/house/recipient chip ATA across deposit, withdraw, settle, betting, gas, custody, and rake. It's now resolved through a single chipMint() helper driven by CHIP_TOKEN (playskpk | tskpk, unset → tskpk, captured once at module load = one mint per deploy). The real-money-intrinsic initMints/wrap and the faucet→wrap bot funding stay on TSKPK. The switch is behavior-preserving: unset, everything resolves to TSKPK and the existing cage-e2e is byte-identical. Set to playskpk, the standup/devnet init scripts and the e2e harness run init_playskpk instead of init_mints — so the SKUSDC mint and faucet config never exist, and the real-money buy/wrap surface is structurally absent, not merely unused.
Proven live. test/e2e/solana-cage/playskpk.test.ts runs the whole fund path on playSKPK against a solana-test-validator: grant → deposit → withdraw (custody round-trip), a settled hand paying the winner from the playSKPK vault, claimId idempotency through the cage, and a refused real-money faucet — 4/4 green. The TSKPK cage-e2e core stays green (the beta path is CHIP_TOKEN-gated).
The coexistence of the two chips is deliberate and temporary: the beta ships on playSKPK now, and the playskpk-full-migration plan (sequenced at the tail of the agent-PMF-beta initiative) retires it once the beta has validated playSKPK as the substrate.