Connect a game without an operator admin key. A Cookchain wallet proves ownership once, the chain issues a game-specific key, and the game then synchronizes resources and NFTs through idempotent events.
The wallet private key stays with the publisher and only signs the registration challenge.
The random register key is hashed before the challenge. It is not the wallet key.
The returned game_secure_key is shown once and belongs only on the game backend.
Every mutation needs a unique event_id. Reusing it makes retries idempotent.
Never call game mutation endpoints directly from an untrusted browser.
Endpoints
POST /game/register/challenge
Start wallet-owned registration
POST /game/register/complete
Verify signature and issue game key
POST /game/assets/bootstrap
Create resource contracts and NFT schemas
POST /game/resource/reconcile
Set an authoritative resource snapshot
POST /game/nft/mint
Mint an NFT with URI and metadata
GET /game/wallet/:wallet
Read synchronized game assets
1. Registration challenge
POST https://rpc.ldbl.net/game/register/challenge
Content-Type: application/json
{
"id": "my-game",
"name": "My Game",
"owner": "CoYOUR_WALLET",
"register_key_hash": "BLAKE3_HEX_OF_RANDOM_REGISTER_KEY"
}
Sign the exact returned message bytes with the owner wallet's secp256k1 key. Cookchain addresses are RIPEMD160(SHA256(uncompressed_public_key)) with the Co prefix.
Use monotonically increasing game revisions in event IDs. Keep a durable outbox in the game database and retry failed events. Never delete local game inventory merely because an RPC read temporarily fails.
Transactions and Explorer
Every resource and NFT mutation produces a cookchain-game-event-v1 transaction envelope containing game_id, action, event_id and payload. These records appear in the Gaming Engine section and normal transaction detail pages.
Production checklist
Use the public RPC, not the validator's private control port.
Restrict the game key to the backend secret store.
Serve immutable WebP icons over HTTPS or IPFS.
Persist an outbox and retry with unchanged event IDs.
Reconcile snapshots periodically and monitor diagnostics.