Skip to Content
3. Examples3.1 Sample Repo

Sample Repo Skeleton (v0.1)

This directory is a copyable sample repo structure that demonstrates:

  • config/: Product Mapping
  • sdk-usage/: Integration snippets (copy into your game)
  • game-demo/: Static web demo (CDN import for quick validation)

Quick start (run demo locally)

  1. Start a static server at the apps/demo/ root so config/ can be fetched by the demo:
cd apps/demo python3 -m http.server 5173
  1. Open:
  • http://localhost:5173/game-demo/
  1. Requires an EIP-1193 provider:
  • Open inside a wallet App WebView (recommended)
  • Or install MetaMask in a desktop browser for local debugging
  1. Locally it uses bridge.mock.js; inside Host Debugger it switches to the host proxy:
  • apps/demo/game-demo/index.html swaps injection based on the hostOrigin param

Configuration entry

  • Product mapping example: apps/demo/config/product-mapping.example.json