[{"u":"/","t":"0x developer documentation","h":"","s":"","x":"0x developer docs Build, publish and sell games on 0x The player swarm delivers your files. Your game gets accounts, lobbies, leaderboards and payments from one API. Publish from the command line or the browser. Publish a game in 5 minutes REST API Getting started What 0x gives a game developer, how a game gets from your folder to players, and where each part is documented. 6 pages 0x CLI Install @0xlimo/cli, the 0x command line for web games (init, dev, publish, deploy-server, submit, issues, source check), and how it finds its registry and credentials. 4 pages JavaScript SDK Partly live The @0xlimo/* npm packages for web games on 0x, with their versions, status and purpose, and how to install them from the 0x registry. 19 pages REST API The 0x platform API at https://api.0x.limo/v1 — base URL, auth, content types, idempotency, versioning and a map of every area. 35 pages Store page What players see on your game's 0x store page, and every field, image, rating and badge you control. 7 pages P2P and the swarm How 0x serves a hosted game's files from the player swarm, with your site's origin as the web seed and the fallback. 6 pages Security How 0x isolates hosted games from each oth"},{"u":"/#popular-pages","t":"0x developer documentation","h":"Popular pages","s":"","x":"0x command reference : every command and flag of @0xlimo/cli . 0x.config.json : build settings, swarm assets and your site's csp declaration. Authentication : access tokens, OAuth sign-in, publish tokens and game-server sessions. Hosting limits : quota, file sizes and sites. Content-Security-Policy : what your hosted pages may load, and how reports reach you. Limits and quotas : every limit in one place."},{"u":"/getting-started/","t":"0x for developers","h":"","s":"Getting started","x":"0x is a game platform that runs in the browser and in a desktop launcher. Games are delivered by the players themselves, through a peer-to-peer swarm. As a developer you can: Host a web game. Upload a built folder and get an immutable, versioned site on its own origin, https://<site>-play.0x.limo/sites/<site>/<n>/ . Files of 16 KiB or more are shared player to player. Small files, pages and the 0x runtime come from the origin. Host its game server. A Node.js server (socket.io, Colyseus, plain WebSocket) runs sandboxed on 0x. Its broadcasts reach players through the 0x broadcast service. List it in the store. Submit a listing (title, art, age rating, play target). A 0x reviewer approves it, and it then appears at 0x.limo and in every launcher's library. Use platform services. Sign-in, leaderboards, stats, cloud saves, lobbies and achievements are available through the JS SDK or the REST API /v1 . Ship an unmodified Steamworks game. The game talks to 0x through a drop-in steamclient ."},{"u":"/getting-started/#how-a-game-reaches-players","t":"0x for developers","h":"How a game reaches players","s":"Getting started","x":"Step What you do What 0x does 1. Build Any static web game: three.js, Babylon.js, Phaser, plain canvas, WebGPU, wasm 2. Publish 0x publish , or drop the folder on api.0x.limo/hosting/ Checks the files, adds the 0x runtime, builds the swarm manifest, serves an immutable version 3. Server (optional) 0x deploy-server , or 0x publish --server Runs your Node.js server in a sandbox at https://play.0x.limo/x1/game/<id>/ 4. List 0x submit --site <id> --site-version <n> , or the form at api.0x.limo/dev/submit Runs automatic pre-checks, then a person reviews the listing 5. Live Answer review issues ( 0x issues ) and publish updates The game appears in the store catalog, the web store and every launcher"},{"u":"/getting-started/#where-to-start","t":"0x for developers","h":"Where to start","s":"Getting started","x":"Publish a web game in 5 minutes : from nothing to a listed game. Accounts and tokens : sign up, 0x login , and tokens for CI. Developer portal : every field of the upload page and the submission form. Hosting limits : quota, file sizes, file types, versions. 0x CLI : install it, then see every command and 0x.config.json . Store page : listing fields, art sizes , age ratings , release types , trending and embeds ."},{"u":"/getting-started/#public-hosts","t":"0x for developers","h":"Public hosts","s":"Getting started","x":"Host What it is 0x.limo The web store and launcher, the SDK registry ( /npm/ ), the installer ( /sdk/install.sh ) api.0x.limo The REST API ( /v1/... ), the upload page ( /hosting/ ), the submission form ( /dev/submit ) <site>-play.0x.limo Your hosted site, on its own origin: /sites/<site>/<n>/ play.0x.limo Hosted game servers ( /x1/game/<id>/ ), the broadcast service, the P2P tracker ( /p2p/ ). Old /sites/ links redirect to the site's own origin (301). p2p.0x.limo The live map of the P2P network docs.0x.limo This documentation Building with an AI coding assistant? Point it at 0x.limo/sdk/llms.txt . It lists the exact commands and APIs, with fixes for common errors."},{"u":"/getting-started/accounts/","t":"Accounts and tokens","h":"","s":"Getting started","x":"There is no separate developer account type. Any 0x account can publish hosted sites, run game servers and submit store listings. Each listing, site and server belongs to the account that created it."},{"u":"/getting-started/accounts/#sign-up","t":"Accounts and tokens","h":"Sign up","s":"Getting started","x":"Create an account in either of these places: the upload page, api.0x.limo/hosting/#signup ( https://0x.limo/signup redirects there); the 0x web store or desktop launcher. Field Rule Username 3–32 characters: a-z , 0-9 , _ , - and . , starting with a letter or digit. Stored in lowercase and unique. Password At least 10 characters. Display name Optional, at most 32 characters. If you leave it out, your username is used. Players see it as the developer name. Sign-up is rate-limited per address: at most 5 new accounts per address per day. Above that the request fails with 429 slow_down . The underlying call is POST /v1/oauth/signup {username, password, persona_name?} . It returns the same token pair as a sign-in."},{"u":"/getting-started/accounts/#x1-login","t":"Accounts and tokens","h":"Sign the CLI in: 0x login","s":"Getting started","x":"0x login 0x login uses the OAuth 2.0 device flow (RFC 8628): The CLI prints a link to https://api.0x.limo/v1/oauth/device?user_code=... and a code. The code expires after 10 minutes. You open the link, sign in and approve the code. The CLI receives an access token and uses it to mint a publish token named 0x cli on <hostname> . The publish token is saved in ~/.config/0x/0x-cli.json (mode 600), with the API URL and your account id. After that, 0x publish , 0x deploy-server , 0x server , 0x submit and 0x issues all use the saved token. 0x whoami shows the account, your usage and your limits. 0x logout deletes the file."},{"u":"/getting-started/accounts/#publish-tokens","t":"Accounts and tokens","h":"Publish tokens","s":"Getting started","x":"A publish token starts with 0xpub_ . It is valid only on the developer surfaces: /v1/hosting/* (publishing), /v1/listings/* (store submissions and review issues), /v1/scriptbus/packages* (0x script packages), and the game-server host. It cannot mint further tokens, because minting needs an access token from a real sign-in. That means a leaked publish token cannot be used to create more. Tokens minted before the rename to 0x start with x1pub_ and keep working."},{"u":"/getting-started/accounts/#dashboard","t":"Accounts and tokens","h":"Developer › Tokens","s":"Getting started","x":"api.0x.limo/dev/tokens manages your publish tokens in the browser. Sign in with your username and password, then: Create a token with a name (where you'll use it: laptop , GitHub Actions ). It is shown once, with a Copy button; 0x keeps only its hash. See every token: name, created, last used, and what it can do (hosted sites, store listings, script packages). Revoked ones stay listed as revoked. Revoke one. Tools using it stop on their next request. You can have at most 25 live tokens. Minting is rate-limited per account (a burst of 10, then one every 6 minutes), for 0x login as well. 0x support can also revoke a token, for example one leaked in a public CI log; you'll see it as revoked here. Call What it does POST /v1/hosting/tokens {name} Mints a token. Needs an access token . The token is shown once. 409 at 25 live tokens, 429 when minting too fast. GET /v1/hosting/tokens Lists your tokens: id, name, created, last used, revoked, scopes DELETE /v1/hosting/tokens/<id> Revokes a token"},{"u":"/getting-started/accounts/#ci","t":"Accounts and tokens","h":"Tokens in CI","s":"Getting started","x":"Set the token in the environment instead of running 0x login : export ZEROX_PUBLISH_TOKEN=0xpub_... # 0x publish, 0x deploy-server, 0x server export ZEROX_TOKEN=$ZEROX_PUBLISH_TOKEN # 0x submit, 0x issues (they read ZEROX_TOKEN) 0x publish To get a token for CI, use any of these: create one at Developer › Tokens ( /dev/tokens ) and copy it; run 0x login once on your own machine and copy token from ~/.config/0x/0x-cli.json ; mint a dedicated token with an access token: curl -s https://api.0x.limo/v1/hosting/tokens \\ -H \"authorization: Bearer $ACCESS_TOKEN\" -H 'content-type: application/json' \\ -d '{\"name\":\"ci\"}' Note The upload page at /hosting/ signs you in with your password and keeps the access token for the browser tab only ( sessionStorage ). It does not show or mint publish tokens: Developer › Tokens does."},{"u":"/getting-started/accounts/#access-tokens","t":"Accounts and tokens","h":"Access tokens","s":"Getting started","x":"Games and the launcher sign players in with OAuth 2.0: an authorization code with PKCE in the browser, the device flow, or the password grant in first-party forms. The result is a short-lived EdDSA access JWT and a rotating refresh token. Access tokens work on every /v1 route that needs a signed-in player. For your game's own sign-in, see the REST API and the JS SDK."},{"u":"/getting-started/accounts/#check-who-you-are","t":"Accounts and tokens","h":"Check who you are","s":"Getting started","x":"0x whoami { \"steamid\": \"…\", \"persona_name\": \"you\", \"via\": \"publish_token\", \"usage\": { \"bytes\": 1468006, \"sites\": 1 }, \"limits\": { \"quota_bytes\": 2147483648, \"max_file_bytes\": 67108864, \"max_files\": 5000, \"max_sites\": 20 } }"},{"u":"/getting-started/developer-portal/","t":"Developer portal","h":"","s":"Getting started","x":"You can do everything the CLI does from two pages in the browser. Both sign you in with your 0x username and password. Page URL For Upload api.0x.limo/hosting/ (also 0x.limo/publish ) Publishing a web game as a hosted site version Submit api.0x.limo/dev/submit Store listings, review issues, site policy reports, payouts In-game items api.0x.limo/dev/items Items you sell inside your game (see Monetization)"},{"u":"/getting-started/developer-portal/#upload","t":"Developer portal","h":"Upload page: /hosting/","s":"Getting started","x":"Sign in, or create an account on the same page. Then fill in: Field What it does Site name The site's id: 3–40 characters, a-z , 0-9 and - , not starting or ending with - . It is globally unique, and its first upload creates the site. Your game is served at https://<site>-play.0x.limo/sites/<site>/<n>/ . Platform host names (such as api , play , www , docs , store ) are reserved. Folder or .zip Drop the built folder, or choose a .zip . index.html must be at the top. Hidden files are skipped. Programs and installers are refused (see hosting limits ). Security policy (optional) What your page loads from other sites. Enter one origin per line for each kind: Connections (fetch, XHR, WebSocket; wss:// allowed), Images, Audio and video, Fonts, Scripts and Frames. Use https:// origins only. A wildcard is allowed only as the whole first label, as in https://*.example.com . Permissions Tick only what your game uses: camera, microphone, location, USB, serial, HID, payment. Each one stays off unless ticked. Fullscreen, gamepad and autoplay are always allowed. eval() / new Function() Allows eval in scripts ( 'unsafe-eval' ). <style> elements made at runtime Allows <style> elements that your sc"},{"u":"/getting-started/developer-portal/#submit","t":"Developer portal","h":"Submission form: /dev/submit","s":"Getting started","x":"This form creates a store listing, or a new version of one you already have. The CLI equivalent is 0x submit . Every field and limit is described in Listing fields . Section Fields Your game Title (≤ 80), ID (3–64, a-z 0-9 - , your store id), Tagline (≤ 200), Description (≤ 4000), Tags (comma-separated, ≤ 16) How players play it Web game (hosted site) , Hosted game server or My own Paper server . Then: Play URL (an https page), or Hosted site id + Site version; for Paper, Server host and port. Release stage Keep the game's current stage (a new game: full release), Full release , or Playable demo of an upcoming release (listed under Upcoming releases). See Release types . Age rating everyone , teen , mature or adults-only : your own declaration, which the reviewer checks. See Age ratings . Art Capsule (PNG, ≤ 1 MiB, required on the first submission). Screenshots (PNG or JPEG, up to 6, ≤ 2 MiB each). See Store art . Trailer (optional) A YouTube or Vimeo link, or an MP4/WebM file of at most 60 MB. If you leave it empty, an update keeps the current trailer. Remove the current trailer deletes it. Details (optional) Controls (keyboard and mouse, gamepad, touch), Works on phones, Single-p"},{"u":"/getting-started/developer-portal/#review","t":"Developer portal","h":"What happens after you submit","s":"Getting started","x":"Automatic pre-checks run immediately and are shown to you and the reviewer: fields : title, description, age rating, play target and capsule are present; link : the play URL answers; hosted : the hosted version is final and built; capsule : a warning if the capsule is tiny or nearly one color. A failed check does not block the submission. It tells you and the reviewer what to fix. A person reviews it. They play the game, look at the art, and check that the tagline, tags and age rating describe it honestly. Reviewers may open review issues. Approved: the listing is in the catalog ( GET /v1/catalog ), on the web store, and in every launcher. Its app id is 4000000 + listing id . Rejected: the reviewer's note says why. Fix it and submit again. Updates: submit a new version. The approved version stays live until the update is approved. A new pending version replaces an older pending one of the same listing. At most 10 of your submissions can wait for review at once. Developer calls for listings: Call What it does POST /v1/listings Submits (the CLI does this) GET /v1/listings , GET /v1/listings/<id> Your listings, with status and review notes POST /v1/listings/<id>/withdraw Withdraws the"},{"u":"/getting-started/publish-in-5-minutes/","t":"Publish a web game in 5 minutes","h":"","s":"Getting started","x":"This guide takes you from nothing to a game in the 0x store. It is the canonical version of the older /sdk/first-game.html and /sdk/multiplayer.html pages. Step You run Time 1. Install curl … | sh 30 s 2. Get a game 0x init or an example zip 30 s 3. Play it locally 0x dev 1 min 4. Publish 0x login , 0x publish 1 min 5. List it in the store 0x submit 2 min"},{"u":"/getting-started/publish-in-5-minutes/#install","t":"Publish a web game in 5 minutes","h":"1. Install the CLI","s":"Getting started","x":"You need Node.js 20 or newer. curl -fsSL https://0x.limo/sdk/install.sh | sh 0x help The installer puts 0x in ~/.0x (no sudo needed), adds ~/.0x/bin to your PATH, and points the @0xlimo npm scope at the 0x registry. If you would rather not install, every command also works through npx: npx --registry https://0x.limo/npm/ 0x … . Installer options are listed on the CLI page ."},{"u":"/getting-started/publish-in-5-minutes/#get-a-game","t":"Publish a web game in 5 minutes","h":"2. Get a game","s":"Getting started","x":"You can start from a template: 0x init # lists the templates 0x init canvas my-game # or: three, phaser, babylon cd my-game Template What you get three three.js 3D: a glTF ship and textured ground. three.js is copied into vendor/ , so it runs offline. phaser Phaser 3 2D: sprites, arcade physics, arrow keys. Phaser loads from a CDN. babylon Babylon.js 3D: a glTF ship, textured ground and an arc-rotate camera. Babylon loads from a CDN. canvas Vanilla 2D canvas: no engine, no build step, a scrolling world. Every template has optional multiplayer: a socket.io server ( server.mjs ) whose broadcasts go through @0xlimo/net ( npm run server ). CDN engines and the site policy New hosted versions are served with an enforced Content-Security-Policy. If you keep Phaser or Babylon on a CDN, declare it in 0x.config.json (both templates load from https://cdn.jsdelivr.net : \"csp\": {\"script\": [\"https://cdn.jsdelivr.net\"]} ), or vendor the engine next to your game. See 0x.config.json csp . Or you can start from a finished example: curl -fsSLO https://0x.limo/sdk/examples/neon-drift.zip # a canvas arcade game, single-player unzip neon-drift.zip -d neon-drift && cd neon-drift File What it does index.h"},{"u":"/getting-started/publish-in-5-minutes/#dev","t":"Publish a web game in 5 minutes","h":"3. Play it locally","s":"Getting started","x":"0x dev # http://localhost:5173 0x dev serves the folder the way 0x will. It runs the 0x runtime, a local tracker and seeder (so the swarm works on your machine too), and a development broadcast service. Edit your code and reload. Add your own loaders as usual: x1/boot.js makes their requests come from the swarm."},{"u":"/getting-started/publish-in-5-minutes/#publish","t":"Publish a web game in 5 minutes","h":"4. Publish","s":"Getting started","x":"First make the game yours. Open 0x.config.json and change \"id\" . It names your hosted site, your hosted server and your store listing, so pick your own instead of a template's or example's id. 0x login # opens a sign-in page: approve the code 0x publish 0x publish: 7 files, 1.4 MiB from /home/you/neon-drift 0x publish: created site my-neon-drift 0x publish: version 1: uploading 7 files, 1.4 MiB (0 already on the service) 0x publish: finalizing (content check, 0x runtime, swarm manifest) 0x publish: 3 files (1.2 MiB) in the swarm 0x publish: security policy enforced; declared nothing (\"csp\" in 0x.config.json); 0 inline scripts and 0 <style> elements allowed by hash 0x publish: play at https://my-neon-drift-play.0x.limo/sites/my-neon-drift/1/ Anyone can open that link right away. Each 0x publish makes a new immutable version ( /2/ , /3/ , …), and old links keep working. If a publish is interrupted, running it again resumes and uploads only what is missing. 0x publish prints a JSON summary on stdout ( url , site , version , manifest_sha256 , and universe , the launcher catalog entry)."},{"u":"/getting-started/publish-in-5-minutes/#submit","t":"Publish a web game in 5 minutes","h":"5. List it in the store","s":"Getting started","x":"The listing comes from 0x.config.json : { \"id\": \"my-neon-drift\", \"name\": \"Neon Drift\", \"tagline\": \"Catch stars, dodge meteors, chase your best score.\", \"description\": \"A tiny neon arcade game. …\", \"tags\": [\"Arcade\", \"Casual\", \"Singleplayer\"], \"listing\": { \"age_rating\": \"everyone\", \"play\": { \"type\": \"web\" }, \"capsule\": \"art/capsule.png\", \"screenshots\": [\"art/shot-1.png\", \"art/shot-2.png\", \"art/shot-3.png\"] } } Submit the version you just published, using the number 0x publish printed: 0x submit --site my-neon-drift --site-version 1 0x submit: my-neon-drift v1 is waiting for review (listing 19) ok fields: title, description, age rating, play target and capsule art present ok link: HTTP 200 ok hosted: hosted version built (7 files, swarm manifest built) 0x submit status # every listing of yours: pending, approved or rejected, with the reviewer's note 0x issues # anything a reviewer raised What review means and how updates work: Developer portal, after you submit . Field rules: Listing fields ."},{"u":"/getting-started/publish-in-5-minutes/#web-path","t":"Publish a web game in 5 minutes","h":"The web path (no install)","s":"Getting started","x":"Get a starter, or use your own game. Each starter zip is a complete static site with the 0x runtime already in it: curl -fsSLO https://0x.limo/sdk/starters/three.zip # or phaser.zip, babylon.zip, canvas.zip unzip three.zip -d my-game For your own game, unzip runtime.zip next to your index.html (it adds x1-sw.js and x1/ ). Then change one line: <!-- before --> <script type=\"module\" src=\"./main.js\"></script> <!-- after --> <script type=\"module\" src=\"./x1/boot.js\" data-entry=\"./main.js\"></script> Hosted publishing adds x1/ and x1-sw.js to every version anyway (and refuses uploads of them), so for 0x hosting the one-line change is all you need. Host it. Open api.0x.limo/hosting/ , sign in, enter a site name and drop the folder or .zip . The page prints the play URL. For self-hosting on any HTTPS static host, see 0x publish --to . List it. Use the form at api.0x.limo/dev/submit with your site id and version."},{"u":"/getting-started/publish-in-5-minutes/#p2p","t":"Publish a web game in 5 minutes","h":"How players share your game","s":"Getting started","x":"When you publish, the service builds a swarm manifest. Every file of 16 KiB or more gets a SHA-256 hash and a torrent. The first players load files from 0x. After that, players' browsers hand files to each other over WebRTC while the game is open, and the 0x seeder fills any gaps. Every piece is checked against the manifest's hash before your game sees it, and anything slow or missing comes from the origin as usual. Your code does nothing for this: x1/boot.js installs a service worker that answers your game's ordinary fetch , Image , Audio and loader requests. Small files, your HTML and the 0x runtime always come from the origin. Players choose in the launcher: On (the default), Private ( ?p2p=relay : connections go through the 0x relay, so other players never see their address) or Off ( ?p2p=0 : everything comes from 0x). Your game gets the same files either way. To see where files came from, run window.x1swarm.stats() in the console. The live network is at p2p.0x.limo . To choose what is shared, put a swarm-assets.json next to index.html : {\"include\": [\"**/*.png\"], \"exclude\": [\"secret/**\"]} ."},{"u":"/getting-started/publish-in-5-minutes/#multiplayer","t":"Publish a web game in 5 minutes","h":"Multiplayer with a hosted server","s":"Getting started","x":"Orb Rush is a 20-player three.js arena: an ordinary socket.io server, hosted by 0x, whose updates reach players through the 0x broadcast service. curl -fsSLO https://0x.limo/sdk/examples/orb-rush.zip unzip orb-rush.zip -d orb-rush && cd orb-rush npm install # @0xlimo/net (0x registry, see .npmrc), socket.io, three.js into vendor/ 0x dev # terminal 1: http://localhost:5173 npm run server # terminal 2: the game server on :3001 Open two tabs, pick two names, and you see each other. Without the server, the page plays solo with the same rules. How it fits together: Broadcasts ( io.emit , and io.to(room).emit for interest-group rooms) leave your server once, however many players there are. The broadcast service signs each one and fans it out through trees of players over WebRTC. Players check every broadcast against the service's signature. Unicast ( socket.emit ) and everything players send stay on socket.io, unchanged. A player who cannot reach the service gets broadcasts over socket.io instead. The server needs two lines: import { Server } from \"socket.io\"; import WebSocket from \"ws\"; import { connectServiceServer, routeSocketIoBroadcasts } from \"@0xlimo/net\"; const io = new Server(ht"},{"u":"/getting-started/publish-in-5-minutes/#server-online","t":"Publish a web game in 5 minutes","h":"Put it online","s":"Getting started","x":"0x login # once 0x publish --server # the page, then the server 0x submit --site <id> --site-version 1 # with \"play\": {\"type\": \"hosted-server\"} in 0x.config.json 0x publish --server publishes the site and then deploys the server, in that order. The server host only accepts an app id that is one of your hosted sites , so publish the site before (or together with) its server. The server is reachable at https://play.0x.limo/x1/game/<id>/ . Server address from a hosted page Hosted pages now run on their own origin ( <id>-play.0x.limo ), but hosted game servers are served from play.0x.limo . The example net.js guesses <page origin>/x1/game/<id> , which does not exist on a site's own origin. Point the page at https://play.0x.limo/x1/game/<id> explicitly, or pass ?server=https://play.0x.limo/x1/game/<id> . 0x publish --server also adds server=<url> to the launcher catalog entry it prints ( universe.web.params ). Then manage the server: 0x server status # running, restarts, CPU and memory 0x server logs # your console.log, plus the host's notes (install, start, restarts) 0x server stop | start What your server gets: Variable Meaning PORT The port to listen on ZEROX_BCAST_SERVER_URL , ZEROX"},{"u":"/getting-started/publish-in-5-minutes/#troubleshooting","t":"Publish a web game in 5 minutes","h":"If something goes wrong","s":"Getting started","x":"Symptom Fix 404 Not Found - GET https://registry.npmjs.org/@0xlimo%2f… The @0xlimo packages are only on the 0x registry: npm config set @0xlimo:registry https://0x.limo/npm/ . The installer does this for you. 0x: command not found Open a new shell, or export PATH=\"$HOME/.0x/bin:$PATH\" . the site name \"…\" belongs to another developer Change \"id\" in 0x.config.json , or use 0x publish --site <name> . not signed in Run 0x login . In CI, set ZEROX_PUBLISH_TOKEN (see tokens in CI ). upload refused with a list of problems Each line names a file: a hidden file, a blocked type, or one larger than 64 MiB. See Hosting limits . capsule: … required Point listing.capsule at a PNG of at most 1 MiB. Pre-check link fails Submit with --site and --site-version (a hosted version), or with --url and a public https address. Multiplayer does nothing locally Run npm install and then npm run server in the game folder, and reload. For a server elsewhere, add ?server=http://host:3001 . meshtorrent not found Reinstall the CLI (it brings @x1/meshtorrent ), or set ZEROX_MESHTORRENT to a built meshtorrent checkout. Assets still come from the origin This is expected on the first visit and for files under 16 KiB. "},{"u":"/getting-started/ai-agents/","t":"Build with an AI agent","h":"","s":"Getting started","x":"The 0x CLI is also an MCP server . Start it with 0x mcp , and an AI coding agent (Claude Code, Cursor or any MCP client) can build, ship and maintain your game on 0x. It uses your own publish token , the one 0x login saves, so the agent can do what you could do with the CLI and nothing more. Coming 0x mcp ships with @0xlimo/cli 0.1.8. The stats scope needs the 0x release that comes with it."},{"u":"/getting-started/ai-agents/#set-it-up","t":"Build with an AI agent","h":"Set it up","s":"Getting started","x":"Sign in once. Add stats to the scopes if you want the agent to read your games' play counts: npx 0x login --scopes hosting,listings,scripts,stats Without --scopes you get the usual token (hosting, listings, scripts). Add the server to your agent, from your game's folder: claude mcp add 0x -- npx 0x mcp Other clients: run the command npx 0x mcp over stdio, in your project folder. In CI, or with a different token, set ZEROX_TOKEN (or ZEROX_PUBLISH_TOKEN ) and ZEROX_API . New games from 0x init include an AGENTS.md (and a CLAUDE.md pointing to it). It tells an agent the game's commands, 0x.config.json and how to add these tools. 0x publish never uploads those two files."},{"u":"/getting-started/ai-agents/#tools","t":"Build with an AI agent","h":"Tools","s":"Getting started","x":"tool what it does changes something public docs_search , docs_read the 0x docs, offline, matching the CLI's version no project_init a starter game (three.js, Phaser, Babylon.js, canvas) no (local files) config_check 0x.config.json as the service checks it: id, dist, csp origins and permissions, the listing and its art no dev_start , dev_stop 0x dev : the local site with the swarm and the multiplayer dev service; returns the URL no publish a new immutable version on 0x hosting, with its play URL; dry_run lists the files first yes ( confirm: true ) versions_list your sites and their versions no csp_reports what your sites' Content-Security-Policy blocked no listing_submit send the store listing for review; dry_run shows it first yes ( confirm: true ) listing_status where your submissions stand no review_issues the reviewers' issues, or one thread no review_reply answer an issue yes ( confirm: true ) script_validate pack a 0x script package without uploading no script_publish sign and upload it for review yes ( confirm: true ) stats_own your games, or one game's play counts (plays and time per day, mode, source, link ref, country) no (needs the stats scope) The four tools that change "},{"u":"/getting-started/ai-agents/#what-the-agent-cant-do","t":"Build with an AI agent","h":"What the agent can't do","s":"Getting started","x":"Anything outside your project folder: dir arguments are relative to where 0x mcp runs. Anything of another developer: their sites, listings, issues and stats answer 404 or 403. Sign in as you, change your account, mint more tokens, move money or reach 0x's admin tools. A publish token can't do any of that. Read players: stats_own is anonymous counts, never per player."},{"u":"/getting-started/ai-agents/#publish-token-scopes","t":"Build with an AI agent","h":"Publish token scopes","s":"Getting started","x":"A publish token reaches only the route families in its scopes: scope reaches hosting /v1/hosting (sites, versions, CSP reports; not minting tokens) listings /v1/listings (submissions, review issues and replies, art uploads) scripts /v1/scriptbus/packages (0x script packages) stats /v1/dev/games , /v1/dev/stats (your own games' play counts), opt-in A token minted without scopes, including every token made before scopes existed, keeps exactly hosting , listings and scripts . A call outside a token's scopes answers 403 with needs_scope . See Accounts for tokens and the REST reference ."},{"u":"/getting-started/hosting-limits/","t":"Hosting limits","h":"","s":"Getting started","x":"The live limits are public. Use them as the source of truth in scripts: curl -s https://api.0x.limo/v1/hosting/config { \"limits\": { \"quota_bytes\": 2147483648, \"max_file_bytes\": 67108864, \"max_files\": 5000, \"max_sites\": 20, \"blocked_extensions\": [\"exe\", \"dll\", \"com\", \"scr\", \"msi\", \"msix\", \"bat\", \"cmd\", \"ps1\", \"vbs\", \"lnk\", \"reg\", \"so\", \"dylib\", \"app\", \"dmg\", \"pkg\", \"deb\", \"rpm\", \"appimage\", \"apk\", \"ipa\", \"jar\", \"sh\"] }, \"sites_url\": \"https://{site}-play.0x.limo/sites/\", \"tracker\": \"wss://play.0x.limo/p2p/tracker\" } 0x whoami (or GET /v1/hosting/me ) shows your own usage against these limits."},{"u":"/getting-started/hosting-limits/#sites","t":"Hosting limits","h":"Hosted sites","s":"Getting started","x":"Limit Value on 0x.limo When you exceed it Storage quota per developer 2048 MiB 413 over your hosting quota (… MiB used of 2048 MiB, this version … MiB) Largest file 64 MiB 422 upload refused : <path>: larger than 64 MiB Files per version 5000 413 a version has 1 to 5000 files Sites per developer 20 403 at most 20 sites per developer Upload request body 80 MB (front limit) One file per PUT /v1/hosting/blobs/<sha256> , so the 64 MiB file limit applies first How the quota counts: it is the sum of the bytes of every version of every site you own, pending versions included. Files are stored once by hash, but each version counts in full. Versions cannot be deleted yet, so frequent large publishes use up the quota. Keep big assets in a version only when they change, or reuse a site, since the quota is per developer."},{"u":"/getting-started/hosting-limits/#site-names","t":"Hosting limits","h":"Site names","s":"Getting started","x":"3–40 characters: a-z , 0-9 and - , not starting or ending with - . Names are globally unique: the first to create one owns it ( 409 that site name is taken ). Reserved: platform host names can't be taken, either as the name or as the first label of the site's host. api , play , p2p , www , docs , sdk , npm , store , embed , sites , earth , war , lossantos , admin and others are reserved ( 409 that site name is reserved ). The name becomes the origin https://<site>-play.0x.limo . Every site has its own origin, so one game can't read another game's storage, cookies or frames."},{"u":"/getting-started/hosting-limits/#files","t":"Hosting limits","h":"Files","s":"Getting started","x":"A version must have an index.html at its top. The service refuses: paths that are not plain relative paths ( .. , absolute paths, // ); hidden files and directories (any segment starting with . ); paths 0x writes itself: x1.json , x1-sw.js , x1/… , swarm/… , and the reserved 0x.json , 0x-sw.js , 0x/… ; the same path listed twice."},{"u":"/getting-started/hosting-limits/#file-types","t":"Hosting limits","h":"Blocked file types","s":"Getting started","x":"Hosted sites are for games, not for distributing software. Files with these extensions are refused: .exe .dll .com .scr .msi .msix .bat .cmd .ps1 .vbs .lnk .reg .so .dylib .app .dmg .pkg .deb .rpm .appimage .apk .ipa .jar .sh . Any other file type is published as-is, including every game data and asset format. The CLI never uploads the following files, even if they are in your build directory: node_modules/ , .x1/ , .git/ , swarm/ , package.json , package-lock.json , 0x.config.json , server.mjs and .gitignore at the top level, and x1-iap.key at any depth."},{"u":"/getting-started/hosting-limits/#versions","t":"Hosting limits","h":"Versions and retention","s":"Getting started","x":"Each publish creates version n+1 . A version is pending until finalized, then final and immutable, served at /sites/<site>/<n>/ for good. Re-publishing exactly the same file list resumes the pending version instead of creating a new one. Finalized versions are kept. There is no delete call for versions or sites yet. Pages ( / and *.html ) are served Cache-Control: no-cache , so a policy change reaches browsers. Every other file is public, max-age=31536000, immutable . Paid games' sites are built origin-only : no swarm manifest, and nothing is seeded. Only owners can load them."},{"u":"/getting-started/hosting-limits/#listings","t":"Hosting limits","h":"Store listings","s":"Getting started","x":"Limit Value Submissions waiting for review at once 10 per developer ( 429 ) Capsule PNG, ≤ 1 MiB Screenshots ≤ 6, PNG or JPEG, ≤ 2 MiB each Trailer file MP4 or WebM, ≤ 60 MB All fields: Listing fields ."},{"u":"/getting-started/hosting-limits/#servers","t":"Hosting limits","h":"Hosted game servers","s":"Getting started","x":"A server deployed with 0x deploy-server runs in a sandbox with these defaults on 0x.limo: Limit Value CPU 1 CPU Memory 512 MiB Processes 128 Writable files /tmp only, 64 MiB (counted in memory). Everything else is read-only. Logs kept 5 MiB Open files 4096 Bundle upload ≤ 50 MB (compressed). Installed: ≤ 400 MB. Running servers 2 per developer ( 429 limit: 2 running servers per developer ) Network Loopback only. The broadcast service and the platform API are forwarded in; nothing else is reachable. App id ^[a-z0-9][a-z0-9-]{1,40}$ , and it must be one of your hosted sites Dependencies install with npm ci --ignore-scripts , or npm install without a lockfile. @0xlimo/* and any file: , link: or workspace: dependencies are packed into the bundle for you. A crash restarts the server, and socket.io clients reconnect by themselves."},{"u":"/getting-started/hosting-limits/#rate-limits","t":"Hosting limits","h":"Rate limits","s":"Getting started","x":"API calls are rate-limited per account and per address. A 429 carries Retry-After . 0x publish retries uploads that get 429 or 5xx , up to 5 times with backoff."},{"u":"/cli/","t":"0x CLI","h":"","s":"0x CLI","x":"0x is the command line for building, running, publishing and listing web games on 0x. The current version is @0xlimo/cli 0.1.4 . Its source is in the x1-sdk repository, packages/cli . The command used to be called x1 (package @x1/cli ). x1 still works as an alias of 0x , so existing scripts and CI keep running unchanged."},{"u":"/cli/#install","t":"0x CLI","h":"Install","s":"0x CLI","x":"You need Node.js 20 or newer with npm. curl -fsSL https://0x.limo/sdk/install.sh | sh The installer: installs @0xlimo/cli into ~/.0x as a local npm install (no npm -g , no sudo) and links ~/.0x/bin/0x ; runs npm config set @0xlimo:registry https://0x.limo/npm/ and the same for @x1:registry , so npm install in your games finds @0xlimo/* and the packages that keep the old scope ( @x1/script , @x1/meshtorrent ); adds ~/.0x/bin to PATH in ~/.bashrc , ~/.zshrc and ~/.profile (whichever exist). Installer variable Default Meaning ZEROX_HOME ~/.0x Install directory ZEROX_REGISTRY https://0x.limo/npm/ The npm registry for @0xlimo/* ZEROX_VERSION latest The @0xlimo/cli version to install ZEROX_NO_MODIFY_PATH=1 Leave shell rc files alone ZEROX_NO_NPMRC=1 Don't add @0xlimo:registry to ~/.npmrc An existing ~/.x1 install (from before the rename to 0x) is updated in place instead. To update, run the installer again. To uninstall, rm -rf ~/.0x and remove the PATH line from your shell rc file. Without installing: npx --registry https://0x.limo/npm/ 0x init"},{"u":"/cli/#registry","t":"0x CLI","h":"The 0x registry","s":"0x CLI","x":"@0xlimo/* packages are published only on the 0x registry at https://0x.limo/npm/ , not on npmjs.org. Any other package name requested there is passed through to npmjs.org, read-only. The registry currently serves: Package Version @0xlimo/cli 0.1.4 @0xlimo/net 0.1.2 @0xlimo/platform 0.1.1 @0xlimo/swarm-sw 0.1.1 @x1/meshtorrent 0.2.0 @0xlimo/iap 0.1.0 @0xlimo/byo-assets 0.1.1 @0xlimo/host 0.1.1 curl -s https://0x.limo/npm/@0xlimo/cli 0x init writes an .npmrc with @0xlimo:registry=<registry> and @x1:registry=<registry> into each new game, unless the registry is npmjs.org."},{"u":"/cli/#commands","t":"0x CLI","h":"Commands at a glance","s":"0x CLI","x":"Command What it does 0x init / 0x new Creates a starter game from a template 0x dev Serves the game locally with a swarm and a dev broadcast service 0x login / logout / whoami Signs in to 0x hosting 0x publish Uploads to 0x hosting and prints the play URL, or self-hosts with --to 0x deploy-server Hosts the game's Node.js server on 0x 0x server Shows the hosted server's status and logs, and stops or starts it 0x submit Submits the store listing for review, and shows its status 0x issues Shows review issues and lets you answer them 0x source check Runs the reviewers' source scan and reproducible build locally 0x assets Bring-your-own-assets conversion ( @0xlimo/byo-assets ) 0x paper Bring your own Minecraft server (not available on 0x.limo yet) 0x , 0x help and 0x --help print the usage and exit with 0. An unknown command prints the usage and exits with 2. See Environment and exit codes ."},{"u":"/cli/#credentials","t":"0x CLI","h":"Credentials","s":"0x CLI","x":"0x login saves {api, token, steamid} to $XDG_CONFIG_HOME/0x/0x-cli.json (default ~/.config/0x/0x-cli.json , mode 600). A login saved before the rename to 0x, in ~/.config/0x1/x1-cli.json , is still read. Every command that talks to 0x reads it. Environment variables override it, which is how CI works (see Accounts, tokens in CI )."},{"u":"/cli/#project","t":"0x CLI","h":"Project file","s":"0x CLI","x":"Each game folder has a 0x.config.json : id, name, store listing, server, and site security policy. See 0x.config.json ."},{"u":"/cli/commands/","t":"Command reference","h":"","s":"0x CLI","x":"These are all the commands in @0xlimo/cli 0.1.4 ( packages/cli/bin/x1.mjs ). [dir] defaults to the current directory. Unless a command says otherwise, it prints its result as JSON on stdout and its progress on stderr , so 0x publish > out.json captures just the result. Errors print x1: <message> on stderr and exit with 1 ( exit codes )."},{"u":"/cli/commands/#init","t":"Command reference","h":"0x init / 0x new","s":"0x CLI","x":"0x init [<template> [dir]] [--list] 0x new [dir] --template <template> Creates a starter game. With no template, or with --list , it lists the templates. Argument Meaning <template> three , phaser , babylon or canvas . The aliases three-js , threejs , babylonjs , babylon-js , vanilla and vanilla-canvas also work. dir Target directory. Default: my-<template>-game . It must be empty or not exist. --template <t> ( 0x new ) The template, when the first argument is the directory It writes .gitignore ( node_modules/ , .x1/ ), and .npmrc with @0xlimo:registry=… when the CLI came from a registry other than npmjs.org. For three , it copies three.js ( three.module.min.js , GLTFLoader , BufferGeometryUtils , LICENSE) into vendor/ . Errors: unknown template \"…\" , <dir> is not empty ."},{"u":"/cli/commands/#dev","t":"Command reference","h":"0x dev","s":"0x CLI","x":"0x dev [dir] [--port 5173] [--no-seed] [--verbose] Serves the game locally the way 0x serves it, at http://localhost:<port>/ . Flag Default Meaning --port <n> 5173 Port to listen on (127.0.0.1) --no-seed seeding on Don't start the local seeder --verbose off Print the seeder's log It runs: a static server with single-range support, serving the 0x runtime files ( x1-sw.js , x1/… ) and an x1.json ; a meshtorrent tracker behind /p2p/ ; a seeder of every file in the swarm manifest; a development broadcast service at /x1/bcast/server and /x1/bcast/player . The site is staged in <dir>/.x1/site as links to your files plus swarm/ . Your folder gets nothing new except .x1/ . If 0x.config.json has \"dist\" , that subdirectory is served. The swarm policy is swarm-assets.json , or the default . Stop it with Ctrl-C. Needs @x1/meshtorrent (installed with the CLI), or ZEROX_MESHTORRENT set to a built checkout."},{"u":"/cli/commands/#login","t":"Command reference","h":"0x login, logout, whoami","s":"0x CLI","x":"0x login [--api <url>] [--token <0xpub_...>] 0x logout 0x whoami Flag Meaning --api <url> The hosting API. Default: https://api.0x.limo , or the saved one. --token <0xpub_…> Checks and saves an existing publish token instead of the device sign-in Without --token , 0x login runs the device sign-in: it prints a URL and a code, waits for your approval, and mints a publish token. See Accounts . 0x logout deletes the saved credentials. 0x whoami prints GET /v1/hosting/me : your account, usage and limits. It fails with not signed in (0x login) when there is no token."},{"u":"/cli/commands/#publish","t":"Command reference","h":"0x publish","s":"0x CLI","x":"0x publish [dir] [--site <name>] [--api <url>] [--server] Uploads the build to 0x hosting as a new immutable version and prints where it plays. This is resumable: run it again after an interruption and it uploads only what is missing. Flag Meaning --site <name> The site. Default: \"site\" , else \"id\" in 0x.config.json . --api <url> The hosting API. Default: ZEROX_API , else the saved login, else https://api.0x.limo . --server Also deploys the game's server after the site, the same as 0x deploy-server . It is also on when 0x.config.json has \"server\": {\"deploy\": true} . Takes the deploy-server flags. Steps: Read 0x.config.json . Upload from \"dist\" (default . ). List the files (skipping what is never uploaded ) and hash each one. If the site doesn't exist, create it ( POST /v1/hosting/sites ). If it belongs to someone else, stop. Open a version ( POST /v1/hosting/sites/<site>/versions {files, csp} ). The service answers with the hashes it lacks. Upload them, 6 at a time ( PUT /v1/hosting/blobs/<sha256> ). Uploads that get 429 or 5xx are retried up to 5 times. Finalize ( POST …/versions/<n>/finalize ): content check, 0x runtime, swarm manifest, site policy. Progress lines include version"},{"u":"/cli/commands/#publish-to","t":"Command reference","h":"0x publish --to (self-hosting)","s":"0x CLI","x":"0x publish [dir] --to <dir | user@host:path> [--origin <https url>] [--tracker <wss url>] [--policy <file>] [--server] [--mount <url prefix>=<dir>]... [--mount-exclude <glob>]... [--mount-cache <dir>] Builds the site locally and copies it to a directory, or to user@host:path with rsync -a --delete . Nothing is uploaded to 0x. The build stages a copy, adds the 0x runtime and x1.json , builds and verifies the swarm manifest ( swarm/manifest.json , .torrent files, the content-addressed store), and copies the result. stdout is the universe JSON for the launcher. Flag Meaning --to <target> A local directory (replaced) or user@host:path --origin <url> The public https URL the site will be served at (goes into universe ). Default: file://<dir>/ for a local target, https://example.invalid/ for a remote one. --tracker <wss url> The tracker the site announces to. Default: the site's own /p2p/tracker . --policy <file> The swarm policy file. Default: swarm-assets.json in the game, else the default policy . --mount <prefix>=<dir> Repeatable. A directory your server serves at that URL prefix goes on the swarm in 1 MiB pieces, hashed in place and never copied into the site. See Mounts . --mount-e"},{"u":"/cli/commands/#deploy-server","t":"Command reference","h":"0x deploy-server","s":"0x CLI","x":"0x deploy-server [dir] [--app <id>] [--entry server.mjs] [--host <url>] [--token <t>] [--ca <pem>] Bundles the game's Node.js server and runs it on 0x. Players reach it at https://play.0x.limo/x1/game/<app>/ . With socket.io, the path is /x1/game/<app>/socket.io . Flag Default Meaning --app <id> server.app , else id in 0x.config.json The app id. On 0x.limo it must be one of your hosted sites. --entry <file> server.entry , else server.mjs The file the host starts --host <url> ZEROX_HOST_URL , else https://api.0x.limo/x1/host The game-server host --token <t> ZEROX_TOKEN , ZEROX_PUBLISH_TOKEN , else the saved login Your developer token --ca <pem> ZEROX_CA A private CA, for staging hosts The bundle is the game directory without node_modules , .x1 , .git , swarm and .x1-server.tgz . @0xlimo/* and local ( file: , link: , workspace: ) dependencies are packed into .x1-vendor/ for you, because the host installs from the npm registry only. Run npm install first. The upload is PUT /v1/servers/<app>?entry=… (gzip tar). stdout: {release, state, ready, url, …} . If the server isn't answering HTTP yet, the progress line says so: check 0x server logs . Errors: no app id: --app <id> or \"id\" in 0x.c"},{"u":"/cli/commands/#server","t":"Command reference","h":"0x server","s":"0x CLI","x":"0x server <status|logs|stop|start|list> [app] [--tail 200] [--host <url>] [--token <t>] [--ca <pem>] Subcommand Call Prints status [app] GET /v1/servers/<app> (no app and no config: GET /v1/servers ) State, restarts, CPU and memory logs [app] [--tail N] GET /v1/servers/<app>/logs?tail=N (default 200) Your console output plus the host's notes (install, start, restarts) stop [app] , start [app] POST /v1/servers/<app>/stop , /start The new state list GET /v1/servers All your servers app defaults to server.app , else id in 0x.config.json in the current directory."},{"u":"/cli/commands/#submit","t":"Command reference","h":"0x submit","s":"0x CLI","x":"0x submit [dir] [--url <https url>] [--type web|hosted-server|paper] [--site <id> --site-version <n>] [--id <listing id>] [--capsule <png>] [--age <rating>] [--backend <url>] [--token <t>] [--source <spec>] [--build-file 0x.build.json] [--source-access public|deploy-key|token] [--source-token-file <f>] 0x submit status [id] 0x submit source-status [id] 0x submit deploy-key <id> Submits the store listing for review ( POST /v1/listings ). The body comes from 0x.config.json ( id , name , tagline , description , tags , and the listing section) plus the art files it names, base64-encoded. It prints the automatic pre-check results to stderr. stdout is {listing, id, version, status, precheck_ok, source} . Flag Meaning --site <id> --site-version <n> Lists a hosted site version. Its origin becomes the play URL (this drops listing.play.url ). --url <https url> The page players open, for a game hosted elsewhere --type <t> web (default), hosted-server or paper ( listing.play.type ) --id <id> The listing id. Default: id in 0x.config.json . --capsule <file> The capsule PNG ( listing.capsule ). It must end in .png . --age <rating> everyone , teen , mature or adults-only ( listing.age_rating ) --r"},{"u":"/cli/commands/#issues","t":"Command reference","h":"0x issues","s":"0x CLI","x":"0x issues [listing] [--json] 0x issues show <id> [--json] 0x issues reply <id> \"<message>\" [--fixed-in <version>] [--json] Shows the review issues the store's reviewers raised about your listings, and lets you answer them. Form Call What it does 0x issues [listing] GET /v1/listings/issues or /v1/listings/<listing>/issues Your issues, active first: counts of open, waiting for you, and new show <id> GET /v1/listings/issues/<id> One issue with its thread (marks it read) reply <id> \"<msg>\" POST /v1/listings/issues/<id>/reply Answers it. --fixed-in <n> names the listing version that fixes it. States: open (waiting for you), reopened , replied , resolved , wontfix . --json prints the raw API response. --backend and --token work as for 0x submit ."},{"u":"/cli/commands/#script","t":"Command reference","h":"0x script","s":"0x CLI","x":"0x script publish [dir] [--check] [--notes \"...\"] [--no-sign] [--json] 0x script status [id[@version]] [--json] 0x script withdraw <id>@<version> 0x script capabilities [--json] Publishes 0x scripts into worlds (see Publishing scripts to worlds ). It needs 0x CLI 0.1.7 or newer (it brings @x1/script 0.2). npx x1-script pack|submit|status|withdraw does the same from a project's own @x1/script . 0x script --help prints the usage. Form Call What it does publish [dir] POST /v1/scriptbus/packages Builds x1.json 's scripts, bundles them with their sources into dist/package.json , signs the bundle with ~/.config/0x1/script-signing.key and uploads it for review status GET /v1/scriptbus/packages Your packages: their versions and statuses, and their installs status <id>@<version> GET /v1/scriptbus/packages/<id>/<version> One version's review report, its decisions and its open review issues withdraw <id>@<version> POST /v1/scriptbus/packages/<id>/<version>/withdraw Withdraws a version that is not decided yet capabilities GET /v1/scriptbus/packages/capabilities What you can ask for, budget maxima, and the worlds with their regions Errors: x1.json has N problem(s) (each one listed), versions ar"},{"u":"/cli/commands/#source-check","t":"Command reference","h":"0x source check","s":"0x CLI","x":"0x source check [dir] [--against <dir> | --against-url <origin> | --site <id> --site-version <n>] [--build-file <f>] [--no-build] [--no-scan] [--source-date-epoch <s>] [--backend <url>] [--token <t>] Runs locally what the reviewers run on your source, before you submit. Scan. Sends the tree (tar, at most 50 MB, .git excluded) to POST /v1/sourcecheck/scan , a dry run that stores nothing. Prints the findings and the worst severity. Skip it with --no-scan . Build. If 0x.build.json exists, runs the recipe in Docker with the checker's sandbox: no network, read-only root, uid 65534, all capabilities dropped, 8 GiB memory, 4 CPUs, a 30-minute timeout. SOURCE_DATE_EPOCH is the last commit time. Override it with --source-date-epoch . Skip the build with --no-build . Compare. Compares the built files with a directory ( --against ), a live origin ( --against-url ), or a hosted version ( --site / --site-version ). stdout: {scan: {total, worst}, build, compare: {verdict, matched, total, problems}} . The command exits with 3 when the comparison isn't a match . Needs Docker for the build step."},{"u":"/cli/commands/#assets","t":"Command reference","h":"0x assets","s":"0x CLI","x":"0x assets import --game gta5 [--path <install>] [--recipes <file|dir>] [--cache <dir>] [--force] [--json] 0x assets fallback [--recipes <file|dir>] --out <dir> 0x assets locate --game gta5 [--path <dir>] Bring-your-own assets ( @0xlimo/byo-assets ): pinned, deterministic recipes that convert files from your own installed copy of a game into web formats. Subcommand What it does import Runs the recipes against your install into the cache ( $ZEROX_BYO_CACHE , default ~/.cache/0x/byo ). Exits with 2 if any recipe ends mismatch or error . fallback Writes the 0x-owned stand-in assets of the recipes to --out locate Prints the install it finds (Steam libraries are detected automatically) 0x assets with no subcommand prints its usage. An unknown subcommand exits with 64."},{"u":"/cli/commands/#paper","t":"Command reference","h":"0x paper","s":"0x CLI","x":"Not available on 0x.limo 0x paper (bring your own Minecraft server) is not on production yet. api.0x.limo/byo/* answers 503 . The command is documented for completeness. 0x paper add <host:port> [--name N] [--description D] [--wait] 0x paper verify <id> 0x paper status [id] 0x paper channels <id> <file|-> 0x paper remove <id> # options: --service <url> (default $ZEROX_BYO_URL, else https://api.0x.limo/byo/) --insecure (accept a private CA) add registers the server and prints a token to put in its MOTD. --wait re-checks every 10 s for up to 10 minutes. verify checks the MOTD and provisions an offload gateway. channels sets the gateway's fan-out channel declarations. remove stops the gateway and withdraws the listing. Management keys are kept in ~/.config/0x/paper.json (mode 600; the directory is ZEROX_CONFIG_DIR )."},{"u":"/cli/config/","t":"0x.config.json","h":"","s":"0x CLI","x":"0x.config.json sits at the top of your game folder. The CLI reads it, and it is never uploaded to your site. Every key is optional, but id is what most commands fall back on. Before the rename to 0x the file was called x1.config.json . A folder that has only x1.config.json still works; when both exist, 0x.config.json wins."},{"u":"/cli/config/#example","t":"0x.config.json","h":"Example","s":"0x CLI","x":"{ \"id\": \"orb-rush\", \"name\": \"Orb Rush\", \"tagline\": \"A 20-player scramble for glowing orbs in a floating arena.\", \"description\": \"Run, jump and ride launch pads around a floating sky arena…\", \"tags\": [\"Multiplayer\", \"Action\", \"Casual\", \"3D\"], \"dist\": \".\", \"server\": { \"entry\": \"server.mjs\", \"deploy\": true }, \"csp\": { \"connect\": [\"https://api.example.com\", \"wss://realtime.example.com\"], \"img\": [\"https://images.example.com\"] }, \"listing\": { \"age_rating\": { \"rating\": \"teen\", \"descriptors\": [\"violence\"] }, \"play\": { \"type\": \"hosted-server\" }, \"capsule\": \"art/capsule.png\", \"screenshots\": [\"art/shot-1.png\", \"art/shot-2.png\"], \"trailer\": { \"url\": \"https://youtu.be/XXXXXXXXXXX\" }, \"release\": \"full\", \"release_notes\": \"Two new arenas.\", \"details\": { \"controls\": [\"keyboard-mouse\", \"touch\"], \"phones\": true, \"players\": { \"single\": true, \"multi\": true, \"max\": 20 }, \"languages\": [\"English\"] } } }"},{"u":"/cli/config/#keys","t":"0x.config.json","h":"Top-level keys","s":"0x CLI","x":"Key Type Used by Meaning id string publish, deploy-server, server, submit Your game's id. It is the default site name (3–40 a-z 0-9 - ), app id for the hosted server, and store listing id (3–64 a-z 0-9 - ). Use one id for all three. name string publish, submit The display name: the site name on creation, and the listing title (1–80 characters) tagline string submit, universe One line, at most 200 characters description string submit, universe 1–4000 characters. listing.description overrides it for the store. tags string[] submit, universe At most 16, each 1–32 characters dist string dev, publish The directory to serve and upload, relative to the folder. Default . . Point it at your build output, such as \"dist\" . site string publish The hosting site name, if different from id origin string submit For self-hosted games: the play URL used when no --url , --site or listing.play.url is given server object publish, deploy-server, server See server csp object publish The site security policy declaration. See csp . mounts object[] publish --to External data trees for the swarm: [{prefix, dir, exclude?, minBytes?}] . A relative dir is resolved against the game directory. They are added to a"},{"u":"/cli/config/#server","t":"0x.config.json","h":"server","s":"0x CLI","x":"Key Default Meaning server.app id App id of the hosted server ( /x1/game/<app>/ ) server.entry server.mjs The file the host starts server.deploy false true : 0x publish also deploys the server (like --server )"},{"u":"/cli/config/#csp","t":"0x.config.json","h":"csp","s":"0x CLI","x":"This declares what your page needs from outside its own origin . New hosted versions are served with an enforced Content-Security-Policy and a Permissions-Policy. Anything you don't declare is blocked. The declaration is sent with the version ( POST /v1/hosting/sites/<site>/versions → csp ), and the service validates it. Invalid entries refuse the upload with one problem per line. The upload page's \"security policy\" section is the same declaration. Key Type Extends Rules connect origin[] connect-src (fetch, XHR, WebSocket, EventSource) https:// or wss:// origins img origin[] img-src https:// origins media origin[] media-src (audio, video) https:// origins font origin[] font-src https:// origins script origin[] script-src https:// origins frame origin[] frame-src https:// origins permissions string[] Permissions-Policy Any of camera , microphone , geolocation , usb , serial , hid , payment eval boolean script-src 'unsafe-eval' Allows eval() and new Function() inline_styles boolean style-src Allows <style> elements created at runtime Origin rules: an origin only: https://host[:port] , with no path, query or user part (a trailing / is dropped); a host name with a domain, not an IP add"},{"u":"/cli/config/#listing","t":"0x.config.json","h":"listing","s":"0x CLI","x":"0x submit builds the store submission from these keys. Rules for each field: Listing fields . Key Type Meaning listing.age_rating string or {rating, descriptors} \"everyone\" , \"teen\" , \"mature\" , \"adults-only\" . See Age ratings . listing.play object {type: \"web\" | \"hosted-server\" | \"paper\", url?, server?: {host, port}, site?, version?} . --site / --site-version / --url / --type override it. listing.description string The store description, if different from description listing.capsule path Capsule PNG, at most 1 MiB. Required on the first submission and kept after that if left out. listing.screenshots path[] Up to 6 PNG/JPEG files, at most 2 MiB each listing.trailer {url} or {upload} or false A YouTube/Vimeo link, an uploaded file name, or false to remove the trailer listing.release string \"demo\" (a playable demo of an upcoming release) or \"full\" . Left out, the game keeps its stage. --release overrides it. listing.release_notes string \"What's new\" for this version, at most 4000 characters listing.details object controls , phones , players , languages , download_bytes listing.source object The source declaration, as --source builds it: {kind: \"git\", url, commit, access} or {kind: \"i"},{"u":"/cli/config/#swarm-assets","t":"0x.config.json","h":"swarm-assets.json","s":"0x CLI","x":"swarm-assets.json is a separate file next to index.html , so it is uploaded. It chooses which files go into the player swarm. Paths match as globs relative to the site. { \"include\": [\"**/*.png\", \"models/**\"], \"exclude\": [\"secret/**\"] } When the file is absent, the default policy puts every file of 16 KiB or more in the swarm, except: { \"include\": [\"**\"], \"exclude\": [\"**/*.html\", \"**/*.htm\", \"x1/**\", \"x1-sw.js\", \"x1.json\", \"swarm-assets.json\", \"node_modules/**\", \".x1/**\", \"server.mjs\", \"package.json\", \"package-lock.json\", \"0x.config.json\"] } Pages, small files and the 0x runtime always come from the origin. A paid game's site has no swarm at all."},{"u":"/cli/environment/#env","t":"Environment and exit codes","h":"Environment variables","s":"0x CLI","x":"Variable Read by Meaning ZEROX_API login, publish, whoami The hosting API (default https://api.0x.limo ). It overrides the saved login. ZEROX_PUBLISH_TOKEN publish, whoami, deploy-server, server A publish token ( 0xpub_… ). It overrides the saved login, which is what CI uses. ZEROX_BACKEND submit, issues, source check The API for listings (default: the saved login's API) ZEROX_TOKEN submit, issues, source check, deploy-server, server A publish or access token. For deploy-server/server it is checked before ZEROX_PUBLISH_TOKEN . ZEROX_HOST_URL deploy-server, server The game-server host (default https://api.0x.limo/x1/host ) ZEROX_CA deploy-server, server A PEM file with a private CA (staging) ZEROX_LOGIN_FILE deploy-server, server Another credentials file instead of ~/.config/0x/0x-cli.json XDG_CONFIG_HOME all The base of 0x/0x-cli.json (default ~/.config ) ZEROX_REGISTRY init The registry written into a new game's .npmrc (otherwise taken from npm's config) ZEROX_MESHTORRENT dev, publish --to A built meshtorrent checkout, instead of @x1/meshtorrent ZEROX_BYO_URL paper The bring-your-own-server service (default https://api.0x.limo/byo/ ) ZEROX_CONFIG_DIR paper Where paper.json (manage"},{"u":"/cli/environment/#files","t":"Environment and exit codes","h":"Files","s":"0x CLI","x":"Path Contents ~/.config/0x/0x-cli.json {api, token, steamid} from 0x login (mode 600) ~/.config/0x/paper.json 0x paper management keys (mode 600) <game>/.x1/ 0x dev 's staged site and seed key. Git-ignored and never uploaded."},{"u":"/cli/environment/#exit-codes","t":"Environment and exit codes","h":"Exit codes","s":"0x CLI","x":"Code When 0 Success. 0x , 0x help and 0x --help also exit with 0. 1 Any error. The message is printed on stderr as x1: <message> . 2 Unknown command (the usage is printed), or 0x assets import with a recipe that ended mismatch or error 3 0x source check : the rebuilt output does not match the published files 64 0x assets <unknown subcommand>"},{"u":"/cli/environment/#errors","t":"Environment and exit codes","h":"Common errors","s":"0x CLI","x":"Message Cause and fix not signed in: run \\ 0x login` (or set ZEROX_PUBLISH_TOKEN)` No saved token and none in the environment invalid or expired token (401) The token was revoked, or the access token expired. Run 0x login again. sign in (0x login) to mint a publish token (403) POST /v1/hosting/tokens was called with a publish token. Use an access token. site: 3-40 characters a-z, 0-9 and '-', … (400) The site name doesn't fit the rule ( site names ) that site name is reserved / is taken (409) Pick another id , or use --site at most 20 sites per developer (403) Use an existing site for the game over your hosting quota (…) (413) The 2048 MiB quota counts every version you have published upload refused (422) + problems Hidden files, blocked file types, files over 64 MiB, missing index.html , or invalid csp entries the site builder refused this version (422) + findings The content check failed. Each finding names a file. id … belongs to another developer (409) The listing id is taken. Change id . at most 10 submissions may wait for review at once (429) Wait for reviews, or withdraw pending versions play.url: the https page players open is required (…) (400) Pass --site / --site-version"},{"u":"/js/","t":"JavaScript SDK","h":"","s":"JavaScript SDK","x":"The @0xlimo/* packages are published to the 0x npm registry at https://0x.limo/npm/ . That registry serves @0xlimo/* itself and proxies every other package to npmjs, so a game can mix @0xlimo/* with ordinary dependencies."},{"u":"/js/#install","t":"JavaScript SDK","h":"Install","s":"JavaScript SDK","x":"The CLI installer ( curl -fsSL https://0x.limo/sdk/install.sh | sh ) adds @0xlimo:registry (and @x1:registry , for @x1/script and @x1/meshtorrent , which keep the old scope) to your ~/.npmrc (unless you set ZEROX_NO_NPMRC=1 ). After that a plain install works: npm install @0xlimo/platform Without the installer, name the registry for the @0xlimo scope on the command line, or put it in the project's .npmrc : command line .npmrc npm install @0xlimo/platform --@0xlimo:registry=https://0x.limo/npm/ @0xlimo:registry=https://0x.limo/npm/ @x1:registry=https://0x.limo/npm/ All packages are ES modules ( \"type\": \"module\" ). The Node packages need Node.js 18 or later; the CLI, @0xlimo/byo-assets and @x1/meshtorrent need Node.js 20 or later."},{"u":"/js/#packages","t":"JavaScript SDK","h":"Packages","s":"JavaScript SDK","x":"Package Registry version Status What it is for @0xlimo/cli 0.1.4 live 0x : init, dev, publish, submit, deploy-server. @0xlimo/platform 0.1.1 live (subscriptions off) A typed client for the 0x API: sign-in, lobbies, leaderboards, stats and achievements, cloud saves, plays. Also the launcher bridge and server-side entitlement checks. @0xlimo/net 0.1.2 live socket.io and Colyseus adapters that send broadcasts through the 0x broadcast service and its player trees. @0xlimo/swarm-sw 0.1.1 (hosting runs 0.1.3) live The service worker and boot script that serve a hosted game's files from the player swarm, falling back to the origin. @x1/meshtorrent 0.2.0 live The swarm toolkit: asset manifest builder, tracker, seeder and browser client. The CLI and hosting use it. @0xlimo/iap 0.1.0 off In-game purchases: ask the launcher to sell an item, then verify and consume receipts on your server. @0xlimo/byo-assets 0.1.1 live (v0) \"Bring your own assets\": recipes that convert a player's own game files into web formats, deterministically. @0xlimo/host 0.1.1 (hosting runs 0.1.2) live The runner behind 0x deploy-server , which runs Node.js game servers in a sandbox. @0xlimo/paygate not published not dep"},{"u":"/js/#what-a-hosted-site-gets-without-npm","t":"JavaScript SDK","h":"What a hosted site gets without npm","s":"JavaScript SDK","x":"0x publish and the hosting builder copy the browser parts of the SDK next to your game, so a page can import them by relative URL without a bundler: Site path From x1-sw.js , x1/boot.js , x1/host.js , x1/privacy.js @0xlimo/swarm-sw x1/meshtorrent.mjs @x1/meshtorrent (browser bundle) x1/net/index.js , x1/net/service.js , x1/net/wire.js , x1/net/mesh.js , x1/net/socketio.js , x1/net/colyseus.js , x1/net/wasm/* @0xlimo/net x1/iap.js @0xlimo/iap (browser client) x1.json written by the builder: manifest , timeoutMs , tracker , api (or {\"swarm\": false} for an origin-only site) @0xlimo/platform is not copied. Install it with npm, or bundle it with your game."},{"u":"/js/cli/","t":"@0xlimo/cli","h":"","s":"JavaScript SDK","x":"@0xlimo/cli (registry version 0.1.4) is the 0x command. It scaffolds a game from a starter, runs it locally with a swarm and a broadcast service of its own, publishes it to 0x hosting, submits the store listing and deploys a hosted game server. curl -fsSL https://0x.limo/sdk/install.sh | sh # installs into ~/.0x, no sudo The installer runs npm install @0xlimo/cli from https://0x.limo/npm/ into ~/.0x ( ZEROX_HOME ). It accepts ZEROX_REGISTRY , ZEROX_VERSION , ZEROX_NO_MODIFY_PATH=1 and ZEROX_NO_NPMRC=1 , and needs Node.js 20 or later. The CLI's own dependencies, which hosted sites get as well, are @0xlimo/swarm-sw , @0xlimo/net , @0xlimo/iap , @0xlimo/byo-assets and @x1/meshtorrent . Every command, every flag and 0x.config.json are documented in the 0x CLI section ."},{"u":"/js/platform/","t":"@0xlimo/platform","h":"","s":"JavaScript SDK","x":"The 0x backend speaks Steamworks semantics over HTTP. @0xlimo/platform is a thin client for it: each call is one fetch with a bearer token. A rotating refresh token is kept in storage , which is localStorage by default in a browser. The package has three entry points: Import Runs in For @0xlimo/platform browser or Node 18+ createPlatform() : sign-in, me , lobbies, leaderboards, stats and achievements, cloud saves, plays. Also siteApi() and findAppid() . @0xlimo/platform/launcher a page inside the 0x launcher createLauncher() : talks to the launcher over postMessage . Covers subscriptions and play tickets. The game never sees the player's token. @0xlimo/platform/server your game server (Node 18+) checkTicket() , hasEntitlement() and serverEntitlement() : who a player is, and what they hold. Registry version: 0.1.1 . Typings ship with the package. The generated API reference lists every type and function. npm install @0xlimo/platform --@0xlimo:registry=https://0x.limo/npm/"},{"u":"/js/platform/#quick-start","t":"@0xlimo/platform","h":"Quick start","s":"JavaScript SDK","x":"import { createPlatform, siteApi, findAppid } from \"@0xlimo/platform\"; const baseUrl = await siteApi(); // the hosting service's API, else https://api.0x.limo const appid = await findAppid({ baseUrl, id: \"my-game\" }); // null until the listing is approved const x1 = createPlatform({ baseUrl, appid }); if (!x1.session) await x1.auth.guest(); // a guest account: plays at once const me = await x1.me(); await x1.leaderboards.upload(\"high-score\", 4200); // keep_best const top = await x1.leaderboards.entries(\"high-score\", { start: 1, end: 10 }); await x1.stats.set({ stats: { runs: 12 }, achievements: { FIRST_WIN: true } }); await x1.cloud.write(\"save/slot1.json\", JSON.stringify({ level: 3 })); const stop = await x1.plays.auto(); // counts the play; not needed inside the launcher"},{"u":"/js/platform/#concepts","t":"@0xlimo/platform","h":"Concepts","s":"JavaScript SDK","x":""},{"u":"/js/platform/#sessions","t":"@0xlimo/platform","h":"Sessions","s":"JavaScript SDK","x":"auth.guest() ( POST /v1/oauth/guest ) creates a guest account. auth.password(username, password) uses the OAuth2 password grant ( POST /v1/oauth/token ). The session is {accessToken, refreshToken, expiresAt, steamid, persona, guest} . It is stored under x1.session:<baseUrl> . Pass storage: null to keep it in memory only. A token that expires within 30 s is refreshed before a call. A 401 is retried once after a refresh. auth.signOut() revokes the refresh token ( POST /v1/oauth/revoke ). auth.onChange(fn) is called on every change and returns an unsubscribe function."},{"u":"/js/platform/#app-id","t":"@0xlimo/platform","h":"App id","s":"JavaScript SDK","x":"Calls under /v1/apps/<appid>/… (lobbies, leaderboards by name, stats, cloud) need appid in createPlatform . Without it they throw x1: createPlatform({appid}) is needed for this call . findAppid({baseUrl, id}) looks the app id up by the id in your 0x.config.json , in the public catalog ( GET /v1/catalog ). The app id is fixed when the listing is first approved, so a build does not need the number written into it."},{"u":"/js/platform/#hosted-sites","t":"@0xlimo/platform","h":"Hosted sites","s":"JavaScript SDK","x":"siteApi() reads ./x1.json ( api , written by the hosting builder). It falls back to https://api.0x.limo , so the same build works on any 0x service."},{"u":"/js/platform/#everything-else","t":"@0xlimo/platform","h":"Everything else","s":"JavaScript SDK","x":"x1.request(method, path, {body, binary}) calls any other /v1 endpoint as the signed-in user, with the same refresh rules. See the REST API for the endpoints."},{"u":"/js/platform/#lobbies","t":"@0xlimo/platform","h":"Lobbies","s":"JavaScript SDK","x":"const lobby = await x1.lobbies.create({ maxMembers: 8, type: 2 }); // 0 private, 1 friends, 2 public await x1.lobbies.setData(lobby.id, { map: \"dunes\", mode: \"ctf\" }); const { lobbies } = await x1.lobbies.search([{ kind: \"string\", key: \"mode\", value: \"ctf\", cmp: 0 }]); await x1.lobbies.join(lobbies[0].id); await x1.lobbies.chat(lobby.id, \"gl hf\"); // sent hex-encoded Filter kinds are string , numerical , near , slots , count and compatible , as in ISteamMatchmaking . cmp is the ELobbyComparison value, and 0 means equal. A search returns only public ( type: 2 ), joinable lobbies of your app, at most 50 by default."},{"u":"/js/platform/#inside-the-launcher-0xlimoplatformlauncher","t":"@0xlimo/platform","h":"Inside the launcher: @0xlimo/platform/launcher","s":"JavaScript SDK","x":"A game opened from the 0x launcher ( https://0x.limo/play/<game> ) runs in an iframe. createLauncher() sends {x1: \"req\", id, type, …} to window.parent . It accepts answers only from the parent, and only from https://0x.limo or the page's own origin (change this with launcherOrigins ). import { createLauncher } from \"@0xlimo/platform/launcher\"; const launcher = createLauncher(); if (launcher.embedded) { const hello = await launcher.hello(); // {launcher: \"0x1\", version, appid, signedIn} const ticket = await launcher.playTicket(); // short-lived; send it to your game server launcher.on(\"subscription.changed\", () => refreshPerks()); } Subscriptions are switched off on 0x.limo launcher.subscriptions.status() , .has(key) and .subscribe(plan, period) are built and deployed, but SG_SUBSCRIPTIONS is off, so the backend answers {\"error\": \"subscriptions are off\"} . has() returns false when anything fails, so a game that checks it keeps working. subscribe() opens the launcher's confirm dialog and has no timeout, because it waits for the player. It resolves with {outcome, status} . outcome is one of subscribed , already_subscribed , canceled , signed_out , insufficient_funds or failed . Errors"},{"u":"/js/platform/#on-your-server-0xlimoplatformserver","t":"@0xlimo/platform","h":"On your server: @0xlimo/platform/server","s":"JavaScript SDK","x":"Play ticket (any server) Game-server session (native servers) import { checkTicket } from \"@0xlimo/platform/server\"; // ticket: from launcher.playTicket() on the page, sent over your own connection const t = await checkTicket({ api: \"https://api.0x.limo\", ticket, appid: 4000123, entitlement: \"vip\" }); if (!t.valid) return reject(); console.log(t.steamid, t.entitlements, t.entitled); import { serverEntitlement } from \"@0xlimo/platform/server\"; // session: the token from POST /v1/gameservers/logon (ISteamGameServer); your own app only const r = await serverEntitlement({ api: \"https://api.0x.limo\", session, steamid, entitlement: \"vip\" }); if (r.entitled) grantPerks(steamid); checkTicket posts to /v1/subscriptions/check . With appid , it treats a ticket for another game as invalid (recommended). hasEntitlement returns checkTicket(...).entitled === true . serverEntitlement calls GET /v1/gameservers/entitlement/<steamid>/<key> . The timeout is 5 s by default ( timeoutMs ). A non-2xx answer throws EntitlementError with status and body . Entitlement keys come from subscription plans, so these calls depend on subscriptions being on."},{"u":"/js/platform/#errors","t":"@0xlimo/platform","h":"Errors","s":"JavaScript SDK","x":"Error Thrown by Fields X1Error createPlatform calls and findAppid status (HTTP), body (the parsed JSON, usually {\"error\": \"...\"} ), path Error(\"x1: sign in first …\") any call before auth.guest() / auth.password() LauncherError @0xlimo/platform/launcher code , detail EntitlementError @0xlimo/platform/server status , body The API's status codes, including 429 with Retry-After , are listed in the REST API section."},{"u":"/js/platform/api/","t":"@0xlimo/platform API","h":"","s":"JavaScript SDK","x":"Typings: src/index.d.ts , src/launcher.d.ts , src/server.d.ts . For concepts and examples see the package guide ."},{"u":"/js/platform/api/#platform","t":"@0xlimo/platform API","h":"@0xlimo/platform","s":"JavaScript SDK","x":"import { ... } from \"@0xlimo/platform\";"},{"u":"/js/platform/api/#platform-session","t":"@0xlimo/platform API","h":"Session","s":"JavaScript SDK","x":"interface interface Session { accessToken: string; refreshToken: string; expiresAt: number; steamid: string | null; persona: string | null; guest: boolean; }"},{"u":"/js/platform/api/#platform-lobby","t":"@0xlimo/platform API","h":"Lobby","s":"JavaScript SDK","x":"interface interface Lobby { id: string; appid: number; owner: string; members: string[]; data: Record<string, string>; max_members: number; type: number; joinable: boolean; [k: string]: unknown; }"},{"u":"/js/platform/api/#platform-lobbyfilter","t":"@0xlimo/platform API","h":"LobbyFilter","s":"JavaScript SDK","x":"interface interface LobbyFilter { kind: \"string\" | \"numerical\" | \"near\" | \"slots\" | \"count\" | \"compatible\"; key?: string; value?: string | number; cmp?: number; lobby?: string; }"},{"u":"/js/platform/api/#platform-leaderboardentry","t":"@0xlimo/platform API","h":"LeaderboardEntry","s":"JavaScript SDK","x":"interface interface LeaderboardEntry { steamid: string; score: number; details: number[]; ugc: string | null; rank: number; persona: string; }"},{"u":"/js/platform/api/#platform-x1error","t":"@0xlimo/platform API","h":"X1Error","s":"JavaScript SDK","x":"class class X1Error extends Error { status: number; body: unknown; path: string; }"},{"u":"/js/platform/api/#platform-platform","t":"@0xlimo/platform API","h":"Platform","s":"JavaScript SDK","x":"interface interface Platform { readonly session: Session | null; auth: { guest(): Promise<Session>; password(username: string, password: string): Promise<Session>; refresh(): Promise<Session>; signOut(): Promise<void>; onChange(fn: (s: Session | null) => void): () => void; }; me(): Promise<{ steamid: string; persona_name: string; [k: string]: unknown }>; lobbies: { /** type: 0 private, 1 friends only, 2 public (ELobbyType). */ create(o?: { maxMembers?: number; type?: number }): Promise<Lobby>; search(filters?: LobbyFilter[]): Promise<{ lobbies: Lobby[]; [k: string]: unknown }>; get(id: string): Promise<Lobby>; join(id: string): Promise<{ response: number; lobby?: Lobby }>; leave(id: string): Promise<unknown>; setData(id: string, data: Record<string, string | null>): Promise<unknown>; setMemberData(id: string, data: Record<string, string | null>): Promise<unknown>; settings(id: string, s: Record<string, unknown>): Promise<unknown>; chat(id: string, message: string | Uint8Array): Promise<{ chat_id: number }>; invite(id: string, steamid: string): Promise<unknown>; }; leaderboards: { find(name: string, o?: { create?: boolean; sort?: number; display?: number }): Promise<{ id: string; na"},{"u":"/js/platform/api/#platform-siteapi","t":"@0xlimo/platform API","h":"siteApi","s":"JavaScript SDK","x":"function The platform API URL of a hosted game: x1.json api , else https://api.0x.limo . function siteApi(o?: { x1json?: string; fallback?: string; fetch?: typeof fetch }): Promise<string>;"},{"u":"/js/platform/api/#platform-findappid","t":"@0xlimo/platform API","h":"findAppid","s":"JavaScript SDK","x":"function A listed game's app id by its store id (x1.config.json \"id\"), from the public catalog; null while unlisted. function findAppid(o: { baseUrl: string; id: string; fetch?: typeof fetch }): Promise<number | null>;"},{"u":"/js/platform/api/#platform-createplatform","t":"@0xlimo/platform API","h":"createPlatform","s":"JavaScript SDK","x":"function function createPlatform(o: { /** The backend, e.g. https://api.0x.limo (or http://localhost:8080 in development). */ baseUrl: string; appid?: number; /** Where the session is kept: localStorage by default, null for memory only. */ storage?: Pick<Storage, \"getItem\" | \"setItem\" | \"removeItem\"> | null; fetch?: typeof fetch; }): Platform;"},{"u":"/js/platform/api/#platform-launcher","t":"@0xlimo/platform API","h":"@0xlimo/platform/launcher","s":"JavaScript SDK","x":"import { ... } from \"@0xlimo/platform/launcher\";"},{"u":"/js/platform/api/#platform-launcher-plan","t":"@0xlimo/platform API","h":"Plan","s":"JavaScript SDK","x":"interface interface Plan { id: string; name: string; description: string; entitlement: string; currency: string; prices: { week?: number; month: number; year?: number }; active?: boolean; }"},{"u":"/js/platform/api/#platform-launcher-subscription","t":"@0xlimo/platform API","h":"Subscription","s":"JavaScript SDK","x":"interface interface Subscription { id: string; plan_id: string; plan_name: string; entitlement: string; period: \"week\" | \"month\" | \"year\"; price: number; currency: string; status: \"active\" | \"grace\" | \"paused\" | \"ended\"; cancel_at_period_end: boolean; current_period_end: number; entitled: boolean; [k: string]: unknown; }"},{"u":"/js/platform/api/#platform-launcher-subscriptionstatus","t":"@0xlimo/platform API","h":"SubscriptionStatus","s":"JavaScript SDK","x":"interface interface SubscriptionStatus { appid: number; signedIn: boolean; entitlements: string[]; subscriptions: Subscription[]; plans: Plan[]; subscription_only: boolean; }"},{"u":"/js/platform/api/#platform-launcher-subscriberesult","t":"@0xlimo/platform API","h":"SubscribeResult","s":"JavaScript SDK","x":"interface interface SubscribeResult { outcome: \"subscribed\" | \"already_subscribed\" | \"canceled\" | \"signed_out\" | \"insufficient_funds\" | \"failed\"; status: SubscriptionStatus; }"},{"u":"/js/platform/api/#platform-launcher-launchererror","t":"@0xlimo/platform API","h":"LauncherError","s":"JavaScript SDK","x":"class class LauncherError extends Error { code: string; detail?: string; }"},{"u":"/js/platform/api/#platform-launcher-launcher","t":"@0xlimo/platform API","h":"Launcher","s":"JavaScript SDK","x":"interface interface Launcher { readonly embedded: boolean; request<T = unknown>(type: string, payload?: Record<string, unknown>, opts?: { timeoutMs?: number }): Promise<T>; hello(): Promise<{ launcher: \"0x1\"; version: number; appid: number; signedIn: boolean }>; on(type: string, fn: (event: { x1: \"event\"; type: string; [k: string]: unknown }) => void): () => void; subscriptions: { status(): Promise<SubscriptionStatus>; has(entitlement: string): Promise<boolean>; subscribe(plan: string, period?: \"week\" | \"month\" | \"year\"): Promise<SubscribeResult>; }; playTicket(): Promise<string>; close(): void; }"},{"u":"/js/platform/api/#platform-launcher-createlauncher","t":"@0xlimo/platform API","h":"createLauncher","s":"JavaScript SDK","x":"function function createLauncher(o?: { launcherOrigins?: string[]; timeoutMs?: number; window?: Window }): Launcher;"},{"u":"/js/platform/api/#platform-server","t":"@0xlimo/platform API","h":"@0xlimo/platform/server","s":"JavaScript SDK","x":"import { ... } from \"@0xlimo/platform/server\";"},{"u":"/js/platform/api/#platform-server-entitlementerror","t":"@0xlimo/platform API","h":"EntitlementError","s":"JavaScript SDK","x":"class class EntitlementError extends Error { status: number; body: unknown; }"},{"u":"/js/platform/api/#platform-server-ticketcheck","t":"@0xlimo/platform API","h":"TicketCheck","s":"JavaScript SDK","x":"interface interface TicketCheck { valid: boolean; steamid?: string; appid?: number; entitlements: string[]; entitled?: boolean; }"},{"u":"/js/platform/api/#platform-server-checkticket","t":"@0xlimo/platform API","h":"checkTicket","s":"JavaScript SDK","x":"function function checkTicket(o: { api: string; ticket: string; entitlement?: string; appid?: number; fetch?: typeof fetch; timeoutMs?: number }): Promise<TicketCheck>;"},{"u":"/js/platform/api/#platform-server-hasentitlement","t":"@0xlimo/platform API","h":"hasEntitlement","s":"JavaScript SDK","x":"function function hasEntitlement(o: { api: string; ticket: string; entitlement: string; appid?: number; fetch?: typeof fetch; timeoutMs?: number }): Promise<boolean>;"},{"u":"/js/platform/api/#platform-server-serverentitlement","t":"@0xlimo/platform API","h":"serverEntitlement","s":"JavaScript SDK","x":"function function serverEntitlement(o: { api: string; session: string; steamid: string; entitlement: string; fetch?: typeof fetch; timeoutMs?: number }): Promise<{ steamid: string; appid: number; entitlement: string; entitled: boolean; entitlements: string[] }>;"},{"u":"/js/iap/","t":"@0xlimo/iap","h":"","s":"JavaScript SDK","x":"Switched off on 0x.limo In-game purchases are deployed but switched off ( SG_IAP is not set on production). While they are off, every /v1/iap/* route answers 404 , and the launcher answers purchase requests with unavailable . Your shop code can ship now: gate it on available() and on a working items() call. Players pay from their 0x balance. Your game never charges anyone. It asks its parent window (the 0x launcher) to sell an item. The launcher shows the item, the price and the player's balance, and nothing is bought unless the player presses Confirm . The answer carries a signed receipt, and your game server checks it before granting anything. Registry version: 0.1.0 . Typings ship with the package. The generated API reference lists every type and function. Import Runs in Exports @0xlimo/iap (also @0xlimo/iap/client , or ./x1/iap.js on CLI-built sites) the page available , purchase , items , inventory , createIapClient , IapError @0xlimo/iap/server your game server (Node 18+) IapServer , verifyReceipt , fetchKeys , decodeReceipt , publicKeyFromHex , hasServerKey , KEY_FILE , IapError npm install @0xlimo/iap --@0xlimo:registry=https://0x.limo/npm/"},{"u":"/js/iap/#1-define-items","t":"@0xlimo/iap","h":"1. Define items","s":"JavaScript SDK","x":"Sign in on https://0x.limo/dev/items , pick your game and add items: Field Rules sku your id for the item: lowercase letters, digits, . , _ , - (e.g. skin-gold ). Never reuse one. name, description shown in the confirm dialog price US dollars, in cents, from $0.25 to $500 kind permanent is owned once (a skin). consumable is bought in quantities and used up by your server (boosts). limit per player optional cap An item that has sold cannot be deleted, only deactivated. Its kind cannot change, and a new price applies only to new purchases. Create server key on the same page gives you the app's server key ( 0xsk_<appid>_… ), shown once. Keep it on the server and never put it in the page."},{"u":"/js/iap/#2-ask-for-a-purchase-the-page","t":"@0xlimo/iap","h":"2. Ask for a purchase (the page)","s":"JavaScript SDK","x":"import { available, items, purchase, inventory } from \"./x1/iap.js\"; // or \"@0xlimo/iap\" if (available()) { // only inside the 0x launcher const { items: onSale, balanceUsd } = await items(); try { const { purchase: p, receipt } = await purchase(\"boost-pack\", { quantity: 1 }); socket.emit(\"redeem\", receipt); // your server grants it } catch (e) { if (e.code === \"canceled\") { /* the player said no */ } else if (e.code === \"insufficient_funds\") { /* the dialog offered a top-up */ } } } purchase() resolves only after the player confirmed and paid. It waits up to 15 minutes, because the dialog may stay open while the player tops up. items() and inventory() time out after 15 s. The protocol is postMessage to window.parent : game -> launcher {x1: \"iap\", v: 1, type: \"purchase\" | \"items\" | \"inventory\", rid, sku?, quantity?} launcher -> game {x1: \"iap\", v: 1, type: \"result\" | \"items\" | \"inventory\", rid, ok, ...} The client accepts answers only from window.parent and only with a pending rid . createIapClient({launcherOrigin: \"https://0x.limo\"}) also pins the origin."},{"u":"/js/iap/#error-codes-iaperrorcode","t":"@0xlimo/iap","h":"Error codes ( IapError.code )","s":"JavaScript SDK","x":"code meaning canceled the player closed the dialog insufficient_funds not enough balance (the dialog offers a top-up) already_owned a permanent item the player already has limit_reached the per-player limit not_found no such active item not_signed_in a guest: purchases need an account unavailable purchases are off busy another dialog is open failed any other error timeout no answer in time not_in_launcher the page is not inside the 0x launcher (hide the shop: available() )"},{"u":"/js/iap/#3-grant-on-your-server","t":"@0xlimo/iap","h":"3. Grant on your server","s":"JavaScript SDK","x":"import { IapServer } from \"@0xlimo/iap/server\"; const iap = IapServer.fromEnv(); // ZEROX_IAP_SERVER_KEY | ZEROX_IAP_SERVER_KEY_FILE | ./x1-iap.key socket.on(\"redeem\", async (receipt, ack) => { const v = await iap.verify({ receipt }); // online: knows refunds and consumption if (!v.valid || v.purchase.status === \"refunded\") return ack({ ok: false }); if (v.purchase.sku === \"skin-gold\") return ack({ ok: true, skin: \"gold\" }); if (v.purchase.sku === \"boost-pack\") { const c = await iap.consume(v.purchase.id, { quantity: 1, idempotencyKey: `${v.purchase.id}:${v.purchase.consumed}`, }); if (c.consumed_now === 1) return ack({ ok: true, boost: true, left: c.purchase.remaining }); } ack({ ok: false }); }); Method Endpoint Returns verify({receipt}) or verify({purchase: \"i_…\"}) POST /v1/iap/server/verify {valid, purchase: {id, appid, steamid, sku, kind, quantity, consumed, remaining, status}} ; a receipt for another game is not valid consume(idOrReceipt, {quantity, idempotencyKey}) POST /v1/iap/server/consume (also sends an Idempotency-Key header) {purchase, consumed_now} ; the same key returns the first answer. 409 with insufficient , not_consumable or refunded . inventory(steamid) GET /v1/"},{"u":"/js/iap/#receipts-offline","t":"@0xlimo/iap","h":"Receipts offline","s":"JavaScript SDK","x":"A receipt is x1r1.<b64url(payload)>.<b64url(signature)> . The payload is JSON: {\"v\":1, \"kid\", \"id\", \"a\": appid, \"s\": steamid, \"k\": sku, \"t\": kind, \"q\": quantity, \"p\": cents, \"c\": \"USD\", \"iat\"} . 0x signs it with Ed25519 over the ASCII bytes x1-iap-receipt-v1. followed by the payload part. The public keys are at GET /v1/iap/keys . import { fetchKeys, verifyReceipt } from \"@0xlimo/iap/server\"; const keys = await fetchKeys(\"https://0x.limo\"); // cached 10 minutes const r = verifyReceipt(receipt, { keys, appid: 4000123 }); if (r.valid) console.log(r.purchase.steamid, r.purchase.sku, r.purchase.quantity); else console.log(r.reason); // \"not an x1r1 receipt\", \"bad signature\", \"unknown key …\", \"receipt of app …\" Offline verification proves that the purchase was made and paid. It cannot know about a later refund, or about units already used. Grant consumables by consuming online."},{"u":"/js/iap/#testing","t":"@0xlimo/iap","h":"Testing","s":"JavaScript SDK","x":"Outside the launcher, available() is false , so the game runs with no shop. Unit-test your server with a fake. new IapServer({api, key, fetch}) takes any fetch , and verifyReceipt takes any key list, so you can sign test receipts with your own Ed25519 key. The SDK's packages/iap/test shows how. See also Monetization for pricing, revenue share and payouts."},{"u":"/js/iap/api/","t":"@0xlimo/iap API","h":"","s":"JavaScript SDK","x":"Typings: src/index.d.ts , src/server.d.ts . For concepts and examples see the package guide ."},{"u":"/js/iap/api/#iap","t":"@0xlimo/iap API","h":"@0xlimo/iap","s":"JavaScript SDK","x":"import { ... } from \"@0xlimo/iap\";"},{"u":"/js/iap/api/#iap-iaperrorcode","t":"@0xlimo/iap API","h":"IapErrorCode","s":"JavaScript SDK","x":"type type IapErrorCode = | \"canceled\" | \"insufficient_funds\" | \"limit_reached\" | \"already_owned\" | \"not_found\" | \"not_signed_in\" | \"unavailable\" | \"busy\" | \"failed\" | \"timeout\" | \"not_in_launcher\";"},{"u":"/js/iap/api/#iap-iaperror","t":"@0xlimo/iap API","h":"IapError","s":"JavaScript SDK","x":"class class IapError extends Error { code: IapErrorCode | string; }"},{"u":"/js/iap/api/#iap-purchase","t":"@0xlimo/iap API","h":"Purchase","s":"JavaScript SDK","x":"interface interface Purchase { id: string; appid: number; sku: string; name?: string; kind: \"consumable\" | \"permanent\"; quantity: number; consumed?: number; remaining?: number; amount?: number; amountUsd?: string; status?: \"paid\" | \"refunded\"; [k: string]: unknown; }"},{"u":"/js/iap/api/#iap-item","t":"@0xlimo/iap API","h":"Item","s":"JavaScript SDK","x":"interface interface Item { sku: string; name: string; description?: string; price: number; priceUsd: string; kind: \"consumable\" | \"permanent\"; max_per_player?: number | null; owned?: unknown; [k: string]: unknown; }"},{"u":"/js/iap/api/#iap-entitlement","t":"@0xlimo/iap API","h":"Entitlement","s":"JavaScript SDK","x":"interface interface Entitlement { sku: string; name: string; kind: \"consumable\" | \"permanent\"; owned?: boolean; available?: number; [k: string]: unknown; }"},{"u":"/js/iap/api/#iap-iapclient","t":"@0xlimo/iap API","h":"IapClient","s":"JavaScript SDK","x":"interface interface IapClient { available(): boolean; purchase(sku: string, opts?: { quantity?: number }): Promise<{ purchase: Purchase; receipt: string }>; items(): Promise<{ items: Item[]; balance: number | null; balanceUsd: string | null }>; inventory(): Promise<{ entitlements: Entitlement[]; purchases: Purchase[] }>; close(): void; }"},{"u":"/js/iap/api/#iap-createiapclient","t":"@0xlimo/iap API","h":"createIapClient","s":"JavaScript SDK","x":"function function createIapClient(opts?: { window?: Window; launcherOrigin?: string | null }): IapClient;"},{"u":"/js/iap/api/#iap-available","t":"@0xlimo/iap API","h":"available","s":"JavaScript SDK","x":"function function available(): boolean;"},{"u":"/js/iap/api/#iap-purchase-1","t":"@0xlimo/iap API","h":"purchase","s":"JavaScript SDK","x":"function function purchase(sku: string, opts?: { quantity?: number }): Promise<{ purchase: Purchase; receipt: string }>;"},{"u":"/js/iap/api/#iap-items","t":"@0xlimo/iap API","h":"items","s":"JavaScript SDK","x":"function function items(): Promise<{ items: Item[]; balance: number | null; balanceUsd: string | null }>;"},{"u":"/js/iap/api/#iap-inventory","t":"@0xlimo/iap API","h":"inventory","s":"JavaScript SDK","x":"function function inventory(): Promise<{ entitlements: Entitlement[]; purchases: Purchase[] }>; @0xlimo/iap/client has the same typings as @0xlimo/iap ."},{"u":"/js/iap/api/#iap-server","t":"@0xlimo/iap API","h":"@0xlimo/iap/server","s":"JavaScript SDK","x":"import { ... } from \"@0xlimo/iap/server\";"},{"u":"/js/iap/api/#iap-server-iaperror","t":"@0xlimo/iap API","h":"IapError","s":"JavaScript SDK","x":"class class IapError extends Error { code: string; status?: number; body?: unknown; }"},{"u":"/js/iap/api/#iap-server-receiptkey","t":"@0xlimo/iap API","h":"ReceiptKey","s":"JavaScript SDK","x":"interface interface ReceiptKey { kid: string; ed25519: string; [k: string]: unknown }"},{"u":"/js/iap/api/#iap-server-keys","t":"@0xlimo/iap API","h":"Keys","s":"JavaScript SDK","x":"type type Keys = { keys: ReceiptKey[] } | ReceiptKey[] | Record<string, string>;"},{"u":"/js/iap/api/#iap-server-receiptpurchase","t":"@0xlimo/iap API","h":"ReceiptPurchase","s":"JavaScript SDK","x":"interface interface ReceiptPurchase { id: string; appid: number; steamid: string; sku: string; kind: \"consumable\" | \"permanent\"; quantity: number; amount: number; currency: string; iat: number; }"},{"u":"/js/iap/api/#iap-server-verifyresult","t":"@0xlimo/iap API","h":"VerifyResult","s":"JavaScript SDK","x":"type type VerifyResult = { valid: true; purchase: ReceiptPurchase; payload: Record<string, unknown> } | { valid: false; reason: string };"},{"u":"/js/iap/api/#iap-server-publickeyfromhex","t":"@0xlimo/iap API","h":"publicKeyFromHex","s":"JavaScript SDK","x":"function function publicKeyFromHex(hex: string): KeyObject;"},{"u":"/js/iap/api/#iap-server-decodereceipt","t":"@0xlimo/iap API","h":"decodeReceipt","s":"JavaScript SDK","x":"function function decodeReceipt(receipt: string): Record<string, unknown> | null;"},{"u":"/js/iap/api/#iap-server-verifyreceipt","t":"@0xlimo/iap API","h":"verifyReceipt","s":"JavaScript SDK","x":"function function verifyReceipt(receipt: string, opts: { keys: Keys; appid?: number | string | null }): VerifyResult;"},{"u":"/js/iap/api/#iap-server-fetchkeys","t":"@0xlimo/iap API","h":"fetchKeys","s":"JavaScript SDK","x":"function function fetchKeys(api?: string, opts?: { maxAgeMs?: number; force?: boolean; fetch?: typeof fetch }): Promise<Keys>;"},{"u":"/js/iap/api/#iap-server-iapserver","t":"@0xlimo/iap API","h":"IapServer","s":"JavaScript SDK","x":"class class IapServer { constructor(opts: { api?: string; key: string; appid?: number | string | null; fetch?: typeof fetch }); static fromEnv(opts?: { api?: string; appid?: number | string | null; fetch?: typeof fetch }): IapServer; api: string; appid: string | null; verify(what: string | { receipt: string } | { purchase: string }): Promise<{ valid: boolean; reason?: string; purchase?: Record<string, unknown> }>; consume(purchaseOrReceipt: string, opts?: { quantity?: number; idempotencyKey?: string }): Promise<{ purchase: Record<string, unknown>; consumed_now: number }>; inventory(steamid: string | number): Promise<{ steamid: string; appid: number; entitlements: unknown[]; purchases: unknown[] }>; verifyOffline(receipt: string): Promise<VerifyResult>; }"},{"u":"/js/iap/api/#iap-server-key-file","t":"@0xlimo/iap API","h":"KEY_FILE","s":"JavaScript SDK","x":"const const KEY_FILE: \"x1-iap.key\";"},{"u":"/js/iap/api/#iap-server-hasserverkey","t":"@0xlimo/iap API","h":"hasServerKey","s":"JavaScript SDK","x":"function function hasServerKey(): boolean;"},{"u":"/js/net/","t":"@0xlimo/net","h":"","s":"JavaScript SDK","x":"A broadcast leaves your game server once per group , however many players are in it. The 0x broadcast service signs it and fans it out to the group's players, in order. Most players get it from other players through WebRTC trees, checked against the service's signature. Your game's emit / on calls do not change: Broadcasts ( io.emit , io.to(group).emit , socket.broadcast.emit , socket.to(group).emit , Colyseus room.broadcast ) go through the service. Everything else stays on socket.io or Colyseus as before: unicast ( socket.emit , client.send ), rooms that are not groups, binary payloads, everything players send, and Colyseus state sync. A player who cannot reach the service gets the broadcasts over socket.io or Colyseus instead, so nobody misses one. Registry version: 0.1.2 (depends on ws ). Typings ship with the package. The generated API reference lists every type and function. npm install @0xlimo/net --@0xlimo:registry=https://0x.limo/npm/ Sites built by the CLI also get the browser files as ./x1/net/ (with ./x1/net/wasm/ , the service's own player client), so the page needs no bundler."},{"u":"/js/net/#socketio","t":"@0xlimo/net","h":"socket.io","s":"JavaScript SDK","x":"Server (Node) Page import { Server } from \"socket.io\"; import WebSocket from \"ws\"; import { connectServiceServer, routeSocketIoBroadcasts } from \"@0xlimo/net\"; const io = new Server(http, { cors: { origin: true } }); // On 0x hosting the URL and token come from the environment (ZEROX_BCAST_*): no arguments needed. const service = await connectServiceServer({ WebSocket }); routeSocketIoBroadcasts(io, { service, playerUrl: process.env.ZEROX_BCAST_PLAYER_URL, groups: (room) => room.startsWith(\"match:\"), // rooms that are interest groups }); service.on(\"close\", () => process.exit(1)); // the host restarts you with a fresh connection setInterval(() => io.emit(\"state\", snapshot()), 50); // leaves once, reaches everyone import { connectMeshPlayer, loadBroadcastWasm, x1SocketIo } from \"./x1/net/index.js\"; const wasm = await loadBroadcastWasm(new URL(\"./x1/net/wasm/\", location.href).href); const ice = await fetch(\"./p2p/ice\").then((r) => r.json()).catch(() => ({})); const socket = x1SocketIo(io(location.origin, { path: \"/x1/game/my-arena/socket.io\" }), { connect: (j) => connectMeshPlayer({ ...j, wasm, mesh: true, rtcConfig: { iceServers: ice.iceServers } }), }); socket.on(\"state\", render); "},{"u":"/js/net/#colyseus","t":"@0xlimo/net","h":"Colyseus","s":"JavaScript SDK","x":"Server (Room) Client import { connectServiceServer, routeColyseusBroadcasts } from \"@0xlimo/net\"; class GameRoom extends Room { async onCreate() { const service = await connectServiceServer(); routeColyseusBroadcasts(this, { service, playerUrl: process.env.ZEROX_BCAST_PLAYER_URL }); } } import { x1Colyseus } from \"@0xlimo/net\"; const room = x1Colyseus(await client.joinOrCreate(\"game\")); // wrap before onMessage handlers room.onMessage(\"tick\", onTick); The room is the group. types (a list or a predicate) limits which message types go through the service. The channel is CHANNEL_COLYSEUS ( 0xc015 )."},{"u":"/js/net/#player-trees-and-privacy","t":"@0xlimo/net","h":"Player trees and privacy","s":"JavaScript SDK","x":"connectMeshPlayer({url, player, ticket, wasm, mesh: true, rtcConfig}) runs the service's own player client (wasm). With mesh: true , the page joins the player trees over WebRTC data channels. Without it, every broadcast comes from the service directly. stats() gives {direct, fanout, framesFromPeers, badFrames, links} . The player's sharing choice in the launcher reaches the page as a URL parameter: ?p2p=relay (Private): connectMeshPlayer forces iceTransportPolicy: \"relay\" , so every WebRTC link goes through the 0x TURN relay. ?p2p=0 (Off): no peer-to-peer."},{"u":"/js/net/#hosted-servers-the-environment","t":"@0xlimo/net","h":"Hosted servers: the environment","s":"JavaScript SDK","x":"0x deploy-server runs your server with these variables (see @0xlimo/host ): Variable Value ZEROX_BCAST_URL , ZEROX_BCAST_SERVER_URL the service's game-server endpoint (a loopback forwarder inside the sandbox) ZEROX_BCAST_PLAYER_URL the player endpoint, handed to clients ( wss://play.0x.limo/x1/bcast/player ) ZEROX_BCAST_TOKEN your app's own service token The host also sets each of these under its old name, X1_* (for example X1_BCAST_TOKEN ), so servers written before the rename to 0x keep working; read ZEROX_* first and fall back to X1_* . connectServiceServer() with no url uses hostedService() . That reads ZEROX_BCAST_TOKEN , plus ZEROX_BCAST_URL , ZEROX_BCAST_PLAYER_URL and ZEROX_BCAST_INSTANCE when set. Without them it uses HOSTED_BCAST ( wss://play.0x.limo/x1/bcast/server and …/player ). With neither a url nor a token, it throws connectServiceServer: no url, and no ZEROX_BCAST_TOKEN for the hosted service ."},{"u":"/js/net/#local-development-and-tests","t":"@0xlimo/net","h":"Local development and tests","s":"JavaScript SDK","x":"0x dev runs a development broadcast service at /x1/bcast/server and /x1/bcast/player . It is startDevService from @0xlimo/net/dev-service : the real wire and rules, direct only, no signing. createMemoryService() is the service in one process, with the real rules. It suits tests and single-process games: server() returns a ServiceServer , and player({player, ticket}) returns a ServicePlayer . groupId(name) maps a room name to the service's u32 group id (FNV-1a). newPlayer() makes a fresh {player, ticket} ."},{"u":"/js/net/#the-lower-level-service-api","t":"@0xlimo/net","h":"The lower-level service API","s":"JavaScript SDK","x":"If you do not use socket.io or Colyseus, drive the service yourself: import { connectServiceServer, newPlayer, groupId } from \"@0xlimo/net\"; const service = await connectServiceServer(); const { player, ticket } = newPlayer(); service.register(player, groupId(\"lobby\"), ticket); // hand {player, ticket, url} to the client yourself service.broadcast(groupId(\"lobby\"), 1, new TextEncoder().encode(\"hi\")); service.on(\"from\", (p, channel, bytes) => { /* a player's message */ }); On the player side, connectServicePlayer({url, player, ticket}) returns a ServicePlayer with on(\"data\", (channel, bytes) => {}) , send(channel, bytes) and close() ."},{"u":"/js/net/api/","t":"@0xlimo/net API","h":"","s":"JavaScript SDK","x":"Typings: src/index.d.ts . For concepts and examples see the package guide ."},{"u":"/js/net/api/#net","t":"@0xlimo/net API","h":"@0xlimo/net","s":"JavaScript SDK","x":"import { ... } from \"@0xlimo/net\";"},{"u":"/js/net/api/#net-playerid","t":"@0xlimo/net API","h":"PlayerId","s":"JavaScript SDK","x":"type Player ids are u64 as decimal strings; tickets 16 bytes as hex. type PlayerId = string;"},{"u":"/js/net/api/#net-serviceserver","t":"@0xlimo/net API","h":"ServiceServer","s":"JavaScript SDK","x":"interface The game server's side of the 0x1 broadcast service. interface ServiceServer { /** Add or move a player (one group at a time). */ register(player: PlayerId, group: number, ticket: string | Uint8Array): void; unregister(player: PlayerId): void; /** One copy per group; the service fans it out, in order, minus `except`. */ broadcast(group: number, channel: number, data: Uint8Array, except?: PlayerId[]): void; unicast(player: PlayerId, channel: number, data: Uint8Array): void; flush(): void; on(ev: \"up\" | \"down\", fn: (player: PlayerId) => void): () => void; on(ev: \"from\", fn: (player: PlayerId, channel: number, data: Uint8Array) => void): () => void; off(ev: string, fn: (...a: any[]) => void): void; close(): void; }"},{"u":"/js/net/api/#net-serviceplayer","t":"@0xlimo/net API","h":"ServicePlayer","s":"JavaScript SDK","x":"interface A player's side: what the service delivers, and messages to the game server. interface ServicePlayer { readonly player: PlayerId; on(ev: \"data\", fn: (channel: number, data: Uint8Array) => void): () => void; on(ev: \"close\", fn: () => void): () => void; off(ev: string, fn: (...a: any[]) => void): void; send(channel: number, data: Uint8Array): void; close(): void; }"},{"u":"/js/net/api/#net-connectmeshplayer","t":"@0xlimo/net API","h":"connectMeshPlayer","s":"JavaScript SDK","x":"function The service's own player client (wasm): WebRTC links to other players, broadcasts through its trees. function connectMeshPlayer(o: { url: string; player: PlayerId; ticket: string; wasm: { WasmClient: unknown }; /** Join the player trees over WebRTC (default false: every broadcast direct from the service). */ mesh?: boolean; rtcConfig?: RTCConfiguration; WebSocket?: unknown; RTCPeerConnection?: unknown; retries?: number; timeoutMs?: number; }): Promise<ServicePlayer & { stats(): { direct: number; fanout: number; framesFromPeers: number; badFrames: number; links: number } }>;"},{"u":"/js/net/api/#net-loadbroadcastwasm","t":"@0xlimo/net API","h":"loadBroadcastWasm","s":"JavaScript SDK","x":"function Loads and initialises the wasm client from base (…/x1/net/wasm/). function loadBroadcastWasm(base: string): Promise<{ WasmClient: unknown }>;"},{"u":"/js/net/api/#net-jointicket","t":"@0xlimo/net API","h":"JoinTicket","s":"JavaScript SDK","x":"interface interface JoinTicket { player: PlayerId; ticket: string; url: string; }"},{"u":"/js/net/api/#net-creatememoryservice","t":"@0xlimo/net API","h":"createMemoryService","s":"JavaScript SDK","x":"function function createMemoryService(): { server(): ServiceServer; player(o: { player: PlayerId; ticket: string }): Promise<ServicePlayer>; stats(): { broadcasts: number; unicasts: number; delivered: number; serverBytes: number; refused: number; players: number }; };"},{"u":"/js/net/api/#net-connectserviceserver","t":"@0xlimo/net API","h":"connectServiceServer","s":"JavaScript SDK","x":"function Without url : the hosted service from X1_BCAST_TOKEN (+ X1_BCAST_INSTANCE, X1_BCAST_URL, X1_BCAST_PLAYER_URL). function connectServiceServer(o?: { url?: string; token?: string | Uint8Array; WebSocket?: unknown; timeoutMs?: number }): Promise<ServiceServer & { playerUrl?: string }>;"},{"u":"/js/net/api/#net-hosted-bcast","t":"@0xlimo/net API","h":"HOSTED_BCAST","s":"JavaScript SDK","x":"const const HOSTED_BCAST: { server: string; player: string };"},{"u":"/js/net/api/#net-hostedservice","t":"@0xlimo/net API","h":"hostedService","s":"JavaScript SDK","x":"function function hostedService(env?: Record<string, string | undefined>): { url: string; playerUrl: string; token: string } | null;"},{"u":"/js/net/api/#net-connectserviceplayer","t":"@0xlimo/net API","h":"connectServicePlayer","s":"JavaScript SDK","x":"function function connectServicePlayer(o: { url: string; player: PlayerId; ticket: string; WebSocket?: unknown; retries?: number; timeoutMs?: number }): Promise<ServicePlayer>;"},{"u":"/js/net/api/#net-groupid","t":"@0xlimo/net API","h":"groupId","s":"JavaScript SDK","x":"function A room or match name as the service's u32 group id (FNV-1a). function groupId(name: string): number;"},{"u":"/js/net/api/#net-newplayer","t":"@0xlimo/net API","h":"newPlayer","s":"JavaScript SDK","x":"function function newPlayer(): { player: PlayerId; ticket: string };"},{"u":"/js/net/api/#net-channel-socketio","t":"@0xlimo/net API","h":"CHANNEL_SOCKETIO","s":"JavaScript SDK","x":"const const CHANNEL_SOCKETIO: number;"},{"u":"/js/net/api/#net-channel-colyseus","t":"@0xlimo/net API","h":"CHANNEL_COLYSEUS","s":"JavaScript SDK","x":"const const CHANNEL_COLYSEUS: number;"},{"u":"/js/net/api/#net-routesocketiobroadcasts","t":"@0xlimo/net API","h":"routeSocketIoBroadcasts","s":"JavaScript SDK","x":"function function routeSocketIoBroadcasts( io: unknown, o: { service: ServiceServer; /** The service's player endpoint, handed to clients. */ playerUrl?: string; /** Which rooms are interest groups (a player is in one at a time). Default: none, the namespace is the group. */ groups?: (room: string) => boolean; events?: string[] | ((ev: string) => boolean); channel?: number; }, ): { stats(): { routed: number; copies: number; socketio: number; direct: number; players: number } };"},{"u":"/js/net/api/#net-x1socketio","t":"@0xlimo/net API","h":"x1SocketIo","s":"JavaScript SDK","x":"function function x1SocketIo<S>(socket: S, o?: { connect?: (j: JoinTicket) => Promise<ServicePlayer>; url?: string; channel?: number }): S;"},{"u":"/js/net/api/#net-routecolyseusbroadcasts","t":"@0xlimo/net API","h":"routeColyseusBroadcasts","s":"JavaScript SDK","x":"function function routeColyseusBroadcasts( room: unknown, o: { service: ServiceServer; playerUrl?: string; types?: Array<string | number> | ((t: string | number) => boolean); channel?: number }, ): { group: number; stats(): { routed: number; colyseus: number; direct: number; players: number } };"},{"u":"/js/net/api/#net-x1colyseus","t":"@0xlimo/net API","h":"x1Colyseus","s":"JavaScript SDK","x":"function function x1Colyseus<R>(room: R, o?: { connect?: (j: JoinTicket) => Promise<ServicePlayer>; url?: string; channel?: number }): R;"},{"u":"/js/swarm-sw/","t":"@0xlimo/swarm-sw","h":"","s":"JavaScript SDK","x":"Add one line to your index.html , and the game's own loaders get the files that the site's swarm manifest lists from other players instead of the origin. This works for GLTFLoader , TextureLoader , Audio , fetch and wasm streaming, with no code change. Every file is checked against the manifest's SHA-256. Anything the swarm cannot deliver in time comes from the origin, as it would have without the swarm. <script type=\"module\" src=\"./x1/boot.js\" data-entry=\"./main.js\"></script> boot.js registers the worker, starts the page's swarm host, and then imports your entry module, so the first asset request already goes through the swarm. If the browser has no service workers, or anything fails, boot waits at most 5 s. It then imports the entry anyway, and the game loads from the origin. Versions Not every 0x tool installs the same runtime: Where Package Runtime ( ?v= ) npm registry, latest @0xlimo/swarm-sw 0.1.8 0.2.6 0x hosting's site builder 0.1.4 0.1.4 published 0x CLI (0.1.7), which pins @0xlimo/swarm-sw 0.1.3 0.1.3 0.1.3 Everything on this page above Mounts, mirror and starter packs works the same in all three. The features in that section need runtime 0.2.x. You normally do not instal"},{"u":"/js/swarm-sw/#how-it-works","t":"@0xlimo/swarm-sw","h":"How it works","s":"JavaScript SDK","x":"The worker ( x1-sw.js , scope: the site root) answers GET requests, but not navigations, for files that the manifest lists. It asks a page that hosts the swarm for the bytes, verifies them, and responds. It honours a single Range , keeps the last 64 MiB of whole files in memory for media seeking, and adds X-X1-Source: swarm . Unlisted files pass through untouched. The page ( x1/host.js ) runs the meshtorrent WebRTC client, because service workers cannot open WebRTC connections. It caches pieces in OPFS or IndexedDB (512 MiB budget) and seeds what it has. The defaults are an upload limit of 2 MiB/s, at most 128 MiB to any one peer, and at most 400 files seeded at once. The fallback : if no page hosts the swarm, nobody seeds the file, it takes longer than timeoutMs (20 s), or anything fails, the worker fetches the request from the origin. It then hands the bytes to the page to seed. From runtime 0.1.9 on, a big file gets more time from the swarm: its size at 256 KiB/s plus 5 s, if that is longer than timeoutMs . Swarm responses carry the same isolation headers the origin sends ( Cross-Origin-Embedder-Policy: credentialless , Cross-Origin-Opener-Policy: same-origin , Cross-Origin-Reso"},{"u":"/js/swarm-sw/#what-goes-into-the-swarm","t":"@0xlimo/swarm-sw","h":"What goes into the swarm","s":"JavaScript SDK","x":"The policy is swarm-assets.json in your game's directory. Without one, the default applies: every file of 16 KiB or more, except pages and the runtime. { \"include\": [\"**\"], \"exclude\": [\"**/*.html\", \"**/*.htm\", \"x1/**\", \"x1-sw.js\", \"x1.json\", \"swarm-assets.json\", \"node_modules/**\", \".x1/**\", \"server.mjs\", \"package.json\", \"package-lock.json\", \"0x.config.json\"] } Field Meaning include globs relative to the site root ( ** any depth, * within a name) exclude globs to leave on the origin minBytes smaller files stay on the origin (default 16384) maxBytes larger files stay on the origin (default 256 MiB) The hosting builder keeps the swarm-assets.json you upload. A paid game's site is built origin-only: x1.json is {\"swarm\": false} , there is no manifest, and nothing is seeded."},{"u":"/js/swarm-sw/#settings-x1json","t":"@0xlimo/swarm-sw","h":"Settings: x1.json","s":"JavaScript SDK","x":"boot.js reads <site>/x1.json , which the builder writes: Key Default Meaning manifest swarm/manifest.json the swarm manifest tracker wss://<host><root>p2p/tracker the meshtorrent tracker timeoutMs 20000 longest wait for the swarm before asking the origin swarm true false : no worker, everything from the origin reports on 0x hosting: /x1/xfer false turns transfer reports off; a URL sends them there site the site name the reports carry, when reports is a URL and the page isn't under /sites/<site>/<n>/ api the platform API URL, read by @0xlimo/platform 's siteApi() mirror none runtime 0.2.3+: an https:// mirror the worker asks before the origin; see mirror readahead false runtime 0.2.0+: true warms the next 6 pieces after each ranged read of a mounted file; see readahead data-tracker , data-manifest and data-timeout on the script tag override the file. ?x1=off in the page URL skips the swarm entirely. Neither builder writes mirror or readahead . On a self-hosted site, add them to the published x1.json after each 0x publish --to ."},{"u":"/js/swarm-sw/#player-privacy","t":"@0xlimo/swarm-sw","h":"Player privacy","s":"JavaScript SDK","x":"The launcher passes the player's sharing choice in the URL. privacy.js keeps it for the tab in sessionStorage : ?p2p=relay (Private): WebRTC only through the 0x TURN relay, so other players never see the player's address. A partitioned x1_private=1 cookie tells hosted game servers too. ?p2p=0 or ?p2p=off (Off): no swarm; every file comes from the origin."},{"u":"/js/swarm-sw/#transfer-reports","t":"@0xlimo/swarm-sw","h":"Transfer reports","s":"JavaScript SDK","x":"The worker counts the bytes each listed file took from the swarm and from the origin, and the host counts the bytes this page uploaded. The reports are sums per file hash only: no addresses and no peers. Inside the launcher : every 30 s, and when the page hides, they go to the launcher ( postMessage {x1: \"transfers\", v: 1, items} ). The launcher reports them unless the player turned sharing off. Opened directly on 0x hosting : the worker posts them to the origin's /x1/xfer every minute, and when the page hides, unless sharing is off."},{"u":"/js/swarm-sw/#in-the-console","t":"@0xlimo/swarm-sw","h":"In the console","s":"JavaScript SDK","x":"window.x1swarm is there for the game and for tests: await x1swarm.stats(); // {status: {sw, host, error}, sw: {...worker counters}, host: {asked, swarm, cache, declined, adopted, peerBytes, client}} x1swarm.status.error; // why the swarm is not running, if it is not The development server 0x dev serves the same runtime with a local tracker and seeder; see the 0x CLI ."},{"u":"/js/swarm-sw/#runtime-0-2","t":"@0xlimo/swarm-sw","h":"Mounts, mirror and starter packs (runtime 0.2.x)","s":"JavaScript SDK","x":"Runtime 0.2.6 ( @0xlimo/swarm-sw 0.1.8) adds these for games with very large data. Today they are for self-hosted sites only. See the version table above. Mounts : 0x publish --to … --mount /data/=<dir> puts an external data tree on the swarm in 1 MiB pieces without copying it into the site. The worker answers each Range request from the pieces that cover it. See Mounts, mirror and readahead . Mirror tier ( x1.json mirror ): a fast HTTPS copy of the swarm's files, asked before the origin, and before the swarm for files of 16 MiB or more. Readahead ( x1.json readahead ): sequential reads of a mounted file warm the next 6 MiB. Starter packs : one file on the player's disk answers the reads it covers, and a .x1patch updates it with only the changed pieces. data-manual on the boot tag waits for your Play button. See Starter packs and .x1patch updates . Tracker reports : the swarm host posts cumulative counters (bytes from peers, origin and cache, and connection kinds) under a random per-page id to the tracker's /report every 30 s and when the page hides. They carry nothing about the player."},{"u":"/js/swarm-sw/reference/","t":"@0xlimo/swarm-sw reference","h":"","s":"JavaScript SDK","x":"The package has no typings. Its files are loaded by URL from the site. This page describes src/ of @0xlimo/swarm-sw 0.1.8 , whose runtime version ( boot.js RUNTIME , the ?v= of the runtime's files) is 0.2.6 . Items marked 0.1.9+ , 0.2.x and so on are not in older runtimes. The 0x hosting builder installs runtime 0.1.4, and the published 0x CLI (0.1.7) installs 0.1.3; see Versions . Package exports: @0xlimo/swarm-sw/boot.js , @0xlimo/swarm-sw/host.js and @0xlimo/swarm-sw/x1-sw.js . src/starter.js ships in the package but is not exported."},{"u":"/js/swarm-sw/reference/#site-files","t":"@0xlimo/swarm-sw reference","h":"Site files","s":"JavaScript SDK","x":"Site path Source Kind x1-sw.js src/x1-sw.js classic service worker script (no imports) x1/boot.js src/boot.js ES module, the page's entry point x1/host.js src/host.js ES module, the swarm host (imported by boot) x1/privacy.js src/privacy.js ES module, the sharing mode x1/meshtorrent.mjs @x1/meshtorrent dist-browser/meshtorrent.mjs ES module, the WebRTC client x1/starter.js src/starter.js ES module, starter packs ( 0.1.9+ ). 0x publish doesn't copy it: copy it yourself to use starter packs. boot.js fetches the runtime files with ?v=0.2.6 , so a cache in front of the site answers with this runtime's copy. The worker rewrites a request for x1/*.js or x1/*.mjs that has no query string to its own RUNTIME . In 0.1.8 that constant still says 0.1.8 . Mount pieces from other players need a meshtorrent.mjs whose client has fetchRanges . The @x1/meshtorrent 0.2.1 on the registry doesn't have it. With that client, mount pieces come from the mirror or the origin."},{"u":"/js/swarm-sw/reference/#x1bootjs","t":"@0xlimo/swarm-sw reference","h":"x1/boot.js","s":"JavaScript SDK","x":"<script type=\"module\" src=\"./x1/boot.js\" data-entry=\"./main.js\" data-tracker=\"wss://…/p2p/tracker\" data-manifest=\"swarm/manifest.json\" data-timeout=\"20000\" data-manual></script> Attribute Meaning data-entry your module, imported after boot (relative to the page) data-tracker overrides x1.json tracker data-manifest overrides x1.json manifest (relative to the site root) data-timeout overrides x1.json timeoutMs data-manual 0.1.9+ : don't import data-entry until the page calls window.x1start() (a Play button). window.__wantStart = true , set before boot gets there, starts it at once. x1.json keys read by boot: tracker , manifest , timeoutMs , swarm , reports , site , readahead ( 0.2.0+ , only true turns it on) and mirror ( 0.2.3+ , only an https:// URL; trailing / removed). See Mounts, mirror and readahead . Boot order: register the worker, wait for it to control the page, import x1/host.js , open a starter pack ( ?starter=<url> , else the stored one) from x1/starter.js if that file exists, then startSwarmHost({…, localPack}) . The whole boot has 5000 ms. Any failure is logged as 0x swarm: <reason> - files load from the origin . URL parameters: ?x1=off skips the worker and the swarm. ?"},{"u":"/js/swarm-sw/reference/#windowx1swarm","t":"@0xlimo/swarm-sw reference","h":"window.x1swarm","s":"JavaScript SDK","x":"Member Type status {sw: boolean, host: boolean, error: string} stats() Promise<{status, sw: object | null, host: object | null, starter}> starter 0.1.9+ : {name, bytes, files} of the open starter pack, or null starterPending 0.1.9+ : set when the stored pack needs a read grant: {name, grant(): Promise} . Call grant() from a user gesture, then reload. takeTransfers() Promise<Array<{id: string, webtorrent?: number, origin?: number, up?: number}>> : the bytes moved since the last call, per file hash"},{"u":"/js/swarm-sw/reference/#x1hostjs","t":"@0xlimo/swarm-sw reference","h":"x1/host.js","s":"JavaScript SDK","x":"startSwarmHost(o: { tracker: string; // ws(s) URL of the tracker; /health, /ice, /seeds are beside it manifestUrl: string; // the swarm manifest (version 1) meshtorrentUrl: string; // URL of meshtorrent.mjs cache?: boolean; // default true: OPFS/IndexedDB tile cache, 512 MiB log?: boolean; localPack?: object; // 0.1.9+: an opened starter pack (starter.js openStarterPack) }): Promise<{ stats(): object; takeUploads(): Array<{ id: string; up: number }>; client: object; swarmKey(): Promise<{ pub: string } | null>; useKey(kid: string): void; takeReceipts(): Promise<Array<{ r; s }>>; }> It throws when the sharing mode is off , when the tracker's /health does not answer in 3 s, or when the manifest is not a meshtorrent manifest ( version !== 1 ). It asks /ice for STUN and TURN servers and uses the browser's defaults when that fails. Swarm limits: uploadLimit 2 MiB/s, perPeerUploadCap 128 MiB, maxSeeding 400, maxConns 24 and fetchNumwant 12 ( 0.1.9+ , before that 8 and 3). With localPack , the reads the pack covers are answered from disk (source \"disk\" ), before the swarm: whole manifest files the pack holds completely, covered mount pieces, and whole mounted files the shards don't list ( "},{"u":"/js/swarm-sw/reference/#x1privacyjs","t":"@0xlimo/swarm-sw reference","h":"x1/privacy.js","s":"JavaScript SDK","x":"sharingMode(loc?: Location): \"relay\" | \"off\" | \"on\" rtcConfigFor(mode: string, iceServers?: RTCIceServer[]): RTCConfiguration // relay -> iceTransportPolicy: \"relay\" The value comes from ?p2p= ( relay , or 0 / off ; any other value means on ). It is kept in sessionStorage under x1-p2p . In relay mode it sets the cookie x1_private=1; Path=/; Secure; SameSite=None; Partitioned; Max-Age=43200 ; in the other modes it clears it."},{"u":"/js/swarm-sw/reference/#x1-swjs","t":"@0xlimo/swarm-sw reference","h":"x1-sw.js","s":"JavaScript SDK","x":"Registered by boot as x1-sw.js?manifest=<url>&timeout=<ms>[&readahead=1][&mirror=<url>]&v=<runtime> , with the site root as its scope. The worker also reads pieceTimeout (ms, default 400) and wholeWindow (pieces, default 8) from its URL. Boot never sets them. Behaviour Value Handles GET , not navigations, for URLs on the site's origin under the manifest root whose key is in manifest.entries , or ( 0.1.9+ ) under a manifest.mounts prefix (case-insensitive) Manifest refresh every 60 s ( MANIFEST_TTL_MS ) Host timeout timeout parameter, default 20000 ms. 0.1.9+ : for a whole file, the longer of that and its size at 256 KiB/s plus 5 s. Memo 64 MiB of recent whole files and mount pieces (for Range requests) Order for a manifest file memo, then the mirror if the file is 16 MiB or more ( 0.2.6 ), then the page's swarm, then the mirror ( 0.2.5 ), then the origin Order for a mount piece memo, then the page (its cache, a starter pack, peers: 400 ms), then the mirror ( 0.2.3 ), then the origin, one Range per run of missing pieces. See mounts . Mirror GET <mirror>/file/<infoHash> ( Range for pieces), timeout max(30 s, bytes/1000 ms) . Off for 60 s after any failure. Whole files are SHA-256 che"},{"u":"/js/swarm-sw/reference/#messages-page--worker","t":"@0xlimo/swarm-sw reference","h":"Messages (page → worker)","s":"JavaScript SDK","x":"t Payload Reply (on ports[0] ) x1-host 0.1.9+ : seeds (the tracker's same-origin /seeds URL), kept (up to 8192 tile ids the page keeps), localPack (boolean) {ok: true} ; the page now hosts the swarm x1-unhost x1-stats the worker's counters plus {hosts, hostHasPack, manifestEntries, mounts} (mount prefixes) x1-take-counts 0.1.9+ : the byte and file counters for the tracker report since the last take x1-xfer {items: [{id, webtorrent?, origin?}]} , taken since the last call x1-report report: {url, site, session, seq} , uploads the worker posts the transfer report to report.url"},{"u":"/js/swarm-sw/reference/#messages-worker--page","t":"@0xlimo/swarm-sw reference","h":"Messages (worker → page)","s":"JavaScript SDK","x":"t Payload Reply (on ports[0] ) x1-get key , url , entry {ok, bytes, source: \"swarm\" | \"cache\" | \"disk\", stats} or {ok: false, why} x1-pieces 0.1.9+ : key , url , fileId , pieces: [{i, tileId, infoHash, size, packRange, pack?, packTileId?, packSize?, seeds}] , noPeerMs , maxMs one message per piece, {i, ok, bytes, source, stats} or {i, ok: false, why} , then {done: true} x1-local 0.1.9+ : key , url {ok, bytes} of a whole file from the starter pack, or {ok: false, why} x1-adopt key , url , entry , bytes (and fileId for a piece) none: the page keeps and seeds the bytes"},{"u":"/js/swarm-sw/reference/#messages-page--launcher","t":"@0xlimo/swarm-sw reference","h":"Messages (page → launcher)","s":"JavaScript SDK","x":"{x1: \"transfers\", v: 1, items} goes to the launcher's origin every 30 s and on pagehide , when the page runs inside the launcher."},{"u":"/js/swarm-sw/reference/#the-manifest","t":"@0xlimo/swarm-sw reference","h":"The manifest","s":"JavaScript SDK","x":"swarm/manifest.json is built by @x1/meshtorrent 's asset manifest builder: {version: 1, entries: {\"/<site path>\": {tileId, infoHash, size}}} . tileId is the file's SHA-256. Beside it are swarm/t/<infoHash>.torrent (metadata bootstrap) and swarm/content/<id> , <id>.info (the content-addressed store that native clients use). See @x1/meshtorrent . 0.1.9+ : a site published with mounts also has mounts: [{prefix, base, pieceLen, pagePieces, buckets, files, pieces, bytes, packs}] beside entries , with its shards under swarm/x/<name>/ and a pack torrent per mounted file in swarm/t/ . See What a mount writes ."},{"u":"/js/swarm-sw/starter-packs/","t":"Starter packs and .x1patch updates","h":"","s":"JavaScript SDK","x":"A starter pack is one file that holds the byte spans a game reads while it boots and plays, as whole pieces of the site's files. The player picks the pack once, or the page downloads it. From then on, the swarm runtime answers every read the pack covers from the player's disk, before it asks the swarm or the origin. Anything the pack doesn't cover loads as before. A .x1patch updates a stored pack to a newer generation. It carries only the pieces that changed, so an update costs only what changed. Starter packs are built for mounts : a big data tree whose reads are ranges of 1 MiB pieces. They also answer whole files of the swarm manifest. Runtime 0.2.x, self-hosted sites, no SDK builder yet This needs the site runtime from @0xlimo/swarm-sw 0.1.8 (runtime 0.2.6 ). 0x hosting installs runtime 0.1.4, so it isn't available on hosted sites. 0x publish doesn't copy x1/starter.js into the site, and the package doesn't export it. Copy node_modules/@0xlimo/swarm-sw/src/starter.js to <site>/x1/starter.js yourself. Without that file, boot.js runs without a pack. The SDK has no tool that builds starter packs or .x1patch files yet. The formats are described below. The runtime looks pack entries"},{"u":"/js/swarm-sw/starter-packs/#how-a-page-uses-a-pack","t":"Starter packs and .x1patch updates","h":"How a page uses a pack","s":"JavaScript SDK","x":"x1/boot.js opens the pack before it starts the swarm host, and passes it to startSwarmHost({localPack}) : ?starter=<url> in the page URL opens a pack at that URL by range requests (a local share, or a launcher's localhost endpoint). It is never stored. The server must send Content-Length on HEAD and answer Range requests with 206 . Otherwise, the pack the player stored earlier is opened from IndexedDB (database x1-starter ). A pack stored as a file handle by an older runtime may need a read grant. Then boot sets window.x1swarm.starterPending = {name, grant} instead. Call grant() from a click handler (it needs a user gesture), and reload. The grant also stores the file itself, so it is asked only once. When a pack is open, window.x1swarm.starter is {name, bytes, files} , and x1swarm.stats() includes it. The swarm host then answers: mount pieces the pack covers, from disk, before the tracker is consulted. With a pack open, the worker asks the page for every piece of a mounted file and never streams a read past it. whole manifest files the pack holds completely, before the swarm. mounted files the shards don't list (excluded or too small, such as an engine's own index files), whole, b"},{"u":"/js/swarm-sw/starter-packs/#what-is-checked","t":"Starter packs and .x1patch updates","h":"What is checked","s":"JavaScript SDK","x":"Read Check Every piece read from the pack SHA-1 against the pack's own index ( ph ), on every read Mount pieces and whole manifest files then SHA-256 against the site's shards or manifest, in the worker, before the game gets them Mounted files the shards don't list only the pack's own SHA-1s: the site has no hash for them Verified pieces are kept in memory for re-reads, up to 1 GiB by default. Engines read the same piece often."},{"u":"/js/swarm-sw/starter-packs/#a-play-button-data-manual","t":"Starter packs and .x1patch updates","h":"A Play button: data-manual","s":"JavaScript SDK","x":"<script type=\"module\" src=\"./x1/boot.js\" data-entry=\"./main.js\" data-manual></script> With data-manual , boot doesn't import the entry module on its own. It waits until the page calls window.x1start() . Your page can show its own pack card and Play control first, and the click is also the gesture that browsers want for audio. If the page sets window.__wantStart = true before boot gets there, the entry starts at once."},{"u":"/js/swarm-sw/starter-packs/#storing-a-pack-x1starterjs","t":"Starter packs and .x1patch updates","h":"Storing a pack: x1/starter.js","s":"JavaScript SDK","x":"Import the module from the site ( ./x1/starter.js ) in your page's own code. import { storeStarterHandle, storeStarterRanges, starterDownloadState, clearStarter } from \"./x1/starter.js\"; // the player picks the file (any browser) input.onchange = async () => { await storeStarterHandle(input.files[0]); location.reload(); // boot opens it on the next load }; // or the page downloads it: 6 ranges at once, each 64 MiB chunk stored as it lands const ctl = new AbortController(); await storeStarterRanges(\"game-starter.x1pack\", packUrl, packSize, (got) => showProgress(got / packSize), { signal: ctl.signal, // ctl.abort() pauses; the landed chunks stay idle: async () => gameIsLoading(), // true: the download waits (the game's reads win the link) }); Export What it does openStarterPack(blob, {cacheBytes?}) Opens a pack from a File , Blob or urlBlob() . Returns {name, bytes, files, built, indexHash, index, covers(rel, a, b), read(rel, a, b), whole(rel)} . read and whole check every piece and throw on a mismatch. cacheBytes defaults to 1 GiB. openStoredStarter() The stored pack, opened. null without one, or {pending: true, name, grant()} for a handle that needs a grant. urlBlob(url) A blob-lik"},{"u":"/js/swarm-sw/starter-packs/#x1patch","t":"Starter packs and .x1patch updates","h":"Updates: .x1patch","s":"JavaScript SDK","x":"Each pack has a generation : indexHash , the SHA-256 of its index JSON. A patch names the generation it builds on ( from ). applyPatch refuses any other generation with starter patch: this update builds on a different pack generation — download the full pack instead . import { openStoredStarter, applyPatch, storeStarterHandle } from \"./x1/starter.js\"; const pack = await openStoredStarter(); const patch = await (await fetch(\"updates/2026-10-29.x1patch\")).blob(); const next = await applyPatch(pack, patch); // nothing is copied yet: slices of the old pack and the patch await storeStarterHandle(next); The new pack's bytes are lazy slices of the old pack and the patch, so keep both readable until the new pack is stored. Every piece, patched or kept, is checked again when it is read. A piece that is neither in the patch nor in the old pack (same piece number and SHA-1) fails the apply."},{"u":"/js/swarm-sw/starter-packs/#formats","t":"Starter packs and .x1patch updates","h":"Formats","s":"JavaScript SDK","x":"Both files end with a 16-byte trailer: an 8-byte magic, then the index length as a little-endian u64. The index JSON sits right before the trailer. Starter pack ( X1PACK01 ): [stored pieces of each file, ascending][index JSON][trailer] { \"v\": 1, \"kind\": \"x1pack-starter\", \"built\": \"2026-10-29T12:00:00Z\", \"files\": { \"maps/level1.pak\": { \"size\": 734003200, \"pieceLen\": 1048576, \"off\": 0, \"pieces\": [0, 1, 2, 57, 58], \"ph\": [\"<sha1 hex>\", \"…\"] }, \"maps/level1.idx\": { \"whole\": true, \"size\": 40960, \"off\": 5242880 } } } Field Meaning key The file's path as the page requests it, without a leading / or /data/ . Mount pieces are looked up by the lower-case path. size The file's full size pieceLen Its piece length: the mount's 1 MiB for mounted files off Where the file's stored pieces start in the pack pieces The piece numbers stored, ascending. They sit back to back from off , and only the file's last piece may be short. ph The SHA-1 of each stored piece, in the same order whole true : the whole file is stored at off , with no piece hashes Patch ( X1PATCH1 ): [piece bytes][index JSON][trailer] { \"v\": 1, \"kind\": \"x1pack-patch\", \"from\": \"<indexHash of the pack it updates>\", \"index\": { \"v\": 1, \"k"},{"u":"/js/meshtorrent/","t":"@x1/meshtorrent","h":"","s":"JavaScript SDK","x":"meshtorrent is how 0x moves static files between players. It uses WebTorrent over WebRTC in browsers, deterministic torrents (the same bytes always give the same infohash), SHA-256 content ids, and the origin as a last-resort web seed. Hosted sites and 0x dev use it through @0xlimo/swarm-sw , so most games never import it directly. Use it directly to: build or check a site's swarm manifest yourself ( asset-manifest.mjs ); fetch listed files from the swarm in your own loader (the browser client); keep a persistent, verified cache of fetched files ( openTileCache ). Registry version: 0.2.0 (Node.js 20+). It depends on webtorrent , bittorrent-tracker , create-torrent , parse-torrent , node-datachannel and webrtc-polyfill . npm install @x1/meshtorrent --@x1:registry=https://0x.limo/npm/ Deep imports only The package's package.json has no main , exports or bin field. Import modules by path ( @x1/meshtorrent/dist/src/asset-manifest.js ), and run the tools with node node_modules/@x1/meshtorrent/bin/<tool>.mjs . The browser bundle is @x1/meshtorrent/dist-browser/meshtorrent.mjs (ES module) or …/meshtorrent.js (an IIFE that sets window.MeshTorrent )."},{"u":"/js/meshtorrent/#build-and-verify-a-swarm-manifest","t":"@x1/meshtorrent","h":"Build and verify a swarm manifest","s":"JavaScript SDK","x":"# what 0x publish does: the files your policy lists -> <site>/swarm/ node node_modules/@x1/meshtorrent/bin/asset-manifest.mjs --root dist --policy swarm-assets.json --verify # check a published copy without writing anything node node_modules/@x1/meshtorrent/bin/asset-manifest.mjs --root dist --verify-only The output goes under <root>/swarm/ : Path What manifest.json {version: 1, entries: {\"/<site path>\": {tileId, infoHash, size}}} , canonical JSON t/<infoHash>.torrent metadata bootstrap, so a swarm with no peers can start from the web seed content/<id> , content/<id>.info the content-addressed store that native 0x clients use as a web seed Files are rewritten only when their bytes change. Torrents and copies of files that left the policy are removed. Without a policy nothing is taken ( 0x publish supplies its default; see what goes into the swarm ). Node Browser import { parsePolicy, writeAssetManifest, verifyAssetManifest } from \"@x1/meshtorrent/dist/src/asset-manifest.js\"; const policy = parsePolicy(JSON.stringify({ include: [\"assets/**\"], minBytes: 16384 })); const r = await writeAssetManifest(\"dist\", policy); // {files, bytes, skippedSmall, skippedLarge, ...} const v = await ve"},{"u":"/js/meshtorrent/#guarantees","t":"@x1/meshtorrent","h":"Guarantees","s":"JavaScript SDK","x":"Integrity : everything fetched is hashed. sha256(bytes) must equal the entry's tileId , or the bytes are discarded and never seeded. Cache reads are re-hashed too. Peers first : the web seed joins late ( webseedDelayMs ). A file that nobody seeds, per the tracker's /seeds , goes straight to a plain fetch. Circuit breaker : after 3 swarm failures in a row, the client uses HTTP for 60 s ( breakerFailures , breakerCooldownMs ). Fallback : without RTCPeerConnection , the client is origin-only. The full option and type list is in the reference ."},{"u":"/js/meshtorrent/reference/","t":"@x1/meshtorrent reference","h":"","s":"JavaScript SDK","x":"This page covers version 0.2.0 as published. The typings are in the package ( dist/src/*.d.ts ), but package.json does not point to them, so import by path. This page lists the parts a game developer uses. The tracker and seeder exist for 0x dev and the hosting service."},{"u":"/js/meshtorrent/reference/#distsrcasset-manifestjs","t":"@x1/meshtorrent reference","h":"dist/src/asset-manifest.js","s":"JavaScript SDK","x":"interface AssetPolicy { include: string[]; // globs relative to the site root: ** any depth, * within a name exclude?: string[]; minBytes?: number; // default 16384 (16 KiB) maxBytes?: number; // default 268435456 (256 MiB) } interface AssetManifestResult { manifest: Manifest; files: number; bytes: number; skippedSmall: number; skippedLarge: number; torrentsWritten: number; torrentsPruned: number; sgWritten: number; sgPruned: number; manifestChanged?: boolean; } interface AssetVerifyResult { entries: number; ok: number; mismatched: string[]; missing: string[]; bad: string[] } const SWARM_DIR = \"swarm\", TORRENT_DIR = \"t\", CONTENT_DIR = \"content\"; function globRe(glob: string): RegExp; function parsePolicy(text: string): AssetPolicy; function buildAssetManifest(root: string, policy: AssetPolicy): Promise<AssetManifestResult>; // no writes function writeAssetManifest(root: string, policy: AssetPolicy): Promise<AssetManifestResult>; function verifyAssetManifest(root: string): Promise<AssetVerifyResult>; Keys are site paths ( /registry/blocks.json ). tileId is the file's SHA-256, and infoHash is the deterministic torrent of the bytes named <tileId><ext> , with a 256 KiB piece length ( T"},{"u":"/js/meshtorrent/reference/#binasset-manifestmjs","t":"@x1/meshtorrent reference","h":"bin/asset-manifest.mjs","s":"JavaScript SDK","x":"asset-manifest.mjs --root <site dir> [--policy <file>] [--verify | --verify-only] Flag Meaning --root the site directory (required) --policy the policy JSON (default <root>/swarm-assets.json ; nothing is taken without one) --verify afterwards, re-hash every entry's file, torrent and stored copy; exit 1 on any mismatch --verify-only the check alone, writing nothing Exit codes: 0 ok, 1 verify failed, 2 usage or policy error."},{"u":"/js/meshtorrent/reference/#browser-client-distsrcclientjs-also-in-the-browser-bundle","t":"@x1/meshtorrent reference","h":"Browser client: dist/src/client.js (also in the browser bundle)","s":"JavaScript SDK","x":"function initClient(o: ClientOpts): MeshClient; interface MeshClient { fetchEntry(entry: { tileId: string; infoHash: string; size: number }, httpUrl: string, torrentUrl: string, o?: { maxProjectedMs?: number }): Promise<FetchFileResult>; fetchFile(key: string, httpUrl: string, expectedTileId?: string): Promise<FetchFileResult>; adoptEntry(entry: { tileId: string; infoHash: string; size: number }, bytes: Uint8Array, httpUrl: string): Promise<boolean>; fetchChunk(params: FetchChunkParams): Promise<ChunkResult>; // voxel world tiles (VXCH) stats(): ClientStats; } interface FetchFileResult { bytes: Uint8Array; source: \"cache\" | \"swarm\" | \"webseed\" | \"origin\"; stats: { peerBytes: number; webseedBytes: number; originBytes: number }; } ClientOpts : Option Default Meaning trackerUrls required tracker WebSocket URLs originBase required the origin base URL (web seed and fallback) swarmTimeoutMs longest swarm attempt for a tile manifest fetched preload the manifest (works with the origin unreachable) rtcConfig RTCConfiguration (STUN/TURN, iceTransportPolicy ) uploadLimit , perPeerUploadCap , maxSeeding , webseedDelayMs , maxConns , fetchNumwant swarm limits assetNoPeerMs 2000 site files: wait"},{"u":"/js/meshtorrent/reference/#tile-cache-distsrctile-cachejs","t":"@x1/meshtorrent reference","h":"Tile cache: dist/src/tile-cache.js","s":"JavaScript SDK","x":"function openTileCache(o?: { budgetBytes?: number; backend?: TileCacheBackend; now?: () => number }): Promise<TileCache>; interface TileCache { get(tileId: string): Promise<Uint8Array | null>; // verified; marks it used put(tileId: string, bytes: Uint8Array, meta: { ext: string; infoHash: string }): Promise<void>; has(tileId: string): boolean; entries(): CacheEntry[]; // most recently used first stats(): TileCacheStats; // {backend, budgetBytes, tiles, bytes, hits, misses, puts, evictions, corrupt} } function opfsBackend(dirName?: string): Promise<TileCacheBackend | null>; function idbBackend(dbName?: string): Promise<TileCacheBackend | null>; function memoryBackend(): TileCacheBackend; function defaultBackend(): Promise<TileCacheBackend>; // OPFS, then IndexedDB, then memory The default budget is 256 MiB, and never more than half of the origin's storage quota. Hosted sites use 512 MiB. Eviction is least recently used. A read whose bytes no longer hash to their id is dropped and counted in corrupt ."},{"u":"/js/meshtorrent/reference/#manifest-helpers-distsrcmanifestjs","t":"@x1/meshtorrent reference","h":"Manifest helpers: dist/src/manifest.js","s":"JavaScript SDK","x":"interface ManifestEntry { tileId: string; infoHash: string; size: number; sg?: SgEntryField } // sg: {piece_len, pieces} interface Manifest { version: 1; entries: Record<string, ManifestEntry> } const MANIFEST_VERSION: 1; function emptyManifest(): Manifest; function parseManifest(serialized: string | Uint8Array): Manifest; function serializeManifest(manifest: Manifest): string; // canonical JSON function lookupKey(manifest: Manifest, key: string): ManifestEntry | null; function addRawEntry(manifest: Manifest, key: string, entry: ManifestEntry): Manifest; An entry larger than one piece carries sg: {piece_len, pieces} , the per-piece SHA-256 list that native clients use. One-piece files derive it from tileId ."},{"u":"/js/meshtorrent/reference/#tools-used-by-the-cli-and-hosting","t":"@x1/meshtorrent reference","h":"Tools used by the CLI and hosting","s":"JavaScript SDK","x":"Tool Purpose bin/tracker.mjs --config <file> the tracker: per-origin swarm groups, a manifest allowlist, limits, GET /ice (STUN + TURN), POST /report , GET /stats.json , GET /health bin/seeder.mjs (--lod <dir> | --assets <site dir>) --tracker <ws url?group=&seedkey=> [--seedkey-file f] [--ice url] [--upload-limit B/s] [--per-peer-cap B] [--rescan-s 60] [--log-s 60] an always-on seed for a site's listed files over WebRTC bin/lod-manifest.mjs , bin/seed-daemon.mjs , bin/bridge.mjs voxel-world tiles and the browser/native bridge 0x dev starts the tracker and a seeder for your site on localhost."},{"u":"/js/byo-assets/","t":"@0xlimo/byo-assets","h":"","s":"JavaScript SDK","x":"Some worlds are built from a commercial game's graphics. Los Santos, for example, uses GTA V's. @0xlimo/byo-assets holds recipes : small JSON files that say which file of the game to read, how to convert it, and which hashes the result must have. The output is ordinary world content: publish it and let the swarm share it like any other asset. Running an import locally is optional; a world can ship the converted files directly. Registry version: 0.1.1 (Node.js 20+). The 0x CLI routes 0x assets … to this package's x1-assets command (also installed as 0x-assets ). npm install @0xlimo/byo-assets --@0xlimo:registry=https://0x.limo/npm/ v0 Implemented end to end: GTA V texture dictionaries ( ytd@1 ) to PNG, glTF swatches or the Los Santos texture library layout. GTA V install detection (retail and extracted trees) and nested RPF7 archives. The proc-texture@1 fallback generator. Not implemented yet (each throws NotImplementedConverter ): models (ydr/ydd, yft to glTF), collisions (ybn), placements (ymap/ytyp), the voxel library, Cyberpunk 2077 conversion (install detection only), decrypting retail NG/AES archives (the keys seam), and BC7 textures (skipped and reported)."},{"u":"/js/byo-assets/#commands","t":"@0xlimo/byo-assets","h":"Commands","s":"JavaScript SDK","x":"0x assets locate --game gta5 [--path <dir>] # show the install found 0x assets import --game gta5 [--path <install>] [--recipes <file|dir>] [--cache <dir>] [--force] [--json] 0x assets fallback [--recipes <file|dir>] --out <dir> # write the stand-ins (0x-owned, publishable) import runs the recipes for that game (the built-in recipes/<game> by default) into the local cache. A recipe whose run is cached, and whose source hash is unchanged, is not converted again unless --force is given. Exit codes: 0 ok, 2 a recipe ended mismatch or error , 1 failure, 64 unknown command. The cache is $ZEROX_BYO_CACHE , else $XDG_CACHE_HOME/0x/byo , else ~/.cache/0x/byo : Path Contents objects/<aa>/<sha256> converted files, by content hash runs/<recipeHash>.json one record per recipe run views/<game>/<target>/<name> hard links (or copies), so engines can load by name"},{"u":"/js/byo-assets/#recipes","t":"@0xlimo/byo-assets","h":"Recipes","s":"JavaScript SDK","x":"{ \"schema\": \"x1.byo.recipe/1\", \"id\": \"gta5/props/v_garden/prop_lawn/png\", \"game\": \"gta5\", \"gameVersions\": [\"*\"], \"source\": { \"path\": \"x64f.rpf/levels/gta5/props/residential/v_garden.rpf/prop_lawn.ytd\", \"sha256\": \"02e9…\" }, \"converter\": { \"name\": \"ytd\", \"version\": \"1\" }, \"target\": \"png\", \"settings\": { \"maxDim\": 512 }, \"outputs\": { \"<name>\": { \"sha256\": \"<file bytes>\", \"content\": \"<decoded pixels>\" } }, \"fallback\": { \"generator\": \"proc-texture\", \"version\": \"1\", \"settings\": { \"palette\": [\"#556b2f\", \"#6b8e23\"], \"seed\": 7 } } } Identity : the SHA-256 of the canonical JSON, with outputs left out. source.sha256 pins the player's file. A different hash means another game version or a modded file, and the run ends source-mismatch . outputs pins the result. content hashes the decoded pixels, so a pin still verifies when only the PNG encoder changes. target is one of png , gltf or bitize-texlib . A file can hold one recipe, or a set: {\"schema\": \"x1.byo.recipeset/1\", \"recipes\": [...]} . Run status is one of verified , unpinned , mismatch , source-mismatch , missing , unsupported or error . Source paths are written as they appear inside the game. Each segment resolves to a real directory, to th"},{"u":"/js/byo-assets/#fallbacks","t":"@0xlimo/byo-assets","h":"Fallbacks","s":"JavaScript SDK","x":"Every recipe can name a stand-in. proc-texture@1 is an original, deterministic generator (noise, bricks or stripes from a palette and a seed). Its PNGs carry the text chunk x1:fallback with the licence CC0-1.0 (0x original) . resolve(recipe, cache) returns the player's converted files when the cache has them all, and the stand-ins otherwise, under the same names."},{"u":"/js/byo-assets/#declaring-imported-content-in-a-listing","t":"@0xlimo/byo-assets","h":"Declaring imported content in a listing","s":"JavaScript SDK","x":"A universe (store entry) can say which games its content comes from, so the launcher can show it and offer the local import: \"content\": { \"imported\": { \"games\": [{ \"id\": \"gta5\", \"title\": \"Grand Theft Auto V\" }], \"recipes\": \"<sha256>\", \"paths\": [\"lsvehmesh/**\"], \"fallback\": \"required\" } } validateImported(universe) checks it: games with id is required, recipes must be a SHA-256, paths a list of globs, and fallback either required or optional . The field does not affect publishing or the swarm. The functions are listed in the reference ."},{"u":"/js/byo-assets/reference/","t":"@0xlimo/byo-assets reference","h":"","s":"JavaScript SDK","x":"The package has no typings. It has one entry point, @0xlimo/byo-assets ( src/index.mjs ), and a binary, x1-assets (alias 0x-assets ). The signatures below are written as TypeScript for readability."},{"u":"/js/byo-assets/reference/#pipeline","t":"@0xlimo/byo-assets reference","h":"Pipeline","s":"JavaScript SDK","x":"importAssets(o: { gameId: string; // \"gta5\" path?: string; // install or extracted tree; default: detected recipes: Recipe[]; // only those with recipe.game === gameId run cacheRoot?: string; // default defaultCacheRoot() keys?: unknown; // decryption seam (retail archives), not implemented in v0 force?: boolean; log?: (line: string) => void; }): Promise<{ install: Install; cacheRoot: string; results: RunResult[] }> runRecipe(recipe: Recipe, o: { install: Install; cache: Cache; keys?: unknown; force?: boolean }): Promise<RunResult> // RunResult: {id, recipe: <recipeHash>, target, status, outputs?, error?, cached?, mismatched?} // status: \"verified\" | \"unpinned\" | \"mismatch\" | \"source-mismatch\" | \"missing\" | \"unsupported\" | \"error\""},{"u":"/js/byo-assets/reference/#recipes","t":"@0xlimo/byo-assets reference","h":"Recipes","s":"JavaScript SDK","x":"const SCHEMA = \"x1.byo.recipe/1\"; const SET_SCHEMA = \"x1.byo.recipeset/1\"; const TARGETS = [\"png\", \"gltf\", \"bitize-texlib\"]; parseRecipes(text: string): Recipe[] // one recipe or a set; validates each validateRecipe(r: object): Recipe // throws \"recipe <id>: <problems>\" recipeHash(r: Recipe): string // sha256 of canonicalJson(r without outputs) canonicalJson(v: unknown): string // keys sorted recursively, no whitespace checkOutputs(recipe: Recipe, outputs: Array<{ name: string; sha256: string; content?: string }>): { status: \"verified\" | \"unpinned\" | \"mismatch\"; mismatched: string[] } Validation rules: schema must be the recipe schema, and id and game are required. source.path must be relative, with no .. . source.sha256 is 64 hex digits or null. converter needs a name and a version . target must be one of TARGETS . Output pins are 64 hex digits."},{"u":"/js/byo-assets/reference/#cache","t":"@0xlimo/byo-assets reference","h":"Cache","s":"JavaScript SDK","x":"defaultCacheRoot(env?: NodeJS.ProcessEnv): string // $ZEROX_BYO_CACHE | $XDG_CACHE_HOME/0x/byo | ~/.cache/0x/byo openCache(root?: string): Promise<{ root: string; objPath(id: string): string; put(bytes: Uint8Array): Promise<string>; // -> sha256 id (atomic write) get(id: string): Promise<Buffer | null>; // null if missing or not matching id getRun(recipeHash: string): Promise<object | null>; putRun(recipeHash: string, run: object): Promise<void>; link(game: string, target: string, name: string, id: string): Promise<string>; // views/<game>/<target>/<name> }>"},{"u":"/js/byo-assets/reference/#fallbacks","t":"@0xlimo/byo-assets reference","h":"Fallbacks","s":"JavaScript SDK","x":"generateFallback(recipe: Recipe): Array<{ name: string; bytes: Buffer; sha256: string }> resolve(recipe: Recipe, cache?: Cache): Promise<{ kind: \"imported\" | \"fallback\"; files: Map<string, Uint8Array> }> generateFallback throws when the recipe has no fallback , when the fallback names an asset by hash (not in v0), or when the generator is unknown. proc-texture@1 settings: width , height (64), palette (hex colours), seed (1), pattern ( bricks or stripes ), and names (output names; default <last id segment>.png )."},{"u":"/js/byo-assets/reference/#universe-field","t":"@0xlimo/byo-assets reference","h":"Universe field","s":"JavaScript SDK","x":"validateImported(universe: object): object | null // the content.imported field, null if absent; throws on errors"},{"u":"/js/byo-assets/reference/#cli","t":"@0xlimo/byo-assets reference","h":"CLI","s":"JavaScript SDK","x":"run(argv: string[], io?: { stdout?: Writable; stderr?: Writable }): Promise<number> // exit code Command Flags import --game (required), --path , --recipes (default: built-in recipes/<game> ), --cache , --force , --json fallback --recipes (default: all built-in), --out (required) locate --game (default gta5 ), --path Exit codes: 0 ok, 1 error ( 0x assets: <message> on stderr), 2 an import with mismatch or error results, 64 unknown command (prints the usage)."},{"u":"/js/host/","t":"@0xlimo/host","h":"","s":"JavaScript SDK","x":"0x deploy-server uploads your game server to x1-host, the 0x service that runs it. Players reach it at https://play.0x.limo/x1/game/<app>/ , over HTTP and WebSocket. <app> is your hosted site's name (the id in 0x.config.json ). The package is the runner itself. You do not need to install it to deploy; the CLI talks to the service. Running your own instance is out of the scope of these docs. Registry version: 0.1.1 . 0x hosting runs 0.1.2 ."},{"u":"/js/host/#your-servers-environment","t":"@0xlimo/host","h":"Your server's environment","s":"JavaScript SDK","x":"Variable Value PORT 8080 ; listen on it ZEROX_APP your app (site) name ZEROX_PUBLIC_URL where players reach you ( https://play.0x.limo/x1/game/<app>/ ) ZEROX_BCAST_URL , ZEROX_BCAST_SERVER_URL the broadcast service, through a loopback forwarder ( ws://127.0.0.1:7801/… ) ZEROX_BCAST_PLAYER_URL the broadcast service's player endpoint, for your clients ZEROX_BCAST_TOKEN your app's broadcast token ZEROX_API_URL the platform API, through a loopback forwarder ( http://127.0.0.1:7802 ) The host also sets each of these under its old name, X1_* (for example X1_BCAST_TOKEN ), so servers written before the rename to 0x keep working; read ZEROX_* first and fall back to X1_* . @0xlimo/net 's connectServiceServer() and @0xlimo/iap/server 's IapServer.fromEnv() pick these up with no arguments. Requests reach your server with the /x1/game/<app> prefix removed, and with X-Forwarded-Prefix: /x1/game/<app> ."},{"u":"/js/host/#the-sandbox","t":"@0xlimo/host","h":"The sandbox","s":"JavaScript SDK","x":"Limit Value on 0x hosting CPU 1 Memory 512 MiB, including /tmp Processes 128 /tmp 64 MiB tmpfs; everything else is read-only Open files 4096 Logs 5 MB per file, 2 files Bundle (upload, .tar.gz ) 50 MB Installed size (after npm ci ) 400 MB Running servers 2 per developer, 20 in total Network loopback only: the broadcast service and the platform API are forwarded in; nothing else (no LAN, no internet) Your code runs as an unprivileged user ( node:24-bookworm-slim ), with no capabilities and no-new-privileges . It sees only its own app directory, read-only. Dependencies install with npm ci --ignore-scripts in a throwaway container. No package scripts run, and @0xlimo/* packages are bundled for you by the CLI. Any exit restarts the server, with a backoff that doubles from 100 ms and resets after 10 s of running. Paid games' servers are meant to take owners only, through @0xlimo/paygate , which is not deployed on 0x.limo."},{"u":"/js/host/#the-developer-api","t":"@0xlimo/host","h":"The developer API","s":"JavaScript SDK","x":"0x deploy-server and 0x server … call these endpoints with your 0x developer token ( 0x login ). They are on https://api.0x.limo/x1/host : Method and path Purpose CLI PUT /x1/host/v1/servers/<app>?entry=server.mjs (body: the bundle .tar.gz ) deploy and (re)start 0x deploy-server GET /x1/host/v1/servers your servers GET /x1/host/v1/servers/<app> status: {app, release, entry, deployedAt, url, state, container, usage, limits} 0x server status GET /x1/host/v1/servers/<app>/logs?tail=200 plain text: the host's notes (install, start, restarts), then your console output; tail 1–5000 lines 0x server logs POST /x1/host/v1/servers/<app>/stop , …/start stop or start 0x server stop , 0x server start GET /x1/host/v1/public/servers/<app> (no auth) {app, url, state, release, since} , for the catalog and launchers Errors are JSON {\"error\": \"…\"} : Status When 400 bad app name: lowercase letters, digits and - , 2–41 characters 401 no or bad token (sign in with 0x login ) 403 the app belongs to another developer, or is not one of your hosted sites ( 0x publish --site <app> first) 404 no hosted server 413 bundle over 50 MB, or installed size over 400 MB 422 the build failed (see 0x server logs ), or t"},{"u":"/js/host/reference/","t":"@0xlimo/host reference","h":"","s":"JavaScript SDK","x":"The package has no typings. It exports the binary x1-host <config.json> , whose module is src/runner.js ( startRunner(cfg) ). This page describes what a developer's server sees. Operating an instance is not covered."},{"u":"/js/host/reference/#containers-per-app","t":"@0xlimo/host reference","h":"Containers per app","s":"JavaScript SDK","x":"Container Role x1s-<app> (sidecar) owns the network namespace ( --network none , loopback only). It bridges three unix sockets to loopback: players to 127.0.0.1:8080 , 127.0.0.1:7801 to the broadcast service, and 127.0.0.1:7802 to the platform API. x1g-<app> (your game) joins the sidecar's namespace and runs node <entry> as uid 10001 under tini . It has a read-only root and app, --cap-drop ALL , no-new-privileges , CPU, memory and pids quotas, and a /tmp tmpfs. build (throwaway) unpacks the bundle and runs npm ci --ignore-scripts . It has network access for the registry, but runs no package scripts. The image is node:24-bookworm-slim ."},{"u":"/js/host/reference/#constants-srcsandboxjs","t":"@0xlimo/host reference","h":"Constants ( src/sandbox.js )","s":"JavaScript SDK","x":"Name Value PORT 8080 BCAST_PORT 7801 API_PORT 7802 LIMITS.cpus 1 LIMITS.memoryMb 512 LIMITS.pids 128 LIMITS.tmpMb 64 LIMITS.logMb 5 (2 files) LIMITS.nofile 4096 LIMITS.bundleMb 50 LIMITS.installedMb 400 LIMITS.servers 2 per developer LIMITS.total 20"},{"u":"/js/host/reference/#names","t":"@0xlimo/host reference","h":"Names","s":"JavaScript SDK","x":"App names match ^[a-z0-9][a-z0-9-]{1,40}$ . Entry files match ^[A-Za-z0-9_][A-Za-z0-9_./-]{0,120}\\.(m?js|cjs)$ . The default is server.mjs ."},{"u":"/js/host/reference/#endpoints-served","t":"@0xlimo/host reference","h":"Endpoints served","s":"JavaScript SDK","x":"Path Who Notes /x1/game/<app>/… (HTTP and WebSocket upgrades) players forwarded to the sandbox as /… with X-Forwarded-Prefix ; ?x1_play= is removed before the request reaches the game; the front drops any Set-Cookie with a Domain /x1/host/v1/servers[/<app>[/logs|/stop|/start]] developers (Bearer: 0x developer token) see @0xlimo/host /x1/host/v1/public/servers/<app> anyone {app, url, state, release, since} /healthz the runner {ok, apps}"},{"u":"/js/host/reference/#paid-games","t":"@0xlimo/host reference","h":"Paid games","s":"JavaScript SDK","x":"When the runner is configured with a paygate ( \"paygate\": {\"url\", \"markerDir\"} ), every /x1/game/<app>/ request for a paid site is checked by x1-paygate . It passes with the x1_pass cookie, scoped to Path=/x1/game/<app>/ , or with ?x1_play=<play ticket> . Free games' answers and owners' passes are cached for 30 s. The 0x.limo runner has no paygate configured."},{"u":"/js/paygate/","t":"@0xlimo/paygate","h":"","s":"JavaScript SDK","x":"Not published, not deployed @0xlimo/paygate 0.1.0 is in the SDK source ( packages/paygate ), but it is not published to the 0x registry, and it is not running on 0x.limo. The front does not route hosted sites through it, and x1-host has no paygate configured. What follows is how paid games will behave when it is switched on. One part is already live: a paid game's new versions are built origin-only, with no swarm. You do not install or call x1-paygate yourself. It sits in front of the hosting service. What matters to you as a developer is how a paid game's site and server behave for players."},{"u":"/js/paygate/#what-players-see","t":"@0xlimo/paygate","h":"What players see","s":"JavaScript SDK","x":"The launcher opens a paid game with ?x1_play=<play ticket> . Only owners get a ticket ( POST /v1/apps/<appid>/play-ticket ). Tickets last 5 minutes. The gate checks the ticket, then sets two cookies with a signed pass that lasts 12 h: x1_pass with Path=/sites/<site>/ x1_pass with Path=/x1/game/<site>/ Both are HttpOnly; Secure; SameSite=None; Partitioned . The gate then redirects to the same URL without x1_play . Every file of the site needs the pass, not only index.html . Without one the answer is 402 with a \"Buy on 0x\" page linking to the store. A bad or expired ticket gets 403 with the same page. A browser sends the /x1/game/<site>/ pass with the game's own HTTP and WebSocket requests, so @0xlimo/net and the templates need no change. A game client without the browser's cookies, such as a native client, connects with ?x1_play=<ticket> . x1-host removes the parameter before your server sees the request."},{"u":"/js/paygate/#what-changes-for-a-paid-games-site","t":"@0xlimo/paygate","h":"What changes for a paid game's site","s":"JavaScript SDK","x":"No swarm. New versions are built origin-only: x1.json is {\"swarm\": false} and there is no swarm/ manifest. The seeder skips paid sites. The gate also answers x1.json with {\"swarm\": false} and swarm/* with 404 for versions built before the game had a price. Private caching. Paid sites get Cache-Control: private , so a shared cache does not keep them. Purge /sites/<site>/* at the CDN when a free game gets a price."},{"u":"/js/paygate/#subscription-only-games","t":"@0xlimo/paygate","h":"Subscription-only games","s":"JavaScript SDK","x":"The sites of subscription-only games are gated the same way. Only players with an active subscription get a play ticket, the refusal page says \"Subscribe to on 0x\", and passes last at most one hour, so a lapsed subscription is locked out within the hour. Subscriptions are switched off on 0x.limo (see @0xlimo/platform )."},{"u":"/js/paygate/#limits","t":"@0xlimo/paygate","h":"Limits","s":"JavaScript SDK","x":"A pass lasts 12 h, so a refund or revoked entitlement takes effect when it expires, not at once. Anyone holding a ticket can exchange it during its 5 minutes. It is removed from the address at once. The pass relies on partitioned cookies (CHIPS) in the store's iframe. A browser that refuses even partitioned cookies in a frame shows the buy page to owners too. The module's exports are listed in the reference ."},{"u":"/js/paygate/reference/","t":"@0xlimo/paygate reference","h":"","s":"JavaScript SDK","x":"Not published, not deployed Source only ( packages/paygate , version 0.1.0). It is not in the 0x registry and does not run on 0x.limo. The entry point is src/index.js . The package has no typings; the signatures below are written as TypeScript."},{"u":"/js/paygate/reference/#exports","t":"@0xlimo/paygate reference","h":"Exports","s":"JavaScript SDK","x":"const COOKIE = \"x1_pass\"; createGate(o: { paid: { loaded: boolean; get(site: string): { appid: number; id: string; name: string; subscription?: boolean } | undefined }; cookieKey: Buffer; ticketSecret?: Buffer | string; // or verifyUrl (POST {ticket} to the backend's /v1/play-tickets/verify) verifyUrl?: string; origin?: string; // the tickets' \"o\" must equal it: the sites' origin storeUrl?: string; // default \"https://0x.limo\"; the buy link is <store>/game/<id> passSecs?: number; // default 12 h fetch?: typeof fetch; now?: () => number; log?: (o: object) => void; }): { handler(req: IncomingMessage, res: ServerResponse): void } target(uri: string): string // the original URI from the forwarded request sign(key: Buffer, payload: string): string // <b64url(payload)>.<b64url(HMAC-SHA256)> open(key: Buffer, token: string): object | null verifyTicket(secret: Buffer | string, ticket: string, now?: number): object | null // checks e (expiry) cookieKey(o: { cookieSecret?: string; ticketSecret?: string }): Buffer // derived: HMAC(ticketSecret, \"x1-paygate pass cookie v1\") signPass(key: Buffer, p: { site: string; appid: number; steamid: string; expires: number }): string verifyPass(key: Buffe"},{"u":"/js/paygate/reference/#pass","t":"@0xlimo/paygate reference","h":"Pass","s":"JavaScript SDK","x":"The cookie value is sign(key, JSON.stringify({v: 1, t: <site>, a: <appid>, s: <steamid>, e: <expiry, unix s>})) . A pass is valid for one site, until e . It lasts 12 h, or at most 1 h for subscription-only games ( SUBSCRIPTION_PASS_SECS = 3600 )."},{"u":"/js/paygate/reference/#answers","t":"@0xlimo/paygate reference","h":"Answers","s":"JavaScript SDK","x":"Status When 2xx (pass through) free site, or a valid pass for this site 302 a valid ?x1_play= ticket: sets the passes and redirects to the URL without it 402 no pass: the \"Buy\" (or \"Subscribe\") page 403 bad or expired ticket: the same page 502 (Caddy) / 503 (x1-host) the gate is down: paid sites are refused, free sites keep working"},{"u":"/js/paygate/reference/#paid-sites-list","t":"@0xlimo/paygate reference","h":"Paid sites list","s":"JavaScript SDK","x":"The gate polls GET /v1/hosting/paid-sites every 30 s (public; it lists the sites of apps with a price, {\"<site>\": {appid, id, name, subscription?}} )."},{"u":"/api/","t":"REST API overview","h":"","s":"REST API","x":"The 0x platform API is one JSON-over-HTTPS service. The launcher, the native Steam-compatible client ( sg-steamclient ), the WASM runtime, the 0x CLI and the @0xlimo/* packages all use it. Your game and your game servers can call it directly too. Base URL https://api.0x.limo (every path starts with /v1/ ) Push channel wss://api.0x.limo/v1/stream ( Push stream ) Format JSON request and response bodies, UTF-8 Auth Authorization: Bearer <token> ( Authentication ) Errors {\"error\": \"...\"} with the HTTP status ( Errors ) Limits token buckets per caller and per address ( Rate limits ) curl -s https://api.0x.limo/v1/hosting/config"},{"u":"/api/#versioning","t":"REST API overview","h":"Versioning","s":"REST API","x":"The version is the first path segment: /v1/ . Inside v1 we only make changes that keep existing clients working: new endpoints, new optional request fields and new response fields. Ignore fields you don't know. A change that would break clients gets a new prefix. /v1 keeps answering alongside it. Some features are coded but switched off on 0x.limo, for example in-game purchases and subscriptions. Their routes answer 404 until they are switched on. Each page says which features are off."},{"u":"/api/#requests","t":"REST API overview","h":"Requests","s":"REST API","x":"Bodies. Send Content-Type: application/json . The token endpoint also accepts application/x-www-form-urlencoded (RFC 6749). Uploads of raw bytes, such as hosting blobs, cloud files and trailers, send the bytes as the body. Body size. api.0x.limo accepts request bodies up to 80 MB. Individual routes have their own lower limits, which their pages list (64 MiB per hosted file, for example). IDs. Account and SteamID-style IDs are 64-bit and always travel as decimal strings ( \"76561197960287930\" ). Large numeric IDs from JavaScript lose precision otherwise. App IDs ( appid ) are numbers. Money is in minor units (cents) as integers. Many responses add a ...Usd decimal string for display. Times are Unix seconds unless a field says ms . CORS. Browsers may call the API from the 0x world hosts and from every hosted site origin ( https://<site>-play.0x.limo ). Only bearer tokens authenticate. Cookies are never used, so requests are made without credentials."},{"u":"/api/#idempotency","t":"REST API overview","h":"Idempotency","s":"REST API","x":"Operations that spend money accept an idempotency key. If you send the same key again, you get the first answer back and you are not charged a second time. The Idempotency-Key header: 1 to 256 printable ASCII characters. Inventory operations ( /v1/apps/{appid}/inventory/* ) and store orders use it. An idempotency_key field in the JSON body, where the reference says so. Orders, in-game purchase intents and consumes take it. Generate a fresh random key, such as a UUID, for each user action. Reuse it only when you retry that same action."},{"u":"/api/#pagination","t":"REST API overview","h":"Pagination","s":"REST API","x":"Most lists are bounded and come back whole, for example at most 1000 wishlist entries or the 500 latest plays. The reference gives the bound for each one. The few paged lists use one of these: next_cursor in the response, sent back as ?cursor= (reviews); page / count fields in the request body (UGC queries, at most 50 a page); start / end ranks (leaderboard entries)."},{"u":"/api/#health","t":"REST API overview","h":"Health","s":"REST API","x":"GET /healthz (liveness) and GET /readyz (Postgres and Redis reachable, node not draining) need no token."},{"u":"/api/#areas","t":"REST API overview","h":"Areas","s":"REST API","x":"Area Guide What it covers Sign-in and tokens Authentication OAuth 2.0 token endpoint, device and browser sign-in, publish tokens, game-server sessions, tickets Store catalog Catalog listings, live player counts, popularity, reviews, store art Hosting Hosting and versions sites, immutable versions, uploads, quota, publish tokens Plays and stats Plays and stats play sessions, library, user stats, global stats Inventory Inventory ISteamInventory items, exchanges, trades, signed results Lobbies and matchmaking Lobbies and matchmaking lobbies, search filters, game-server browser, party beacons Achievements and leaderboards Achievements and leaderboards unlocks, percentages, scores, ranked entries Friends and presence Friends and presence friends, rich presence, clans, chat Cloud saves Cloud saves per-player files per app, pre-signed transfers Transfers Transfers swarm tracker, web seeds, transfer reports Site security policy CSP reports and policy declared origins, enforced policy, violation reports Payments Payments and top-ups balance, top-ups, paid games, in-game purchases (off), subscriptions (off), revenue Push Push stream the WebSocket event channel The generated reference lists e"},{"u":"/api/auth/","t":"Authentication","h":"","s":"REST API","x":"Every authenticated call sends one bearer token: Authorization: Bearer <token> Which token you use depends on who is calling: Caller Token How you get it Lifetime A player or developer (launcher, game, scripts) access token , an EdDSA JWT POST /v1/oauth/token 900 s The same, to stay signed in refresh token , opaque the same response 30 days, rotated on every use 0x publish , CI publish token 0xpub_... POST /v1/hosting/tokens until revoked; hosting routes only Your game server game-server session gs-... POST /v1/gameservers/logon 24 h Your game server, for in-game purchases server key 0xsk_... (older keys: x1sk_... , still valid) developer portal ( Payments ) until rotated Tokens are checked on every request. A token that is missing, expired or revoked gets 401 {\"error\": \"invalid or expired token\"} . Calls that need no token, such as the public catalog, work without the header. Development tokens The backend can accept long-lived development tokens for local and test setups. They are off on 0x.limo , so use access tokens there."},{"u":"/api/auth/#access-tokens","t":"Authentication","h":"Access tokens","s":"REST API","x":"An access token is a compact JWT signed with Ed25519 ( alg: EdDSA ). The header carries a kid . The claims are: {\"sub\": \"76561197960287930\", \"iat\": 1792250000, \"exp\": 1792250900, \"jti\": \"9f2c4e1a0b7d3c55\", \"iss\": \"0x1\"} sub is the account's SteamID-style ID, as a decimal string. A token is valid for 900 seconds; expires_in in the token response says exactly how long. Refresh it before it expires; don't wait for a 401. Your own server can verify a token offline with the public keys from GET /v1/keys , or online by calling GET /v1/me with it."},{"u":"/api/auth/#token-endpoint","t":"Authentication","h":"The token endpoint","s":"REST API","x":"POST /v1/oauth/token is an OAuth 2.0 token endpoint (RFC 6749). It takes a form-encoded or JSON body. Four grants are supported: grant_type Use password username + password : the launcher's sign-in form, or your own scripts with your own account refresh_token refresh_token : a new token pair (the old refresh token stops working) authorization_code code + code_verifier + client_id + redirect_uri : browser sign-in with PKCE urn:ietf:params:oauth:grant-type:device_code device_code + client_id : device sign-in A successful grant returns: {\"access_token\": \"eyJhbGciOiJFZERTQSIs...\", \"token_type\": \"Bearer\", \"expires_in\": 900, \"refresh_token\": \"3b8f0c...\"} curl JS curl -s https://api.0x.limo/v1/oauth/token \\ -d grant_type=password -d username=alice -d password=\"$ZEROX_PASSWORD\" const r = await fetch(\"https://api.0x.limo/v1/oauth/token\", { method: \"POST\", headers: { \"Content-Type\": \"application/json\" }, body: JSON.stringify({ grant_type: \"password\", username: \"alice\", password }), }); const { access_token, refresh_token, expires_in } = await r.json(); Warning Never ask players for their 0x password inside your game. A game that runs in the launcher, or on a hosted site, gets the player's id"},{"u":"/api/auth/#refresh","t":"Authentication","h":"Refresh tokens rotate","s":"REST API","x":"Each refresh_token grant returns a new refresh token and marks the old one used. If a used refresh token is presented again, the backend assumes it was stolen and revokes the whole session (every token descended from the same sign-in): {\"error\": \"invalid_grant\", \"error_description\": \"refresh token reuse; session revoked\"} Store only the newest refresh token. If two parts of your program refresh at once, one of them signs the user out."},{"u":"/api/auth/#revoke","t":"Authentication","h":"Sign out","s":"REST API","x":"POST /v1/oauth/revoke with token=<refresh token> (RFC 7009) ends that session. It always answers 200 {} . Access tokens already issued stay valid until they expire, at most 15 minutes."},{"u":"/api/auth/#oauth-errors","t":"Authentication","h":"Token endpoint errors","s":"REST API","x":"The OAuth routes answer errors in the RFC 6749 form {\"error\": \"<code>\", \"error_description\": \"...\"} with status 400 : error When invalid_grant wrong username or password; unknown or expired refresh token; refresh-token reuse; code used, expired or not matching the client, redirect URI or PKCE verifier; account suspended unsupported_grant_type a grant not in the table above invalid_client unknown client_id , or a device code polled by another client authorization_pending device flow: the user hasn't approved yet; poll again slow_down device flow: polled faster than every 5 s expired_token device flow: the device code expired (10 min) or was already redeemed access_denied device flow: the user denied the request"},{"u":"/api/auth/#device","t":"Authentication","h":"Device sign-in","s":"REST API","x":"Device sign-in follows RFC 8628. Use it for CLIs, TVs and anything without a good browser. This is how 0x login signs in: POST /v1/oauth/device_authorization {client_id} returns device_code , user_code , verification_uri ( https://api.0x.limo/v1/oauth/device ), verification_uri_complete , expires_in (600) and interval (5). Show the user the user_code and the URL. The user signs in there and approves. A signed-in app can approve for them instead with POST /v1/oauth/device/approve {user_code, allow} . Poll POST /v1/oauth/token with grant_type=urn:ietf:params:oauth:grant-type:device_code , the device_code and the client_id , every interval seconds, until you get tokens. curl JS curl -s https://api.0x.limo/v1/oauth/device_authorization \\ -H 'Content-Type: application/json' -d '{\"client_id\": \"x1-cli\"}' # open verification_uri_complete, approve, then: curl -s https://api.0x.limo/v1/oauth/token \\ -d grant_type=urn:ietf:params:oauth:grant-type:device_code \\ -d client_id=x1-cli -d device_code=\"$DEVICE_CODE\" const api = \"https://api.0x.limo\"; const post = (p, b) => fetch(api + p, { method: \"POST\", headers: { \"Content-Type\": \"application/json\" }, body: JSON.stringify(b) }).then(r => r.json())"},{"u":"/api/auth/#authorization-code","t":"Authentication","h":"Browser sign-in (authorization code + PKCE)","s":"REST API","x":"Native apps use authorization code + PKCE (RFC 7636, RFC 8252): Open GET /v1/oauth/authorize?response_type=code&client_id=...&redirect_uri=...&code_challenge=...&code_challenge_method=S256&state=... in the system browser. Only S256 is accepted. The user signs in on that page. The browser is redirected to redirect_uri with code and state . A loopback redirect ( http://127.0.0.1:<any port>/... ) may use any port. Redeem the code with grant_type=authorization_code , code , code_verifier , client_id and redirect_uri . Codes are single-use and live for 60 seconds. OAuth clients OAuth clients (a client_id with its redirect URIs) are registered by 0x. Today the registered clients are the launcher and the 0x CLI. You can't register your own client yet. Games get the player's identity through the launcher instead ( @0xlimo/platform )."},{"u":"/api/auth/#accounts","t":"Authentication","h":"Accounts","s":"REST API","x":"POST /v1/oauth/signup {username, password, persona_name?} creates an account and returns the same token pair as a sign-in, plus steamid , username and persona_name . A username is 3 to 32 characters of a-z 0-9 _ - . and starts with a letter or digit. A password has at least 10 characters. One address may create at most 5 accounts a day ( 429 slow_down ). A username that is taken gets 409 username_taken . POST /v1/oauth/guest creates a guest account. It has no username or password and can only be reached with its refresh token. Guests own the free apps but can't review, vote or get world tickets. GET /v1/me returns the caller's steamid , persona_name , level , country , language , mc_name and push stream URL. curl -s https://api.0x.limo/v1/me -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/auth/#publish-tokens","t":"Authentication","h":"Publish tokens","s":"REST API","x":"0xpub_... tokens let a tool publish hosted sites (and submit listings) without your password. They are valid on /v1/hosting/* and /v1/listings* only. Tokens minted before the rename to 0x start with x1pub_ ; they keep working and need no change. POST /v1/hosting/tokens {name} mints one. It needs an access token : a publish token can't mint more tokens. The token appears once in the response, so store it then. GET /v1/hosting/tokens lists your tokens (never the secret) with last_used_at ; DELETE /v1/hosting/tokens/{id} revokes one. 0x login does all of this for you. See Hosting and versions ."},{"u":"/api/auth/#game-servers","t":"Authentication","h":"Game servers","s":"REST API","x":"A dedicated server logs on as a game server, not as a player: curl -s https://api.0x.limo/v1/gameservers/logon \\ -H 'Content-Type: application/json' -d '{\"appid\": 480}' # -> {\"steamid\": \"...\", \"session\": \"gs-3f9a...\", \"public_ip\": 1550214401, \"stream\": \"wss://...\"} Without token , the server gets an anonymous game-server ID. With a game-server login token , it keeps a persistent ID. Send the session as the bearer token. It lasts 24 hours. Calls marked game server in the reference take this session: PUT /v1/gameservers/me (the heartbeat that keeps you in the server browser for 90 s), licence checks ( GET /v1/gameservers/license/{steamid}/{appid} ), ticket checks and stats writes for players in your app."},{"u":"/api/auth/#tickets","t":"Authentication","h":"Session tickets","s":"REST API","x":"The Steam-style session ticket is how a player proves their identity to your game server: The client calls POST /v1/auth/tickets {appid, identity?} and gets {ticket: <hex>, issued} . Only owners of the app get one ( 403 no licence for this app ). The ticket is an Ed25519-signed blob valid for one hour. The client sends the ticket to your server. Your server calls POST /v1/auth/verify {ticket, appid, steamid?} with its game-server session and gets {ok, steamid, owner} . Each ticket verifies once online, so a replayed ticket fails. Your server can also verify the signature offline with /v1/keys , but then there is no replay protection. The same session token gets other short-lived tickets: Ticket Endpoint For Encrypted app ticket POST /v1/apps/{appid}/encrypted_ticket {data} your servers decrypt it with .../encrypted_ticket/decrypt (game-server session) Ownership ticket GET /v1/apps/{appid}/ownership_ticket signed proof that the caller owns the app World join ticket POST /v1/worlds/{universe}/ticket joining a public Minecraft-protocol world (60 s; not for guests) Play ticket POST /v1/apps/{appid}/play-ticket proving to a hosted site's front that the caller may play ( Payments )"},{"u":"/api/auth/#keys","t":"Authentication","h":"Verification keys","s":"REST API","x":"GET /v1/keys publishes the current and previous Ed25519 public keys, each with its kid . JWTs, session tickets and inventory results are all signed with these keys. Cache the response and fetch it again when you see an unknown kid . curl -s https://api.0x.limo/v1/keys {\"alg\": \"EdDSA\", \"kid\": \"b77eced8e7c06123\", \"ed25519\": \"fa2f56f3...\", \"keys\": [{\"alg\": \"EdDSA\", \"kid\": \"b77eced8e7c06123\", \"ed25519\": \"fa2f56f3...\", \"current\": true}]} In-game purchase receipts use their own key set: GET /v1/iap/keys . There is no OpenID Connect discovery document for third-party sign-in on the platform API."},{"u":"/api/auth/#stream-auth","t":"Authentication","h":"Push channel auth","s":"REST API","x":"wss://api.0x.limo/v1/stream takes the same tokens. Browsers can't set headers on a WebSocket, so they pass the token as a subprotocol instead. See Push stream . See the generated reference for every OAuth route."},{"u":"/api/errors/","t":"Errors","h":"","s":"REST API","x":"Every error is JSON with the HTTP status: {\"error\": \"no such site of yours\"} Some errors carry more fields. A 422 from hosting lists problems , a 409 lists missing , a 429 has retry_after_ms , and a payment error names what is short. The OAuth routes answer in the RFC 6749 form {\"error\": \"<code>\", \"error_description\": \"...\"} (see token endpoint errors ). error is a short English sentence or a snake_case code. Codes are stable : match on them. A sentence may be reworded, so show it to the developer or the player, but don't parse it."},{"u":"/api/errors/#statuses","t":"Errors","h":"Statuses","s":"REST API","x":"Status Meaning on 0x What to do 200 / 201 Done ( 201 : something new was created: a site, an order, a top-up, a plan) 206 Partial content for a Range request (trailers, web seeds) 302 Redirect (sign-in pages, store sign-in links) follow it 400 The request is malformed: a bad ID, a missing field, text with NUL or invalid characters fix the request 401 No token, or the token is invalid, expired or revoked refresh the token, or sign in again 402 The game must be bought first ( not_owned , with its price ) send the player to the store 403 Signed in, but not allowed: not the owner, a guest where an account is needed ( account_required ), a feature closed for this account don't retry 404 No such thing or a feature that is off ( \"in-game purchases are off\" , \"subscriptions are off\" ) check the ID; check the feature's status 405 Wrong method for the path 409 A conflict with the current state: a name taken, already owned, files still to upload, insufficient funds read the body; it says what conflicts 410 Gone: a purchase request that expired start again 413 Too large: over the hosting quota, too many files, a file over the limit 415 Unsupported media type (trailers are MP4 or WebM) 416 The "},{"u":"/api/errors/#retry","t":"Errors","h":"Retrying","s":"REST API","x":"GET requests are always safe to retry. Writes are safe to retry only when they carry an idempotency key. Use the Idempotency-Key header or the idempotency_key field (see Idempotency ). A retried purchase with the same key returns the first result instead of charging again. On 429 , wait at least Retry-After seconds; don't hammer. On 500 , 502 and 503 , back off exponentially (for example 0.5 s, 1 s, 2 s, 4 s, then give up). The API already retries idempotent requests internally during a database failover, which takes about 8 seconds, before it answers 503 . Never retry 400 , 401 (refresh first), 403 , 404 , 409 or 422 unchanged."},{"u":"/api/errors/#strings","t":"Errors","h":"Common error strings","s":"REST API","x":"These are the errors developers meet most. The full set for each route is in the generated reference . error Status Where invalid or expired token 401 any authenticated route invalid or revoked publish token 401 /v1/listings* with a 0xpub_ token account_required 403 guests writing reviews, votes, purchases bad app id / bad appid / appid required 400 {appid} that isn't a number bad steamid 400 a {steamid} that isn't a 64-bit decimal bad idempotency key 400 an Idempotency-Key that is empty, longer than 256 or not printable ASCII text with NUL or invalid characters 400 any text field no such app / no such world / no such game in the store 404 an unknown or unlisted appid no such site / no such site of yours 404 hosting: unknown site, or not yours no such version / bad version 404 / 400 hosting versions that site name is taken / that site name is reserved 409 POST /v1/hosting/sites at most 20 sites per developer 403 POST /v1/hosting/sites upload refused (+ problems ) 422 POST /v1/hosting/sites/{site}/versions files still to upload (+ missing ) 409 finalize before every blob is uploaded the site builder refused this version (+ findings ) 422 finalize over your hosting quota (...) 413 op"},{"u":"/api/rate-limits/","t":"Rate limits","h":"","s":"REST API","x":"Every limit is a token bucket . Each bucket holds a burst of requests and refills at rate per second. The buckets live in Redis, so a limit holds across every API node. A request that finds its bucket empty gets: HTTP/1.1 429 Too Many Requests Retry-After: 2 Content-Type: application/json {\"error\": \"rate limited\", \"retry_after_ms\": 1500} Retry-After is in whole seconds (at least 1); retry_after_ms is the exact wait. Wait that long before the next attempt. The numbers below are the defaults in the code. 0x can tune them at runtime, globally or for one caller, so treat them as typical values, not guarantees. If a limit gets in your way, tell us about your use case."},{"u":"/api/rate-limits/#global","t":"Rate limits","h":"Global limits","s":"REST API","x":"Each request counts against one of these two buckets: Class Applies to Keyed by Rate / burst auth requests that check a password or create an account: POST /v1/oauth/token with grant_type=password , POST /v1/oauth/authorize , POST /v1/oauth/device , POST /v1/oauth/signup , POST /v1/oauth/guest client IP 2/s, burst 20 api every other request the bearer token (or the IP when anonymous) 50/s, burst 300 So one token sustains about 50 requests a second, with bursts up to 300. Redeeming a refresh token, authorization code or device code counts as an ordinary api request. Account creation has a daily cap on top of the bucket: at most 5 new accounts per address per day ( 429 slow_down )."},{"u":"/api/rate-limits/#features","t":"Rate limits","h":"Per-feature limits","s":"REST API","x":"Some routes have their own bucket on top of the global one: Class Route Keyed by Rate / burst playticket POST /v1/apps/{appid}/play-ticket account 1/s, burst 30 worldticket POST /v1/worlds/{universe}/ticket account 1 per 2 s, burst 30 iap_intent POST /v1/apps/{appid}/iap/intents account 1 per 2 s, burst 20 topup POST /v1/me/wallet/topups account 1 per 20 s, burst 10 topup-estimate POST /v1/me/wallet/estimate account 1/s, burst 30 reviews PUT / DELETE /v1/apps/{appid}/reviews/me account 1 per 30 s, burst 10 votes PUT /v1/apps/{appid}/reviews/{id}/helpful account 1 per 2 s, burst 30 reports POST /v1/apps/{appid}/report , .../reviews/{id}/report account 1 per 60 s, burst 5 reports_ip the same IP 1 per 20 s, burst 20 issue_replies POST /v1/listings/issues/{issue}/reply account 1 per 20 s, burst 10 visreports POST /v1/visreports account 1 per 60 s, burst 5 csp CSP reports ( POST <site>-play.0x.limo/x1/csp ) IP 1/s, burst 120 csp_site the same site 20/s, burst 2000 xfer_site anonymous transfer reports ( POST .../x1/xfer ) IP 1 per 10 s, burst 6 announce swarm tracker announces (REST and push) account off by default"},{"u":"/api/rate-limits/#bounds","t":"Rate limits","h":"Other bounds","s":"REST API","x":"These caps aren't rates, but you'll hit them the same way. Each is listed on its route: Pending submissions: a listing with too many versions waiting for review gets 429 . Issue threads hold at most 200 messages. A wishlist holds 1000 games and server favourites 1000 entries. GET /v1/content/{cid}/peers returns at most 40 peers. Lobby search returns at most 50 lobbies, or the count filter."},{"u":"/api/rate-limits/#good-client","t":"Rate limits","h":"Being a good client","s":"REST API","x":"Cache public reads. GET /v1/catalog/live sends Cache-Control: public, max-age=5 and GET /v1/catalog/reviews sends max-age=30 . Polling them faster gets you the same answer. Use the push stream instead of polling for lobby, friend and invite changes. Batch where a batch route exists, such as POST /v1/content/announce with up to 1000 IDs. Spread retries with jitter. When many clients retry on the same second, they hit the bucket together again."},{"u":"/api/catalog/","t":"Catalog","h":"","s":"REST API","x":"The catalog is public. Every route on this page works without a token . With a token, GET /v1/catalog also says which games the caller owns."},{"u":"/api/catalog/#listings","t":"Catalog","h":"Listings","s":"REST API","x":"GET /v1/catalog returns every listed game (\"world\") with its store record: curl -s https://api.0x.limo/v1/catalog { \"schema\": 1, \"apps\": [ { \"appid\": 3100001, \"name\": \"OG: Earth\", \"source_verified\": false, \"store\": { \"free\": true, \"listed\": true, \"universe\": { \"id\": \"outgrid-earth\", \"name\": \"OG: Earth\", \"tagline\": \"The vanilla planet. Real terrain, real physics, real chemistry.\", \"developer\": \"OG\", \"tags\": [\"Open world\", \"Digital twin\", \"Physics\"], \"web\": {\"hosted\": \"https://earth.0x.limo/\"} } } } ] } appid is the numeric ID that every per-game route takes. store.universe.id is the store's slug, used in store URLs such as https://0x.limo/game/<id> . store.free is true for free games. A paid game has store.price: {amount, currency} in minor units. owned appears only for a signed-in caller. It is always true for a free game. source_verified is true when the game was rebuilt from its published source, the result matched what players download, and a reviewer approved it. store.release: \"demo\" marks a playable demo of an upcoming game. Launchers list demos apart from released games. It comes from the approved listing version's release . p2p.tracker is the WebTorrent track"},{"u":"/api/catalog/#live","t":"Catalog","h":"Live players","s":"REST API","x":"GET /v1/catalog/live lists the plays going on now: plays started or heard from in the last 180 s that haven't ended. Only worlds with players appear. at is a Unix time in milliseconds . curl -s https://api.0x.limo/v1/catalog/live # {\"at\": 1792259580679, \"apps\": {\"3100001\": {\"playing\": 3}}} Cached for 5 s ( Cache-Control: public, max-age=5 )."},{"u":"/api/catalog/#stats","t":"Catalog","h":"Popularity and freshness","s":"REST API","x":"GET /v1/catalog/stats gives each listed app's anonymous play counts and time played over the last 7 days and 24 hours, plus approved_at (when it was first listed) and updated_at (when its live version was approved). The store uses these numbers for its trending and new rows. Cached for 60 s. curl -s https://api.0x.limo/v1/catalog/stats {\"at\": 1792259580679, \"apps\": {\"3100001\": {\"plays_7d\": 66, \"seconds_7d\": 46540, \"plays_24h\": 6, \"seconds_24h\": 3032, \"approved_at\": null, \"updated_at\": null}}}"},{"u":"/api/catalog/#reviews","t":"Catalog","h":"Reviews","s":"REST API","x":"GET /v1/catalog/reviews returns the review summary of every listed world with visible reviews: {at, apps: {\"<appid>\": {count, positive, percent}}} . Cached for 30 s. GET /v1/apps/{appid}/reviews?sort=recent|helpful&cursor=&limit= returns one world's reviews, newest or most helpful first, paged with next_cursor . With a token, the response also has the caller's own review as mine . Players write reviews with PUT /v1/apps/{appid}/reviews/me {recommend, body?} (accounts only, not guests; one review every 30 s). They vote one helpful with PUT .../reviews/{id}/helpful . curl -s https://api.0x.limo/v1/catalog/reviews"},{"u":"/api/catalog/#store-page","t":"Catalog","h":"Store page data","s":"REST API","x":"These public routes feed a listed game's store page: Route Returns GET /v1/apps/{appid}/achievements achievements with display names, icons and the share of players who unlocked each; hidden ones are counted, not shown GET /v1/apps/{appid}/leaderboards up to 20 leaderboards, busiest first, each with its top 10 (persona names, no SteamIDs) GET /v1/apps/{appid}/news the developer's news posts, newest first GET /v1/listings/{id}/art/{version}/{file} capsule and screenshots of an approved version (immutable URLs) GET /v1/listings/{id}/media/{version}/{file} the trailer ( trailer.mp4 / trailer.webm ) with byte ranges GET /v1/news/{post}/{file} a news post's image The art and media URLs name the approved version, so they are cached forever ( Cache-Control: public, max-age=31536000, immutable ). A new version gets new URLs."},{"u":"/api/catalog/#your-listings","t":"Catalog","h":"Your listings","s":"REST API","x":"Developers manage their own listings with a token: an access token or a 0xpub_ publish token. Route Does GET /v1/listings your listings with their latest version, review status and open review issues POST /v1/listings submit a new listing or a new version (it waits for review) GET /v1/listings/{id} one listing with every version ( id is the numeric ID or the slug) POST /v1/listings/{id}/withdraw withdraw the version waiting for review POST /v1/listings/{id}/delist take the live listing out of the store PUT /v1/listings/uploads/trailer upload a trailer (MP4 or WebM, at most 60 MB) for the next submission POST /v1/listings/{id}/news post news (with optional release notes for a version) GET /v1/listings/issues review issues reviewers opened on your listings, and their threads curl -s https://api.0x.limo/v1/listings -H \"Authorization: Bearer $ZEROX_TOKEN\" The submission body (title, tagline, description, tags, age rating, the play target, price, capsule, screenshots, details, trailer and source) is described in the catalog reference . See also the generated catalog reference ."},{"u":"/api/hosting-and-versions/","t":"Hosting and versions","h":"","s":"REST API","x":"Hosting turns a folder with a built web game into an immutable, swarm-enabled site version at https://<site>-play.0x.limo/sites/<site>/<version>/ Each site gets its own origin ( <site>-play.0x.limo ), so one game can't read another's storage, cookies or frames. 0x publish and the upload page at https://api.0x.limo/hosting/ use this API. You can also call it yourself, from CI for example. Note This page is the guide: limits, auth and the publish flow step by step. Every /v1/hosting route, with its parameters and responses, is in the generated REST reference: Content and depots ."},{"u":"/api/hosting-and-versions/#limits","t":"Hosting and versions","h":"Limits","s":"REST API","x":"Limit On 0x.limo Storage quota per developer (all sites and versions) 2048 MiB Largest file 64 MiB Files per version 5000 Sites per developer 20 Site name 3 to 40 characters a-z 0-9 - , not starting or ending with - Blocked file types exe dll com scr msi msix bat cmd ps1 vbs lnk reg so dylib app dmg pkg deb rpm appimage apk ipa jar sh Every other file type is published as it is, game data and assets of every format included. GET /v1/hosting/config returns the live numbers (public): curl -s https://api.0x.limo/v1/hosting/config {\"sites_url\": \"https://{site}-play.0x.limo/sites/\", \"tracker\": \"wss://play.0x.limo/p2p/tracker\", \"limits\": {\"quota_bytes\": 2147483648, \"max_file_bytes\": 67108864, \"max_files\": 5000, \"max_sites\": 20, \"blocked_extensions\": [\"exe\", \"dll\", \"...\"]}} Some paths are refused: hidden files (any path segment starting with . ); paths that 0x writes into every version itself: x1.json , x1-sw.js , x1/ and swarm/ (and the reserved 0x.json , 0x-sw.js , 0x/ ); a version without index.html at the top. Some site names are reserved for 0x's own hosts ( api , play , docs , store , admin and others). Creating a site with one of them gets 409 that site name is reserved ."},{"u":"/api/hosting-and-versions/#auth","t":"Hosting and versions","h":"Auth","s":"REST API","x":"Every write takes either an access token or a 0xpub_ publish token . Publish tokens are long-lived and valid on hosting, listings and script packages only, so use them in CI. Creators manage them at Developer › Tokens ( /dev/tokens ), which calls these routes. Route Does POST /v1/hosting/tokens {name} mint a publish token ( needs an access token ). The token appears once in the response, with scopes . At most 25 live per account (409); rate-limited per account (429, retry_after_ms ) GET /v1/hosting/tokens your tokens: id , name , created_at , last_used_at , revoked_at , scopes ( hosting , listings , scripts ); active_max DELETE /v1/hosting/tokens/{id} revoke one → {revoked: true} GET /v1/hosting/me the caller, via ( publish_token or access_token ), usage and limits curl -s https://api.0x.limo/v1/hosting/me -H \"Authorization: Bearer $ZEROX_TOKEN\" {\"steamid\": \"76561197960287930\", \"persona_name\": \"alice\", \"via\": \"access_token\", \"usage\": {\"bytes\": 18874368, \"sites\": 2}, \"limits\": {\"quota_bytes\": 2147483648, \"max_file_bytes\": 67108864, \"max_files\": 5000, \"max_sites\": 20}}"},{"u":"/api/hosting-and-versions/#flow","t":"Hosting and versions","h":"The publish flow","s":"REST API","x":"Publishing is content-addressed. You send the list of files with their SHA-256 hashes, upload only the files the service doesn't already have, then finalize. POST /v1/hosting/sites create the site (once) POST /v1/hosting/sites/{site}/versions open version n: {files} -> {version, missing} PUT /v1/hosting/blobs/{sha256} (raw bytes) upload each missing file POST /v1/hosting/sites/{site}/versions/{n}/finalize build and publish (immutable)"},{"u":"/api/hosting-and-versions/#create-site","t":"Hosting and versions","h":"1. Create a site","s":"REST API","x":"curl -s https://api.0x.limo/v1/hosting/sites -H \"Authorization: Bearer $ZEROX_PUBLISH_TOKEN\" \\ -H 'Content-Type: application/json' -d '{\"site\": \"neon-drift\", \"name\": \"Neon Drift\"}' 201 returns the site record. Errors: 409 that site name is taken , 409 that site name is reserved , 403 at most 20 sites per developer and 400 for a bad name."},{"u":"/api/hosting-and-versions/#open-version","t":"Hosting and versions","h":"2. Open a version","s":"REST API","x":"curl -s https://api.0x.limo/v1/hosting/sites/neon-drift/versions \\ -H \"Authorization: Bearer $ZEROX_PUBLISH_TOKEN\" -H 'Content-Type: application/json' -d '{ \"files\": [ {\"path\": \"index.html\", \"sha256\": \"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08\", \"size\": 1532}, {\"path\": \"game.js\", \"sha256\": \"60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752\", \"size\": 88211} ], \"csp\": {\"connect\": [\"wss://rt.example.com\"], \"img\": [\"https://*.cdn.example.com\"]} }' {\"site\": \"neon-drift\", \"version\": 3, \"state\": \"pending\", \"resumed\": false, \"files\": 2, \"bytes\": 89743, \"missing\": [\"60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752\"]} files lists 1 to 5000 entries, each with a relative path , the lowercase hex sha256 of its bytes and its size . If a pending version with exactly the same files exists, it is resumed ( resumed: true ), so a failed upload can simply run again. missing lists the hashes you still have to upload. Files any version already stored are not sent again, so a new version that changes one file uploads one file. csp (optional) declares what the game loads from outside its origin; see CSP reports and policy . A list that breaks the rules"},{"u":"/api/hosting-and-versions/#upload","t":"Hosting and versions","h":"3. Upload the missing files","s":"REST API","x":"curl -s -X PUT https://api.0x.limo/v1/hosting/blobs/60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752 \\ -H \"Authorization: Bearer $ZEROX_PUBLISH_TOKEN\" --data-binary @game.js # {\"sha256\": \"60303ae2...\", \"stored\": true} The service checks the size and the hash against the bytes. Errors: 400 size ... does not match , 400 sha256 does not match the bytes , and 404 that hash is in none of your pending versions . A blob that is already stored answers stored: false . Uploads may run in parallel."},{"u":"/api/hosting-and-versions/#finalize","t":"Hosting and versions","h":"4. Finalize","s":"REST API","x":"curl -s -X POST https://api.0x.limo/v1/hosting/sites/neon-drift/versions/3/finalize \\ -H \"Authorization: Bearer $ZEROX_PUBLISH_TOKEN\" Finalize assembles the version and adds the 0x runtime ( x1.json , the x1-sw.js service worker and x1/ ). It also builds the swarm manifest, so players can fetch the files from each other, hashes the inline scripts and styles for the security policy, and publishes the version. A published version never changes . {\"site\": \"neon-drift\", \"version\": 3, \"origin\": \"https://neon-drift-play.0x.limo/sites/neon-drift/3/\", \"manifest_sha256\": \"c0ffee...\", \"swarm\": {\"files\": 2, \"bytes\": 89743}, \"warnings\": [], \"boot\": true, \"origin_only\": false, \"csp\": {\"mode\": \"enforce\", \"declared\": {\"connect\": [\"wss://rt.example.com\"]}, \"warnings\": [], \"inline_hashes\": {\"script\": 1, \"style\": 0}, \"content_security_policy\": \"default-src 'self'; ...\", \"report_only\": \"...\", \"permissions_policy\": \"...\"}} 409 {\"error\": \"files still to upload\", \"missing\": [...]} : upload those first. 422 {\"error\": \"the site builder refused this version\", \"findings\": [...]} : fix the files and open a new version. swarm counts the files and bytes the swarm manifest covers. boot: false means your index.h"},{"u":"/api/hosting-and-versions/#read","t":"Hosting and versions","h":"Reading sites and versions","s":"REST API","x":"Route Auth Returns GET /v1/hosting/sites token your sites, each with its versions GET /v1/hosting/sites/{site} public {site, owner, name, created_at, latest, versions} GET /v1/hosting/sites/{site}/versions public {site, owner, versions} GET /v1/hosting/sites/{site}/versions/{n} public one version: {version, state, origin, manifest_sha256, files, bytes, created_at, finalized_at, site, owner} GET /v1/hosting/paid-sites public the sites of paid games: {sites: {\"<site>\": {appid, id, name, subscription?}}, at} A version's state is pending until it is finalized and final afterwards. Only final versions have an origin ."},{"u":"/api/hosting-and-versions/#policy","t":"Hosting and versions","h":"Security policy routes","s":"REST API","x":"Route Auth Returns GET /v1/hosting/sites/{site}/policy token, your site the policy each version is served with GET /v1/hosting/csp-reports token what the policy blocked (or would block) across your sites ( ?version=&days=30 ) GET /v1/hosting/sites/{site}/csp-reports token, your site the same for one site GET /v1/hosting/policy/{site}/{n} public that version's headers, as the front applies them CSP reports and policy explains them."},{"u":"/api/hosting-and-versions/#errors","t":"Hosting and versions","h":"Errors","s":"REST API","x":"Status error 400 site: 3-40 characters a-z, 0-9 and '-', ... , files: [{path, sha256, size}] , bad version , blob name is its sha256 (64 lowercase hex digits) 401 invalid or expired token 403 sign in (0x login) to mint a publish token (minting with a publish token), at most 20 sites per developer 404 no such site , no such site of yours , no such version , no such token , no such hosting route 409 that site name is taken , that site name is reserved , files still to upload , N publish tokens are live (at most 25): revoke one you no longer use first 429 too many publish tokens minted: try again later (+ retry_after_ms ) 413 a version has 1 to 5000 files , over your hosting quota (...) 422 upload refused (+ problems ), the site builder refused this version (+ findings ) 503 temporarily unavailable"},{"u":"/api/plays-and-stats/#plays","t":"Plays and stats","h":"Plays","s":"REST API","x":"A play is one session of one player in one game. The launcher reports plays for every game it starts, so a game run from the launcher doesn't have to do anything. A hosted page opened outside the launcher can report its own plays with the same routes. Route Does POST /v1/plays {app, mode, source, ref?} start a play → {play, history, beat_secs} POST /v1/plays/{play}/beat still playing; send about once a minute ( beat_secs ) POST /v1/plays/{play}/end the play ended mode is native or web . source is launcher , link , direct or other . ref is an optional link reference, so you can see which of your links brought players in. Each beat or end adds the time since the previous call, at most 10 minutes, so a client that vanishes doesn't add hours. Plays are counted anonymously per hour, world, mode, source, ref and country. The address is used only to find the country; it isn't stored. A player who consented to a play history also gets a row per play. history in the answer says whether this play is kept. curl JS curl -s https://api.0x.limo/v1/plays -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' -d '{\"app\": 4000009, \"mode\": \"web\", \"source\": \"link\", \"ref\": \"devlog-12\""},{"u":"/api/plays-and-stats/#library","t":"Plays and stats","h":"Library and play history","s":"REST API","x":"Route Does GET /v1/me/library {items: [{appid, added_at, last_played, playtime_secs, plays}]} PUT /v1/me/library/{appid} add a listed or owned world DELETE /v1/me/library/{appid} remove one; it stays hidden even if the play history mentions it GET /v1/me/consent / PUT /v1/me/consent {play_history} the player's consent; withdrawing it deletes the history GET /v1/me/plays the caller's own play history (the 500 latest; empty without consent) PUT /v1/me/wishlist/{appid} / GET /v1/me/wishlist the wishlist (follow a world), at most 1000 curl -s https://api.0x.limo/v1/me/library -H \"Authorization: Bearer $ZEROX_TOKEN\" Play history is kept for 180 days. Anonymous counts are kept for 400 days."},{"u":"/api/plays-and-stats/#userstats","t":"Plays and stats","h":"Player stats","s":"REST API","x":"Stats and achievements follow ISteamUserStats. A game defines its stats and achievements in its app schema ( GET /v1/apps/{appid} , which also says whether the caller owns the app). Route Does GET /v1/apps/{appid}/userstats/{steamid} {stats: {name: number}, achievements: {name: unlock_time}} PUT /v1/apps/{appid}/userstats/{steamid} store your own stats (a player), or a player's stats in your app (game-server session) curl -s -X PUT https://api.0x.limo/v1/apps/4000009/userstats/76561197960287930 \\ -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application/json' \\ -d '{\"stats\": {\"wins\": 12, \"best_lap_ms\": 61840}, \"achievements\": {\"FIRST_WIN\": 1792250000}}' stats values are numbers. achievements maps a name to its unlock time (Unix seconds); an object {achieved, unlock_time} is accepted too. The schema's rules apply on the server side: min/max values and increment-only stats. Writing another player's stats as a player gets 403 can only write own stats ."},{"u":"/api/plays-and-stats/#global","t":"Plays and stats","h":"Global stats","s":"REST API","x":"Route Returns GET /v1/apps/{appid}/global_stats totals of the schema's aggregated stats and their daily changes (newest first, up to 60 days) GET /v1/apps/{appid}/achievement_percentages each achievement's share of players, most achieved first GET /v1/apps/{appid}/achievements public, store page: achievements with display names, icons and percentages Leaderboards are on Achievements and leaderboards . See the generated apps reference ."},{"u":"/api/inventory/","t":"Inventory","h":"","s":"REST API","x":"The inventory API is the 0x implementation of Steam's ISteamInventory. Unmodified Steam games use it through sg-steamclient , and you can call it directly. Every route is per app: /v1/apps/{appid}/inventory... . In-game purchases vs. inventory This is the Steam-style item inventory : item definitions, drops, exchanges and trades. For selling items in a web game with a player-confirmed purchase and a signed receipt, see in-game purchases , which are switched off on 0x.limo for now."},{"u":"/api/inventory/#defs","t":"Inventory","h":"Item definitions","s":"REST API","x":"Definitions live in the app record ( inventory.item_defs ) in Steam's itemdef style: Field Meaning itemdefid the definition ID type item , bundle , generator or playtimegenerator name , price display name; price in cents (purchasable items) promo manual or owns:<appid> (granted to owners of another app) exchange recipes, separated by ; , with ingredients separated by , , e.g. 101x3,102;103x10 bundle contents, e.g. 100;101x5 ; for generators the counts are weights drop_interval , drop_window , drop_max_per_window playtime drop rules (minutes) curl -s https://api.0x.limo/v1/apps/480/inventory/defs -H \"Authorization: Bearer $TOKEN\" # {\"defs\": [...], \"currency\": \"USD\"} GET /v1/apps/{appid}/inventory/prices returns prices and the caller's balance."},{"u":"/api/inventory/#items","t":"Inventory","h":"Items","s":"REST API","x":"Route Body Does GET /v1/apps/{appid}/inventory all the caller's items (signed result) POST .../inventory/by_id {ids: [item ids]} some items (signed result) POST .../inventory/purchase {items: [[def, qty], ...]} buy items with the 0x balance POST .../inventory/promo {defs: [def, ...]} claim promo items the caller is eligible for POST .../inventory/consume {id, qty?} use up units of an item POST .../inventory/exchange {generate: [[def, qty]], destroy: [[item, qty]]} craft by a recipe POST .../inventory/transfer {src, qty, dest?} split or stack items POST .../inventory/drop {def} a playtime drop, if one is due POST .../inventory/properties set dynamic properties on items POST .../inventory/generate {items: [{def, qty}]} publishers only: grant items (others get result 15) GET .../inventory/inspect one player's item as a signed result (result 9 when there is none) Lists hold at most 128 lines. Quantities are positive 64-bit integers."},{"u":"/api/inventory/#purchases-debit-the-0x-balance","t":"Inventory","h":"Purchases debit the 0x balance","s":"REST API","x":"purchase debits the player's 0x balance (the same balance top-ups fill) in the same transaction that grants the items, so a purchase is all or nothing. Send an Idempotency-Key : a retried purchase then returns the first result instead of charging twice. curl -s https://api.0x.limo/v1/apps/480/inventory/purchase \\ -H \"Authorization: Bearer $TOKEN\" -H \"Idempotency-Key: $(uuidgen)\" \\ -H 'Content-Type: application/json' -d '{\"items\": [[1001, 1]]}'"},{"u":"/api/inventory/#signed","t":"Inventory","h":"Signed results","s":"REST API","x":"Every item result looks like: {\"result\": 1, \"items\": [{\"id\": 1, \"def\": 1001, \"qty\": 1}], \"ts\": 1792250000, \"signed\": \"5347494e56310000...\"} result is a Steam EResult (1 = OK). signed is a hex blob your game server can check offline : \"SGINV1\\0\\0\" (8 bytes) | payload length (u32, little-endian) | JSON payload | Ed25519 signature (64 bytes) The signature covers everything before it. Verify it with the current key from GET /v1/keys , then trust the JSON payload. A failed operation answers {\"result\": <code>, \"error\": \"...\", \"items\": []} ."},{"u":"/api/inventory/#trades","t":"Inventory","h":"Trades","s":"REST API","x":"POST /v1/apps/{appid}/inventory/trade {partner, give: [{id, qty}], get: [{id, qty}]} (at most 50 lines each) stores an offer for 5 minutes. It answers {status: \"pending\", offer, result: 22} . When the partner posts the mirror-image offer, the swap happens atomically and both sides get {status: \"done\", ...} . Only tradable definitions can be traded. Poll GET .../inventory/trade/{offer} , or listen for inventory_trade on the push stream . See the generated apps reference ."},{"u":"/api/lobbies-and-matchmaking/","t":"Lobbies and matchmaking","h":"","s":"REST API","x":"0x implements Steam's matchmaking model: lobbies that players create, search and join; a server browser of dedicated servers; and party beacons for joining friends. There is no automatic matchmaker that sorts players into matches. Your game picks a lobby or a server with the filters below. Lobby state changes reach members over the push stream ( lobby events), so clients don't poll."},{"u":"/api/lobbies-and-matchmaking/#lobbies","t":"Lobbies and matchmaking","h":"Lobbies","s":"REST API","x":"Route Does POST /v1/apps/{appid}/lobbies {max_members?, type?} create a lobby (the caller owns it and is its first member) POST /v1/apps/{appid}/lobbies/search {filters} find public, joinable lobbies GET /v1/lobbies/{id} the lobby's state POST /v1/lobbies/{id}/join join → {response: EChatRoomEnterResponse, lobby} POST /v1/lobbies/{id}/leave leave PUT /v1/lobbies/{id}/data owner: set key/values ( null deletes a key) PUT /v1/lobbies/{id}/member_data a member: set their own key/values PUT /v1/lobbies/{id}/settings owner: max_members , type , joinable , owner , game_server , linked POST /v1/lobbies/{id}/chat {data: hex} send a chat message to every member → {chat_id} POST /v1/lobbies/{id}/invite {user} invite someone (they get lobby_invite ) max_members is 1 to 250 (default 4). type is Steam's ELobbyType : 0 private, 1 friends only, 2 public (the default), 3 invisible. Only public, joinable lobbies show up in search. A lobby's state looks like {id, appid, owner, members, member_data, data, max_members, type, joinable, game_server, personas} . personas gives members' display names. Lobby IDs and SteamIDs are strings. A member whose last connection to the push stream closes drops out of "},{"u":"/api/lobbies-and-matchmaking/#search","t":"Lobbies and matchmaking","h":"Search filters","s":"REST API","x":"filters is a list. Every filter must match: kind Fields Matches string key , value , cmp the lobby's data[key] compared as text numerical key , value , cmp data[key] parsed as an integer slots value at least value free slots near key , value no filtering; results sort by distance of data[key] to value count value at most value results (default 50) compatible lobby no member of the result blocked or ignored, or is blocked or ignored by, a member of lobby (or the lobbies linked to either) cmp is Steam's ELobbyComparison , read as \"lobby value cmp filter value\": -2 ≤, -1 <, 0 = (default), 1 >, 2 ≥, 3 ≠. curl -s https://api.0x.limo/v1/apps/480/lobbies/search -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' -d '{\"filters\": [ {\"kind\": \"string\", \"key\": \"mode\", \"value\": \"ctf\", \"cmp\": 0}, {\"kind\": \"slots\", \"value\": 2}, {\"kind\": \"near\", \"key\": \"skill\", \"value\": 1500}, {\"kind\": \"count\", \"value\": 10} ]}' The answer is a list of lobby states, closest first."},{"u":"/api/lobbies-and-matchmaking/#servers","t":"Lobbies and matchmaking","h":"Game-server browser","s":"REST API","x":"Dedicated servers log on ( game servers ) and send a heartbeat with their state at least every 90 seconds: curl -s -X PUT https://api.0x.limo/v1/gameservers/me -H \"Authorization: Bearer $GS_SESSION\" \\ -H 'Content-Type: application/json' \\ -d '{\"advertise\": true, \"port\": 27015, \"query_port\": 27016, \"name\": \"EU #1\", \"map\": \"dust\", \"game_dir\": \"mygame\", \"players\": 7, \"max_players\": 16, \"tags\": \"ctf,eu\", \"dedicated\": true, \"secure\": true, \"password\": false}' Only servers that send advertise: true are listed. Leave out ip (or send 0 ) and the service lists the address the heartbeat came from. Players list servers with GET /v1/apps/{appid}/gameservers . It takes the master-server filters map , gamedir , gametagsand , gametagsnor , notfull , hasplayers , noplayers , dedicated , secure , password and name_match . Each entry carries updated , the time of its last heartbeat. DELETE /v1/gameservers/me unlists a server at once. Players' favourite and history servers are kept with GET|PUT /v1/me/server_favorites (at most 1000)."},{"u":"/api/lobbies-and-matchmaking/#beacons","t":"Lobbies and matchmaking","h":"Party beacons","s":"REST API","x":"A beacon advertises open slots in a party to the members of one of the host's clans: Route Does GET /v1/apps/{appid}/party/locations where a beacon can go: the caller's clans POST /v1/apps/{appid}/party/beacons {open_slots, location, connect, metadata} create one (1 to 250 slots) GET /v1/apps/{appid}/party/beacons active beacons in the caller's clans POST /v1/party/beacons/{id}/join reserve a slot for 5 minutes → {owner, connect} POST /v1/party/beacons/{id}/reservation {user, completed} host: the player arrived, or the slot opens again PUT / DELETE /v1/party/beacons/{id} host: change the slots / turn it off"},{"u":"/api/lobbies-and-matchmaking/#net","t":"Lobbies and matchmaking","h":"Networking helpers","s":"REST API","x":"Route For GET /v1/net/config the networking CA, the relay list and whether direct connections are allowed POST /v1/net/cert {spki} a 24-hour certificate for the caller's key (peer-to-peer identity) POST /v1/apps/{appid}/fakeip {ports} a stable FakeIP (169.254.128.0/17) and up to 4 fake ports for the caller in this app POST /v1/apps/{appid}/net/relay_ticket publishers: a signed relay auth ticket for a game coordinator See the generated lobbies reference , the game servers reference and the lobbies reference ."},{"u":"/api/achievements-leaderboards/#achievements","t":"Achievements and leaderboards","h":"Achievements","s":"REST API","x":"A game declares its achievements (with names, display names, descriptions and icons) in its app schema. A player's unlocks are part of their stats document : curl -s -X PUT https://api.0x.limo/v1/apps/4000009/userstats/$STEAMID \\ -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application/json' \\ -d '{\"achievements\": {\"FIRST_WIN\": 1792250000}}' Each value is the unlock time in Unix seconds. An object {\"achieved\": true, \"unlock_time\": 1792250000} is accepted too. A game server may write the stats of players in its own app with its game-server session. Route Auth Returns GET /v1/apps/{appid}/userstats/{steamid} token {stats, achievements} GET /v1/apps/{appid}/achievement_percentages token {players, achievements: [{name, percent}]} , most achieved first GET /v1/apps/{appid}/achievements public the store page: {appid, total, hidden_count, players, achievements: [{name, display_name, description, icon, icon_gray, percent}]} GET /v1/me/apps/{appid}/community token the caller's side of the store page: unlocked achievements (hidden ones included), leaderboard ranks Hidden achievements are counted on the store page but shown only to the players who unlocked them."},{"u":"/api/achievements-leaderboards/#leaderboards","t":"Achievements and leaderboards","h":"Leaderboards","s":"REST API","x":""},{"u":"/api/achievements-leaderboards/#find","t":"Achievements and leaderboards","h":"Find or create","s":"REST API","x":"curl -s \"https://api.0x.limo/v1/apps/4000009/leaderboards/best_lap?create=1&sort=1&display=3\" \\ -H \"Authorization: Bearer $TOKEN\" # {\"id\": 77, \"name\": \"best_lap\", \"sort\": 1, \"display\": 3, \"entry_count\": 1204} create=1 creates the board if it doesn't exist. Without it, a missing board answers 404 no such leaderboard . sort (only used when creating) is 1 ascending (lower is better, e.g. times) or 2 descending. display (only used when creating) is 1 numeric, 2 seconds or 3 milliseconds."},{"u":"/api/achievements-leaderboards/#scores","t":"Achievements and leaderboards","h":"Upload a score","s":"REST API","x":"curl -s https://api.0x.limo/v1/leaderboards/77/scores -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' -d '{\"score\": 61840, \"details\": [3, 1], \"method\": \"keep_best\"}' # {\"changed\": true, \"rank_new\": 12, \"rank_prev\": 30} method is keep_best (the default: only a better score replaces the old one) or force_update . Scores are 32-bit signed integers (larger values are clamped). details is optional extra data stored with the entry (Steam's score details, a list of integers). PUT /v1/leaderboards/{id}/ugc {handle} attaches a shared file you committed (a replay, a ghost) to your entry."},{"u":"/api/achievements-leaderboards/#entries","t":"Achievements and leaderboards","h":"Read entries","s":"REST API","x":"GET /v1/leaderboards/{id}/entries returns ranked entries [{steamid, score, details, ugc, rank, persona}] . The request parameter picks which entries: request Parameters Entries (default) global start (1), end (10) ranks start to end around_user user (default: the caller), start (-4), end (5) ranks relative to the player friends start , end the caller and their friends, in rank order users users (comma-separated SteamIDs) those players curl -s \"https://api.0x.limo/v1/leaderboards/77/entries?request=around_user&start=-2&end=2\" \\ -H \"Authorization: Bearer $TOKEN\""},{"u":"/api/achievements-leaderboards/#store","t":"Achievements and leaderboards","h":"Store page","s":"REST API","x":"GET /v1/apps/{appid}/leaderboards (public) lists a listed game's leaderboards, busiest first (at most 20), each with its top 10 by persona name. It never shows SteamIDs. See the generated leaderboards reference and apps reference ."},{"u":"/api/friends-presence/","t":"Friends and presence","h":"","s":"REST API","x":"The social API follows ISteamFriends. Changes reach the other side over the push stream as events: persona_change , rich_presence , game_invite , friend_message , clan_chat_msg and others."},{"u":"/api/friends-presence/#social","t":"Friends and presence","h":"The social view","s":"REST API","x":"GET /v1/me/social returns everything a friends list needs in one call: {\"friends\": [{\"steamid\": \"76561197960287931\", \"relationship\": 3, \"persona_name\": \"bob\", \"level\": 4, \"nickname\": null, \"online\": true, \"playing\": {\"appid\": 480}}], \"nicknames\": [], \"groups\": [{\"id\": 12, \"name\": \"Raid team\", \"members\": [\"76561197960287931\"]}], \"clans\": [{\"id\": 5, \"name\": \"Night Owls\", \"tag\": \"OWL\", \"public\": true, \"official_appid\": null, \"role\": \"member\", \"owner\": \"76561197960287940\"}]} curl -s https://api.0x.limo/v1/me/social -H \"Authorization: Bearer $ZEROX_TOKEN\" relationship is Steam's EFriendRelationship , for example 3 = friend, 2 = request received, 4 = request sent, 1 = blocked."},{"u":"/api/friends-presence/#friends","t":"Friends and presence","h":"Friends","s":"REST API","x":"Route Does POST /v1/me/friends {username} send a friend request by username (case-insensitive) POST /v1/friends/{steamid} {action} add , accept , remove , ignore , block or unblock → {relationship} PUT /v1/friends/{steamid}/nickname {nickname} your nickname for someone (≤ 32 characters; empty clears it) POST /v1/me/friend-groups {name} / DELETE .../{id} friend groups PUT / DELETE /v1/me/friend-groups/{id}/members/{steamid} group membership PUT /v1/me/persona {persona_name} change your display name (1 to 32 characters; the old one goes to the history) GET /v1/users/{steamid}/profile public profile {steamid, persona_name, level} GET /v1/users/{steamid}/persona-history earlier display names PUT / DELETE /v1/me/following/{steamid} , GET /v1/me/following follow players POST /v1/me/coplay {steamid, appid} record someone you played with"},{"u":"/api/friends-presence/#presence","t":"Friends and presence","h":"Playing and rich presence","s":"REST API","x":"PUT /v1/me/playing {appid, ip?, port?, query_port?, lobby?} says what the player is playing now. Refresh it each minute; it expires after 3 minutes. DELETE /v1/me/playing says the player stopped. The launcher does this for games it starts. PUT /v1/apps/{appid}/presence stores the player's rich presence key/values for the app (kept a day). Friends get rich_presence events. GET /v1/users/{steamid}/presence?app= returns a friend's rich presence {appid, visible, data} (without app : the game they play now). Strangers get visible: false . curl -s -X PUT https://api.0x.limo/v1/apps/480/presence -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' -d '{\"status\": \"In a match: 3-2\", \"connect\": \"+connect 10.0.0.5:27015\"}'"},{"u":"/api/friends-presence/#chat","t":"Friends and presence","h":"Invites and chat","s":"REST API","x":"Route Does POST /v1/friends/{steamid}/invite {connect, appid} invite a friend to your game; they get game_invite POST /v1/friends/{steamid}/messages {body, kind} an in-game chat message ( kind : EChatEntryType ) → {id} GET /v1/messages/{id} a message you sent, received or can see as a clan member (30 days)"},{"u":"/api/friends-presence/#clans","t":"Friends and presence","h":"Clans","s":"REST API","x":"Route Does POST /v1/clans {name, tag, public} create a clan you own GET /v1/clans/{id} {id, name, tag, owner, public, officers, members, online, in_game, chatting} POST /v1/clans/{id}/join / .../leave join a public clan / leave PUT /v1/clans/{id}/members/{steamid} {role} owner: officer or member POST /v1/clans/{id}/chat/join / .../leave enter or leave the clan chat room GET /v1/clans/{id}/chat/members who is in the room POST /v1/clans/{id}/chat/messages {body} say something in the room Game servers can check clan membership ( GET /v1/gameservers/group_status/{user}/{clan} ) and associate with a clan ( PUT /v1/gameservers/me/clan ). See the generated me reference and users reference ."},{"u":"/api/cloud-saves/","t":"Cloud saves","h":"","s":"REST API","x":"Each player has a private file space per app. Only that player can read or write it, with their own token. Names are relative paths with / separators. . and .. segments are refused ( 400 bad name )."},{"u":"/api/cloud-saves/#small","t":"Cloud saves","h":"Small files","s":"REST API","x":"Route Does GET /v1/apps/{appid}/cloud list: [{name, size, timestamp}] GET /v1/apps/{appid}/cloud/{path} read the bytes ( 404 not found ) PUT /v1/apps/{appid}/cloud/{path} write the request body → {ok, size} DELETE /v1/apps/{appid}/cloud/{path} delete curl JS curl -s -X PUT https://api.0x.limo/v1/apps/4000009/cloud/saves/slot1.json \\ -H \"Authorization: Bearer $TOKEN\" --data-binary @slot1.json curl -s https://api.0x.limo/v1/apps/4000009/cloud/saves/slot1.json -H \"Authorization: Bearer $TOKEN\" const url = `https://api.0x.limo/v1/apps/${appid}/cloud/saves/slot1.json`; await fetch(url, { method: \"PUT\", headers: { Authorization: `Bearer ${token}` }, body: JSON.stringify(save) }); const save2 = await fetch(url, { headers: { Authorization: `Bearer ${token}` } }).then(r => r.json());"},{"u":"/api/cloud-saves/#large","t":"Cloud saves","h":"Large files","s":"REST API","x":"For larger saves, move the bytes with a pre-signed URL. The URL carries its own signature (HMAC-SHA256 over the method, path and expiry), so the upload itself needs no bearer token. POST /v1/apps/{appid}/cloud_uploads {name, size} → {url} , a pre-signed PUT valid for 10 minutes. PUT the bytes to url . POST /v1/apps/{appid}/cloud_commit {name, sha256} checks the hash and makes the file live → {ok, size} . A wrong hash answers 409 sha256 mismatch ; nothing uploaded answers 404 nothing staged . To download, call POST /v1/apps/{appid}/cloud_download {name} → {url} , a pre-signed GET valid for 10 minutes. API=https://api.0x.limo; H=\"Authorization: Bearer $TOKEN\" URL=$(curl -s $API/v1/apps/4000009/cloud_uploads -H \"$H\" -H 'Content-Type: application/json' \\ -d \"{\\\"name\\\": \\\"world.bin\\\", \\\"size\\\": $(stat -c %s world.bin)}\" | jq -r .url) curl -s -X PUT \"$URL\" --data-binary @world.bin curl -s $API/v1/apps/4000009/cloud_commit -H \"$H\" -H 'Content-Type: application/json' \\ -d \"{\\\"name\\\": \\\"world.bin\\\", \\\"sha256\\\": \\\"$(sha256sum world.bin | cut -d' ' -f1)\\\"}\""},{"u":"/api/cloud-saves/#shared","t":"Cloud saves","h":"Shared files","s":"REST API","x":"To share a file with other players, for a leaderboard replay or a Workshop preview, use the shared file routes: POST /v1/apps/{appid}/shared {name, size} → {handle, url} , upload, then POST /v1/shared/{id}/commit {sha256} . The upload scanner checks committed files ( 451 if refused). Other players read them with GET /v1/shared/{id} . See the generated apps reference ."},{"u":"/api/transfers/","t":"Transfers","h":"","s":"REST API","x":"Game files move between players. These routes are the API side of that: a tracker that tells clients who has a file, web seeds that serve a file over HTTP when no peer has it, and reports of how many bytes came from where. The launcher, sg-steamclient and the @0xlimo/swarm-sw site runtime call them for you. You only need them for your own client. Files are named by content ID ( cid ): the lowercase hex SHA-256 of the file, or of its ciphertext when the file is gated (encrypted)."},{"u":"/api/transfers/#tracker","t":"Transfers","h":"Tracker","s":"REST API","x":"Route Does POST /v1/content/{cid}/announce the caller has (some of) this file; counts for 90 s POST /v1/content/announce {ids} the same for up to 1000 content IDs at once GET /v1/content/{cid}/peers up to 40 SteamIDs that announced the file in the last 90 s, shuffled The same operations run over the push stream , which is cheaper for a client that is connected anyway: {\"op\": \"announce\", \"id\": \"<cid>\"} {\"op\": \"announce\", \"ids\": [\"<cid>\", \"...\"]} {\"op\": \"peers\", \"id\": \"<cid>\", \"req\": 7} A peers request is answered with {\"type\": \"peers\", \"id\": \"<cid>\", \"req\": 7, \"peers\": [\"7656...\", \"...\"]} . Content that an operator blocked answers 451 content blocked over REST, and blocked: true with no peers over the stream. GET /v1/content/blocks lists blocked content IDs and their WebTorrent infohashes. Clients enforce the list on paths that don't go through a tracker of ours."},{"u":"/api/transfers/#seeds","t":"Transfers","h":"Web seeds and keys","s":"REST API","x":"Route Does GET /v1/content/{cid}/seed {data, info} URLs (CDN or pre-signed bucket URLs) that support HTTP range requests GET /v1/content/{cid}/key the AES-256 key of a gated file, for owners of its app only ( 403 otherwise)"},{"u":"/api/transfers/#web","t":"Transfers","h":"Hosted sites in the browser","s":"REST API","x":"Hosted sites use WebTorrent in the browser instead of the REST tracker: the WebSocket tracker wss://play.0x.limo/p2p/tracker (the tracker in GET /v1/hosting/config ); ./p2p/ice under the site version's own URL, which hands out STUN and TURN servers; the site's own origin as the fallback when no peer has a piece."},{"u":"/api/transfers/#reports","t":"Transfers","h":"Transfer reports","s":"REST API","x":"Clients report, opt-in, how many bytes of each file came from peers, from the origin and from the WebTorrent swarm. These reports feed 0x's swarm statistics and the public network map at https://p2p.0x.limo . They are never used for billing or enforcement. Route Auth Body POST /v1/content/transfers token {session, seq, app, items: [{id, peer, origin, webtorrent, up, bad_pieces}]} (at most 500 items) POST /v1/content/transfers/site anonymous the same with site in place of app POST /v1/content/report token {session, app, counters: {peer, origin, webtorrent, duplicate, bad_pieces, wt_up}} (cumulative per session) POST /v1/net/live token live gauges: up/down rate, seeding, DHT state seq rises by one per report of a session . A report whose seq isn't above the last one is acknowledged and ignored, so retries are safe. A hosted page opened directly (no one signed in) posts to /x1/xfer on its own origin, which the front forwards to /v1/content/transfers/site . These reports are limited per address to one every 10 s (burst 6). Nothing is sent when the player turned sharing off. Reports from a node with telemetry off answer 403 telemetry disabled . See the generated content reference ."},{"u":"/api/csp/","t":"CSP reports and policy","h":"","s":"REST API","x":"Every hosted page on <site>-play.0x.limo is served with a Content-Security-Policy and a Permissions-Policy built for that exact site version. By default a game can load only from its own origin and from the 0x platform. Anything else it needs from outside, it declares when it publishes. The front never takes a policy from the client: the backend answers it per version."},{"u":"/api/csp/#declare","t":"CSP reports and policy","h":"Declare what your game needs","s":"REST API","x":"Send csp with the version, from 0x.config.json with 0x publish , or in POST /v1/hosting/sites/{site}/versions : { \"csp\": { \"connect\": [\"wss://rt.example.com\", \"https://api.example.com\"], \"img\": [\"https://*.cdn.example.com\"], \"media\": [], \"font\": [], \"script\": [], \"frame\": [], \"permissions\": [\"microphone\"], \"eval\": false, \"inline_styles\": false } } Key Extends Values connect connect-src https:// or wss:// origins img / media / font / script / frame img-src / media-src / font-src / script-src / frame-src https:// origins permissions Permissions-Policy any of camera , microphone , geolocation , usb , serial , hid , payment eval script-src 'unsafe-eval' true to allow eval / new Function inline_styles style-src 'unsafe-inline' true to allow <style> elements made at runtime The rules for origins: An origin is https://host[:port] (or wss:// for connect ) with no path, query or user. The host is a name with a domain ( example.com ), not an IP address. One wildcard is allowed, as the whole first label: https://*.cdn.example.com . At most 20 origins per kind and 64 in all; the whole declaration at most 8 KiB. A bad declaration refuses the version with 422 upload refused and the problems list"},{"u":"/api/csp/#baseline","t":"CSP reports and policy","h":"What every version gets","s":"REST API","x":"Always allowed, without declaring anything: scripts, styles, images, media, fonts, workers and frames from the site's own origin; WebAssembly ( 'wasm-unsafe-eval' ); data: and blob: images, media and fonts; blob: workers; the 0x platform: https://api.0x.limo , https://play.0x.limo and their wss:// origins; Cloudflare's page analytics; inline <script> and <style> that shipped with the game . At finalize the backend hashes every inline script and style in the version's HTML files and allows exactly those hashes, without 'unsafe-inline' ; style=\"...\" attributes, plus the fullscreen , gamepad and autoplay permissions. Always refused: plugins ( object-src 'none' ) and <base> ( base-uri 'none' ). Forms may submit only to the site itself."},{"u":"/api/csp/#modes","t":"CSP reports and policy","h":"Enforce and report-only","s":"REST API","x":"Mode Headers enforce Content-Security-Policy (enforced), a stricter copy as Content-Security-Policy-Report-Only (style attributes by hash only; only the 0x store and X as frame ancestors), and Permissions-Policy turning off every permission not declared report-only the same policy as Content-Security-Policy-Report-Only only; no Permissions-Policy . Its reports are exactly what enforcing would break Versions published since the enforced policy shipped are enforce . Older versions stay report-only . 0x can switch a whole site (or all sites) to another mode. The answer gives the mode and mode_source ( version , site or global ). A version with more than 64 inline script and style hashes stays report-only . Move inline code into files to get it enforced. If the backend can't answer, the page is served with the report-only baseline and keeps working."},{"u":"/api/csp/#preview","t":"CSP reports and policy","h":"Preview enforcement","s":"REST API","x":"Add ?x1-csp=enforce to a page URL to load that page with the version's policy enforced , whatever its mode. Do this before you rely on a version being enforced. https://mygame-play.0x.limo/sites/mygame/4/?x1-csp=enforce"},{"u":"/api/csp/#read-policy","t":"CSP reports and policy","h":"Read the policy","s":"REST API","x":"Route Auth Returns GET /v1/hosting/sites/{site}/policy token, your site the last 20 versions, each with mode , mode_source , declared , effective_declared , review , the inline-hash counts, warnings and the exact headers GET /v1/hosting/policy/{site}/{n} public that version's headers as the front applies them: X-X1-Csp , X-X1-Csp-Ro , X-X1-Pp and X-X1-Csp-Mode (empty body) curl -s -D - -o /dev/null https://api.0x.limo/v1/hosting/policy/planetsmithx/1 x-x1-csp-mode: enforce x-x1-csp: default-src 'self'; script-src 'self' 'wasm-unsafe-eval' ... x-x1-pp: camera=(), microphone=(), geolocation=(), usb=(), serial=(), hid=(), payment=(), fullscreen=(self), gamepad=(self), autoplay=(self) 0x publish prints the version's policy after finalize, and the finalize answer carries it as csp ( Hosting )."},{"u":"/api/csp/#reports","t":"CSP reports and policy","h":"Violation reports","s":"REST API","x":"Browsers post what the policy blocked (or would block) to /x1/csp on the site's own origin. The Reporting-Endpoints header and report-uri point there. Both report formats are accepted: application/csp-report and the Reporting API's application/reports+json . Reports are anonymous. The reporter's address is used only for rate limiting (1/s, burst 120) and isn't stored. Reports are added up per site, version, directive, blocked origin and source file. URLs lose their query and fragment, and blocked URLs keep only their origin. Read your rows: Route Returns GET /v1/hosting/csp-reports?version=&days=30 rows across all your sites GET /v1/hosting/sites/{site}/csp-reports?version=&days=30 rows of one site curl -s \"https://api.0x.limo/v1/hosting/csp-reports?days=7\" -H \"Authorization: Bearer $ZEROX_TOKEN\" {\"items\": [{\"site\": \"mygame\", \"version\": 4, \"directive\": \"connect-src\", \"blocked\": \"https://api.example.com\", \"source_file\": \"https://mygame-play.0x.limo/sites/mygame/4/game.js\", \"line\": 120, \"col\": 9, \"disposition\": \"enforce\", \"count\": 37, \"first_seen\": 1792250000, \"last_seen\": 1792259000}], \"totals\": [{\"site\": \"mygame\", \"version\": 4, \"reports\": 37, \"rows\": 1, \"first_seen\": 1792250000, \"l"},{"u":"/api/payments-and-topups/","t":"Payments and top-ups","h":"","s":"REST API","x":"Money on 0x runs through one place: the player's 0x balance , in US cents. Players top it up with a card through the USDT checkout. Paid games, inventory purchases and, once they are switched on, in-game purchases and subscriptions are paid from it. Developers earn the sale price minus the platform fee and are paid out in USDT. Feature On 0x.limo Balance and top-ups (Ethereum, Tron, Arbitrum, BSC, Polygon USDT, and Bitcoin) live Paid games (store orders paid from the balance) live Developer revenue and USDT payouts live Play tickets ( POST /v1/apps/{appid}/play-ticket ) not enabled yet : answers 503 play_tickets_closed In-game purchases ( /v1/.../iap/... ) off : answers 404 in-game purchases are off Subscriptions ( /v1/me/subscriptions , plans) off : answers 404 subscriptions are off"},{"u":"/api/payments-and-topups/#wallet","t":"Payments and top-ups","h":"The balance","s":"REST API","x":"curl -s https://api.0x.limo/v1/me/wallet -H \"Authorization: Bearer $ZEROX_TOKEN\" {\"currency\": \"USD\", \"balance\": 2500, \"balanceUsd\": \"25.00\", \"topups_enabled\": true, \"topup_min\": 2000, \"topup_max\": 50000, \"networks\": [{\"id\": \"tron\", \"name\": \"Tron\", \"token\": \"USDT\", \"standard\": \"TRC-20\", \"...\": \"...\"}], \"last_network\": \"tron\", \"history\": [], \"topups\": []} balance is in cents. Top-ups are whole dollars from $20 to $500 ."},{"u":"/api/payments-and-topups/#topups","t":"Payments and top-ups","h":"Top-ups","s":"REST API","x":"Route Does POST /v1/me/wallet/estimate {amountUsd} what the card would be charged on each network (cached a minute) POST /v1/me/wallet/topups {amountUsd, network?} start a top-up → 201 with the checkout URL to send the player to GET /v1/me/wallet/topups the player's top-ups, newest first GET /v1/me/wallet/topups/{id} one top-up (the return page polls it) and the new balance POST /v1/me/wallet/topups/{id}/cancel cancel an open top-up ( 409 once a payment has arrived) A top-up moves through pending → confirming → paid . The other end states are paid_short , expired , failed , mismatch and resolved . The balance is credited when the payment confirms. Starting a top-up is limited to one every 20 s per account (burst 10). Top-ups are a player feature: the launcher and https://0x.limo show them. Your game only needs the balance when it sells something."},{"u":"/api/payments-and-topups/#paid-games","t":"Payments and top-ups","h":"Paid games","s":"REST API","x":"A listing's price is \"free\" or {amount, currency} in minor units (USD; $0.99 to $1000). It is set when you submit the listing. Once approved, the catalog shows store.price with store.free: false , and only buyers own the game. Route Does POST /v1/store/orders {appid, idempotency_key?} buy a game, paid at once from the balance → 201 {order: {status: \"paid\"}, paid_from: \"wallet\", wallet} GET /v1/me/orders / GET /v1/me/orders/{id} the player's orders POST /v1/me/orders/{id}/cancel cancel a pending order Errors: 409 already_owned , 409 not_for_sale , and 409 insufficient_funds with missing and missingUsd . curl -s https://api.0x.limo/v1/store/orders -H \"Authorization: Bearer $TOKEN\" \\ -H \"Idempotency-Key: $(uuidgen)\" -H 'Content-Type: application/json' -d '{\"appid\": 4000011}' A paid game's hosted site is built origin-only : no swarm, so nothing of it is shared player to player. Its gate, which lets only owners in, uses play tickets ."},{"u":"/api/payments-and-topups/#play-tickets","t":"Payments and top-ups","h":"Play tickets","s":"REST API","x":"A play ticket is a short-lived proof, signed by 0x, that a player may play a game on a given site origin: ticket = b64url(payload) \".\" b64url(HMAC-SHA256(secret, b64url(payload))) payload = {\"a\": <appid>, \"o\": \"<site origin>\", \"s\": \"<steamid>\", \"e\": <expiry, unix s>, \"j\": \"<nonce>\"} POST /v1/apps/{appid}/play-ticket → {ticket, appid, origin, expires_in, paid} . A paid game gives tickets only to owners; others get 402 {\"error\": \"not_owned\", \"price\": {...}} . POST /v1/play-tickets/verify {ticket} (public) → {valid, appid, origin, steamid, expires} , for a server that doesn't hold the secret. Not enabled on 0x.limo yet The ticket signing key isn't configured on 0x.limo, so POST /v1/apps/{appid}/play-ticket answers 503 play_tickets_closed ."},{"u":"/api/payments-and-topups/#revenue","t":"Payments and top-ups","h":"Developer revenue and payouts","s":"REST API","x":"The platform fee is 10% of each sale. The rest is yours. Route Does GET /v1/dev/revenue {fee_percent, currencies: [{currency, gross_sales, refunds, platform_fees, earned, available, payouts_pending, paid_out}], games, recent_sales, payouts, settlement} (minor units) GET /v1/dev/payout-account your USDT payout addresses and preferred network PUT /v1/dev/payout-account {addresses, payout_network?} set or change addresses per network ( 0x… EIP-55 for EVM networks, T… for Tron; null removes one) curl -s https://api.0x.limo/v1/dev/revenue -H \"Authorization: Bearer $ZEROX_TOKEN\" Payouts go to the address of your preferred network. The /dev/submit portal has the same views."},{"u":"/api/payments-and-topups/#iap","t":"Payments and top-ups","h":"In-game purchases","s":"REST API","x":"Switched off on 0x.limo In-game purchases are built and tested but switched off on 0x.limo. Every route below answers 404 {\"error\": \"in-game purchases are off\"} until they go live. The design: your game asks the launcher to sell an item, the player confirms in the launcher's own dialog, the price comes off the 0x balance, and your game server checks a signed receipt. Who Route Does Developer PUT /v1/dev/apps/{appid}/iap/items/{sku} add or change an item {name, description?, price, kind: consumable | permanent, max_per_player?, active?} Developer POST /v1/dev/apps/{appid}/iap/server-key a server key 0xsk_<appid>_... for your game servers (shown once) Game GET /v1/apps/{appid}/iap/items items on sale with what the player owns and their balance Game POST /v1/apps/{appid}/iap/intents {sku, quantity?} ask to buy → a pending intent the player confirms in the launcher Server POST /v1/iap/server/verify {receipt} check a receipt (Bearer: the server key) Server POST /v1/iap/server/consume {purchase, quantity?, idempotency_key?} use up a consumable Server GET /v1/iap/server/players/{steamid}/inventory a player's items of your app Anyone GET /v1/iap/keys the Ed25519 keys receipts are signed wi"},{"u":"/api/payments-and-topups/#subscriptions","t":"Payments and top-ups","h":"Subscriptions","s":"REST API","x":"Switched off on 0x.limo Subscriptions are built and tested but switched off on 0x.limo. Every route below answers 404 {\"error\": \"subscriptions are off\"} until they go live. The design: a game has plans. Each plan has an entitlement key your game checks and prices per week , month or year . Subscribers pay each period from the 0x balance. A game can be subscription-only , which makes an active subscription count as owning it. Who Route Does Developer POST /v1/dev/apps/{appid}/plans add a plan {name, description?, entitlement, prices: {month, week?, year?}} Developer PUT /v1/dev/apps/{appid}/plans/{id} edit or retire a plan (the entitlement key never changes) Developer PUT /v1/dev/apps/{appid}/subscription {only} subscription-only on or off Developer GET /v1/dev/subscriptions your plans with subscriber counts Player POST /v1/me/subscriptions {plan, period} subscribe, first period paid at once Player POST /v1/me/subscriptions/{id}/cancel / .../resume cancel at period end / undo or pay an overdue renewal Game GET /v1/me/apps/{appid}/subscription what the player holds for this game Server GET /v1/gameservers/entitlement/{steamid}/{key} game-server session: does the player hold the key n"},{"u":"/api/stream/","t":"Push stream","h":"","s":"REST API","x":"wss://api.0x.limo/v1/stream is one WebSocket per client process: a game, a game server or the launcher. The service pushes JSON events over it, for lobby changes, invites, friends, chat, trades and relay-list changes. It also carries swarm tracker requests and a binary relay between players. GET /v1/me and POST /v1/gameservers/logon return the stream URL to use ( stream , with every gateway in streams )."},{"u":"/api/stream/#connect","t":"Push stream","h":"Connect","s":"REST API","x":"Authenticate with the same tokens as REST: an access token or a game-server session. Browser Node / native // Browsers can't set headers on a WebSocket: offer the token as a subprotocol. const ws = new WebSocket(\"wss://api.0x.limo/v1/stream\", [\"sg.v1\", \"sg.bearer.\" + accessToken]); ws.onmessage = (m) => { if (typeof m.data !== \"string\") return; // binary frames: the relay const ev = JSON.parse(m.data); lastEid = ev._eid ?? lastEid; if (ev.type === \"lobby\") onLobby(ev.event, ev.lobby); }; import WebSocket from \"ws\"; const ws = new WebSocket(\"wss://api.0x.limo/v1/stream\", [\"sg.v1\"], { headers: { Authorization: `Bearer ${accessToken}` }, }); The server answers the sg.v1 subprotocol. A bad or expired token gets 401 on the upgrade. While a node is draining for a deploy, the upgrade gets 503 ; connect to another gateway or retry. The server pings every 20 s. A connection that stays silent for three intervals is closed. Messages may be up to 1 MiB."},{"u":"/api/stream/#resume","t":"Push stream","h":"Resuming","s":"REST API","x":"Every JSON event carries _eid , its ID in the user's event stream. After a reconnect, pass the last one you saw: wss://api.0x.limo/v1/stream?since=1792259580679-0 You first get every event you missed, from any gateway node, then live events. Drop duplicates by _eid . The replay keeps the last ~64 events for about 30 s. After a longer gap, resync your state over REST ( GET /v1/lobbies/{id} , GET /v1/me/social ). Binary relay frames are never replayed. When a user's last connection closes, they get 10 seconds to reconnect, on any node, before they drop out of their lobbies."},{"u":"/api/stream/#events","t":"Push stream","h":"Events","s":"REST API","x":"type When lobby a lobby you are in changed: event is member_entered , member_left , data or chat , with the full lobby lobby_invite someone invited you to a lobby persona_change a friend's name, relationship or game changed ( flags , Steam's EPersonaChange ) rich_presence a friend's rich presence changed ( user , appid ) game_invite a friend invited you to their game ( connect ) friend_message an in-game chat message from a friend clan_chat_join / clan_chat_leave / clan_chat_msg clan chat room activity party_beacons / party_reservation party beacons in your clans; a player reserved a slot in yours inventory_trade a trade offer for you, or a trade done net_config the relay list changed ( v ); fetch GET /v1/net/config again peers the answer to a tracker peers request overlay_join the launcher asks your game to join something the player clicked in its overlay deprecation a client feature you use is being retired Ignore event types you don't know; new ones are added over time."},{"u":"/api/stream/#requests","t":"Push stream","h":"Requests over the stream","s":"REST API","x":"Text frames from the client, at most 96 KiB, are swarm tracker requests ( Transfers ): {\"op\": \"announce\", \"id\": \"<cid>\"} {\"op\": \"announce\", \"ids\": [\"<cid>\", \"...\"]} {\"op\": \"peers\", \"id\": \"<cid>\", \"req\": 1}"},{"u":"/api/stream/#relay","t":"Push stream","h":"Binary relay","s":"REST API","x":"Binary frames are a last-resort relay between players when no direct or relayed connection works. To send, write [u64 little-endian: recipient SteamID][payload] . Every connection of the recipient receives [u64 little-endian: sender SteamID][payload] , whichever gateway node it is on. Delivery is best effort, and frames are not replayed. Use real networking (ISteamNetworkingSockets, @0xlimo/net ) for game traffic."},{"u":"/api/reference/","t":"REST reference","h":"","s":"REST API","x":"This reference is generated from sg-backend/openapi.yaml (OpenAPI 3.1.0, API version 1.0), the contract the backend's own tests check every route against. Base URL: https://api.0x.limo . Not in the generated reference The hosting routes ( /v1/hosting/* ) are not in the OpenAPI document yet; they are documented by hand in Hosting and versions . Group Operations Apps (stats, achievements, tickets, cloud, servers) 31 Auth tickets 3 Blobs 2 Catalog 1 Content and depots 7 Fusions 2 Game servers 4 Health 2 Verification keys 1 Leaderboards 2 Lobbies 8 Me (the signed-in account) 4 Networking 3 OAuth and sign-in 9 Screenshots 2 Push stream 1 User-generated content 11 Users 1"},{"u":"/api/reference/#schemas","t":"REST reference","h":"Shared schemas","s":"REST API","x":""},{"u":"/api/reference/#schema-error","t":"REST reference","h":"Error","s":"REST API","x":"{ error: string; }"},{"u":"/api/reference/#schema-ok","t":"REST reference","h":"Ok","s":"REST API","x":"{ ok: boolean; }"},{"u":"/api/reference/#schema-itemid","t":"REST reference","h":"ItemId","s":"REST API","x":"number"},{"u":"/api/reference/#schema-definitionid","t":"REST reference","h":"DefinitionId","s":"REST API","x":"number"},{"u":"/api/reference/#schema-quantity","t":"REST reference","h":"Quantity","s":"REST API","x":"number"},{"u":"/api/reference/#schema-grantquantity","t":"REST reference","h":"GrantQuantity","s":"REST API","x":"number"},{"u":"/api/reference/#schema-grantpair","t":"REST reference","h":"GrantPair","s":"REST API","x":"[number, number]"},{"u":"/api/reference/#schema-ingredientpair","t":"REST reference","h":"IngredientPair","s":"REST API","x":"[number, number]"},{"u":"/api/reference/#schema-purchaserequest","t":"REST reference","h":"PurchaseRequest","s":"REST API","x":"{ items: ([number, number])[]; // at most 128 items }"},{"u":"/api/reference/#schema-exchangerequest","t":"REST reference","h":"ExchangeRequest","s":"REST API","x":"{ generate: ([number, number])[]; // at most 128 items destroy: ([number, number])[]; // at most 128 items }"},{"u":"/api/reference/#schema-transferrequest","t":"REST reference","h":"TransferRequest","s":"REST API","x":"{ src: number; // 1..18446744073709552000 qty: number; // 1..18446744073709552000 dest?: number; // 1..18446744073709552000 }"},{"u":"/api/reference/#schema-consumerequest","t":"REST reference","h":"ConsumeRequest","s":"REST API","x":"{ id: number; // 1..18446744073709552000 qty?: number; // 1..18446744073709552000 }"},{"u":"/api/reference/#schema-byidrequest","t":"REST reference","h":"ByIdRequest","s":"REST API","x":"{ ids: number[]; // at most 128 items }"},{"u":"/api/reference/#schema-promorequest","t":"REST reference","h":"PromoRequest","s":"REST API","x":"{ defs: number[]; // at most 128 items }"},{"u":"/api/reference/#schema-droprequest","t":"REST reference","h":"DropRequest","s":"REST API","x":"{ def: number; // 1..9223372036854776000 }"},{"u":"/api/reference/#schema-propertyname","t":"REST reference","h":"PropertyName","s":"REST API","x":"string"},{"u":"/api/reference/#schema-propertiesrequest","t":"REST reference","h":"PropertiesRequest","s":"REST API","x":"{ set?: ([number, string, any])[]; // at most 128 items remove?: ([number, string])[]; // at most 128 items }"},{"u":"/api/reference/#schema-userstats","t":"REST reference","h":"UserStats","s":"REST API","x":"{ stats?: { [key: string]: number }; achievements?: { [key: string]: number | { achieved?: boolean; unlock_time?: number; // 0..18446744073709552000 } }; // SDK format: name -> u32 unlock timestamp (0 is locked). The previously documented object format remains accepted for compatibility. }"},{"u":"/api/reference/#schema-lobby","t":"REST reference","h":"Lobby","s":"REST API","x":"{ id: string; appid: number; owner: string; members: string[]; member_data?: object; data: { [key: string]: string }; max_members: number; type: number; // ELobbyType joinable: boolean; game_server?: object | null; personas?: { [key: string]: string }; }"},{"u":"/api/reference/#schema-inventoryresult","t":"REST reference","h":"InventoryResult","s":"REST API","x":"{ result: number; // EResult (1 = OK) error?: string; items: { id: number; // 1..18446744073709552000 def: number; // 1..9223372036854776000 qty: number; // 0..18446744073709552000 flags: number; // 0.. acquired: number; // 0.. origin: string; props: object; }[]; ts?: number; signed?: string; // hex: SGINV1 blob, Ed25519-signed by the service key }"},{"u":"/api/reference/#schema-cloudlist","t":"REST reference","h":"CloudList","s":"REST API","x":"{ name: string; size: number; // 0.. timestamp: number; // 0.. }[]"},{"u":"/api/reference/#schema-tokenresponse","t":"REST reference","h":"TokenResponse","s":"REST API","x":"{ access_token: string; token_type: \"Bearer\"; expires_in: number; refresh_token: string; }"},{"u":"/api/reference/apps/","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"","s":"REST API","x":"Guide: Achievements and leaderboards , Cloud saves , Inventory , Payments and top-ups , Plays and stats . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/apps/{appid} Bearer token App schema GET /v1/apps/{appid}/userstats/{steamid} Bearer token Stats and achievements PUT /v1/apps/{appid}/userstats/{steamid} Bearer token Store own stats PUT /v1/apps/{appid}/presence Bearer token Rich presence key/values GET /v1/apps/{appid}/cloud Bearer token Cloud files: GET /v1/apps/{appid}/cloud/{path} Bearer token Read a small file PUT /v1/apps/{appid}/cloud/{path} Bearer token Write a small file DELETE /v1/apps/{appid}/cloud/{path} Bearer token Delete POST /v1/apps/{appid}/cloud_uploads Bearer token Begin an upload: POST /v1/apps/{appid}/cloud_commit Bearer token Commit an upload: POST /v1/apps/{appid}/cloud_download Bearer token {name} GET /v1/apps/{appid}/leaderboards/{name} Bearer token Find POST /v1/apps/{appid}/lobbies Bearer token Create {max_members, type} POST /v1/apps/{appid}/lobbies/search Bearer token Search with filters [{kind: GET /v1/apps/{appid}/gameservers Bearer token Server browser with master-server filters "},{"u":"/api/reference/apps/#get-v1-apps-appid","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}","s":"REST API","x":"App schema (achievements, stats, DLC with ownership) and whether the caller owns it Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/apps/$APPID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-userstats-steamid","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/userstats/{steamid}","s":"REST API","x":"Stats and achievements Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes steamid path string yes 64-bit SteamID as a decimal string Status Response 200 OK UserStats UserStats { stats?: { [key: string]: number }; achievements?: { [key: string]: number | { achieved?: boolean; unlock_time?: number; // 0..18446744073709552000 } }; // SDK format: name -> u32 unlock timestamp (0 is locked). The previously documented object format remains accepted for compatibility. } curl -s \"https://api.0x.limo/v1/apps/$APPID/userstats/$STEAMID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#put-v1-apps-appid-userstats-steamid","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"PUT /v1/apps/{appid}/userstats/{steamid}","s":"REST API","x":"Store own stats (game servers: players in their app); server-side min/max/increment-only rules apply Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes steamid path string yes 64-bit SteamID as a decimal string Request body ( application/json ): { stats?: { [key: string]: number }; achievements?: { [key: string]: number | { achieved?: boolean; unlock_time?: number; // 0..18446744073709552000 } }; // SDK format: name -> u32 unlock timestamp (0 is locked). The previously documented object format remains accepted for compatibility. } Example: { \"stats\": { \"NumGames\": 1 }, \"achievements\": {} } Status Response 200 OK Ok 403 Not yours curl -s -X PUT \"https://api.0x.limo/v1/apps/$APPID/userstats/$STEAMID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\" \\ -H \"Content-Type: application/json\" \\ -d '{\"stats\":{\"NumGames\":1},\"achievements\":{}}'"},{"u":"/api/reference/apps/#put-v1-apps-appid-presence","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"PUT /v1/apps/{appid}/presence","s":"REST API","x":"Rich presence key/values Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK Ok curl -s -X PUT \"https://api.0x.limo/v1/apps/$APPID/presence\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-cloud","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/cloud","s":"REST API","x":"Cloud files: [{name, size, timestamp}] Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK CloudList curl -s \"https://api.0x.limo/v1/apps/$APPID/cloud\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-cloud-path","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/cloud/{path}","s":"REST API","x":"Read a small file Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes path path string yes relative path, / separated; no . or .. parts Status Response 200 File contents ( application/octet-stream ) 404 Not found curl -s \"https://api.0x.limo/v1/apps/$APPID/cloud/$PATH\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#put-v1-apps-appid-cloud-path","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"PUT /v1/apps/{appid}/cloud/{path}","s":"REST API","x":"Write a small file Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes path path string yes relative path, / separated; no . or .. parts Request body ( application/octet-stream ): binary Status Response 200 OK curl -s -X PUT \"https://api.0x.limo/v1/apps/$APPID/cloud/$PATH\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\" \\ -H \"Content-Type: application/octet-stream\" --data-binary @file"},{"u":"/api/reference/apps/#delete-v1-apps-appid-cloud-path","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"DELETE /v1/apps/{appid}/cloud/{path}","s":"REST API","x":"Delete Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes path path string yes relative path, / separated; no . or .. parts Status Response 200 OK Ok curl -s -X DELETE \"https://api.0x.limo/v1/apps/$APPID/cloud/$PATH\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-cloud-uploads","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/cloud_uploads","s":"REST API","x":"Begin an upload: {name, size} → {url} (pre-signed PUT) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/cloud_uploads\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-cloud-commit","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/cloud_commit","s":"REST API","x":"Commit an upload: {name, sha256} (hash-checked) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK 404 Nothing staged 409 sha256 mismatch curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/cloud_commit\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-cloud-download","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/cloud_download","s":"REST API","x":"{name} → {url} (pre-signed GET) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/cloud_download\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-leaderboards-name","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/leaderboards/{name}","s":"REST API","x":"Find (or create) a leaderboard: {id, name, sort, display, entry_count} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes name path string yes create query \"1\" no sort query number no display query number no Status Response 200 OK 404 No such leaderboard curl -s \"https://api.0x.limo/v1/apps/$APPID/leaderboards/$NAME\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-lobbies","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/lobbies","s":"REST API","x":"Create {max_members, type} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK Lobby Lobby { id: string; appid: number; owner: string; members: string[]; member_data?: object; data: { [key: string]: string }; max_members: number; type: number; // ELobbyType joinable: boolean; game_server?: object | null; personas?: { [key: string]: string }; } curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/lobbies\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-lobbies-search","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/lobbies/search","s":"REST API","x":"Search with filters [{kind: string|numerical|near|slots|count, key, value, cmp}] Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/lobbies/search\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-gameservers","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/gameservers","s":"REST API","x":"Server browser with master-server filters (map, gamedir, gametagsand, gametagsnor, notfull, hasplayers, noplayers, dedicated, secure, password, name_match) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/apps/$APPID/gameservers\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-ugc","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/ugc","s":"REST API","x":"Create an item {file_type} → {id} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/ugc\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-ugc-query","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/ugc/query","s":"REST API","x":"Query (kind all|user|details, filters, sort, paging) → {total, items, next_cursor} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/ugc/query\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-ugc-subscribed","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/ugc/subscribed","s":"REST API","x":"[{id, subscribed_at}] Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/apps/$APPID/ugc/subscribed\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-inventory","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/inventory","s":"REST API","x":"All items (signed result) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK InventoryResult InventoryResult { result: number; // EResult (1 = OK) error?: string; items: { id: number; // 1..18446744073709552000 def: number; // 1..9223372036854776000 qty: number; // 0..18446744073709552000 flags: number; // 0.. acquired: number; // 0.. origin: string; props: object; }[]; ts?: number; signed?: string; // hex: SGINV1 blob, Ed25519-signed by the service key } curl -s \"https://api.0x.limo/v1/apps/$APPID/inventory\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-inventory-defs","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/inventory/defs","s":"REST API","x":"Item definitions and currency Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/apps/$APPID/inventory/defs\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-inventory-prices","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/inventory/prices","s":"REST API","x":"Prices and wallet balance Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/apps/$APPID/inventory/prices\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-inventory-action","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/inventory/{action}","s":"REST API","x":"Item operations; results are Ed25519-signed; a purchase debits the wallet in the same transaction The action selects its request schema below. Missing optional consume.qty defaults to one; malformed supplied quantities never do. Inventory business rejection remains HTTP 200 with result != 1; conflicting idempotency reuse is HTTP 409. Extra object fields are tolerated for forward compatibility. Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Accepts Idempotency-Key . Parameter In Type Required Description appid path number yes action path \"by\\_id\" | \"promo\" | \"consume\" | \"exchange\" | \"transfer\" | \"drop\" | \"purchase\" | \"properties\" yes Idempotency-Key header string no Request body ( application/json , required): ByIdRequest | PromoRequest | ConsumeRequest | ExchangeRequest | TransferRequest | DropRequest | PurchaseRequest | PropertiesRequest Status Response 200 OK InventoryResult InventoryResult { result: number; // EResult (1 = OK) error?: string; items: { id: number; // 1..18446744073709552000 def: number; // 1..9223372036854776000 qty: number; // 0..18446744073709552000 flags: number; // 0.. acquired: number; // 0.. origin: string; props: object; }[]; "},{"u":"/api/reference/apps/#get-v1-apps-appid-screenshots","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/screenshots","s":"REST API","x":"The caller's screenshots for the app Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/apps/$APPID/screenshots\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-screenshots","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/screenshots","s":"REST API","x":"Upload a PNG or JPEG (query width, height, name) → {id} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK 400 Not an image curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/screenshots\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-builds","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/builds","s":"REST API","x":"Publishers: builds and branches Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK 403 Not a publisher curl -s \"https://api.0x.limo/v1/apps/$APPID/builds\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-builds","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/builds","s":"REST API","x":"Publishers: new build {files: [{path, id, size, mode?, key?, type?, wt?, parts?: [{id, size, key?, wt?}]}], description?} → {build_id, missing} (a file in parts: id = SHA-256 of the part ids joined by newlines, size = their sum; wt = the object's WebTorrent infohash, 40 hex, stored as given; notes/15) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK 400 Bad manifest (unsafe or duplicate path 403 Not a publisher 409 A content id belongs to another app curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/builds\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-builds-build-step","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/builds/{build}/{step}","s":"REST API","x":"Publishers: uploads {ids} → pre-signed PUT URLs; commit {id} (hash-checked, then on the origin); publish {branch, statement?} (statement: the publisher's signed build statement, relayed to clients unverified) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes build path number yes step path \"uploads\" | \"commit\" | \"publish\" yes Status Response 200 OK 404 No such build or nothing uploaded 409 Bytes don't match the id, or files missing at publish curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/builds/$BUILD/$STEP\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-rotate-keys","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/rotate_keys","s":"REST API","x":"Publishers: bump the key generation (future encrypted builds derive new keys and ids even for unchanged files; notes/15) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK 403 Not a publisher curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/rotate_keys\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-depot-secret","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/depot_secret","s":"REST API","x":"Publishers: the app's key-derivation secret for encrypted builds Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK 403 Not a publisher curl -s \"https://api.0x.limo/v1/apps/$APPID/depot_secret\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#post-v1-apps-appid-publisher-roots","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"POST /v1/apps/{appid}/publisher_roots","s":"REST API","x":"Publishers: append the next signed publisher root {doc} (trusted keys; version = previous + 1). Stored and relayed; clients verify it. Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes Status Response 200 OK 400 Not a root document for this app 403 Not a publisher 409 Not the next version curl -s -X POST \"https://api.0x.limo/v1/apps/$APPID/publisher_roots\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/apps/#get-v1-apps-appid-depot","t":"Apps (stats, achievements, tickets, cloud, servers)","h":"GET /v1/apps/{appid}/depot","s":"REST API","x":"Owners (public branch) and publishers: the build's manifest {build_id, files: [{path, id, size, mode, encrypted, type?, wt?, parts?}], publisher?: {roots, statement}} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description appid path number yes branch query string no Status Response 200 OK 403 Not entitled 404 No build on that branch curl -s \"https://api.0x.limo/v1/apps/$APPID/depot\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/auth/","t":"Auth tickets","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary POST /v1/auth/tickets Bearer token Issue an Ed25519-signed session ticket {appid, identity} POST /v1/auth/verify Bearer token Verify a ticket once POST /v1/auth/verify_any Game-server session Game servers:"},{"u":"/api/reference/auth/#post-v1-auth-tickets","t":"Auth tickets","h":"POST /v1/auth/tickets","s":"REST API","x":"Issue an Ed25519-signed session ticket {appid, identity} (requires a licence) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK 403 No licence curl -s -X POST \"https://api.0x.limo/v1/auth/tickets\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/auth/#post-v1-auth-verify","t":"Auth tickets","h":"POST /v1/auth/verify","s":"REST API","x":"Verify a ticket once (replay-protected): {ticket, appid, steamid?} → {ok, steamid, owner} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/auth/verify\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/auth/#post-v1-auth-verify-any","t":"Auth tickets","h":"POST /v1/auth/verify_any","s":"REST API","x":"Game servers: verify a ticket of unknown owner (deprecated connect flow) Auth: Game-server session: Authorization: Bearer gs-... from game-server logon . Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/auth/verify_any\" \\ -H \"Authorization: Bearer $ZEROX_GS_TOKEN\""},{"u":"/api/reference/blobs/","t":"Blobs","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/blobs/{path} None Pre-signed download PUT /v1/blobs/{path} None Pre-signed upload"},{"u":"/api/reference/blobs/#get-v1-blobs-path","t":"Blobs","h":"GET /v1/blobs/{path}","s":"REST API","x":"Pre-signed download (local blob store; with S3 the URLs point at object storage) Auth: None: no token needed. Parameter In Type Required Description path path string yes relative path, / separated; no . or .. parts exp query number yes sig query string yes Status Response 200 File contents ( application/octet-stream ) 403 Bad or expired signature curl -s \"https://api.0x.limo/v1/blobs/$PATH?exp=VALUE&sig=VALUE\""},{"u":"/api/reference/blobs/#put-v1-blobs-path","t":"Blobs","h":"PUT /v1/blobs/{path}","s":"REST API","x":"Pre-signed upload Auth: None: no token needed. Parameter In Type Required Description path path string yes relative path, / separated; no . or .. parts exp query number yes sig query string yes Status Response 200 OK 403 Bad or expired signature curl -s -X PUT \"https://api.0x.limo/v1/blobs/$PATH?exp=VALUE&sig=VALUE\""},{"u":"/api/reference/catalog/","t":"Catalog","h":"","s":"REST API","x":"Guide: Catalog . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/catalog Optional Store listings:"},{"u":"/api/reference/catalog/#get-v1-catalog","t":"Catalog","h":"GET /v1/catalog","s":"REST API","x":"Store listings: {schema, apps: [{appid, name, store, owned?, p2p?: {tracker}}]}; owned only for a signed-in caller (always true for a free app, store.free); p2p.tracker is the WebTorrent tracker of a world whose web origin is in a placed tracker group Auth: Optional: works without a token; a bearer token adds the caller's own data. Status Response 200 OK 401 Bad token curl -s \"https://api.0x.limo/v1/catalog\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/content/","t":"Content and depots","h":"","s":"REST API","x":"Guide: Hosting and versions , Transfers . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary POST /v1/content/{cid}/announce Bearer token Tracker: GET /v1/content/{cid}/peers Bearer token Tracker: GET /v1/content/{cid}/seed Bearer token Web seed: GET /v1/content/{cid}/key Bearer token AES-256 key of a gated POST /v1/content/report Bearer token Opt-in aggregate content telemetry POST /v1/content/transfers Bearer token Opt-in per-asset content telemetry POST /v1/content/announce Bearer token Tracker, batch:"},{"u":"/api/reference/content/#post-v1-content-cid-announce","t":"Content and depots","h":"POST /v1/content/{cid}/announce","s":"REST API","x":"Tracker: the caller has (some of) this file; counts for 90 s (also over the push stream: {op: announce, id}) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description cid path string yes content id: hex SHA-256 of the file (of the ciphertext when gated) Status Response 200 OK 400 Not a SHA-256 id curl -s -X POST \"https://api.0x.limo/v1/content/$CID/announce\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/content/#get-v1-content-cid-peers","t":"Content and depots","h":"GET /v1/content/{cid}/peers","s":"REST API","x":"Tracker: up to 40 SteamIDs that announced the file in the last 90 s, shuffled (also over the push stream: {op: peers, id, req}) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description cid path string yes content id: hex SHA-256 of the file (of the ciphertext when gated) Status Response 200 OK curl -s \"https://api.0x.limo/v1/content/$CID/peers\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/content/#get-v1-content-cid-seed","t":"Content and depots","h":"GET /v1/content/{cid}/seed","s":"REST API","x":"Web seed: {data, info} URLs (CDN, or pre-signed bucket URLs) supporting HTTP range requests Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description cid path string yes content id: hex SHA-256 of the file (of the ciphertext when gated) Status Response 200 OK curl -s \"https://api.0x.limo/v1/content/$CID/seed\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/content/#get-v1-content-cid-key","t":"Content and depots","h":"GET /v1/content/{cid}/key","s":"REST API","x":"AES-256 key of a gated (encrypted) file, for owners of its app Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description cid path string yes content id: hex SHA-256 of the file (of the ciphertext when gated) Status Response 200 OK 403 Not entitled (or no such gated file) curl -s \"https://api.0x.limo/v1/content/$CID/key\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/content/#post-v1-content-report","t":"Content and depots","h":"POST /v1/content/report","s":"REST API","x":"Opt-in aggregate content telemetry (SG_TELEMETRY): {session, app, counters: {peer, origin, webtorrent, duplicate, bad_pieces, wt_up}}, cumulative per session; the server adds deltas Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK 400 Bad session, unknown counter, value out of range, or a counter went down 403 Telemetry disabled curl -s -X POST \"https://api.0x.limo/v1/content/report\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/content/#post-v1-content-transfers","t":"Content and depots","h":"POST /v1/content/transfers","s":"REST API","x":"Opt-in per-asset content telemetry (SG_TELEMETRY): {session, seq, app, items: [{id, peer, origin, webtorrent, up, bad_pieces}]}, bytes per content ID since the previous report (at most 500 items); seq rises by one per report and a repeated seq adds nothing Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK 400 Bad session or seq, bad or repeated id, unknown field, or value out of range 403 Telemetry disabled curl -s -X POST \"https://api.0x.limo/v1/content/transfers\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/content/#post-v1-content-announce","t":"Content and depots","h":"POST /v1/content/announce","s":"REST API","x":"Tracker, batch: {ids: [up to 1000 content ids]} (also over the push stream: {op: announce, ids}) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK 400 Bad or too many ids curl -s -X POST \"https://api.0x.limo/v1/content/announce\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/fusions/","t":"Fusions","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/fusions None Published fusion worlds: GET /v1/fusions/{id} None A published fusion:"},{"u":"/api/reference/fusions/#get-v1-fusions","t":"Fusions","h":"GET /v1/fusions","s":"REST API","x":"Published fusion worlds: {items: [{id, name, summary, creator, minecraft, loader, mods, server, auth}]} Auth: None: no token needed. Status Response 200 OK curl -s \"https://api.0x.limo/v1/fusions\""},{"u":"/api/reference/fusions/#get-v1-fusions-id","t":"Fusions","h":"GET /v1/fusions/{id}","s":"REST API","x":"A published fusion: {manifest (sg.fusion/1), revision} Auth: None: no token needed. Parameter In Type Required Description id path string yes Status Response 200 OK 404 No such published fusion curl -s \"https://api.0x.limo/v1/fusions/$ID\""},{"u":"/api/reference/gameservers/","t":"Game servers","h":"","s":"REST API","x":"Guide: Lobbies and matchmaking . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary POST /v1/gameservers/logon None {appid, token?} PUT /v1/gameservers/me Game-server session Game server heartbeat with its state DELETE /v1/gameservers/me Game-server session Unlist GET /v1/gameservers/license/{steamid}/{appid} Game-server session Game servers:"},{"u":"/api/reference/gameservers/#post-v1-gameservers-logon","t":"Game servers","h":"POST /v1/gameservers/logon","s":"REST API","x":"{appid, token?} → {steamid, session, public_ip, stream} Auth: None: no token needed. Status Response 200 OK 401 Invalid server token curl -s -X POST \"https://api.0x.limo/v1/gameservers/logon\""},{"u":"/api/reference/gameservers/#put-v1-gameservers-me","t":"Game servers","h":"PUT /v1/gameservers/me","s":"REST API","x":"Game server heartbeat with its state (listed while fresh, 90 s) Auth: Game-server session: Authorization: Bearer gs-... from game-server logon . Status Response 200 OK Ok curl -s -X PUT \"https://api.0x.limo/v1/gameservers/me\" \\ -H \"Authorization: Bearer $ZEROX_GS_TOKEN\""},{"u":"/api/reference/gameservers/#delete-v1-gameservers-me","t":"Game servers","h":"DELETE /v1/gameservers/me","s":"REST API","x":"Unlist Auth: Game-server session: Authorization: Bearer gs-... from game-server logon . Status Response 200 OK Ok curl -s -X DELETE \"https://api.0x.limo/v1/gameservers/me\" \\ -H \"Authorization: Bearer $ZEROX_GS_TOKEN\""},{"u":"/api/reference/gameservers/#get-v1-gameservers-license-steamid-appid","t":"Game servers","h":"GET /v1/gameservers/license/{steamid}/{appid}","s":"REST API","x":"Game servers: does this player own the app Auth: Game-server session: Authorization: Bearer gs-... from game-server logon . Parameter In Type Required Description steamid path string yes 64-bit SteamID as a decimal string appid path number yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/gameservers/license/$STEAMID/$APPID\" \\ -H \"Authorization: Bearer $ZEROX_GS_TOKEN\""},{"u":"/api/reference/health/","t":"Health","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /healthz None Liveness GET /readyz None Readiness"},{"u":"/api/reference/health/#get-healthz","t":"Health","h":"GET /healthz","s":"REST API","x":"Liveness Auth: None: no token needed. Status Response 200 ok curl -s \"https://api.0x.limo/healthz\""},{"u":"/api/reference/health/#get-readyz","t":"Health","h":"GET /readyz","s":"REST API","x":"Readiness (Postgres, Redis, not draining) Auth: None: no token needed. Status Response 200 OK 503 OK curl -s \"https://api.0x.limo/readyz\""},{"u":"/api/reference/keys/","t":"Verification keys","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/keys None Verification keys:"},{"u":"/api/reference/keys/#get-v1-keys","t":"Verification keys","h":"GET /v1/keys","s":"REST API","x":"Verification keys: current and previous Ed25519 keys with key IDs (JWTs, tickets, inventory results) Auth: None: no token needed. Status Response 200 OK curl -s \"https://api.0x.limo/v1/keys\""},{"u":"/api/reference/leaderboards/","t":"Leaderboards","h":"","s":"REST API","x":"Guide: Achievements and leaderboards . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary POST /v1/leaderboards/{id}/scores Bearer token Upload {score, details, method: GET /v1/leaderboards/{id}/entries Bearer token Ranked entries [{steamid, score, details, rank}]"},{"u":"/api/reference/leaderboards/#post-v1-leaderboards-id-scores","t":"Leaderboards","h":"POST /v1/leaderboards/{id}/scores","s":"REST API","x":"Upload {score, details, method: keep_best|force_update} → {changed, rank_new, rank_prev} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/leaderboards/$ID/scores\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/leaderboards/#get-v1-leaderboards-id-entries","t":"Leaderboards","h":"GET /v1/leaderboards/{id}/entries","s":"REST API","x":"Ranked entries [{steamid, score, details, rank}] Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes request query \"global\" | \"around\\_user\" | \"friends\" | \"users\" no start query number no end query number no user query string no users query string no Status Response 200 OK curl -s \"https://api.0x.limo/v1/leaderboards/$ID/entries\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/lobbies/","t":"Lobbies","h":"","s":"REST API","x":"Guide: Lobbies and matchmaking . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/lobbies/{id} Bearer token Lobby state POST /v1/lobbies/{id}/join Bearer token {response: POST /v1/lobbies/{id}/leave Bearer token PUT /v1/lobbies/{id}/data Bearer token Owner sets key/values PUT /v1/lobbies/{id}/member_data Bearer token Member sets own key/values PUT /v1/lobbies/{id}/settings Bearer token Owner changes max_members, type, joinable, owner, game_server POST /v1/lobbies/{id}/chat Bearer token {data: POST /v1/lobbies/{id}/invite Bearer token {user}"},{"u":"/api/reference/lobbies/#get-v1-lobbies-id","t":"Lobbies","h":"GET /v1/lobbies/{id}","s":"REST API","x":"Lobby state Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK Lobby 404 No such lobby Lobby { id: string; appid: number; owner: string; members: string[]; member_data?: object; data: { [key: string]: string }; max_members: number; type: number; // ELobbyType joinable: boolean; game_server?: object | null; personas?: { [key: string]: string }; } curl -s \"https://api.0x.limo/v1/lobbies/$ID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/lobbies/#post-v1-lobbies-id-join","t":"Lobbies","h":"POST /v1/lobbies/{id}/join","s":"REST API","x":"{response: EChatRoomEnterResponse, lobby} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/lobbies/$ID/join\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/lobbies/#post-v1-lobbies-id-leave","t":"Lobbies","h":"POST /v1/lobbies/{id}/leave","s":"REST API","x":"Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK Ok curl -s -X POST \"https://api.0x.limo/v1/lobbies/$ID/leave\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/lobbies/#put-v1-lobbies-id-data","t":"Lobbies","h":"PUT /v1/lobbies/{id}/data","s":"REST API","x":"Owner sets key/values (null deletes) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK Ok 403 Not the owner curl -s -X PUT \"https://api.0x.limo/v1/lobbies/$ID/data\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/lobbies/#put-v1-lobbies-id-member-data","t":"Lobbies","h":"PUT /v1/lobbies/{id}/member_data","s":"REST API","x":"Member sets own key/values Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK Ok 403 Not a member curl -s -X PUT \"https://api.0x.limo/v1/lobbies/$ID/member_data\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/lobbies/#put-v1-lobbies-id-settings","t":"Lobbies","h":"PUT /v1/lobbies/{id}/settings","s":"REST API","x":"Owner changes max_members, type, joinable, owner, game_server Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK Ok 403 Not the owner curl -s -X PUT \"https://api.0x.limo/v1/lobbies/$ID/settings\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/lobbies/#post-v1-lobbies-id-chat","t":"Lobbies","h":"POST /v1/lobbies/{id}/chat","s":"REST API","x":"{data: hex} → {chat_id}; pushed to members Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK 403 Not a member curl -s -X POST \"https://api.0x.limo/v1/lobbies/$ID/chat\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/lobbies/#post-v1-lobbies-id-invite","t":"Lobbies","h":"POST /v1/lobbies/{id}/invite","s":"REST API","x":"{user} → push lobby_invite Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/lobbies/$ID/invite\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/me/","t":"Me (the signed-in account)","h":"","s":"REST API","x":"Guide: Friends and presence , Payments and top-ups . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/me Bearer token The caller: DELETE /v1/me Bearer token Erase the account GET /v1/me/export Bearer token Everything held about the caller POST /v1/me/push Bearer token The launcher injects an overlay_join event into the user's own game"},{"u":"/api/reference/me/#get-v1-me","t":"Me (the signed-in account)","h":"GET /v1/me","s":"REST API","x":"The caller: steamid, persona, level, country, language, push gateway URLs Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK curl -s \"https://api.0x.limo/v1/me\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/me/#delete-v1-me","t":"Me (the signed-in account)","h":"DELETE /v1/me","s":"REST API","x":"Erase the account (GDPR art. 17); body {confirm: \"delete my account\"} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK 400 Not confirmed curl -s -X DELETE \"https://api.0x.limo/v1/me\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/me/#get-v1-me-export","t":"Me (the signed-in account)","h":"GET /v1/me/export","s":"REST API","x":"Everything held about the caller (GDPR art. 15/20) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK curl -s \"https://api.0x.limo/v1/me/export\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/me/#post-v1-me-push","t":"Me (the signed-in account)","h":"POST /v1/me/push","s":"REST API","x":"The launcher injects an overlay_join event into the user's own game Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/me/push\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/net/","t":"Networking","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/net/config Bearer token Networking CA POST /v1/net/report Bearer token Opt-in aggregate path telemetry POST /v1/net/cert Bearer token Certify the caller's key:"},{"u":"/api/reference/net/#get-v1-net-config","t":"Networking","h":"GET /v1/net/config","s":"REST API","x":"Networking CA (hex DER), relays [{id, addr, region, weight, full}] from the relay registry, direct allowed, v (relay-list version; changes are pushed as {type: net_config, v}), telemetry (reports accepted) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK curl -s \"https://api.0x.limo/v1/net/config\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/net/#post-v1-net-report","t":"Networking","h":"POST /v1/net/report","s":"REST API","x":"Opt-in aggregate path telemetry (SG_TELEMETRY): {session, counters: {direct, relay, fallback, webrtc, upgrade_attempts, upgrades, direct_failed, c_100..c_inf}, relay_rtt_ms: {relay: ms}}, cumulative per session; the server adds deltas Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK 400 Bad session, unknown counter, value out of range, or a counter went down 403 Telemetry disabled curl -s -X POST \"https://api.0x.limo/v1/net/report\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/net/#post-v1-net-cert","t":"Networking","h":"POST /v1/net/cert","s":"REST API","x":"Certify the caller's key: {spki: hex DER} → {cert, ca, expires} (24 h, s<steamid>.peer.0x1) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK 400 Bad key curl -s -X POST \"https://api.0x.limo/v1/net/cert\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/oauth/","t":"OAuth and sign-in","h":"","s":"REST API","x":"Guide: Authentication . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary POST /v1/oauth/token None OAuth 2.0 token endpoint: POST /v1/oauth/guest None A guest account, so a launcher takes part in the network before its player signs in: POST /v1/oauth/revoke None RFC 7009: GET /v1/oauth/authorize None Sign-in page POST /v1/oauth/authorize None Sign-in form post: POST /v1/oauth/device_authorization None RFC 8628: GET /v1/oauth/device None Device approval page POST /v1/oauth/device None Approve or deny a user code POST /v1/oauth/device/approve Bearer token A signed-in app approves a device code:"},{"u":"/api/reference/oauth/#post-v1-oauth-token","t":"OAuth and sign-in","h":"POST /v1/oauth/token","s":"REST API","x":"OAuth 2.0 token endpoint: password, refresh_token (rotating, reuse revokes the family), authorization_code (PKCE S256), device_code Auth: None: no token needed. Request body ( application/x-www-form-urlencoded ): A JSON object; the fields are in the summary above. Status Response 200 Tokens TokenResponse 400 OAuth error (invalid_grant, authorization_pending, slow_down, expired_token, access_denied) TokenResponse { access_token: string; token_type: \"Bearer\"; expires_in: number; refresh_token: string; } curl -s -X POST \"https://api.0x.limo/v1/oauth/token\" \\ -d key=value"},{"u":"/api/reference/oauth/#post-v1-oauth-guest","t":"OAuth and sign-in","h":"POST /v1/oauth/guest","s":"REST API","x":"A guest account, so a launcher takes part in the network before its player signs in: {access_token, refresh_token, expires_in, steamid, persona_name, guest: true}. No user name or password; owns the free apps. Rate-limited per address as a sign-in; 403 when SG_GUESTS=0 Auth: None: no token needed. Status Response 200 OK 403 Guest accounts are off 429 Too many from this address curl -s -X POST \"https://api.0x.limo/v1/oauth/guest\""},{"u":"/api/reference/oauth/#post-v1-oauth-revoke","t":"OAuth and sign-in","h":"POST /v1/oauth/revoke","s":"REST API","x":"RFC 7009: revokes the token's family Auth: None: no token needed. Status Response 200 Always curl -s -X POST \"https://api.0x.limo/v1/oauth/revoke\""},{"u":"/api/reference/oauth/#get-v1-oauth-authorize","t":"OAuth and sign-in","h":"GET /v1/oauth/authorize","s":"REST API","x":"Sign-in page (authorization code + PKCE; loopback redirect URIs on any port) Auth: None: no token needed. Status Response 200 HTML curl -s \"https://api.0x.limo/v1/oauth/authorize\""},{"u":"/api/reference/oauth/#post-v1-oauth-authorize","t":"OAuth and sign-in","h":"POST /v1/oauth/authorize","s":"REST API","x":"Sign-in form post: redirects to redirect_uri with code and state Auth: None: no token needed. Status Response 200 HTML (retry) 302 Redirect curl -s -X POST \"https://api.0x.limo/v1/oauth/authorize\""},{"u":"/api/reference/oauth/#post-v1-oauth-device-authorization","t":"OAuth and sign-in","h":"POST /v1/oauth/device_authorization","s":"REST API","x":"RFC 8628: device_code, user_code, verification_uri, interval Auth: None: no token needed. Status Response 200 OK curl -s -X POST \"https://api.0x.limo/v1/oauth/device_authorization\""},{"u":"/api/reference/oauth/#get-v1-oauth-device","t":"OAuth and sign-in","h":"GET /v1/oauth/device","s":"REST API","x":"Device approval page Auth: None: no token needed. Status Response 200 HTML curl -s \"https://api.0x.limo/v1/oauth/device\""},{"u":"/api/reference/oauth/#post-v1-oauth-device","t":"OAuth and sign-in","h":"POST /v1/oauth/device","s":"REST API","x":"Approve or deny a user code (with credentials) Auth: None: no token needed. Status Response 200 HTML curl -s -X POST \"https://api.0x.limo/v1/oauth/device\""},{"u":"/api/reference/oauth/#post-v1-oauth-device-approve","t":"OAuth and sign-in","h":"POST /v1/oauth/device/approve","s":"REST API","x":"A signed-in app approves a device code: {user_code, allow} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Status Response 200 OK Ok 404 Unknown or expired curl -s -X POST \"https://api.0x.limo/v1/oauth/device/approve\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/screenshots/","t":"Screenshots","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/screenshots/{id} Bearer token Image bytes PUT /v1/screenshots/{id}/meta Bearer token Tag location, users, published files"},{"u":"/api/reference/screenshots/#get-v1-screenshots-id","t":"Screenshots","h":"GET /v1/screenshots/{id}","s":"REST API","x":"Image bytes Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 File contents ( application/octet-stream ) curl -s \"https://api.0x.limo/v1/screenshots/$ID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/screenshots/#put-v1-screenshots-id-meta","t":"Screenshots","h":"PUT /v1/screenshots/{id}/meta","s":"REST API","x":"Tag location, users, published files Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK curl -s -X PUT \"https://api.0x.limo/v1/screenshots/$ID/meta\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/stream/","t":"Push stream","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/stream Bearer token Push channel"},{"u":"/api/reference/stream/#get-v1-stream","t":"Push stream","h":"GET /v1/stream","s":"REST API","x":"Push channel (WebSocket upgrade) Text frames: JSON events ({\"type\": \"lobby\"|\"lobby_invite\"|\"resync\"|..., \"_eid\": \"<id>\"}). Binary frames: relay [u64 to][payload] out, [u64 from][payload] in. Reconnect with ?since=&lt;last \\_eid&gt; to receive missed events (drop duplicates by ID). Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description since query string no Status Response 101 Switching protocols 401 Bad token curl -s \"https://api.0x.limo/v1/stream\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/","t":"User-generated content","h":"","s":"REST API","x":"Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/ugc/{id} Bearer token Item PUT /v1/ugc/{id} Bearer token Owner commits an update DELETE /v1/ugc/{id} Bearer token Owner deletes POST /v1/ugc/{id}/content_urls Bearer token {method: GET /v1/ugc/{id}/content Bearer token File list [{name, size, sha256}] GET /v1/ugc/{id}/content/{path} Bearer token Download a file PUT /v1/ugc/{id}/content/{path} Bearer token Owner uploads a file GET /v1/ugc/{id}/preview Bearer token Preview image PUT /v1/ugc/{id}/preview Bearer token Owner sets the preview POST /v1/ugc/{id}/{action} Bearer token Subscribe, unsubscribe, vote {up}, favorite {add} GET /v1/ugc/{id}/vote Bearer token {voted_up, voted_down, skipped}"},{"u":"/api/reference/ugc/#get-v1-ugc-id","t":"User-generated content","h":"GET /v1/ugc/{id}","s":"REST API","x":"Item (with vote and subscription counts) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK 404 Not visible curl -s \"https://api.0x.limo/v1/ugc/$ID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#put-v1-ugc-id","t":"User-generated content","h":"PUT /v1/ugc/{id}","s":"REST API","x":"Owner commits an update (metadata, tags, kv, visibility, change note, file list); finalising a file list runs the upload scanner over each file and records its sha256 plus the item's content_sha256, and an optional {signature: {key, sig}} over the item id and that hash is verified and relayed Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK 400 Bad or non-matching signature 403 Not the owner 451 The scanner refused a file curl -s -X PUT \"https://api.0x.limo/v1/ugc/$ID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#delete-v1-ugc-id","t":"User-generated content","h":"DELETE /v1/ugc/{id}","s":"REST API","x":"Owner deletes Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK Ok curl -s -X DELETE \"https://api.0x.limo/v1/ugc/$ID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#post-v1-ugc-id-content-urls","t":"User-generated content","h":"POST /v1/ugc/{id}/content_urls","s":"REST API","x":"{method: PUT|GET, names} → {urls} (pre-signed); GET urls are issued only for files on the item's list Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK 404 That name is not part of this item's content curl -s -X POST \"https://api.0x.limo/v1/ugc/$ID/content_urls\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#get-v1-ugc-id-content","t":"User-generated content","h":"GET /v1/ugc/{id}/content","s":"REST API","x":"File list [{name, size, sha256}] Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/ugc/$ID/content\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#get-v1-ugc-id-content-path","t":"User-generated content","h":"GET /v1/ugc/{id}/content/{path}","s":"REST API","x":"Download a file Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes path path string yes relative path, / separated; no . or .. parts Status Response 200 File contents ( application/octet-stream ) curl -s \"https://api.0x.limo/v1/ugc/$ID/content/$PATH\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#put-v1-ugc-id-content-path","t":"User-generated content","h":"PUT /v1/ugc/{id}/content/{path}","s":"REST API","x":"Owner uploads a file Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes path path string yes relative path, / separated; no . or .. parts Status Response 200 OK curl -s -X PUT \"https://api.0x.limo/v1/ugc/$ID/content/$PATH\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#get-v1-ugc-id-preview","t":"User-generated content","h":"GET /v1/ugc/{id}/preview","s":"REST API","x":"Preview image Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 File contents ( application/octet-stream ) curl -s \"https://api.0x.limo/v1/ugc/$ID/preview\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#put-v1-ugc-id-preview","t":"User-generated content","h":"PUT /v1/ugc/{id}/preview","s":"REST API","x":"Owner sets the preview Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK Ok curl -s -X PUT \"https://api.0x.limo/v1/ugc/$ID/preview\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#post-v1-ugc-id-action","t":"User-generated content","h":"POST /v1/ugc/{id}/{action}","s":"REST API","x":"Subscribe, unsubscribe, vote {up}, favorite {add} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes action path \"subscribe\" | \"unsubscribe\" | \"vote\" | \"favorite\" yes Status Response 200 OK Ok curl -s -X POST \"https://api.0x.limo/v1/ugc/$ID/$ACTION\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/ugc/#get-v1-ugc-id-vote","t":"User-generated content","h":"GET /v1/ugc/{id}/vote","s":"REST API","x":"{voted_up, voted_down, skipped} Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description id path string yes Status Response 200 OK curl -s \"https://api.0x.limo/v1/ugc/$ID/vote\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/api/reference/users/","t":"Users","h":"","s":"REST API","x":"Guide: Friends and presence . Errors are {\"error\": \"...\"} with the status ( errors ); limits are in rate limits . Method Path Auth Summary GET /v1/users/{steamid} Bearer token Public profile"},{"u":"/api/reference/users/#get-v1-users-steamid","t":"Users","h":"GET /v1/users/{steamid}","s":"REST API","x":"Public profile (persona name) Auth: Bearer token: Authorization: Bearer <access token> ( authentication ). Parameter In Type Required Description steamid path string yes 64-bit SteamID as a decimal string Status Response 200 OK 404 No such user curl -s \"https://api.0x.limo/v1/users/$STEAMID\" \\ -H \"Authorization: Bearer $ZEROX_TOKEN\""},{"u":"/store/","t":"Your store page","h":"","s":"Store page","x":"A listing goes into the 0x store once it has been reviewed. Submit it with 0x submit or the developer portal . These pages cover what a listing contains and how the store shows it. Page What it covers Listing fields Every field of a listing, with its limits and the matching 0x.config.json key Store art and media Capsule, screenshot and trailer formats and sizes, cropping, share images Age ratings The four ratings and eight content descriptors Release types Released games, demos of upcoming releases, the New badge Trending and sorting How games are ranked, what counts as a play, the Trending badge and Featured Embeds, X cards and oEmbed Playable embeds in X posts, blogs and other sites"},{"u":"/store/listing-fields/","t":"Listing fields","h":"","s":"Store page","x":"A store listing is submitted with POST /v1/listings . 0x submit builds the request from 0x.config.json , and the submission form builds it from the page. Each submission is a new version of the listing, which waits for review. The approved version is what players see."},{"u":"/store/listing-fields/#fields","t":"Listing fields","h":"Fields","s":"Store page","x":"Field Required Rules 0x.config.json Shown id yes 3–64 characters: a-z , 0-9 , - , not starting or ending with - . It is the game's id in every launcher and its store URL ( 0x.limo/game/<id> ). The first developer to use an id owns it. The launcher's own worlds ( outgrid-earth , los-santos , war , earth ) and issues and uploads are reserved. id URL, catalog title yes 1–80 characters name Everywhere tagline no ≤ 200 characters tagline Cards, share previews description yes 1–4000 characters listing.description , else description , else tagline Game page tags no ≤ 16 tags, each 1–32 characters tags Cards (first 3), tag pages , filters age_rating yes See Age ratings listing.age_rating Game page (\"Rated\") play yes See Play target listing.play price no \"free\" (the default). {amount, currency} only when payments are on. capsule first version {\"png\": base64} , ≤ 1 MiB, a real PNG. If left out, the last version's capsule is kept. See Store art . listing.capsule (path) Cards, game page, share image screenshots no ≤ 6, each {\"png\": …} or {\"jpeg\": …} , ≤ 2 MiB listing.screenshots (paths) Game page media strip trailer no {\"url\": YouTube or Vimeo} , or {\"upload\": name} of a file sent to PUT /v1/l"},{"u":"/store/listing-fields/#play","t":"Listing fields","h":"Play target","s":"Store page","x":"Key Meaning play.type web : a page in the browser. hosted-server : a web page plus a game server hosted on 0x. paper : your own Minecraft (Paper) server, not available on 0x.limo yet. play.url The https page players open ( http://localhost: and http://127.0.0.1: are accepted only for development). Not needed with site . play.site , play.version A hosted site version: it must be yours and final . Its origin becomes the play URL. If you also give url , it must be on that origin. play.server {host, port} of the game server a native client joins. Required for paper ."},{"u":"/store/listing-fields/#details","t":"Listing fields","h":"Details","s":"Store page","x":"Key Rules details.controls Any of keyboard-mouse , gamepad , touch details.phones true or false : whether the game plays well on a phone details.players {single: bool, multi: bool, max: 1–100000} . max above 1 needs multi to be not false. details.languages ≤ 40 names, each 1–40 characters details.download_bytes A size in bytes. For hosted sites, the version's own size is used instead. details.players.multi , play type hosted-server , or a tag matching multi/co-op/online/MMO put the game under the store's Multiplayer filter."},{"u":"/store/listing-fields/#tags","t":"Listing fields","h":"Tags and developer pages","s":"Store page","x":"Tags are free text and matched case-insensitively. 0x.limo/tag/<tag> lists the games with that tag, and 0x.limo/developer/<slug> lists the games of a developer: your display name, lowercased, with runs of other characters turned into - . Use common genre words (Action, Arcade, Puzzle, Multiplayer, …) so your game shows up next to similar ones."},{"u":"/store/listing-fields/#status","t":"Listing fields","h":"Status and versions","s":"Store page","x":"Status Meaning pending Waiting for review. A newer submission of the same listing replaces it. At most 10 per developer at once. approved Live in the catalog. The previous approved version becomes superseded . rejected See the reviewer's note ( 0x submit status ) and any review issues You can withdraw a pending version ( POST /v1/listings/<id>/withdraw ) or take a live listing out of the catalog ( POST /v1/listings/<id>/delist ). An approved listing gets the app id 4000000 + listing id . Approved art is public at GET /v1/listings/<id>/art/<version>/<file> ."},{"u":"/store/listing-fields/#example","t":"Listing fields","h":"Example request","s":"Store page","x":"curl -s https://api.0x.limo/v1/listings \\ -H \"authorization: Bearer $ZEROX_TOKEN\" -H 'content-type: application/json' \\ -d '{ \"id\": \"my-neon-drift\", \"title\": \"Neon Drift\", \"tagline\": \"Catch stars, dodge meteors.\", \"description\": \"A tiny neon arcade game.\", \"tags\": [\"Arcade\", \"Casual\"], \"age_rating\": \"everyone\", \"play\": {\"type\": \"web\", \"site\": \"my-neon-drift\", \"version\": 1}, \"price\": \"free\", \"capsule\": {\"png\": \"'\"$(base64 -w0 art/capsule.png)\"'\"} }' The response has id , listing , version , status and precheck ( checks: [{check, ok, detail}] )."},{"u":"/store/media/#capsule","t":"Store art and media","h":"Capsule","s":"Store page","x":"The capsule is the game's main image. It is used on store cards, the game page, the launcher library and share previews. Format PNG only (the CLI refuses other files; the API checks the PNG signature) File size ≤ 1 MiB Aspect 616:353 (about 1.75:1). Store cards show it at this ratio. Recommended size 616×353 (as in the examples) or 1232×706 for sharp high-DPI cards Minimum Under 460×215 gets a pre-check warning Required On the first version. Later versions keep it if you leave it out. The pre-check also warns when the capsule is mostly transparent (90% or more) or nearly one color. These are warnings only: the reviewer still sees the game and can approve it. Note The submission form's label says \"920×430 or larger\", and the pre-check message mentions 920×430 too. The store's cards use 616:353, so art at 920×430 (2.14:1) is cropped. Make it 616:353. To render store art from your game, give it a fixed scene behind a query parameter (the examples use ?art=capsule ) and screenshot it at 616×353 in a headless browser."},{"u":"/store/media/#screenshots","t":"Store art and media","h":"Screenshots","s":"Store page","x":"Format PNG or JPEG Count Up to 6 File size ≤ 2 MiB each Aspect 16:9. The game page media strip shows them at 16:9, cropped to fill. Recommended size 1280×720 or 1920×1080 Sending screenshots replaces the whole set. Leaving it out keeps the last version's screenshots."},{"u":"/store/media/#trailer","t":"Store art and media","h":"Trailer","s":"Store page","x":"A trailer plays first in the game page's media strip. You can provide either: a link to YouTube ( youtube.com/watch?v= , youtu.be/ , …) or Vimeo. YouTube plays from youtube-nocookie.com ; a file , MP4 or WebM of at most 60 MB. Upload it first, then name it in the submission: curl -s -X PUT https://api.0x.limo/v1/listings/uploads/trailer \\ -H \"authorization: Bearer $ZEROX_TOKEN\" --data-binary @trailer.webm # {\"upload\": \"<name>.webm\", \"bytes\": …, \"type\": \"video/webm\", \"note\": \"name it in your submission: …\"} { \"listing\": { \"trailer\": { \"upload\": \"<name>.webm\" } } } An approved version's trailer file is served with byte ranges from /v1/listings/<id>/media/<version>/<file> . \"trailer\": false removes the trailer, and leaving the key out keeps it."},{"u":"/store/media/#share","t":"Store art and media","h":"Share images","s":"Store page","x":"Game pages ( 0x.limo/game/<id> ) carry Open Graph and X card tags. The image is your capsule. If you have none, the store generates a 1200×630 card from your game's name, tagline and accent color ( /og/game/<id>.png ). See Embeds for X player cards and oEmbed."},{"u":"/store/age-ratings/","t":"Age ratings","h":"","s":"Store page","x":"Every listing declares an age rating. It is your own declaration . The reviewer checks that it fits the game, and a wrong rating is a reason to reject the listing or open a review issue."},{"u":"/store/age-ratings/#ratings","t":"Age ratings","h":"Ratings","s":"Store page","x":"Value Shown as Use for everyone Everyone Suitable for all ages teen Teen Mild violence, mild language, suggestive themes mature Mature 17+ Intense violence, blood, strong language adults-only Adults only 18+ Content only for adults"},{"u":"/store/age-ratings/#descriptors","t":"Age ratings","h":"Descriptors","s":"Store page","x":"You can add descriptors to explain the rating: violence , blood , language , sexual-content , drugs , gambling , user-interaction (players can chat or meet), in-game-purchases . Any other value is refused ( age_rating.descriptors: unknown \"…\" ). { \"listing\": { \"age_rating\": \"everyone\" } } { \"listing\": { \"age_rating\": { \"rating\": \"teen\", \"descriptors\": [\"violence\", \"user-interaction\"] } } } With the CLI, 0x submit --age <rating> overrides the rating without changing 0x.config.json . The form at /dev/submit sets the rating only, with no descriptors."},{"u":"/store/age-ratings/#store","t":"Age ratings","h":"How the store uses it","s":"Store page","x":"The game page shows the rating under Rated . Descriptors are stored with the version and seen by the reviewer. The store does not show them yet. The rating does not gate who can play. 0x has no age verification."},{"u":"/store/release-types/","t":"Release types","h":"","s":"Store page","x":"Every listed game is either released (the default) or a demo , a playable demo of a game that is still being made. You choose the stage in your submission ( release ), and the catalog entry carries it as store.release : store.release Where it appears Game page absent or \"released\" The main games grid, Featured, search and tag pages Normal \"demo\" Upcoming releases , a section after the games (\"Playable demos of games still in the making. Play the demo now; the full game is coming later.\") On tag and developer pages, demos are listed after the games. A \"Demo\" pill on the art, and \"Release: Upcoming · demo now\" A demo still plays exactly like any other game. It also counts toward Trending and can carry the Trending badge."},{"u":"/store/release-types/#choose","t":"Release types","h":"Choosing the stage","s":"Store page","x":"Each submission can name the release stage with release : release When the version is approved \"demo\" The game is listed as a demo, under Upcoming releases \"full\" The game is listed as a released game (a demo moves to the main grid) left out The game keeps the stage it has. A new game is a released game. 0x submit : \"release\": \"demo\" in the listing section of 0x.config.json , or 0x submit --release demo . The submission form : Release stage . POST /v1/listings : \"release\": \"demo\" (see Listing fields ). The reviewer sees the stage you asked for and approves it with the rest of the version. 0x can also change a game's stage at any time; your next version that names a stage sets it again. When the full game comes out, submit a version with \"release\": \"full\" . The Demo badge already says it is a demo, so the title doesn't need \"(Demo)\". You can read the type from the public catalog: curl -s https://api.0x.limo/v1/catalog Each app in apps[] has store.release when it is set."},{"u":"/store/release-types/#new","t":"Release types","h":"New","s":"Store page","x":"A game gets the New pill for 14 days after it was first approved ( approved_at in GET /v1/catalog/stats ). The store's New filter and the \"Newest\" sort use the same date. Approving an update doesn't make a game new again. The game page shows \"Updated\" with the date the live version was approved."},{"u":"/store/release-types/#paid","t":"Release types","h":"Paid games","s":"Store page","x":"Listings are free: 0x submit always sends \"price\": \"free\" , and the submission form is for free games. Prices and subscriptions are covered in Monetization."},{"u":"/store/trending/","t":"Trending and sorting","h":"","s":"Store page","x":"The store ranks games by what players actually play. The figures come from the public GET /v1/catalog/stats (cached 60 s): curl -s https://api.0x.limo/v1/catalog/stats { \"at\": 1792234000000, \"apps\": { \"4000009\": { \"plays_7d\": 412, \"seconds_7d\": 98110, \"plays_24h\": 57, \"seconds_24h\": 12020, \"approved_at\": \"2026-10-16T12:00:00Z\", \"updated_at\": \"2026-10-17T09:30:00Z\" } } } Every listed app appears, with zeros if nobody played it."},{"u":"/store/trending/#plays","t":"Trending and sorting","h":"What counts as a play","s":"Store page","x":"A play is counted when the launcher (desktop or web) starts your game and sends POST /v1/plays . Heartbeats about once a minute ( /v1/plays/<id>/beat , at most 10 minutes per beat) and the end of the play add the time played. Counts are anonymous and kept per hour. plays_7d covers the last 168 hours and plays_24h the last 24. Plays from embeds and shared links count too, tagged with their source. Opening your site URL directly, outside the launcher, doesn't start a counted play by itself. If your page is also played outside the launcher, report plays with @0xlimo/platform . Games inside the launcher don't need this: the launcher reports the plays it starts. import { createPlatform } from \"@0xlimo/platform\"; const x1 = createPlatform({ baseUrl: \"https://api.0x.limo\", appid: 4000019 }); if (!x1.session) await x1.auth.guest(); await x1.plays.auto(); // start now, beat every 60 s, end on pagehide"},{"u":"/store/trending/#sorts","t":"Trending and sorting","h":"Sorts","s":"Store page","x":"Sort Order (each step only breaks ties of the one before) Trending (the default) plays in the last 7 days → plays in the last 24 hours → players right now → play time in the last 7 days → name Most played plays in the last 7 days → play time in the last 7 days → players right now → name Newest first approved (newest first) → name A–Z name A game with more plays this week always ranks above one with fewer, whatever happened today. \"Players right now\" comes from GET /v1/catalog/live : plays started or heard from in the last 3 minutes and not ended. The store refreshes the grid every 20 seconds."},{"u":"/store/trending/#badge","t":"Trending and sorting","h":"The Trending badge","s":"Store page","x":"The ↗ Trending pill (\"Among the most played on 0x right now\") goes to the top games of the Trending sort, across every listed game, demos included. A game must also meet both of these limits: it has at least 10 plays in the last 7 days ; it is among the top 3 , and within the top half of the store (rounded down, at least 1). With 4 listed games, at most 2 can be trending. A game with 9 plays this week never is."},{"u":"/store/trending/#featured","t":"Trending and sorting","h":"Featured","s":"Store page","x":"The store's Featured slot shows the top game of the Trending sort. When only demos are listed, it shows the top demo."},{"u":"/store/trending/#tips","t":"Trending and sorting","h":"What you can do","s":"Store page","x":"Share your game's page link with a ?ref= tag ( 0x.limo/game/<id>?ref=launch-post ). Plays from it are counted with that ref. Embed the game in posts and blogs. Embedded plays count. Keep sessions alive: play time breaks ties."},{"u":"/store/embeds/","t":"Embeds, X cards and oEmbed","h":"","s":"Store page","x":"Every game page on the store, https://0x.limo/game/<id> , can be shared as a playable embed."},{"u":"/store/embeds/#embed","t":"Embeds, X cards and oEmbed","h":"/embed/<id>","s":"Store page","x":"https://0x.limo/embed/<id> is the game made for other sites' iframes. It shows a tap-to-play poster with your capsule, plays the game as a guest, and links to the full page. It is the only path on 0x.limo that any site may frame ( frame-ancestors * ). <iframe src=\"https://0x.limo/embed/my-neon-drift\" width=\"640\" height=\"360\" title=\"Neon Drift on 0x\" style=\"border:0;border-radius:12px;max-width:100%\" allow=\"fullscreen; gamepad; autoplay; clipboard-write; pointer-lock; screen-wake-lock\" allowfullscreen loading=\"lazy\"></iframe> The default size is 640×360 (16:9), and the host site scales it. Add ?ref=<tag> to see where plays came from. The embed counts them as embed-<tag> (1–32 characters of a-z 0-9 _ - ), or embed with no tag."},{"u":"/store/embeds/#in-frame","t":"Embeds, X cards and oEmbed","h":"Which games play inside the frame","s":"Store page","x":"A game plays inside the embed when all of these are true: it plays in the browser (a hosted or https web client; not paper ); it doesn't need a signed-in 0x account to join; it is free (not priced, not subscribers-only); it hasn't opted out ( universe.embed = false on the catalog entry, which 0x sets on request). Any other game shows its poster and an Open full page button."},{"u":"/store/embeds/#x-cards","t":"Embeds, X cards and oEmbed","h":"X (Twitter) player cards","s":"Store page","x":"Game page links posted on X unfurl as a player card ( twitter:card = player ): the post plays the game through /embed/<id> , at 640×360, with your capsule as the fallback image. Games that can't play in the frame (see above) get a summary_large_image card instead. You don't need to do anything: just post https://0x.limo/game/<id> . The link's ?ref= is carried into the embed. Note X decides whether to show player cards for a domain. If a post shows the large image instead of the player, the card still links to the game page."},{"u":"/store/embeds/#oembed","t":"Embeds, X cards and oEmbed","h":"oEmbed","s":"Store page","x":"Sites that support oEmbed (blogs, CMSs, Discord-style unfurlers) can discover the embed from the game page's <link rel=\"alternate\" type=\"application/json+oembed\"> , or ask for it directly: curl -s 'https://0x.limo/oembed?url=https%3A%2F%2F0x.limo%2Fgame%2Fplanetsmithx&format=json' { \"version\": \"1.0\", \"type\": \"rich\", \"provider_name\": \"0x\", \"provider_url\": \"https://0x.limo/\", \"title\": \"PlanetSmithX\", \"author_name\": \"0x Examples\", \"html\": \"<iframe src=\\\"https://0x.limo/embed/planetsmithx\\\" width=\\\"640\\\" height=\\\"360\\\" …></iframe>\", \"width\": 640, \"height\": 360, \"cache_age\": 3600, \"thumbnail_url\": \"https://0x.limo/og/game/planetsmithx.png?v=…\", \"thumbnail_width\": 1200, \"thumbnail_height\": 630 } Parameter Meaning url A game page on 0x.limo: /game/<id> , /play/<id> or /embed/<id> . Its ref or utm_source is passed on to the embed. format json (the default). Anything else answers 501 . maxwidth , maxheight Shrink the frame, keeping 16:9 (never larger than 640×360) Error When 400 url is missing or not a URL 404 Not a game page on 0x.limo, or no such game 503 The catalog is briefly unavailable"},{"u":"/store/embeds/#share","t":"Embeds, X cards and oEmbed","h":"Share tags","s":"Store page","x":"Game pages also carry Open Graph tags ( og:title , og:description , og:image , og:type = video.game ) and schema.org VideoGame JSON-LD built from your listing: title, description, developer, tags, approval date. Write the tagline and description with that in mind. They are what link previews show. Image sizes: Store art ."},{"u":"/p2p/","t":"P2P delivery overview","h":"","s":"P2P and the swarm","x":"Players who load a game hosted on 0x also share its files with each other. The first visitor of the day gets the files from 0x's always-on seeder or from the site's origin. Every visitor after that can get them from other players' browsers over WebRTC. This happens without any code in your game: your loaders ( fetch , GLTFLoader , TextureLoader , <audio> , WebAssembly streaming and so on) request the same URLs as before. What is live Swarm delivery is on for every hosted site on 0x.limo ( https://<site>-play.0x.limo/sites/<site>/<n>/ ) whose index.html loads ./x1/boot.js . Paid games are the exception: their sites are built origin-only, so nothing of them is seeded or shared. See What you control ."},{"u":"/p2p/#the-pieces","t":"P2P delivery overview","h":"The pieces","s":"P2P and the swarm","x":"piece where it runs what it does x1/boot.js your page Registers the service worker, starts the swarm host, then imports your entry module. x1-sw.js (service worker) the browser Intercepts GET requests for files listed in the swarm manifest and answers them with verified bytes. x1/host.js + x1/meshtorrent.mjs your page The WebTorrent client: talks to the tracker and opens WebRTC data channels to other players. swarm/manifest.json your site The files that go on the swarm, by path, each with its SHA-256 and torrent infohash. tracker wss://play.0x.limo/p2p/tracker Introduces players who are loading the same site to each other. 0x seeder 0x servers Seeds every published version, so a file has at least one peer. your site's origin <site>-play.0x.limo The web seed and the fallback: any file the swarm can't deliver comes from here. 0x writes all of these into each version when you publish ( 0x publish or the upload page at https://api.0x.limo/hosting/ ). You never upload x1/ , x1-sw.js , x1.json or swarm/ yourself: the service refuses those paths."},{"u":"/p2p/#what-happens-on-a-page-load","t":"P2P delivery overview","h":"What happens on a page load","s":"P2P and the swarm","x":"The page loads x1/boot.js . It reads x1.json , registers x1-sw.js with your site's version directory as its scope, and waits for the worker to control the page (on a first visit the worker claims it when it activates). x1/host.js checks the tracker's /p2p/health , asks /p2p/ice for STUN and TURN servers, loads swarm/manifest.json , and asks /p2p/seeds how many seeders each file has. boot.js imports your entry module ( data-entry ). Your game starts loading files. For each GET the worker looks up the path in the manifest: Not listed (pages, small files, the runtime itself): the request goes to the origin unchanged. Listed : the worker asks the page's swarm client for the file. When the bytes arrive, the worker checks their length and SHA-256 against the manifest and answers the request (with Range honoured, so media elements work). No peer, too slow, bad bytes, or any error : the worker fetches the request from the origin exactly as the browser would have. It then hands the whole file to the page, which keeps it and seeds it to the next player. Everything the page received stays in a persistent cache (up to 512 MiB, where the browser allows one) and is seeded while the tab is open. "},{"u":"/p2p/#integrity","t":"P2P delivery overview","h":"Integrity","s":"P2P and the swarm","x":"Every file in the manifest is identified by the SHA-256 of its bytes ( tileId ). The worker checks every file it gets from the swarm against that hash before your game sees it, and drops it if the size or hash is wrong. Peers can delay a file, but they can't change it. The manifest itself always comes from your origin (it is never served by peers) and is revalidated at most once a minute."},{"u":"/p2p/#privacy-what-players-share","t":"P2P delivery overview","h":"Privacy: what players share","s":"P2P and the swarm","x":"The launcher passes the player's sharing setting to your page: setting URL parameter effect On (default) none Direct WebRTC connections to other players. Private ?p2p=relay Every connection goes through 0x's TURN relay, so other players never see this player's address. Off ?p2p=0 No peer-to-peer connections at all: every file comes from the origin. The setting is kept for the tab ( sessionStorage ), so it survives your game's own navigation. ?x1=off skips the whole runtime, which is handy for debugging."},{"u":"/p2p/#transfer-reports","t":"P2P delivery overview","h":"Transfer reports","s":"P2P and the swarm","x":"The worker counts, per file hash, the bytes it got from the swarm and from the origin, and the page counts the bytes it uploaded to other players. Only those sums are reported: no addresses and no peers. Inside the 0x launcher, the page sends them to the launcher every 30 seconds and when it is hidden. The launcher reports them unless the player turned sharing off. Opened directly, the page sends them through its worker to its own origin's /x1/xfer every minute and when it is hidden, unless sharing is off. Set \"reports\": false in x1.json to turn this off (see What you control )."},{"u":"/p2p/#next","t":"P2P delivery overview","h":"Next","s":"P2P and the swarm","x":"Swarm assets : which files go on the swarm, the swarm-assets.json policy and the manifest format. Tracker and web seed : the endpoints your page talks to, and CORS. What you control : the settings you have, how to opt out, and how caching works."},{"u":"/p2p/swarm-assets/","t":"Swarm assets","h":"","s":"P2P and the swarm","x":"When a version is published, 0x decides which files go on the swarm. It writes them into swarm/manifest.json together with a .torrent file per file and a content-addressed copy of each one. Your swarm policy controls that choice."},{"u":"/p2p/swarm-assets/#the-default-policy","t":"Swarm assets","h":"The default policy","s":"P2P and the swarm","x":"Without a swarm-assets.json in your upload, this policy applies: { \"include\": [\"**\"], \"exclude\": [\"**/*.html\", \"**/*.htm\", \"x1/**\", \"x1-sw.js\", \"x1.json\", \"swarm-assets.json\", \"node_modules/**\", \".x1/**\", \"server.mjs\", \"package.json\", \"package-lock.json\", \"0x.config.json\"] } It also applies two size bounds: files under 16 KiB stay on the origin, because tracker traffic would cost more than it saves; files over 256 MiB stay on the origin. On 0x hosting the 64 MiB per-file limit applies first. In practice the default puts every file of 16 KiB or more on the swarm, whatever its format: models, textures, audio, WebAssembly, game data, archives and .0xpak packs. Your pages stay on the origin, and so does the 0x runtime, which has to load before the swarm exists."},{"u":"/p2p/swarm-assets/#your-own-policy-swarm-assetsjson","t":"Swarm assets","h":"Your own policy: swarm-assets.json","s":"P2P and the swarm","x":"Put a swarm-assets.json at the top of your site (next to index.html ). It replaces the default policy completely, so add any excludes you still want. { \"include\": [\"packs/*.0xpak\", \"media/**\", \"*.wasm\"], \"exclude\": [\"media/previews/**\"], \"minBytes\": 1048576, \"maxBytes\": 67108864 } field type meaning include list of globs (required) Files that may go on the swarm. exclude list of globs Files that never go on the swarm, even if include matches. minBytes number Smaller files stay on the origin (default 16384). maxBytes number Larger files stay on the origin (default 268435456). Globs are matched against paths relative to the site root, with / separators. ** matches any depth, so **/ also matches zero directories ( **/*.png matches a.png and x/y/a.png ). * matches within one name and ? matches one character. A file goes on the swarm when it matches an include glob, matches no exclude glob, and is within the size bounds. To keep everything on the origin, use an include list that matches nothing: { \"include\": [] } The policy file is public swarm-assets.json is published with your site like any other file. Don't put anything in it that you wouldn't publish. 0x publish --to <dir> (a local "},{"u":"/p2p/swarm-assets/#the-manifest-swarmmanifestjson","t":"Swarm assets","h":"The manifest: swarm/manifest.json","s":"P2P and the swarm","x":"The manifest is canonical JSON (meshtorrent manifest version 1). Its keys are site paths, so the worker can look up a request by its URL: { \"version\": 1, \"entries\": { \"/models/ship.glb\": { \"tileId\": \"9f2c…64 hex…\", \"infoHash\": \"3b1d…40 hex…\", \"size\": 1843200 } } } field meaning key The file's path under the site root, with a leading / . tileId SHA-256 of the file's bytes (hex). The swarm worker checks every delivered file against it. infoHash BitTorrent v1 infohash of the deterministic single-file torrent of those bytes, named <tileId><ext> . The same bytes always give the same infohash, so identical files are one swarm across versions and sites. size File size in bytes. sg Optional: the 0x content info native clients use ( piece_len and the SHA-256 of each 256 KiB piece). Next to it, the builder writes: swarm/t/<infoHash>.torrent : torrent metadata, so a peer can start a swarm that has no peers yet; swarm/content/<id> and swarm/content/<id>.info : the content-addressed copy used as a web seed by native clients. Pieces are 256 KiB, the same as 0x's native content delivery, so the same bytes line up in both. The builder verifies the manifest after writing it: every entry must exist,"},{"u":"/p2p/swarm-assets/#large-files","t":"Swarm assets","h":"Large files","s":"P2P and the swarm","x":"Hosted sites: at most 64 MiB per file , 5000 files and 2048 MiB in total per developer ( GET /v1/hosting/config returns the current values). Split bigger content: several 0xpak packs, or chunks your loader fetches by name. Each swarm file is one torrent. The worker fetches a listed file whole, verifies it, then serves any Range of it from memory (the last 64 MiB of whole files are kept), so a media element's many range requests cost one swarm fetch. Native builds ( sg-content publish ) have their own large-file support: big files are published and installed in parts. That is part of the native runtime, not of hosted sites."},{"u":"/p2p/swarm-assets/#checking-what-went-on-the-swarm","t":"Swarm assets","h":"Checking what went on the swarm","s":"P2P and the swarm","x":"0x publish prints the count, for example 0x publish: 41 files (183.2 MiB) in the swarm . It also prints a note when index.html does not load ./x1/boot.js , because then players get every file from the origin. The finalize response of the hosting API carries the same numbers in swarm: {files, bytes} and boot: true|false . Read the live manifest of any version: curl -s https://<site>-play.0x.limo/sites/<site>/<n>/swarm/manifest.json | head -c 600 In the page, await window.x1swarm.stats() returns the worker's counters ( swarm , cache , origin , peerBytes , originBytes , rejected , manifestEntries , ...) and the swarm host's."},{"u":"/p2p/mounts/","t":"Mounts, mirror and readahead","h":"","s":"P2P and the swarm","x":"A mount puts a large data tree on the swarm, such as a game's data/ directory with thousands of files and tens of GB, without copying it into the site. 0x publish hashes the tree where it is, in 1 MiB pieces, and writes small index files (shards) next to the swarm manifest. When the game asks for a byte range of a mounted file, the service worker fetches only the pieces that cover that range. Each piece comes from the worker's memory, the page's kept copy, a starter pack on disk, other players, the mirror, or your origin, in that order. Two x1.json settings go with mounts. mirror adds a fast HTTPS copy of the swarm's files that the worker asks before your origin. readahead warms the next pieces of a file that is read in order. Self-hosted sites only, runtime 0.2.x Mounts, mirror and readahead need the site runtime from @0xlimo/swarm-sw 0.1.8 (runtime 0.2.6 ). They work only for sites you host yourself with 0x publish --to : 0x hosting doesn't take mounts. Its site builder still installs runtime 0.1.4, and the x1.json it writes has no mirror or readahead . The 0x CLI : --mount , --mount-exclude , --mount-cache and the mounts key in 0x.config.json are in the CLI source (x1-sdk main )"},{"u":"/p2p/mounts/#when-to-use-a-mount","t":"Mounts, mirror and readahead","h":"When to use a mount","s":"P2P and the swarm","x":"Use a mount when: the data is too big for a site: more than the 64 MiB per-file limit, or more files and bytes than you want to copy into every version; your own server already serves it at a URL prefix, such as https://game.example/data/ ; the game reads parts of files with Range requests (an engine reading archives, streaming a world), not whole files. For ordinary assets, use the normal swarm policy . A file under a mount prefix can't also be in the site: the publish fails if it is."},{"u":"/p2p/mounts/#publishing-a-mount","t":"Mounts, mirror and readahead","h":"Publishing a mount","s":"P2P and the swarm","x":"From the command line (repeat --mount for several trees): 0x publish ./web --to /srv/www/game \\ --mount /data/=/srv/gamedata \\ --mount-exclude \"**/*.idx\" --mount-exclude \"cache/**\" \\ --mount-cache ./.x1 Or in 0x.config.json . A relative dir is resolved against the game directory: { \"id\": \"my-game\", \"mounts\": [ { \"prefix\": \"/data/\", \"dir\": \"../gamedata\", \"exclude\": [\"**/*.idx\", \"cache/**\"], \"minBytes\": 16384 } ] } Key / flag Type Default Meaning prefix / --mount <prefix>=<dir> string required The URL path your server serves the tree at, under the site root, such as /data/ . A leading and trailing / is added. / alone, /./ and /../ are refused. Two mounts can't have the same name (the prefix with / stripped and other characters turned into _ ). dir path required The directory on disk. Symlinks are followed, and each directory is walked once. exclude / --mount-exclude <glob> glob[] none Files that stay on the origin. Globs are relative to the mount and matched case-insensitively ( ** any depth, * within a name, ? one character). --mount-exclude applies to every --mount on the command line, not to the mounts in 0x.config.json . minBytes number 16384 Smaller files stay on the origin. It "},{"u":"/p2p/mounts/#what-a-mount-writes","t":"Mounts, mirror and readahead","h":"What a mount writes","s":"P2P and the swarm","x":"Under swarm/ in the site: Path Content manifest.json mounts One item per mount: {prefix, base: \"x/<name>/\", pieceLen: 1048576, pagePieces: 512, buckets: [256 names or null], files, pieces, bytes, packs: true} x/<name>/b/<hh>.<sha12>.json Bucket hh : the files whose lower-cased path hashes there (FNV-1a 32, & 255 ). {v: 1, files: {\"<lower-case path>\": {size, id, pages, pack, n?, alt?}}} . id is the file's SHA-256, pack its pack torrent's infohash, n its name on disk when that isn't all lower case, and alt: 1 when other files differ from it only in case. x/<name>/p/<sha16>.json A page of up to 512 pieces: {v: 1, pieces: [[sha256, infoHash], …]} x/<name>/packs.json {v: 1, packs: {\"<pack infoHash>\": \"<path under the prefix>\"}} : where a seeder or mirror can fetch each pack from your origin ( <origin><prefix><path> ) t/<pack infoHash>.torrent One torrent per mounted file, its bytes named <sha256><ext> , with 1 MiB pieces, so piece i of the torrent is mount piece i Bucket and page names carry their content hash, so a cache in front of the site can keep them forever. The manifest names the current ones."},{"u":"/p2p/mounts/#how-a-mounted-file-is-served","t":"Mounts, mirror and readahead","h":"How a mounted file is served","s":"P2P and the swarm","x":"The worker matches a request's path against each mount's prefix, case-insensitively, and looks the file up in its bucket. Buckets are kept while the manifest names them, and the last 96 pages are kept as well. A Range request is answered from the pieces that cover it. The page's swarm is asked only for pieces the page keeps or somebody is known to seed (from the tracker's /p2p/seeds , looked up in the background, never inside a read), or for every piece when the page holds a starter pack . It gets 400 ms for them. Whatever is missing then is fetched in one request per run of consecutive pieces: first from the mirror, then from your origin. After 3 reads in a row where the page missed the 400 ms, it is left out for 30 s. An aligned read that nobody seeds , such as an engine reading whole 1 MiB blocks, is streamed straight from the mirror or origin to the game. A copy is split into pieces for the memory and the page. A request without Range is streamed 8 pieces at a time, never held whole. If a window fails in the middle, that window comes from the origin. A file the shards don't list (excluded, too small, a case twin): a page with a starter pack is asked for the whole file first (40"},{"u":"/p2p/mounts/#what-your-server-must-do","t":"Mounts, mirror and readahead","h":"What your server must do","s":"P2P and the swarm","x":"Serve the tree at the prefix, with single Range requests answered 206 and a correct Content-Range . A server that answers 200 makes every read fetch the whole file. Serve each file under its name on disk. Paths match case-insensitively: whatever case the game uses, the worker asks your server for the name as published ( n , or the lower-case path). A file whose name differs from another only in case is served by the origin only, under its exact name. Keep the tree as published. A changed file fails its piece hashes, so it is served by the origin but never kept or seeded, until you publish again."},{"u":"/p2p/mounts/#mirror","t":"Mounts, mirror and readahead","h":"mirror : a fast copy before the origin","s":"P2P and the swarm","x":"{ \"manifest\": \"swarm/manifest.json\", \"timeoutMs\": 20000, \"mirror\": \"https://mirror.example\" } Key Type Default Meaning mirror string none An https:// base URL. Other schemes are ignored, and trailing / are removed. The mirror is any HTTPS server that answers GET <mirror>/file/<infoHash> with the bytes of that torrent's single file, and single Range requests with 206 . A seedbox that holds the site's torrents is the intended mirror. The worker uses it: For When Check A manifest file of 16 MiB or more (an engine's wasm) before the page's swarm size and SHA-256 before answering Any other manifest file after the swarm failed, before the origin size and SHA-256 before answering A run of missing mount pieces before the origin ( Range on the file's pack infohash) like origin bytes, after answering A streamed aligned mount read before the origin like origin bytes, after answering Every mirror request has a timeout of max(30 s, bytes / 1000) ms, a floor of about 1 MB/s. After any failure, such as an HTTP error, a timeout, a short range or bad bytes, the mirror sits out for 60 s and the origin is asked. Mirror bytes are reported as origin bytes in transfer reports. The worker calls the mirro"},{"u":"/p2p/mounts/#readahead","t":"Mounts, mirror and readahead","h":"readahead : warm the next pieces","s":"P2P and the swarm","x":"{ \"manifest\": \"swarm/manifest.json\", \"timeoutMs\": 20000, \"readahead\": true } Key Type Default Meaning readahead boolean false Only true turns it on After each ranged read of a mounted file, the worker fetches the next 6 pieces (6 MiB) of that file in the background into its 64 MiB memory, by the same path as a read. Turn it on for a game that reads its data in order, such as a world streamed while the player moves. Leave it off when reads jump around, because readahead then fetches bytes nobody uses. It applies only to mounted files."},{"u":"/p2p/mounts/#setting-mirror-and-readahead","t":"Mounts, mirror and readahead","h":"Setting mirror and readahead","s":"P2P and the swarm","x":"0x publish --to writes x1.json with manifest , timeoutMs and, if given, tracker . Add mirror and readahead to the published x1.json yourself. Each 0x publish --to writes the file again, so add them after every publish. boot.js reads x1.json on every page load and passes the values to the worker's registration URL ( readahead=1 , mirror=<url> )."},{"u":"/p2p/mounts/#limits","t":"Mounts, mirror and readahead","h":"Limits","s":"P2P and the swarm","x":"What Value Piece size 1 MiB (fixed) Pieces per page 512 Buckets per mount 256 Smallest mounted file minBytes , 16 KiB by default Page swarm budget per read 400 ms Peer wait per piece / longest peer download 1.5 s / 4 s Pages kept by the worker 96 Worker memory (whole files and pieces) 64 MiB Origin pieces handed to the page 8 MiB/s See also: starter packs , which answer a mount's reads from a file on the player's disk, and the @0xlimo/swarm-sw reference ."},{"u":"/p2p/tracker-and-webseed/","t":"Tracker and web seed","h":"","s":"P2P and the swarm","x":"A hosted page talks to two hosts: its own origin ( https://<site>-play.0x.limo ) and play.0x.limo , where the tracker lives. The 0x runtime handles all of this for you. This page describes what it does, so you can debug it and so your own code doesn't get in the way."},{"u":"/p2p/tracker-and-webseed/#the-tracker","t":"Tracker and web seed","h":"The tracker","s":"P2P and the swarm","x":"Each version's x1.json names the tracker: { \"manifest\": \"swarm/manifest.json\", \"timeoutMs\": 20000, \"tracker\": \"wss://play.0x.limo/p2p/tracker\" } The tracker is a WebSocket BitTorrent tracker (the WebTorrent offer/answer protocol). It relays WebRTC offers and answers between players, so two players behind NATs can connect without a separate signalling server. The tracker never carries file data: file data moves only over WebRTC data channels between players, or over HTTPS from the origin. Groups by origin. The tracker puts a page into a swarm group by the browser's Origin header. Every hosted site's origin ( https://*-play.0x.limo , where * is one run of letters, digits and dashes) is in the same group. Identical bytes have the same infohash, so a file shared by two versions, or by two sites, is one swarm. A page from an origin in no group is refused. Seeders. 0x runs an always-on seeder for every published version that has a swarm manifest. It picks up a new version within seconds of finalize."},{"u":"/p2p/tracker-and-webseed/#http-endpoints-next-to-the-tracker","t":"Tracker and web seed","h":"HTTP endpoints next to the tracker","s":"P2P and the swarm","x":"x1/host.js derives these from the tracker URL ( wss://play.0x.limo/p2p/tracker → https://play.0x.limo/p2p/... ): endpoint what it returns used for GET /p2p/health {\"ok\": true, ...} A 3-second reachability check before the swarm starts. GET /p2p/ice {\"iceServers\": [...]} : STUN servers and 0x's TURN relay with short-lived credentials The page's RTCPeerConnection configuration. GET /p2p/seeds?ih=<infohash>,... {\"group\": \"hosted\", \"seeds\": {\"<infohash>\": n}} How many complete peers each file has, in the page's own group. Asked in batches of 400, every 20 s. Your site also answers ./p2p/ice (under your version directory, for example /sites/<site>/<n>/p2p/ice ) with the same ICE servers, for code that wants them from the page's own origin. The SDK templates use it. curl -s https://play.0x.limo/p2p/health"},{"u":"/p2p/tracker-and-webseed/#cors-and-origins","t":"Tracker and web seed","h":"CORS and origins","s":"P2P and the swarm","x":"Hosted pages are on their own origin, https://<site>-play.0x.limo , so their requests to play.0x.limo/p2p/* are cross-origin: play.0x.limo/p2p/* echoes Access-Control-Allow-Origin for origins that match https://[a-z0-9-]+-play.0x.limo , and only those, with Vary: Origin . A preflight ( OPTIONS ) is answered for GET and POST with content-type . The tracker WebSocket needs no CORS. The platform API, https://api.0x.limo , allows https://*-play.0x.limo too, so @0xlimo/platform works from every hosted game, and from nothing else. A page opened from another host (your own domain, localhost ) is in no group: its swarm start fails, and every file loads from the origin. Use 0x dev locally (it runs a local tracker) and test the swarm on a published version."},{"u":"/p2p/tracker-and-webseed/#the-web-seed-your-origin","t":"Tracker and web seed","h":"The web seed: your origin","s":"P2P and the swarm","x":"Every file in the manifest is also a normal file on your site. The swarm client uses the origin as a web seed, and the service worker uses it as the fallback: The worker asks the page's swarm for a listed file and waits up to timeoutMs (20 s by default). The swarm only asks peers for files that /p2p/seeds says somebody holds. When no peer has the file, a peer is too slow, or the bytes fail the hash check, the worker fetches the original request from the origin, with Range and all. That is exactly what the browser would have done without the runtime. After an origin fetch of a whole file, the page adopts the bytes and seeds them, so the next player gets the file from this one. Files under swarm/ ( t/<infoHash>.torrent , content/<id> , content/<id>.info ) bootstrap a swarm that has no peers yet, and serve as the web seed for 0x's native clients."},{"u":"/p2p/tracker-and-webseed/#webrtc-stun-and-turn","t":"Tracker and web seed","h":"WebRTC, STUN and TURN","s":"P2P and the swarm","x":"Connections between players are WebRTC data channels. /p2p/ice hands out public STUN servers and 0x's TURN relay (UDP and TCP on 3478, and TCP on 443) with credentials that expire after an hour. When the player picked Private in the launcher ( ?p2p=relay ), the page uses only the relay ( iceTransportPolicy: \"relay\" ), so peers never learn the player's address. WebRTC is not governed by your site's Content-Security-Policy, so you don't declare the peers or the TURN relay. The tracker and /p2p/* on play.0x.limo are always in the policy's connect-src (see Content-Security-Policy )."},{"u":"/p2p/tracker-and-webseed/#limits","t":"Tracker and web seed","h":"Limits","s":"P2P and the swarm","x":"The swarm host opens at most 8 connections, uploads at most 2 MiB/s in total and 128 MiB to any one peer, and seeds at most 400 files at a time. These limits keep a game tab from saturating a player's uplink."},{"u":"/p2p/what-you-control/","t":"What you control","h":"","s":"P2P and the swarm","x":"0x runs the swarm, the tracker, the seeder and the relay. You decide which files are shared, whether your page starts the runtime at all, and a few runtime settings."},{"u":"/p2p/what-you-control/#summary","t":"What you control","h":"Summary","s":"P2P and the swarm","x":"you want do this The default (share every file of 16 KiB or more) Load ./x1/boot.js from index.html . Ship no swarm-assets.json . Share only some files Ship a swarm-assets.json policy. Share nothing, but keep the runtime (transfer reports, ./p2p/ice ) swarm-assets.json with {\"include\": []} . No runtime at all Don't load ./x1/boot.js . Every file comes from the origin. Debug without the swarm Open the page with ?x1=off . Test as a Private or Off player Open the page with ?p2p=relay or ?p2p=0 ."},{"u":"/p2p/what-you-control/#starting-the-runtime","t":"What you control","h":"Starting the runtime","s":"P2P and the swarm","x":"The runtime starts only if your page loads it: <script type=\"module\" src=\"./x1/boot.js\" data-entry=\"./main.js\"></script> data-entry is your game's entry module. boot.js imports it after the swarm is up (at most 5 s), so your first asset request already goes through the swarm. Without data-entry , load your code yourself. Files requested before the service worker controls the page come from the origin. data-tracker , data-manifest and data-timeout on the script tag override the x1.json values. You rarely need them on 0x hosting. The 0x init templates and the starters already contain this line. If you publish a version whose index.html doesn't load ./x1/boot.js , the publish output and the finalize response say so ( boot: false )."},{"u":"/p2p/what-you-control/#x1json","t":"What you control","h":"x1.json","s":"P2P and the swarm","x":"0x writes x1.json into every version. You can't upload it, because it is a server-owned path. The fields it can contain: field meaning tracker The tracker WebSocket ( wss://play.0x.limo/p2p/tracker on 0x.limo). manifest The swarm manifest, relative to the version root ( swarm/manifest.json ). timeoutMs How long the worker waits for the swarm before it asks the origin (20000). api The platform API URL, for @0xlimo/platform 's siteApi() . swarm false on a paid game's site: the runtime starts no swarm. reports false turns transfer reports off. A URL sends them there instead (the local dev server uses this in tests). mirror Runtime 0.2.3+, self-hosted sites: an https:// copy of the swarm's files that the worker asks before the origin. See mirror . readahead Runtime 0.2.0+, self-hosted sites: true warms the next 6 MiB after each ranged read of a mounted file. See readahead . With 0x publish --to <dir> (your own hosting) you control x1.json through the CLI flags ( --tracker , --policy ), and you can edit the published result. The CLI doesn't write mirror or readahead , so add them after each publish. A self-hosted site can also put a large data tree on the swarm with mounts ."},{"u":"/p2p/what-you-control/#reports","t":"What you control","h":"Transfer reports","s":"P2P and the swarm","x":"Transfer reports are byte counts per file hash: from the swarm, from the origin, and uploaded to others. They feed the traffic numbers you and 0x see. They carry no addresses and no peer identities. They stay off when the player turned sharing off. See the overview ."},{"u":"/p2p/what-you-control/#paid-games","t":"What you control","h":"Paid games","s":"P2P and the swarm","x":"A site that a priced app's listing points at ( universe.web.hosted ) is a paid site : Its new versions are built origin-only : no swarm manifest, and x1.json says \"swarm\": false . Nothing of the game is seeded by 0x or shared between players. Versions published before the game got a price were built with a swarm manifest. Those older versions stay published and seeded. Publish a new version after the price is approved, and point the listing at it. The site front lets only owners load the pages (see the note below for its status on 0x.limo). You don't need to change anything in your game for this. The same boot.js line simply starts no swarm. Paid games on 0x.limo The origin-only build for paid sites is live in the hosting service. The owners-only gate in front of paid sites ( @0xlimo/paygate ) is coded, but it is not deployed on 0x.limo, and no hosted site is paid today. Until the gate is on, don't rely on hosting to keep a paid game's files private."},{"u":"/p2p/what-you-control/#versions-are-immutable","t":"What you control","h":"Versions are immutable","s":"P2P and the swarm","x":"A version ( /sites/<site>/<n>/ ) never changes after finalize. To change anything, publish a new version. The service uploads only the files it doesn't already have, by SHA-256, so an unchanged 200 MB asset costs nothing to republish. Because versions are immutable: Files other than pages are served with Cache-Control: public, max-age=31536000, immutable (one year, in browsers and in Cloudflare). Pages ( / and *.html ) are served Cache-Control: no-cache . Browsers revalidate them (a 304 with the current headers), so a change to your site's security policy reaches returning players. The swarm can trust a file's hash forever. A new version's unchanged files keep their infohash, so players who have the old version already seed them. Point your store listing at the new version (resubmit with 0x submit , or on /dev/submit ) to move players over. Old versions stay published. Don't cache-bust with query strings on swarm files The worker matches requests by path. models/ship.glb?v=2 still maps to the manifest entry /models/ship.glb . Within one version the bytes never change, so the query string isn't needed: publish a new version instead."},{"u":"/p2p/what-you-control/#what-you-cant-change","t":"What you control","h":"What you can't change","s":"P2P and the swarm","x":"The tracker, the ICE servers and the seeder on 0x hosting. The isolation and policy headers your site is served with. You influence the policy through your declaration (see Content-Security-Policy ). The paths 0x writes: x1.json , x1-sw.js , x1/ and swarm/ ."},{"u":"/p2p/swarm-earnings/","t":"Swarm earnings","h":"","s":"P2P and the swarm","x":"Every player of a game on 0x hosting helps host it. When a player's browser loads a file from the swarm instead of from our origin, the player it came from did the hosting. Swarm earnings pays those players a share of 0x's revenue for it. Your game needs no change: the 0x runtime ( @0xlimo/swarm-sw 0.1.4 and later) does the work, and you keep your full developer share. The pool comes out of 0x's own platform fee."},{"u":"/p2p/swarm-earnings/#what-players-get","t":"Swarm earnings","h":"What players get","s":"P2P and the swarm","x":"The pool. Each calendar month, 20 % of 0x's net platform revenue goes into a pool. Net revenue is the store and in-game sales fees, less refunds, plus the top-up margin. Cents nobody earns roll over to the next month. The split. The pool is split by verified bytes : what other signed-in players downloaded from the player and signed for. Files few others hold count more, and so do busy hours and steady seeding. Large amounts count less and less, so farming doesn't pay. To earn in a month, a player needs at least three different receivers, and no single receiver counts for more than a quarter of their bytes. The cap. No player gets more than 10 % of a month's pool or $250. Payment. After a 14-day hold, earnings go to the player's 0x balance , spendable in the store and in in-game shops. Earnings are balance credit only; they can't be withdrawn. Worlds count too. The Earth, War and Los Santos web clients sign receipts as well, so seeding a world's files earns the same way as seeding a hosted game's. Joining. Players opt in on 0x.limo/earnings . Seeding itself needs no opt-in, and players who turn sharing off in Settings neither seed nor earn."},{"u":"/p2p/swarm-earnings/#signed-receipts","t":"Swarm earnings","h":"Signed receipts","s":"P2P and the swarm","x":"Only the receiving player can vouch that bytes arrived, so only receipts it signs count. A key per page. Each page that runs the swarm creates an ECDSA P-256 key pair with WebCrypto. The private key is non-extractable. The launcher registers the public key for the signed-in player: POST /v1/revshare/keys {pub} returns {kid, expires} , valid for 24 h. Guests get no key. Handshake. The meshtorrent wire extension x1_rs (BEP 10) tells each peer the other's kid . Counting. The receiver counts, per uploader and torrent, the block bytes each peer delivered, but only for pieces that then pass the torrent's hash check . Signing. At least once a minute, the receiver signs one receipt per uploader and torrent: x1rs1|<receiver kid>|<uploader kid>|<infohash>|<seq>|<unix seconds>|<piece ranges>|<bytes>|<ph> ph is the SHA-256 over the listed pieces' hashes from your version's swarm/manifest.json (the sg.pieces hex strings, in ascending piece order). The signature is P1363 ( r‖s ), base64url. Upload. The launcher posts the receipts with the player's credentials: POST /v1/revshare/receipts {receipts: [{r, s}]} . The backend checks each receipt before it counts: the signature, and that the key belon"},{"u":"/p2p/swarm-earnings/#what-this-means-for-your-game","t":"Swarm earnings","h":"What this means for your game","s":"P2P and the swarm","x":"Nothing to integrate. Publish with the current CLI ( 0x publish ). The site runtime registers the key through the launcher and signs receipts on its own. Your files must be on the swarm (see Swarm assets ). Files that stay on the origin are not seeded by players, so no player earns from them. Paid games are served origin-only (no swarm), so no player earns from them either. No data about your players leaves the page beyond what the transfer reports already carry. A receipt names key ids, an infohash and piece numbers, never an address."},{"u":"/p2p/swarm-earnings/#limits","t":"Swarm earnings","h":"Limits","s":"P2P and the swarm","x":"Only pages opened inside the 0x launcher (signed-in players) sign receipts. Direct visits to a game's own address are anonymous and are not counted. Native peers (the desktop runtime) don't sign receipts yet. Their bytes are shown as unverified and are not paid."},{"u":"/security/","t":"Security model for developers","h":"","s":"Security","x":"A game hosted on 0x is code from a developer, running in a player's browser next to other developers' games and next to the player's 0x account. The platform puts several layers between them. Each layer is on by default on 0x.limo. You only need to act when your game needs something from outside its own origin. layer protects what you do page An origin per site Your game's storage, cookies and frames, from other games Nothing. Use relative URLs. Site origins Cross-origin isolation (COOP, COEP, CORP) Gives you SharedArrayBuffer and threads, and keeps other windows out of yours Load outside resources with CORS, or as credentialless Isolation headers Content-Security-Policy per version Players, from a compromised build that loads or sends data elsewhere Declare outside hosts with \"csp\" Content-Security-Policy Permissions-Policy Camera, microphone, location, USB, serial, HID and payments: off unless declared Declare the permissions you use Permissions-Policy Content-addressed, immutable versions Players, from files changed after publish, and from bad bytes off the swarm Nothing P2P delivery Source integrity (optional) Players, from a build that doesn't match its source Publish your sou"},{"u":"/security/#what-a-hosted-page-can-and-cant-do","t":"Security model for developers","h":"What a hosted page can and can't do","s":"Security","x":"A page at https://<site>-play.0x.limo/sites/<site>/<n>/ can: load anything from its own origin, including WebAssembly ( 'wasm-unsafe-eval' ), workers (also from blob: ), and images, media and fonts from data: and blob: ; call the platform API ( https://api.0x.limo , with CORS) and the swarm and broadcast services on play.0x.limo , over HTTPS and WSS; use WebRTC (peers, TURN), which CSP does not govern; use fullscreen, gamepads and autoplay; be framed by any https: page (the store, 0x.limo/embed/<id> , X player cards, blogs); reach whatever else you declare. It can't: read or write another game's storage, or script another game's frame; set cookies from the server: the front removes Set-Cookie from every hosted response; load scripts, styles, connections, images, media, fonts or frames from other hosts without a declaration, once the version's policy is enforced; use eval / new Function , or <style> elements created at runtime, without a declaration; use <object> / <embed> , change <base> , or post forms to other hosts."},{"u":"/security/#things-0x-never-does-with-your-site","t":"Security model for developers","h":"Things 0x never does with your site","s":"Security","x":"It never serves a hosted site from the API's origin. The page where developers mint publish tokens ( api.0x.limo/hosting/ ) and the player's session live on origins your scripts can't reach. It never changes a published version: versions are immutable (see What you control ). It never takes your security headers from the client: the front strips any X-X1-* request headers before it asks the backend for your version's policy."},{"u":"/security/#reporting-a-vulnerability","t":"Security model for developers","h":"Reporting a vulnerability","s":"Security","x":"If you find a way around one of these layers, report it privately to the 0x team instead of publishing it. Don't test it against other developers' sites or other players."},{"u":"/security/site-origins/","t":"Site origins","h":"","s":"Security","x":"Every hosted site has its own origin: https://<site>-play.0x.limo/sites/<site>/<n>/ For example, version 10 of the site hellengine is at https://hellengine-play.0x.limo/sites/hellengine/10/ . This has been the form since 2026-10-16."},{"u":"/security/site-origins/#why-an-origin-per-site","t":"Site origins","h":"Why an origin per site","s":"Security","x":"A browser treats an origin as one trust domain. When every game shared play.0x.limo , any game could read and overwrite every other game's localStorage (where @0xlimo/platform keeps the player's session), IndexedDB, Cache Storage and cookies, and could frame another game's page and script it. With an origin each: your game's storage, caches, service worker and IndexedDB are yours alone; another game can't load your pages under its own origin, and can't reach into your frame (the browser throws a SecurityError ); the platform API can allow exactly the hosted origins with CORS ( https://*-play.0x.limo ), so @0xlimo/platform works from every hosted game, and from no other site."},{"u":"/security/site-origins/#what-the-front-serves-on-your-host","t":"Site origins","h":"What the front serves on your host","s":"Security","x":"<site>-play.0x.limo serves your site and nothing else: request answer /sites/<site>/<n>/... (your site, a published version) the file, with the isolation and policy headers /sites/<other>/... 404 a path with .. , \\ , // or encoded dots or slashes 404 POST /x1/xfer your page's transfer reports (anonymous, rate-limited) POST /x1/csp your page's CSP violation reports (see Content-Security-Policy ) /sites/<site>/<n>/.../p2p/ice STUN and TURN servers (see Tracker and web seed ) anything else 404 Any other host under *.0x.limo that is not <name>-play answers 404 ."},{"u":"/security/site-origins/#old-urls","t":"Site origins","h":"Old URLs","s":"Security","x":"Links of the old form keep working. https://play.0x.limo/sites/<site>/... answers with a 301 to https://<site>-play.0x.limo/sites/<site>/... , with the path and query kept. Store listings submitted before the move still point at the old URL until they are resubmitted, and the redirect covers them. Resubmit to store the new URL. Some platform features look a site up by its current URL only (paid sites, transfer reports)."},{"u":"/security/site-origins/#site-names","t":"Site origins","h":"Site names","s":"Security","x":"A site name is 3 to 40 characters: a-z , 0-9 and - , not starting or ending with - . Names are global and first come, first served. Platform host names can't be taken, either as the name or as the host's first label (for example api , play , p2p , docs , www , store , earth , war , lossantos , embed , sites ). The API answers 409 that site name is reserved ."},{"u":"/security/site-origins/#cookies","t":"Site origins","h":"Cookies","s":"Security","x":"The front removes Set-Cookie from every hosted response, and hosted game servers ( /x1/game/ ) can't set cookies with a Domain attribute. Your page's script can still write cookies with document.cookie . Hosted origins are subdomains of 0x.limo , so a script could set a Domain=0x.limo cookie. Nothing in the platform reads such cookies, and the console's cookie is __Host- prefixed, so a game can't shadow it. Keep your game's own state in localStorage or IndexedDB on your origin."},{"u":"/security/site-origins/#what-this-means-for-your-code","t":"Site origins","h":"What this means for your code","s":"Security","x":"Use relative URLs ( ./assets/ship.glb ), or URLs under your own version directory. Don't hard-code play.0x.limo/sites/... . A new version is a new path on the same origin. Storage persists across your versions, so migrate your saved data when its format changes. If your game talks to your own backend, that backend must allow your site's origin ( https://<site>-play.0x.limo ) with CORS, and you must declare it in \"csp\" ."},{"u":"/security/isolation-headers/","t":"Isolation headers (COOP, COEP, CORP)","h":"","s":"Security","x":"Every file of a hosted site is served with: Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: credentialless Cross-Origin-Resource-Policy: cross-origin Access-Control-Allow-Origin: * X-Content-Type-Options: nosniff Files the swarm service worker serves carry the same three Cross-Origin-* headers, so a file behaves the same whether it came from a peer or from the origin."},{"u":"/security/isolation-headers/#what-you-get","t":"Isolation headers (COOP, COEP, CORP)","h":"What you get","s":"Security","x":"With COOP same-origin and COEP credentialless your page is cross-origin isolated ( self.crossOriginIsolated === true ) when it is the top-level page. That gives you: SharedArrayBuffer and Atomics.wait , so Emscripten pthreads, wasm threads and multi-threaded engines work; high-resolution timers ( performance.now() at full precision) and performance.measureUserAgentSpecificMemory() . CORP: cross-origin and ACAO: * let other isolated pages embed your files. The 0x store's player does this."},{"u":"/security/isolation-headers/#inside-the-0x-store","t":"Isolation headers (COOP, COEP, CORP)","h":"Inside the 0x store","s":"Security","x":"On 0x.limo/play/<id> , the store serves the page with COOP same-origin and COEP credentialless when the game's site is on a hosted origin. It frames your game with allow=\"... cross-origin-isolated\" , so your game is cross-origin isolated in the store as well. Games hosted elsewhere, and the worlds, are framed without isolation. 0x.limo/embed/<id> (X player cards, oEmbed and blogs) is framed by other sites, which are not isolated. There your game runs without cross-origin isolation, so it gets no SharedArrayBuffer . If your engine needs threads, give it a single-threaded fallback when crossOriginIsolated is false."},{"u":"/security/isolation-headers/#what-breaks-and-how-to-fix-it","t":"Isolation headers (COOP, COEP, CORP)","h":"What breaks, and how to fix it","s":"Security","x":"COEP credentialless means that cross-origin no-cors requests (an <img> , <script> or <audio> pointing at another host, without CORS) are sent without cookies or credentials . They still load. Requests in CORS mode behave as usual. In practice: symptom cause fix An image or script from another host loads logged out, or fails It needed cookies. Under credentialless no-cors requests carry none. Serve it from your own site, or use CORS ( crossorigin=\"anonymous\" and an Access-Control-Allow-Origin header on the other host). An <iframe> of another site stays blank The framed site must allow being embedded by a COEP page ( Cross-Origin-Embedder-Policy on it, or CORP/ credentialless support). Use an <iframe credentialless> where supported, or open the site in a new window. Also declare it under frame in \"csp\" . window.opener is null / a popup can't talk back COOP same-origin severs links to cross-origin windows. Use postMessage through a frame you control, or redirects instead of popups. OAuth popups to other hosts need a redirect flow. A worker script fails with a COEP error The worker script must carry COEP/CORP itself. Serve workers from your own site. 0x adds the headers there, and on s"},{"u":"/security/isolation-headers/#testing-locally","t":"Isolation headers (COOP, COEP, CORP)","h":"Testing locally","s":"Security","x":"0x dev serves your game on localhost , but it does not send COOP/COEP. To check threads before you publish, publish a version and open it on its -play origin, or serve your build with the same two headers. curl -sI https://<site>-play.0x.limo/sites/<site>/<n>/ | grep -i cross-origin"},{"u":"/security/csp/","t":"Content-Security-Policy","h":"","s":"Security","x":"Every page and script of a hosted site is served with a Content-Security-Policy built for that version . The policy allows everything your game loads from its own origin, the 0x platform, and the inline <script> and <style> elements that shipped in your HTML. It blocks everything else unless you declare it when you publish. Live since 2026-10-17 Versions published from 2026-10-17 on are enforced by default. Versions published before that are report-only : they report what the policy would block, but nothing is blocked."},{"u":"/security/csp/#declaring-what-your-game-needs-csp","t":"Content-Security-Policy","h":"Declaring what your game needs: \"csp\"","s":"Security","x":"Add \"csp\" to 0x.config.json . 0x publish (CLI 0.1.4 or later) sends it with the version: { \"id\": \"my-game\", \"name\": \"My game\", \"csp\": { \"connect\": [\"https://api.mygame.example\", \"wss://rt.mygame.example\"], \"img\": [\"https://*.cdn.mygame.example\"], \"font\": [\"https://fonts.gstatic.com\"], \"permissions\": [\"microphone\"], \"eval\": false, \"inline_styles\": true } } key adds to value connect connect-src fetch , XHR, WebSocket, EventSource. https:// or wss:// origins. img img-src Images. media media-src Audio and video. font font-src Fonts. script script-src Scripts from other hosts. frame frame-src Pages you put in an <iframe> . permissions Permissions-Policy Any of camera , microphone , geolocation , usb , serial , hid , payment . See Permissions-Policy . eval script-src 'unsafe-eval' true allows eval() and new Function() . inline_styles style-src 'unsafe-inline' true allows <style> elements created at runtime. Origin rules, checked when you publish: https:// only ( wss:// too for connect ); no path, query, user or IP address; a host name with a domain ( example.com or deeper). A port is allowed ( wss://rt.example.com:8443 ); a wildcard only as the whole first label: https://*.cdn.example.co"},{"u":"/security/csp/#the-policy","t":"Content-Security-Policy","h":"The policy","s":"Security","x":"For an enforced version, the policy looks like this, with your declared origins added to each directive: default-src 'self'; script-src 'self' 'wasm-unsafe-eval' <inline script hashes> https://static.cloudflareinsights.com [script] ['unsafe-eval']; style-src 'self' <inline style hashes | 'unsafe-inline'>; style-src-elem 'self' <inline style hashes | 'unsafe-inline'>; style-src-attr 'unsafe-inline'; connect-src 'self' https://api.0x.limo https://play.0x.limo wss://api.0x.limo wss://play.0x.limo https://cloudflareinsights.com [connect]; img-src 'self' data: blob: [img]; media-src 'self' data: blob: [media]; font-src 'self' data: blob: [font]; worker-src 'self' blob:; frame-src 'self' [frame]; object-src 'none'; base-uri 'none'; form-action 'self'; frame-ancestors 'self' https:; report-uri /x1/csp; report-to csp Notes: Inline code by hash. When you publish, 0x hashes every inline <script> and <style> in your HTML files (SHA-256 of the text as the browser sees it, with CR LF read as LF ; HTML comments are skipped; a <script src> has no inline code). Those exact blocks run without 'unsafe-inline' . If you change an inline block, publish a new version. More than 64 inline blocks keep a v"},{"u":"/security/csp/#modes","t":"Content-Security-Policy","h":"Modes","s":"Security","x":"mode headers effect enforce Content-Security-Policy (the policy), Content-Security-Policy-Report-Only (a stricter copy), Permissions-Policy Violations are blocked and reported. report-only Content-Security-Policy-Report-Only (the policy) Nothing is blocked. Reports show exactly what enforcing would break. off none No policy headers. A version's own mode is enforce if it was published on or after 2026-10-17, otherwise report-only . 0x's reviewers can switch a whole site (to enforce, report-only or off). They can also approve, flag or reject parts of a declaration, or block a host. You see the result, the served declaration, next to what you published (see Your site's policy ). The stricter report-only copy that comes with an enforced version also reports style=\"...\" attributes and frame ancestors other than the store and X. That is information for 0x about future tightening. It never blocks anything."},{"u":"/security/csp/#preview-enforcement","t":"Content-Security-Policy","h":"Preview enforcement","s":"Security","x":"Open any page of a report-only version with ?x1-csp=enforce to get it enforced, for example https://<site>-play.0x.limo/sites/<site>/3/?x1-csp=enforce . A preview can only tighten the policy. Use it to check an old version before 0x switches it."},{"u":"/security/csp/#when-headers-change","t":"Content-Security-Policy","h":"When headers change","s":"Security","x":"0x asks for a version's headers on every page and script request and caches them for 30 seconds, so a switch applies within about a minute: Pages ( / , *.html ) are Cache-Control: no-cache , so returning players get the current headers. Other files are immutable for a year. A script a browser cached before a switch keeps the headers it was fetched with. Files served by the swarm service worker carry no CSP of their own. The page's policy still governs the page. If 0x can't compute a version's policy, the page gets a report-only baseline instead: it keeps loading, and nothing is enforced."},{"u":"/security/csp/#reports","t":"Content-Security-Policy","h":"Violation reports","s":"Security","x":"Browsers post violations to /x1/csp on your site's own origin ( report-uri and the Reporting API's report-to ). 0x adds them up per version, directive, blocked origin and source file: Kept: the count, first and last seen, the line and column of the last one, and the disposition ( enforce = blocked, report = would be blocked). Not kept: blocked URLs are reduced to their origin, and source files lose their query and fragment. The referrer, sample, user agent and the reporter's address are never stored. Up to 300 distinct rows per version; past that, reports fold into (directive, other) . Rows not seen for 90 days are deleted. Read them on https://api.0x.limo/dev/submit ( Site policy reports ), or with the API using a publish token or an access token: # every site of yours, the last 30 days curl -s -H \"Authorization: Bearer $ZEROX_TOKEN\" https://api.0x.limo/v1/hosting/csp-reports # one site, one version, the last 7 days curl -s -H \"Authorization: Bearer $ZEROX_TOKEN\" \\ \"https://api.0x.limo/v1/hosting/sites/my-game/csp-reports?version=3&days=7\" { \"items\": [ {\"site\": \"my-game\", \"version\": 3, \"directive\": \"connect-src\", \"blocked\": \"https://api.mygame.example\", \"source_file\": \"https://my-"},{"u":"/security/csp/#reading-a-report","t":"Content-Security-Policy","h":"Reading a report","s":"Security","x":"directive blocked usually means fix connect-src https://api.example.com fetch /WebSocket to your backend declare it under connect script-src-elem https://cdn.example.com a <script src> from a CDN vendor it into your site, or declare it under script script-src-elem inline an inline script that changed after publish, or was added at runtime move it into a file script-src eval eval or new Function remove it, or declare \"eval\": true style-src-elem inline a <style> created at runtime (UI libraries do this) declare \"inline_styles\": true img-src / font-src / media-src an origin assets from another host serve them from your site (they then go on the swarm), or declare them frame-src an origin an embedded video or page declare it under frame frame-ancestors an origin from the stricter report-only copy: your game embedded on another site nothing: it is informational"},{"u":"/security/csp/#your-sites-policy","t":"Content-Security-Policy","h":"Your site's policy","s":"Security","x":"GET /v1/hosting/sites/<site>/policy (your sites only) returns the policy of each of your site's latest 20 versions: the mode and where it comes from ( version , site or global ), the declaration as published ( declared ) and as served ( effective_declared ), the review of it, the number of inline hashes, warnings, and the exact headers. curl -s -H \"Authorization: Bearer $ZEROX_TOKEN\" https://api.0x.limo/v1/hosting/sites/my-game/policy Anyone can read a published version's headers, because they are the same headers every visitor gets: curl -s -o /dev/null -w '%{http_code}\\n' https://api.0x.limo/v1/hosting/policy/hellengine/10 That route answers with headers only: X-X1-Csp-Mode , X-X1-Csp , X-X1-Csp-Ro and X-X1-Pp . Use curl -sD- -o /dev/null to see them. 0x publish also prints the mode, what you declared and how many inline blocks were hashed: 0x publish: security policy enforced; declared connect: https://api.mygame.example; 1 inline scripts and 2 <style> elements allowed by hash"},{"u":"/security/permissions-policy/","t":"Permissions-Policy","h":"","s":"Security","x":"Enforced versions are served with a Permissions-Policy header. It turns off powerful features your game didn't declare, so a compromised build can't suddenly ask players for their camera or location. Permissions-Policy: camera=(), microphone=(), geolocation=(), usb=(), serial=(), hid=(), payment=(), fullscreen=(self), gamepad=(self), autoplay=(self) feature default to use it fullscreen , gamepad , autoplay allowed for your site nothing camera , microphone , geolocation , usb , serial , hid , payment off declare it in \"csp\".\"permissions\" Declare the features your game uses in 0x.config.json : { \"csp\": { \"permissions\": [\"microphone\", \"gamepad\"] } } Only the seven names in the table can be declared. gamepad above is refused with csp.permissions: one of camera, microphone, geolocation, usb, serial, hid, payment , because it is always on. A declared feature becomes =(self) : allowed for your site's own origin, never for frames of other sites inside it. The browser still asks the player before it grants a feature. The policy only decides whether your page may ask at all."},{"u":"/security/permissions-policy/#report-only-versions","t":"Permissions-Policy","h":"Report-only versions","s":"Security","x":"A report-only version (one published before 2026-10-17, or a site 0x switched to report-only) gets no Permissions-Policy header, because it would block. Features then follow the browser's defaults and the embedding frame's allow attribute."},{"u":"/security/permissions-policy/#inside-the-store-and-embeds","t":"Permissions-Policy","h":"Inside the store and embeds","s":"Security","x":"When your game runs inside a frame, the frame's allow attribute also limits what it may use. The 0x store and 0x.limo/embed/<id> delegate fullscreen , gamepad , autoplay , clipboard-write , screen-wake-lock and pointer-lock (the store also delegates xr-spatial-tracking and cross-origin-isolated ). Camera, microphone and location inside the store The store's and the embed's frames don't delegate camera , microphone , geolocation , usb , serial , hid or payment today. A declared permission takes effect when players open your game's page directly ( https://<site>-play.0x.limo/sites/<site>/<n>/ ), but not inside the 0x store or an embed. If your game depends on one of these, tell players to open it directly."},{"u":"/security/permissions-policy/#checking-it","t":"Permissions-Policy","h":"Checking it","s":"Security","x":"curl -sI https://<site>-play.0x.limo/sites/<site>/<n>/ | grep -i permissions-policy In the page, document.featurePolicy?.allowedFeatures() (Chromium) lists what is allowed."},{"u":"/security/source-integrity/","t":"Source integrity","h":"","s":"Security","x":"Publish your game's source with its listing. 0x then: fetches the source at the exact commit or content id you name; builds it in a sandbox with the toolchain you pin; checks that every file players download is byte-for-byte what the source builds; scans the source for malware and abuse, and has an AI model review it; shows the result to the operator who reviews your listing. When the rebuilt files match and an operator approves the version with the audit in front of them, the store page says Source verified , with the commit. Source integrity is optional. A listing without source still goes through store review."},{"u":"/security/source-integrity/#1-where-the-source-lives","t":"Source integrity","h":"1. Where the source lives","s":"Security","x":"where --source notes Public GitHub, GitLab or any git host git:https://github.com/you/game.git#<commit> The full 40-character commit id: branches and tags move, a commit doesn't. Private repository, deploy key git:git@github.com:you/game.git#<commit> with --source-access deploy-key Run 0x submit deploy-key <id> first, then add the printed key to the repository as a read-only deploy key (GitHub: Settings → Deploy keys; GitLab: Settings → Repository → Deploy keys). Fetched over ssh. Private repository, token git:https://gitlab.com/you/game.git#<commit> with --source-access token --source-token-file token.txt A read-only token. 0x stores it sealed and never shows it again. IPFS ipfs:<cid> A directory, or one tar, tar.gz or zip file. Keep it pinned until the check is done. Add a directory with ipfs add -r --hidden : without --hidden , dot-files such as .cargo/config.toml or .npm-cache are left out and the build fails. BitTorrent torrent:<infohash> or torrent:magnet:?xt=urn:btih:… Keep seeding until the check is done. Add trackers to the magnet link. Caps: 2 GB and 200,000 files of source; a 30-minute build with 8 GB of memory; 4 GB of output."},{"u":"/security/source-integrity/#2-the-build-recipe-0xbuildjson","t":"Source integrity","h":"2. The build recipe: 0x.build.json","s":"Security","x":"Put it at the root of the source: { \"image\": \"node@sha256:<digest>\", \"steps\": [\"npm ci --offline --ignore-scripts --cache .npm-cache\", \"npm run build\"], \"output\": \"dist\", \"env\": {\"NODE_ENV\": \"production\"} } image : the toolchain, pinned by digest ( name@sha256:<64 hex> ). Get it with docker image inspect --format '{{index .RepoDigests 0}}' node:20 . A tag can change; a digest can't. steps : 1 to 50 shell lines, run in order in a copy of the source, as an unprivileged user, with no network . The build can't download anything, so commit what it needs. For npm, commit its cache ( npm ci --cache .npm-cache once, then commit .npm-cache ), so that npm ci --offline installs exactly the lockfile's packages. output : the directory whose files you publish ( 0x publish dist ). env : up to 50 plain variables. SOURCE_DATE_EPOCH is set to the commit's time (0 for IPFS and torrents). Use it for any date your build embeds. Instead of a file you can pass the recipe inline in the submission ( source.build ), or name another file with --build-file . Builds must be reproducible: the same source must give the same bytes. Avoid timestamps, random ids and absolute paths in the output, and sort whatever y"},{"u":"/security/source-integrity/#rust-and-webassembly","t":"Source integrity","h":"Rust and WebAssembly","s":"Security","x":"For a Rust engine built with wasm-bindgen: Use the official rust@sha256:… image of your Rust version, and carry everything else in the source. cargo vendor the crates, with a .cargo/config.toml that replaces crates-io with vendor/ and sets [net] offline = true . The image has no wasm32 target. Add the rust-std-<version>-wasm32-unknown-unknown.tar.gz that rust-lang's channel manifest ( static.rust-lang.org/dist/channel-rust-<version>.toml ) names, check its SHA-256 in a step, and point CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_RUSTFLAGS=--sysroot=… at it. Build wasm-bindgen-cli of the same version as your wasm-bindgen crate from its crates.io source, vendored with the rest. Put upstream code under vendor/ or third_party/ : the AI review reads your own files first. Such a source is hundreds of MB, so run 0x source check --no-scan locally (the reviewers' scan has no size limit)."},{"u":"/security/source-integrity/#3-check-it-before-you-submit","t":"Source integrity","h":"3. Check it before you submit","s":"Security","x":"0x source check . --site my-game --site-version 3 This runs the same scan the reviewers see (a dry run: nothing is stored), then runs the recipe in Docker with the same sandbox arguments, and compares the output with what players get from your hosted version. Compare against a local directory with --against dist , or against any origin with --against-url https://…/ . --no-build and --no-scan skip a stage. On a mismatch it names the files and exits with status 3."},{"u":"/security/source-integrity/#4-submit","t":"Source integrity","h":"4. Submit","s":"Security","x":"0x publish dist --site my-game # the files players get 0x submit . --site my-game --site-version 3 --source git:https://github.com/you/game.git#<commit> 0x submit source-status my-game # the check: match or mismatch, and the audit Or set it in 0x.config.json : { \"listing\": { \"source\": {\"kind\": \"git\", \"url\": \"https://github.com/you/game.git\", \"commit\": \"<40 hex>\", \"build\": {\"file\": \"0x.build.json\"}} } } A declaration is checked when you submit ( 400 names the bad field), so a broken one never queues a check."},{"u":"/security/source-integrity/#what-is-compared","t":"Source integrity","h":"What is compared","s":"Security","x":"A hosted site version: the files you uploaded with 0x publish , by SHA-256. The files 0x adds ( x1.json , x1-sw.js , x1/ , swarm/ ) are not part of it. A game published as builds: the build's files, encrypted files and large files in parts included. Check a build with POST /v1/apps/<appid>/builds/<build>/publish {\"branch\": \"public\", \"source\": {…}} and read the result at GET /v1/apps/<appid>/builds/<build>/source . A web game served from your own host can't be verified, because 0x can't know what your server sends. The source is still scanned and reviewed, and the result is unverifiable . Every published file is match , mismatch , missing (published, not built) or extra (built, not published; allowed). The verdict is match only when every published file matched."},{"u":"/security/source-integrity/#5-what-reviewers-see-what-players-see","t":"Source integrity","h":"5. What reviewers see, what players see","s":"Security","x":"The file table: every published file, rebuilt identically or not. One mismatch and the source is not verified. The scan: languages, binaries and archives in the source, minified or obfuscated code, where dependencies come from, and constructs malware uses, each with file and line. Those constructs include eval of strings, running programs, code loaded from other hosts, miners, wallet drainers, and clipboard and key capture. The rules are public: curl -s -o /dev/null -w '%{http_code}\\n' https://api.0x.limo/v1/sourcecheck/rules The AI review: a model reads the source (flagged files first) and reports only malware and abuse. It is advisory: an operator decides, as for any submission. AI findings never reach you on their own. You only see issues a reviewer raises (see Review ). Players see one of three states on the game page: Source verified (with the commit, where the source is, and the audit summary), Source check failed , or Source not provided . Source verified means \"built from this source, and reviewed\", which anyone can check again. The public record is at GET /v1/listings/{id}/source , and the catalog carries source_verified per game."},{"u":"/security/source-integrity/#api-summary","t":"Source integrity","h":"API summary","s":"Security","x":"call auth what POST /v1/listings with source you Submit with a source; the response carries source: {job, status} . GET /v1/listings/{id} you Each version's source status, verdict, file counts and audit summary. Credentials are never returned. GET /v1/listings/{id}/source/deploy_key you The read-only deploy key to add to a private repository: {public_key, fingerprint} . GET /v1/apps/{appid}/source/deploy_key you The same, for builds. GET /v1/apps/{appid}/builds/{build}/source you A build's check. POST /v1/sourcecheck/scan you The deterministic scan of a tar (up to 50 MB) as a dry run. Nothing is stored. GET /v1/sourcecheck/rules public The scan's rule data. GET /v1/listings/{id}/source public The live version's source record and verified flag."},{"u":"/security/review/","t":"Review and review issues","h":"","s":"Security","x":"Every store submission is reviewed by 0x before it goes live. When a reviewer finds a problem, they raise a review issue : one problem, with its own thread between the reviewers and you. You answer where you already work: the submit page, the 0x CLI or the API. The reviewer then resolves the issue, marks it won't-fix, or reopens it."},{"u":"/security/review/#an-issue","t":"Review and review issues","h":"An issue","s":"Security","x":"field meaning category security , source-mismatch , content , metadata , technical , other , or rejection (the reason a version was rejected) severity info , needs-change or blocking . Only open blocking issues stop an approval. title and messages What the reviewer wrote. Titles are one line of up to 200 characters; messages are up to 4000. refs Where in your source: up to 20 of {file, line?, rule?} origin What raised it: scan , ai , file , rejection or manual , and the rule where there is one state open → replied → resolved / wontfix ; a closed issue can be reopened fixed_in_version The version you said fixes it How the state moves: action from to you reply open, replied, reopened replied reviewer replies to you replied open (your turn again) reviewer resolves / marks won't fix open, replied, reopened resolved / wontfix reviewer reopens resolved, wontfix reopened A closed issue takes no replies ( 409 ). Only a reviewer can reopen it. Reviewers appear as \"0x review\". You never see internal notes, reviewers' names or the AI review's raw findings: an AI finding reaches you only as an issue a reviewer raises, in their words. A rejection keeps its reason as the version's review note, a"},{"u":"/security/review/#answering-on-devsubmit","t":"Review and review issues","h":"Answering on /dev/submit","s":"Security","x":"https://api.0x.limo/dev/submit shows Review issues first, with a red \"N new\" badge (and \"(N)\" in the tab title). Each issue opens to its thread, with a reply box and a Fixed in choice (your listing's later versions). Link to an issue with /dev/submit#issue-<id> . The badge refreshes every 2 minutes while the tab is visible."},{"u":"/security/review/#answering-with-the-cli","t":"Review and review issues","h":"Answering with the CLI","s":"Security","x":"0x issues # every issue on your listings, active first; [new] marks unread 0x issues my-game # one listing's issues 0x issues show 42 # one issue and its thread (marks it read) 0x issues reply 42 \"Removed the eval in loader.js; fixed in version 4\" --fixed-in 4 0x issues --json # machine-readable 0x submit status # your submissions, with issue counts The CLI strips control characters and bidi overrides before printing anything a reviewer wrote."},{"u":"/security/review/#answering-with-the-api","t":"Review and review issues","h":"Answering with the API","s":"Security","x":"Use an access token, or a publish token from 0x login (publish tokens reach /v1/hosting/* and /v1/listings/* only). curl -s -H \"Authorization: Bearer $ZEROX_TOKEN\" https://api.0x.limo/v1/listings/issues curl -s -H \"Authorization: Bearer $ZEROX_TOKEN\" https://api.0x.limo/v1/listings/my-game/issues curl -s -H \"Authorization: Bearer $ZEROX_TOKEN\" https://api.0x.limo/v1/listings/issues/42 curl -s -X POST -H \"Authorization: Bearer $ZEROX_TOKEN\" -H 'content-type: application/json' \\ -d '{\"message\": \"Fixed: the loader no longer uses eval.\", \"fixed_in_version\": 4}' \\ https://api.0x.limo/v1/listings/issues/42/reply call returns GET /v1/listings/issues {items, open, unread, awaiting_you} , active issues first (up to 200) GET /v1/listings/{id}/issues One listing's issues (numeric id or slug) GET /v1/listings/issues/{issue} The issue and its thread. Marks it read. POST /v1/listings/issues/{issue}/reply {message, fixed_in_version?} GET /v1/listings Each listing carries issues: {open, blocking, unread, awaiting_you} Another developer's issue answers 404 . Limits: one reply every 20 seconds per account, with a burst of 10; at most 200 messages per issue and 100 active issues per listing."},{"u":"/security/review/#notifications","t":"Review and review issues","h":"Notifications","s":"Security","x":"There is no email or webhook yet. You're notified in-app: the badge on /dev/submit , the issues counts in GET /v1/listings , and [new] in 0x issues ."},{"u":"/security/review/#tips","t":"Review and review issues","h":"Tips","s":"Security","x":"Fix the problem in a new version, resubmit it, then reply with Fixed in that version. That is the fastest path to approval. Issues raised from a source scan quote the file and line. If the finding is a false positive (for example vendored upstream code), say so and point at it. Keep upstream code under vendor/ or third_party/ , so the review reads your own code first (see Source integrity )."},{"u":"/security/admin-agents/","t":"Managing 0x with an agent","h":"","s":"Security","x":"An operator of a 0x deployment can let an AI agent work on the platform through the admin API , the same API the admin console uses. The agent connects through x1-admin , an MCP server, with an agent token the operator creates in the console. Live since 2026-11-07 Agent tokens and the x1-admin MCP server are live on 0x.limo's admin console. Human sign-in doesn't change. Operators still sign in with a passkey, a COLDCARD or an authenticator app. An agent token is a separate kind of credential, with its own limits."},{"u":"/security/admin-agents/#what-an-agent-can-and-cant-do","t":"Managing 0x with an agent","h":"What an agent can and can't do","s":"Security","x":"Every admin route has one of four classes for agents. The admin API applies the class before any handler runs, whatever role the agent has. class what happens examples read runs health, worlds, plays, the network and the swarm, Earth status, review queues, the audit trail manage runs at once (reversible desk work, audited) re-running a pre-check, drafting review issues, suggesting a reply on the hype desk live queued for a human. The agent gets an action_id . The change runs once, as the agent, if an operator approves it within an hour world release stage, Earth LOD switch, weather events, fire dispatch, delivery mode, CSP mode, publishing, restarts, crediting denied never sign-in and sessions, operators, roles, agents, approvals, credentials and secrets, payouts and refunds, anything that deletes Other limits: One role. An agent token holds one built-in or custom role, optionally scoped to apps, worlds or publishers. Break-glass can't be an agent's role. Never more than its owner. The operator who creates a token owns it. Each request also needs its owner to hold the permission right now. If the owner loses a role or is disabled, the agent loses it too. A dry run first. For a dang"},{"u":"/security/admin-agents/#creating-a-token","t":"Managing 0x with an agent","h":"Creating a token","s":"Security","x":"In the console, open Security & access › Agents , then New agent . You need the agents.manage permission, which security-admins have. Pick a name, a role and, if you like, a scope and an expiry (1 to 90 days, 30 by default). You can only give the agent permissions you hold yourself, everywhere. The dry run shows how many routes the agent will reach in each class. Apply. This needs a fresh second factor, like any dangerous action. The token ( 0xag_ + 64 hex digits) is shown once . Save it in a file only you can read. Tokens minted before the rename to 0x start with x1ag_ and keep working. The console keeps only its hash. The Agents page shows each token's owner, role, expiry, last use, number of calls and rate-limit hits. Revoke stops a token at once and rejects its pending actions. Any operator with agents.manage can revoke a token. Only its owner can rotate it, which gives a new token and stops the old one at once."},{"u":"/security/admin-agents/#connecting-claude-code","t":"Managing 0x with an agent","h":"Connecting Claude Code","s":"Security","x":"x1-admin runs on a host that can reach the admin API. It has two transports: stdio , for one agent on one machine, usually started over SSH: claude mcp add x1-admin -- ssh <admin-host> \\ ZEROX_AGENT_TOKEN_FILE=~/.config/0x/agents/<name>.token \\ node <path>/x1-admin-mcp/bin/x1-admin-mcp.mjs --stdio Streamable HTTP , on the operators' private network only. Each client sends its own token as a bearer, and the server keeps no token of its own: claude mcp add --transport http x1-admin http://<private-address>:8590/mcp \\ --header \"Authorization: Bearer $(cat ~/.config/0x/agents/<name>.token)\" The HTTP transport refuses to listen on wildcard or public addresses, and refuses requests from browsers (any request with an Origin header). Ask the agent to start with agent_whoami . It reports the agent's role, its owner and how many routes it reaches in each class."},{"u":"/security/admin-agents/#tools","t":"Managing 0x with an agent","h":"Tools","s":"Security","x":"About fifty tools, each on one admin route, grouped by area. The tool descriptions name each route's class and permission. area tools status ops_health , ops_nodes , ops_alerts , metrics_catalog , metrics_query worlds worlds_list , world_get , plays_overview , world_set_release network and swarm p2p_topology , p2p_network , p2p_traffic , p2p_capacity , p2p_trackers , p2p_mode , p2p_set_mode , swarm_overview , swarm_items , seedboxes_list Earth earth_terrain_status , earth_bake_status , earth_bake_log , earth_lod_build , earth_lod_switch , climate_status , climate_history , climate_trigger , firefighters_status , firefighters_dispatch , helicopters_status review listings_list , listing_get , listing_issues , sourcecheck_jobs , listing_precheck , listing_approve hype desk hype_status , hype_replies , xreach_status , xreach_likes , xreach_like_action , xreach_run operations infra_status , docs_status , audit_search , audit_verify the agent agent_whoami , agent_actions , agent_action_status any read route admin_get (a concrete /admin/v1/... path of any read route) and admin_routes (the route table with classes, offline) Read tools carry readOnlyHint . Manage and live tools carry destru"},{"u":"/security/admin-agents/#approving","t":"Managing 0x with an agent","h":"Approving","s":"Security","x":"Queued actions wait in Security & access › Agent approvals , with the agent, its owner, the operation, its dry run or request, and the agent's reason. To approve one you need the action's own permission and a fresh second factor. It then runs once, as the agent. Anyone eligible, or the agent's owner, can reject it. After an hour a pending action expires, and the agent has to ask again. The agent polls agent_action_status and sees pending , executed (with the result), failed , rejected or expired ."},{"u":"/monetization/","t":"Monetization overview","h":"","s":"Monetization","x":"Every way of paying on 0x goes through one place, the player's 0x balance . It is held in US dollars (cents). Players top it up by card, and the card payment is settled in USDT or Bitcoin. They then buy games, items and subscriptions from it. Your share of every sale goes to your account at the USDT checkout and is then paid out on-chain, in USDT, to the address you choose. player's card ──► top-up (USDT or BTC network) ──► 0x balance (USD cents) │ game purchase · in-game item · subscription charge │ platform fee + your share ──► your checkout account ──► USDT payout to your address"},{"u":"/monetization/#status","t":"Monetization overview","h":"What is live on 0x.limo","s":"Monetization","x":"Feature Status Notes Paid games (price on the listing, bought from the balance) live Paid games and the paygate Wallet top-ups by card: USDT on Ethereum, Tron, Arbitrum, BNB Chain, Polygon; Bitcoin live Wallet and top-ups Developer settlement in USDT (transfers + on-chain payouts) live Developer settlement Hosted-site gate for paid games (x1-paygate, play tickets) off coded; not deployed on 0x.limo yet In-game purchases ( @0xlimo/iap ) off deployed but switched off Subscriptions ( @0xlimo/platform/launcher , @0xlimo/platform/server ) off deployed but switched off Switched off on 0x.limo In-game purchases and subscriptions are in the production backend, but they are switched off. While they are off, every route they use answers 404 , @0xlimo/iap 's available() is false inside the launcher, and purchase() rejects with unavailable . You can build against them now: the SDKs work the same and the guides show the full flow. When they are switched on, this page and the changelog will say so."},{"u":"/monetization/#fees","t":"Monetization overview","h":"Fees","s":"Monetization","x":"Platform fee: 10 % of each sale (game, in-game item or subscription charge). The rest is your share. The split is rounded once per sale, and the fee and your share always add up to the price. Top-up fees are the player's. The card provider's charge and network costs show up as the expected card charge before they pay, and half of the checkout's fee is added to the invoice. Payout network fee: each on-chain payout pays its network fee in USDT, and that fee is deducted from the payout. The payout settings page shows what a payout on each network would send right now."},{"u":"/monetization/#where-to-go-next","t":"Monetization overview","h":"Where to go next","s":"Monetization","x":"Paid games and the paygate : set a price, what players see, and gating a hosted site. In-game purchases : items, the launcher's confirm dialog, receipts and server-side consumption. Subscriptions : plans, subscription-only games, entitlement checks. Wallet and top-ups : how players get a balance. Developer settlement : how and when you get paid."},{"u":"/monetization/paid-games-and-paygate/","t":"Paid games and the paygate","h":"","s":"Monetization","x":"A game on 0x is free, or it has a price in US dollars. Players buy it from their 0x balance . The purchase grants them ownership (an entitlement), and your share goes to settlement . Status on 0x.limo Prices on listings, buying from the balance live Play tickets ( POST /v1/apps/{appid}/play-ticket ) off (the route answers 503 ) x1-paygate in front of paid games' hosted sites and game servers off (not deployed)"},{"u":"/monetization/paid-games-and-paygate/#price","t":"Paid games and the paygate","h":"Set a price","s":"Monetization","x":"The price is part of a listing version. Set it in the price field of POST /v1/listings : { \"price\": { \"amount\": 499, \"currency\": \"USD\" } } amount is in cents, from 99 ($0.99) to 100000 ($1,000.00). currency must be USD , because the 0x balance is held in US dollars. \"free\" (or 0 , or leaving the field out) makes the game free. Anything else is rejected with 400 and an error such as price: \"free\" or {amount, currency}: amount in minor units (99-100000), currency one of USD . As with every listing change, the version waits for store review. When it is approved, the store shows the price, and from then on only owners hold the game. The submit form and `0x submit` send \"free\" The submission page ( https://api.0x.limo/dev/submit ) and 0x submit always send \"price\": \"free\" . A version submitted from either of them makes a paid game free once it is approved. To keep a price, submit new versions of a paid game through POST /v1/listings with the price field set. Changing a free game to paid: players who had it while it was free keep it only if they are granted it. The reviewer sees this as free_to_paid before approving."},{"u":"/monetization/paid-games-and-paygate/#buying","t":"Paid games and the paygate","h":"What players see","s":"Monetization","x":"On the game's page, a paid game shows Buy · $4.99 from your balance . If the balance is short, the button reads Top up $x more and opens the wallet with the missing amount filled in. The purchase is one transaction: the balance is debited, the game is granted, and the sale's fee and share are recorded. Behind the button is POST /v1/store/orders {\"appid\": …} , which answers 409 insufficient_funds with missing (in cents) when the balance is short. Refunds are made by 0x support. They return the price to the player's 0x balance (never to the card or the chain), revoke the game, and take your share back (see refunds after a payout ). Players can't refund a purchase themselves."},{"u":"/monetization/paid-games-and-paygate/#ownership","t":"Paid games and the paygate","h":"Ownership in your game","s":"Monetization","x":"Ownership of a paid app comes only from its entitlements, and every existing check sees it: the player's library and the launcher's Play button; the Steam-compatible licence check ( UserHasLicenseForApp ), when the game runs through the Steamworks compatibility layer ; play tickets and the paygate (below), once they are on."},{"u":"/monetization/paid-games-and-paygate/#paygate","t":"Paid games and the paygate","h":"The paygate (hosted sites of paid games)","s":"Monetization","x":"Not deployed on 0x.limo yet x1-paygate ( @0xlimo/paygate ) and play tickets are coded and tested, but they are not deployed on 0x.limo yet. Until they are, the hosted site of a paid game is not access-controlled : anyone who has its https://<site>-play.0x.limo/sites/<site>/<n>/ URL can open it. Don't put a paid game's full build on 0x hosting until this callout is gone, or gate your own game server yourself. The launcher only hides Play. A hosted site is a public URL, so a paid game needs a gate in front of it. Here is how the gate works once it is on: Paid sites. A site is paid when a priced app's hosted URL points at it, whether or not the app is listed (taking the listing down never opens the site). The public list is GET https://api.0x.limo/v1/hosting/paid-sites → {\"sites\": {\"<site>\": {appid, id, name}}, \"at\": …} . No swarm. New versions of a paid site are built origin-only : no swarm manifest, and x1.json says {\"swarm\": false} , so nothing of a paid game is shared from player to player. The publish answer says \"origin_only\": true . Play ticket. The web launcher gets a ticket for an owner ( POST /v1/apps/{appid}/play-ticket , 5 minutes; anyone else gets 402 not_owned ) and open"},{"u":"/monetization/paid-games-and-paygate/#related","t":"Paid games and the paygate","h":"Related","s":"Monetization","x":"Subscriptions : subscription-only games are gated like paid ones (passes last at most an hour). Developer settlement : where your share goes."},{"u":"/monetization/in-game-purchases/","t":"In-game purchases","h":"","s":"Monetization","x":"Sell items in your game, such as a skin or a pack of boosts, for the player's 0x balance. Your game can only ask. The 0x launcher shows the player the item, the price and their balance, and nothing is bought unless they press Confirm. Your game server then checks the signed receipt with 0x and grants the item. Your share is settled like a game sale. Switched off on 0x.limo In-game purchases are deployed but switched off on 0x.limo. While they are off, every in-game purchase route answers 404 , the developer routes behind the items page answer 404 too, and in the launcher purchase() rejects with unavailable . You can integrate and unit-test against the SDK now (see Test it ). This page will drop this callout when purchases go live. Game ── purchase(\"boost-pack\") ──► Launcher ── player confirms, paid from balance ──► receipt ──► Your server: verify, consume, grant"},{"u":"/monetization/in-game-purchases/#items","t":"In-game purchases","h":"1. Define your items","s":"Monetization","x":"Sign in at https://api.0x.limo/dev/items , pick your game and add items: Field Rules sku Your id for the item: ^[a-z0-9][a-z0-9._-]{0,63}$ (e.g. skin-gold ). Unique per game, and never reused for another item. name , description What the player sees in the confirm dialog: 1–80 and 0–500 characters. price US cents, from 25 ($0.25) to 50000 ($500). kind permanent : owned once (a skin, a level pack). consumable : bought in quantities and used up by your server (boosts, coins). max_per_player Optional: at most this many (not refunded) per player. A permanent item is always 1. active Inactive items can't be bought. Purchases already made stay valid. Once an item has been sold, it can't be deleted (it is deactivated instead) and its kind can't change. A new price applies to new purchases only. On the same page, Create server key gives you the game's server key, 0xsk_<appid>_… (keys made before the rename to 0x start with x1sk_ and keep working). It is shown once, and creating a new one revokes the old one. Keep it on your game server only, never in the page. The same operations over the API, with your 0x account's token: Method and path GET /v1/dev/iap/apps your games, with their items a"},{"u":"/monetization/in-game-purchases/#client","t":"In-game purchases","h":"2. Ask for a purchase (the page)","s":"Monetization","x":"npm install @0xlimo/iap --@0xlimo:registry=https://0x.limo/npm/ Sites built with the 0x CLI also get it as ./x1/iap.js next to the game, so you don't need a bundler. import { available, items, purchase, inventory } from \"./x1/iap.js\"; // or \"@0xlimo/iap\" if (available()) { // only inside the 0x launcher const { items: onSale, balanceUsd } = await items(); // names, prices, what the player owns try { const { purchase: p, receipt } = await purchase(\"boost-pack\", { quantity: 1 }); socket.emit(\"redeem\", receipt); // your server grants it (step 3) } catch (e) { if (e.code === \"canceled\") { /* the player said no */ } else if (e.code === \"insufficient_funds\") { /* they can top up and try again */ } } } purchase() resolves only after the player has confirmed and paid. Quantity is 1–100 (always 1 for a permanent item). It rejects with an IapError whose code is one of: code Meaning canceled the player closed the dialog insufficient_funds not enough balance (the dialog offers a top-up) already_owned , limit_reached a permanent item they have, or the per-player limit not_found no such active item not_signed_in a guest: purchases need an account unavailable , busy , failed , timeout purchases o"},{"u":"/monetization/in-game-purchases/#server","t":"In-game purchases","h":"3. Grant it on your server","s":"Monetization","x":"Never grant an item on the page's word. Check the receipt on your server. IapServer.fromEnv() looks for the key in ZEROX_IAP_SERVER_KEY , then in the file named by ZEROX_IAP_SERVER_KEY_FILE , then in x1-iap.key in the server's directory. On 0x hosting, save the key as x1-iap.key next to server.mjs and run 0x deploy-server . 0x publish never puts a file of that name into your public site, but keep it out of git. On 0x hosting the host sets ZEROX_API_URL ; elsewhere the API defaults to https://0x.limo . import { IapServer } from \"@0xlimo/iap/server\"; const iap = IapServer.fromEnv(); socket.on(\"redeem\", async (receipt, ack) => { const v = await iap.verify({ receipt }); // online: knows about refunds and consumption if (!v.valid || v.purchase.status === \"refunded\") return ack({ ok: false }); if (v.purchase.sku === \"skin-gold\") return ack({ ok: true, skin: \"gold\" }); // permanent if (v.purchase.sku === \"boost-pack\") { // consumable: one unit per use const c = await iap.consume(v.purchase.id, { quantity: 1, idempotencyKey: `${v.purchase.id}:${v.purchase.consumed}` }); if (c.consumed_now === 1) return ack({ ok: true, boost: true, left: c.purchase.remaining }); } ack({ ok: false }); }); Ca"},{"u":"/monetization/in-game-purchases/#receipts","t":"In-game purchases","h":"Receipts offline","s":"Monetization","x":"A receipt is x1r1.<payload>.<signature> . The payload is base64url JSON: {\"v\":1,\"kid\":\"…\",\"id\":\"i_…\",\"a\":4000123,\"s\":\"<steamid>\",\"k\":\"boost-pack\",\"t\":\"consumable\",\"q\":1,\"p\":99,\"c\":\"USD\",\"iat\":1792000000} It is signed with Ed25519 by 0x over the ASCII bytes x1-iap-receipt-v1. followed by the payload part. The public keys (the current and previous ones, by kid ) are at GET https://api.0x.limo/v1/iap/keys . import { fetchKeys, verifyReceipt } from \"@0xlimo/iap/server\"; const keys = await fetchKeys(\"https://0x.limo\"); // cached 10 minutes const r = verifyReceipt(receipt, { keys, appid: 4000123 }); if (r.valid) console.log(r.purchase.steamid, r.purchase.sku, r.purchase.quantity); Offline verification proves the purchase was made and paid. It can't know about a later refund or about units already used. Granting permanent items with it is fine, but grant consumables by consuming online ."},{"u":"/monetization/in-game-purchases/#player-api","t":"In-game purchases","h":"Players' side","s":"Monetization","x":"These routes are for the launcher, but you may see them in its traffic. All of them need a signed-in account; a guest gets 403 account_required . Method and path GET /v1/apps/{appid}/iap/items active items with what the player owns, and the balance POST /v1/apps/{appid}/iap/intents {sku, quantity?} an intent that lives 10 minutes: {intent, balance, can_afford, missing} POST /v1/iap/intents/{id}/confirm the launcher's Confirm → 201 {purchase, receipt, wallet} . Confirming again → 200 with replayed: true . 409 insufficient_funds keeps the intent open (top up and confirm again), 410 expired . POST /v1/iap/intents/{id}/cancel GET /v1/me/iap/purchases?appid= the player's purchases, newest first GET /v1/me/iap/purchases/{id}/receipt the receipt again, for a game that lost it"},{"u":"/monetization/in-game-purchases/#money","t":"In-game purchases","h":"Money and refunds","s":"Monetization","x":"Each purchase is a sale from the balance, split like a game sale: the platform fee and your share, which goes to your account through settlement . A refund by 0x support returns the whole price to the player's balance and revokes the item: a permanent item is no longer owned, and a consumable's remaining units can no longer be consumed. Your share is taken back. Players can't refund a purchase themselves. Steam-compatible games ISteamInventory::StartPurchase in the Steamworks compatibility layer is refused for priced items while payments are on (\"purchases need the player's confirmation in the 0x launcher\"). To sell items through 0x, use @0xlimo/iap ."},{"u":"/monetization/in-game-purchases/#testing","t":"In-game purchases","h":"Test it","s":"Monetization","x":"Outside the launcher, available() is false , so your game runs without a shop, as it should. Unit-test your server with fakes: new IapServer({ api, key, fetch }) takes any fetch , and verifyReceipt takes any key list, so you can sign test receipts with your own Ed25519 key (the SDK's packages/iap/test shows how). Once purchases are on: inside the launcher, buy your own items from a test account that has a balance. The receipts are real, and the server key works the same."},{"u":"/monetization/subscriptions/","t":"Subscriptions","h":"","s":"Monetization","x":"Sell a monthly subscription for your game, with optional weekly and yearly prices. Players pay from their 0x balance, and 0x renews the subscription every period. Your share of each charge is settled like a game sale. Each plan unlocks an entitlement key that your game checks. Switched off on 0x.limo Subscriptions are deployed but switched off on 0x.limo. While they are off, every subscription route answers 404 , and the launcher shows no plans. Server-side checks also need play tickets, which are off on 0x.limo too (see the paygate ). You can build against @0xlimo/platform now. This callout goes away when subscriptions are switched on."},{"u":"/monetization/subscriptions/#plans","t":"Subscriptions","h":"1. Create plans","s":"Monetization","x":"On 0x, open Subscription plans ( https://0x.limo/plans ). Each game can have up to 10 plans: Field Rules Name, description What players see on the game page and in the subscribe dialog (description up to 500 characters). Entitlement key What your game checks, e.g. vip , season-2 , perks.gold : 1–64 characters of lowercase letters, digits and _ . : - , starting with a letter or digit. It never changes once the plan exists. Prices Monthly (required), weekly and yearly (optional), in US cents, from 99 to 100000. A new price applies to new subscribers; current subscribers keep theirs. Retire a plan to stop new subscriptions. Current subscribers keep renewing until they cancel. The same operations over the API, with your 0x account's token: POST /v1/dev/apps/<appid>/plans {\"name\": \"VIP\", \"entitlement\": \"vip\", \"prices\": {\"month\": 499, \"year\": 4999}} PUT /v1/dev/apps/<appid>/plans/<plan id> {\"active\": false} (also name, description, prices) PUT /v1/dev/apps/<appid>/subscription {\"only\": true} GET /v1/dev/subscriptions your games, plans and subscriber counts Plan ids look like pl_ followed by 12 hex digits. The catalog ( GET /v1/catalog ) carries a game's active plans as store.subscription"},{"u":"/monetization/subscriptions/#subscription-only","t":"Subscriptions","h":"Subscription-only games","s":"Monetization","x":"When subscription-only is on, the game can't be bought ( 409 subscription_only ): owning it means holding an active subscription to any of its plans. Subscribers see Play, get play tickets, pass the hosted-site gate, and own the game for the Steam-compatible licence check. When a subscription lapses, the subscriber loses access. Without subscription-only, a free or paid game stays as it is, and its plans only unlock their entitlement keys."},{"u":"/monetization/subscriptions/#lifecycle","t":"Subscriptions","h":"2. What players get","s":"Monetization","x":"Subscribe: the first period is paid from the balance at once. Renewals fall on the same calendar day each week, month or year, in UTC (Jan 31 → Feb 28 → Mar 31). Renewal: 0x charges the next period on that day. Three days before, the player gets a notice in the launcher, and a second one if their balance won't cover the charge. Balance short: 3 days of grace with access, retried every 12 hours. After that the subscription is paused (no access) until the player resumes it, and a new period starts on that day. Cancel: takes effect at the end of the paid period, and the player can undo it until then. Canceling during grace or while paused ends the subscription at once. Refunds (0x support): the period's price goes back to the player's balance and your share is taken back. Refunding the current period ends the subscription. A player can hold several plans of your game, one subscription per plan. Free trials and coupons don't exist yet."},{"u":"/monetization/subscriptions/#client","t":"Subscriptions","h":"3. In the game: ask the launcher","s":"Monetization","x":"A game opened from the 0x launcher runs in its frame. @0xlimo/platform/launcher asks the launcher about the signed-in player. The game never sees the player's token, and anything that costs money is confirmed by the player in the launcher's own dialog. import { createLauncher } from \"@0xlimo/platform/launcher\"; const launcher = createLauncher(); const s = await launcher.subscriptions.status(); // {entitlements: [\"vip\"], subscriptions: [{plan_name, status, current_period_end, ...}], plans: [...], signedIn} if (await launcher.subscriptions.has(\"vip\")) unlockVipSkins(); // your own \"Go VIP\" button; the launcher asks the player to confirm const r = await launcher.subscriptions.subscribe(s.plans[0].id, \"month\"); if (r.outcome === \"subscribed\") unlockVipSkins(); // also \"already_subscribed\", \"canceled\", \"insufficient_funds\" (the dialog offers a top-up), \"signed_out\", \"failed\" launcher.on(\"subscription.changed\", (e) => refresh(e.entitlements)); Outside the launcher (the game opened in its own tab, or local development), status() rejects with a LauncherError whose code is no_launcher , and has() returns false . A player who edits the page can bypass a check in the browser, so for anything "},{"u":"/monetization/subscriptions/#server","t":"Subscriptions","h":"4. On your server: check the entitlement","s":"Monetization","x":"The client gets a short-lived play ticket from the launcher and sends it to your server. The server asks 0x who the player is and which keys they hold: JS curl // client const ticket = await launcher.playTicket(); socket.emit(\"hello\", { ticket }); // server (Node 18+) import { checkTicket } from \"@0xlimo/platform/server\"; const API = \"https://api.0x.limo\"; io.on(\"connection\", (socket) => socket.on(\"hello\", async ({ ticket }) => { const who = await checkTicket({ api: API, ticket, appid: MY_APPID }); // {valid, steamid, entitlements} if (!who.valid) return socket.disconnect(); socket.data.vip = who.entitlements.includes(\"vip\"); })); curl -s https://api.0x.limo/v1/subscriptions/check \\ -H 'content-type: application/json' \\ -d '{\"ticket\": \"<play ticket>\", \"entitlement\": \"vip\"}' # {\"valid\": true, \"appid\": 4000123, \"steamid\": \"...\", \"entitlements\": [\"vip\"], \"entitled\": true} Tickets last 5 minutes, so check again when the player reconnects. hasEntitlement({api, ticket, entitlement}) is the boolean shortcut. A native game server signed in to the backend asks directly, for players of its own game only. It uses a game-server session from POST /v1/gameservers/logon : import { serverEntitleme"},{"u":"/monetization/subscriptions/#hosted","t":"Subscriptions","h":"5. Hosted sites of subscription-only games","s":"Monetization","x":"A subscription-only game hosted on 0x ( 0x publish ) is gated like a paid one by x1-paygate : only subscribers get in, and everyone else sees a \"Subscribe to … on 0x\" page. Passes for these sites last at most an hour, so a lapsed subscriber is locked out within the hour. The paygate is not deployed on 0x.limo yet."},{"u":"/monetization/subscriptions/#faq","t":"Subscriptions","h":"Questions","s":"Monetization","x":"Question Answer Currencies? US dollars, paid from the 0x balance (topped up by card, settled in USDT or Bitcoin). What does the game see while a payment is late? The key stays during the grace days. Once the subscription is paused, the key is gone until the player pays. Can I change a plan's key? No. Create a new plan and retire the old one."},{"u":"/monetization/wallet-and-topups/","t":"Wallet and top-ups","h":"","s":"Monetization","x":"Players pay for games, items and subscriptions from their 0x balance . The balance is held in US dollars (cents) and topped up by card on 0x's payment partner's page. The card buys USDT, or bitcoin, which reaches 0x over the network the player picks. You never handle a card or a chain: your game only sees \"paid\" or \"not enough balance\". Top-ups are live on 0x.limo. Players manage their balance at https://0x.limo/wallet ."},{"u":"/monetization/wallet-and-topups/#networks","t":"Wallet and top-ups","h":"Networks","s":"Monetization","x":"Network Settled as Top-ups Developer payouts Ethereum USDT (ERC-20) yes yes Tron USDT (TRC-20) yes yes Arbitrum One USDT (ERC-20) yes yes BNB Smart Chain USDT (BEP-20) yes yes Polygon PoS USDT (ERC-20) yes yes Bitcoin BTC (pass-through) yes no : payouts are always in USDT The network changes only the fees. Before paying, the player sees the expected card charge on each network, cheapest first ( POST /v1/me/wallet/estimate {amountUsd} )."},{"u":"/monetization/wallet-and-topups/#topup","t":"Wallet and top-ups","h":"How a top-up works","s":"Monetization","x":"The player picks an amount in whole dollars, $20 to $500 , and a network. This is POST /v1/me/wallet/topups {amountUsd, network} , which takes an Idempotency-Key . They pay by card on the checkout's page. On a USDT network, the card is charged the amount plus a small processing fee, which is shown before they pay. The balance is credited when the checkout confirms the payment: by its webhook, by the wallet page polling the top-up, or by a background check that catches a lost webhook or a late payment. Each top-up is credited once. An unpaid top-up expires after about an hour, and the player can cancel it before then ( POST /v1/me/wallet/topups/{id}/cancel ). An expired top-up stays expired, so the player starts a new one. A late payment within a day is still credited. What is credited: USDT networks: the full amount the player picked. The processing fee was added on top of it. Bitcoin: the player picks what the card is charged. The checkout keeps the bitcoin and credits its USD value when the payment confirms, less its Bitcoin fee (about 4 %). The balance can therefore end up a little more or less than the estimate. The wallet shows the approximate BTC and the expected balance befo"},{"u":"/monetization/wallet-and-topups/#games","t":"Wallet and top-ups","h":"Your game and the balance","s":"Monetization","x":"Games never read or debit the balance directly. Purchases go through the launcher's dialogs: Buy for games, the confirm dialog for in-game purchases and subscriptions . When the balance is short, those dialogs already offer Top up $x more , which opens https://0x.limo/wallet?need=<cents>&game=<game id> . Your game needs no top-up UI of its own. Guests can't pay: buying, purchases and top-ups need a 0x account ( 403 account_required )."},{"u":"/monetization/wallet-and-topups/#api","t":"Wallet and top-ups","h":"Player API (reference)","s":"Monetization","x":"These routes are used by the 0x launcher. They are listed so you can recognise them; your game doesn't call them. Method and path GET /v1/me/wallet balance ( balance cents, balanceUsd ), top-up limits, recent ledger rows and top-ups POST /v1/me/wallet/estimate {amountUsd} the expected card charge per network POST /v1/me/wallet/topups {amountUsd, network?} {topup: {id, status, amountUsd, chargedUsd, feeUsd}, checkoutUrl} GET /v1/me/wallet/topups[/{id}] the player's top-ups / one top-up (the return page polls it) POST /v1/me/wallet/topups/{id}/cancel give up on an unpaid top-up ( 409 if it is already closed) POST /v1/store/orders {appid} buy a game from the balance ( 409 insufficient_funds with missing ) Top-up statuses: pending , confirming (payment received, waiting for confirmations), paid , paid_short (the provider delivered less than it charged; the balance still gets the full amount), expired , cancelled , failed , mismatch (under review by 0x support) and resolved (settled by 0x support)."},{"u":"/monetization/developer-settlement/","t":"Developer settlement","h":"","s":"Monetization","x":"You are paid on-chain, in USDT , on the network you choose: Tron (TRC-20), Ethereum (ERC-20), Arbitrum One (ERC-20), BNB Smart Chain (BEP-20) or Polygon PoS (ERC-20). Settlement is live on 0x.limo. sale from a player's balance ──► your share (price − 10 % platform fee) └─► transferred to your account at the USDT checkout (automatic, minutes) └─► paid out on-chain to your address (automatic at your threshold; network fee deducted) └─► 0x checks the payout transaction on its chain 0x never holds a key that sends your money on-chain. The USDT checkout holds the balances and makes the payouts, and 0x then verifies every payout transaction on its chain independently."},{"u":"/monetization/developer-settlement/#setup","t":"Developer settlement","h":"Set up payouts","s":"Monetization","x":"On the submission page ( https://api.0x.limo/dev/submit ), under Payouts (USDT) : An address per network you want to be paid on. Each address must belong to a wallet you control that can receive USDT on that network. Don't use an exchange deposit address that needs a memo or tag. The Ethereum, Arbitrum, BNB Chain and Polygon address forms look the same ( 0x… ): make sure the wallet behind the address can see the network you pick. USDT sent to the wrong network can be lost for good. Mixed-case 0x… addresses must pass their EIP-55 checksum. Tron addresses start with T and are 34 characters long. Pay me on: the network your payouts go to. Pay out automatically at: a threshold in USD. When your balance at the checkout reaches it, a payout is made. 0 means no automatic payouts, and the money waits in your checkout account. Your 0x password , every time you set or change where your money goes. Changes are rate-limited and recorded. Bitcoin is a top-up network only; payouts are always in USDT. Over the API this is GET and PUT /v1/dev/payout-account ( {addresses, payout_network, auto_payout_usd, password} ). Sales made before you set an address are held , not lost. They are transferred aut"},{"u":"/monetization/developer-settlement/#fees","t":"Developer settlement","h":"Fees","s":"Monetization","x":"Platform fee: 10 % of each sale. The fee is rounded half up, and you get the rest. Payout network fee: paid in USDT and deducted from each payout. It depends on the network: Arbitrum, Polygon and BNB Chain cost cents, while Ethereum and Tron cost more. A Tron payout to a fresh address can cost several dollars. The payouts section shows \"A payout on … now would send …\" for each network where you have an address."},{"u":"/monetization/developer-settlement/#earnings","t":"Developer settlement","h":"Your earnings","s":"Monetization","x":"GET /v1/dev/revenue (the same data as the Earnings table on the submission page) lists sales, refunds and fees per game and currency, with a settlement section: Field Meaning in_0x1.pending_cents , held_cents still at 0x: about to be transferred, or held until you set an address transferred_cents moved to your account at the checkout reversed_cents taken back for refunds owed_cents , netted_cents refunds of sales already paid out, and what later sales have covered (below) checkout.balance_units your balance at the checkout, in USDT units (6 decimals: 1 USDT = 1000000) checkout.quote what a payout now would send ( receiveUnits ) after the network fee ( gasUnits ): one quote, or one per network ( {tron: {…}, ethereum: {…}} ) payouts[] date, USDT sent, fee, address, tx_url , and the on-chain state verify_status transfers[] the last 50 transfers (sale and refund rows) with their status Payout verify_status values: verified (with confirmations / confirmations_required ), confirming , pending , failed (nothing moved), and discrepancy (under review by 0x)."},{"u":"/monetization/developer-settlement/#refunds","t":"Developer settlement","h":"Refunds after a payout","s":"Monetization","x":"When 0x support refunds a sale, your share of it moves back: not transferred yet: the transfer is canceled; still in your checkout account: it is transferred back; already paid out on-chain: whatever is still in your account is taken back, and the rest becomes a debt ( owed_cents ) that is netted against your next sales. You are never asked to send money back, and the player's refund is never held up."},{"u":"/monetization/developer-settlement/#verify","t":"Developer settlement","h":"Check a payout yourself","s":"Monetization","x":"Every payout has its transaction link ( tx_url ). On the network's explorer, the transaction's token-transfer line shows the USDT contract, the checkout's settlement wallet as the sender, your address as the recipient, and the amount, which equals the payout's sent USDT. 0x checks the same facts from the chain's own data, waits for confirmations (for example 12 on Ethereum, 15 on BNB Chain, 64 on Polygon), and checks that the address was the one on file for that network at payout time."},{"u":"/monetization/developer-settlement/#related","t":"Developer settlement","h":"Related","s":"Monetization","x":"Monetization overview — what is live. Paid games , in-game purchases , subscriptions — every one of them settles the same way."},{"u":"/x1pak/","t":"0xpak asset packs","h":"","s":"0xpak","x":"An .0xpak is one file that holds a game's assets, cooked and ready for the GPU or the player, with every original file kept by its path. Its id is its SHA-256, any part of it can be read with a range request, and one Ed25519 signature over its header and table of contents covers every blob. It travels over the 0x player swarm like any other file, with your origin as the fallback. Formerly x1pak 0xpak used to be called x1pak. Only the name changed: the format, magic bytes, signatures and hashes are the same, readers still open .x1pak files, and new packs are written as .0xpak . This page and the full reference keep their /x1pak/ addresses. The full reference lives at /sdk/x1pak/ The complete 0xpak documentation (format, signing, encryption, the x1cook CLI, readers, publishing and limits) is maintained at 0x.limo/sdk/x1pak/ . This page is a summary and a map into it."},{"u":"/x1pak/#why-use-it","t":"0xpak asset packs","h":"Why use it","s":"0xpak","x":"Cooked. Meshes are GPU vertex and index buffers, textures are WebP or PNG as delivered, and audio is Ogg. Nothing is converted at load time. Signed. One signature covers every blob's SHA-256, and a client can check it from the first few KB. Content-addressed. The pack's id is the SHA-256 of the file, and each blob is listed by its own hash. The same sources cooked twice give the same bytes. Range-readable. One range request returns the head. After that you fetch only the blobs you draw, and each is verified before it is decoded. P2P-friendly. One pack is one torrent. Thousands of loose files become a few dozen seeded packs."},{"u":"/x1pak/#what-is-live","t":"0xpak asset packs","h":"What is live","s":"0xpak","x":"piece status The web worlds (Earth, Los Santos, War) read their assets from signed packs live A hosted game's .0xpak files are seeded on the swarm like any other file live x1cook (cook, import, sign, verify, extract) source only: no public binary or npm package yet x1cook swarm (prints a pack's swarm manifest entry) in the next build Signing your packs on the server when you publish to hosting coded, off on 0x.limo Encrypted packs with owner-only keys coded, off Swarm range reads (only the torrent pieces under one blob) in development: range reads go to the origin The native runtime (sg-runtime) reading packs not yet The canonical page keeps this table current: see What is live ."},{"u":"/x1pak/#packs-on-0x-hosting","t":"0xpak asset packs","h":"Packs on 0x hosting","s":"0xpak","x":"Packs need nothing special on 0x hosting: With the default swarm policy , every file of 16 KiB or more goes on the swarm, packs included. A swarm-assets.json can narrow it, for example {\"include\": [\"packs/*.0xpak\"]} . The 64 MiB per-file limit of hosting applies, so split big content into several packs. Keep pack keys out of your build directory. @0xlimo/cli 0.1.4 leaves out only x1-iap.key . The rule that also skips *.0xpak.key (and *.x1pak.key ) is not in a released CLI yet, and the hosting service doesn't refuse .key files. Anything you upload is public on your site's origin. Paid games are built origin-only, so their packs are not seeded (see What you control )."},{"u":"/x1pak/#reference-map","t":"0xpak asset packs","h":"Reference map","s":"0xpak","x":"topic on the canonical page Quick start: pack, verify, list, publish #quick Format reference (container v1, header, TOC, blobs) #format Signatures and publisher roots #signing Encryption #encryption The x1cook CLI #x1cook Reading packs (browser and Rust) #reading P2P delivery #p2p Publishing your game's packs #publish Limits #limits Security model #security FAQ #faq"},{"u":"/steamworks/","t":"Steamworks compatibility","h":"","s":"Steamworks compatibility","x":"Games built with the Steamworks SDK can run on 0x without changing the game or its libsteam_api . 0x provides sg-steamclient , a drop-in replacement for the steamclient library that libsteam_api loads at start-up. Every Steamworks call the game makes lands in sg-steamclient, which serves it from the 0x platform (accounts, ownership, stats, achievements, leaderboards, cloud saves, Workshop, inventory, lobbies, game servers, networking) at https://api.0x.limo . Not in the 0x app download yet sg-steamclient is built and tested (see what is tested ), but the 0x app download (version 0.1.0, Linux and Windows) does not ship it yet, and the app does not yet start Steamworks games for you. This section documents how the layer works and what it supports, so you can plan a release. The step-by-step guide shows the process layout the app will set up."},{"u":"/steamworks/#how-it-works","t":"Steamworks compatibility","h":"How it works","s":"Steamworks compatibility","x":"A Steamworks game never talks to a Steam service itself. Its copy of libsteam_api : loads the client library from a fixed place: ~/.steam/sdk64/steamclient.so on Linux (a dedicated server first tries a steamclient.so next to its binary), or the steamclient64.dll the Steam client registers on Windows; asks it for ISteamClient ( CreateInterface(\"SteamClient0NN\") ); fetches every other interface through ISteamClient::GetISteamGenericInterface ; pumps callbacks through three plain C exports. sg-steamclient implements that boundary. It exports the same entry points ( CreateInterface , Steam_BGetCallback , Steam_FreeLastCallback , Steam_GetAPICallResult , Steam_IsKnownInterface , Steam_NotifyMissingInterface , Steam_ReleaseThreadLocalMemory ) and constructs 249 interface versions : the 31 current ones and 218 historical ones, so games built against SDK generations from 0.99 up to the current release find the exact versions they were compiled against. See the interface list ."},{"u":"/steamworks/#what-happens-at-steamapi_init","t":"Steamworks compatibility","h":"What happens at SteamAPI_Init","s":"Steamworks compatibility","x":"Step What sg-steamclient does Version check libsteam_api asks Steam_IsKnownInterface for every interface version the game was compiled against. Each of the 249 versions answers yes; an unknown one fails init cleanly with k_ESteamAPIInitResult_VersionMismatch , as on Steam. App ID The client must know the app ID before the game says it. sg-steamclient reads SteamAppId from the environment, then steam_appid.txt in the working directory, the same sources a developer uses. libsteam_api then reads it back with ISteamUtils::GetAppID() . Sign-in ConnectToGlobalUser loads the session: the signed-in 0x account ( /v1/me ), the app's schema and your ownership of it, your stats, and a cloud sync-down. The token comes from the 0x app (see environment ); the game never handles it. Stats ready UserStatsReceived_t is posted after the session loads, as current Steam clients do. Callbacks Callbacks and call results are queued and delivered from SteamAPI_RunCallbacks , converted to the struct layout of the SDK the game was built with. Shutdown Writes (stats, cloud saves) go through one ordered worker thread; shutdown waits up to 10 seconds so they are flushed before the process exits. Your 0x account"},{"u":"/steamworks/#app-ids","t":"Steamworks compatibility","h":"App IDs","s":"Steamworks compatibility","x":"Each game on 0x has a numeric app ID . sg-steamclient uses it for ownership, stats, cloud saves, lobbies and everything else that is per game. The process that starts your game sets SteamAppId to your 0x app ID. The environment variable wins over a steam_appid.txt you ship for local testing. SteamAPI_RestartAppIfNecessary returns false when SteamAppId or steam_appid.txt is present, so the game does not try to relaunch itself through a Steam client."},{"u":"/steamworks/#platforms","t":"Steamworks compatibility","h":"Platforms","s":"Steamworks compatibility","x":"Platform Library Status Linux x86_64 steamclient.so (64-bit) Built and tested with real games Windows games under Proton or Wine the Linux steamclient.so , reached through Proton's bridge Tested with real games Windows x86_64, native steamclient64.dll from the same source: MSVC vtable order, Windows struct packing and callback layouts Tested with one real game; newer 32-bit Windows ( steamclient.dll ), macOS — Not built"},{"u":"/steamworks/#in-this-section","t":"Steamworks compatibility","h":"In this section","s":"Steamworks compatibility","x":"Point a game at 0x : the process layout, environment, game servers. Supported interfaces : every interface and version, and which are inert by design. Features : what each Steamworks feature does on 0x. Limitations : what is not covered, and the test evidence."},{"u":"/steamworks/point-a-game/","t":"Point a Steamworks game at 0x","h":"","s":"Steamworks compatibility","x":"Nothing in the game changes. The game keeps the libsteam_api it ships with. What changes is the client library that library loads, and the environment the game starts in. The 0x app will do this for you The 0x app (0.1.0) does not start Steamworks games yet and does not ship sg-steamclient. The layout below is what the app sets up for each game process; it is also how 0x's own real-game tests run."},{"u":"/steamworks/point-a-game/#1-give-the-game-an-app-id","t":"Point a Steamworks game at 0x","h":"1. Give the game an app ID","s":"Steamworks compatibility","x":"Your game needs a 0x app ID: the number of its store listing (see Getting started ). Ownership, stats, achievements, leaderboards, cloud saves, Workshop items and lobbies are all keyed by it."},{"u":"/steamworks/point-a-game/#2-publish-the-build","t":"Point a Steamworks game at 0x","h":"2. Publish the build","s":"Steamworks compatibility","x":"Native builds are published with sg-content , which ships next to the 0x app in both downloads ( sg-content on Linux, sg-content.exe on Windows). Signed in as a publisher of the app (it signs in like a game: SG_BACKEND , plus SG_TOKEN or SG_TOKEN_FILE ), run: sg-content publish <appid> ./build --branch public --description \"1.0.3\" Flag Effect --branch NAME The branch the build is published to (default public ; other names are betas). --description TEXT The build's description, shown in branch lists. --encrypt Encrypt every file per piece; only owners of the app receive the keys. --sign-key key.json Sign a build statement with a publisher key (see 0xpak and signing ). --statement-expires sets its expiry (Unix seconds, default one year). --launch path[,path...] Files marked as launch files: installers fetch them first, head first, so the game can start before the rest arrives. A build is a manifest of files, each stored once by content ID (the SHA-256 of what is stored). Unchanged files keep their IDs from build to build, so an update downloads only what changed, and players fetch the bytes from each other through the player swarm . Large files are published in parts (64 MiB each by "},{"u":"/steamworks/point-a-game/#layout","t":"Point a Steamworks game at 0x","h":"3. The process layout","s":"Steamworks compatibility","x":"On Linux, libsteam_api loads $HOME/.steam/sdk64/steamclient.so and checks that a Steam client is running by reading $HOME/.steam/steam.pid . So the game process gets: ~/.steam/sdk64/steamclient.so : sg-steamclient; ~/.steam/steam.pid : the PID of a live process (the 0x app); the environment below. The intended layout gives each game this view without touching the player's real home directory or a Steam install on the same machine: sg-steamclient is bind-mounted over that path for the game process only (as container runtimes for games do), so saves under $HOME stay where they always were. A manual test can use a separate HOME instead: mkdir -p \"$PWD/home/.steam/sdk64\" cp libsteamclient.so \"$PWD/home/.steam/sdk64/steamclient.so\" sleep infinity & echo $! > \"$PWD/home/.steam/steam.pid\" # stands in for the running client HOME=\"$PWD/home\" SteamAppId=<appid> SG_BACKEND=https://api.0x.limo \\ SG_TOKEN_FILE=~/.config/0x/session/tokens.json ./MyGame Games write their saves under $HOME , so with a separate HOME those saves land in the test home: this is for testing, not for players."},{"u":"/steamworks/point-a-game/#environment","t":"Point a Steamworks game at 0x","h":"4. Environment","s":"Steamworks compatibility","x":"Variable Meaning SteamAppId The 0x app ID. Read before steam_appid.txt . SG_BACKEND The platform API. https://api.0x.limo for 0x. SG_TOKEN_FILE The signed-in account's token file, shared with the 0x app. sg-steamclient refreshes the access token on a 401 and writes the rotated pair back, holding <file>.lock while it does, so the app and the game never spend the same refresh token. SG_TOKEN / SG_REFRESH_TOKEN Tokens passed directly instead of a file (tests). SG_DATA_DIR Where the offline cache and pending writes are kept. Default $XDG_DATA_HOME/0x1 ( ~/.local/share/0x1 ). SG_OFFLINE Set: skip the network and use only the local cache. SG_OFFLINE_DAYS How long a cached ownership is honoured offline (default 30). SG_LAUNCH_COMMAND_LINE What ISteamApps::GetLaunchCommandLine returns (join links, +connect ). SG_LAUNCH_<key> What ISteamApps::GetLaunchQueryParam(key) returns. SG_INSTALL_DIR What GetAppInstallDir reports (default: the working directory). The game never sees your password, and never needs one: it runs as whoever is signed in to the 0x app."},{"u":"/steamworks/point-a-game/#windows","t":"Point a Steamworks game at 0x","h":"5. Windows games","s":"Steamworks compatibility","x":"Under Proton or Wine. A Windows build's steam_api64.dll loads the steamclient64.dll registered for the running client. Proton redirects it to its lsteamclient bridge, which calls the Linux ~/.steam/sdk64/steamclient.so . Put sg-steamclient there and the Windows build runs against 0x like a Linux one; set SteamAppId and SteamGameId in the environment. Natively. The same source builds as a PE steamclient64.dll with the Microsoft C++ ABI (vtable order, hidden struct-return pointers, Windows struct packing). The Windows steam_api64.dll loads it from the path the client registers under HKCU\\Software\\Valve\\Steam\\ActiveProcess\\SteamClientDll64 . Native Windows support is new: see limitations ."},{"u":"/steamworks/point-a-game/#servers","t":"Point a Steamworks game at 0x","h":"6. Dedicated and listen servers","s":"Steamworks compatibility","x":"A server built with SteamGameServer_Init works unchanged: libsteam_api first looks for a steamclient.so next to the server binary , so a dedicated server can carry sg-steamclient in its own directory, with no ~/.steam at all. Point it at 0x with SG_BACKEND and SteamAppId . LogOnAnonymous() gives the server an anonymous game-server ID. LogOn(token) with a registered game-server token gives it a persistent ID; 0x has no self-serve page for those tokens yet, so use anonymous logon. The server sends a heartbeat every 30 seconds and on every state change, and stays in the server browser while it is fresh (90 seconds after the last heartbeat). A server bound to INADDR_ANY is listed at the address 0x sees, which GetPublicIP returns. BeginAuthSession verifies a player's ticket with 0x (one-shot: a ticket cannot be replayed), and falls back to a local signature check against GET /v1/keys if 0x is unreachable. UserHasLicenseForApp , BUpdateUserData , ISteamGameServerStats and the server browser filters ( map , gamedir , gametagsand , gametagsnor , notfull , hasplayers , noplayers , dedicated , secure , password , name_match ) work as on Steam. A process can host a client and a server at once"},{"u":"/steamworks/point-a-game/#7-check-it-worked","t":"Point a Steamworks game at 0x","h":"7. Check it worked","s":"Steamworks compatibility","x":"SteamAPI_Init returns true, and ISteamUser::GetSteamID is your 0x account. ISteamApps::BIsSubscribedApp(<appid>) is true for an account that owns the game. Set a stat or unlock an achievement, call StoreStats , and see it on the game's store page ( GET /v1/apps/{appid}/achievements ). Two diagnostic variables make sg-steamclient log what the game does: SG_TRACE_CALLS=1 (every interface call) and SG_TRACE_CALLBACKS=1 (every callback delivered)."},{"u":"/steamworks/interfaces/","t":"Supported interfaces","h":"","s":"Steamworks compatibility","x":"sg-steamclient constructs 249 interface versions across 46 interfaces: the 31 versions in the current SDK headers and 218 historical versions, so a game finds the exact version strings it was compiled against. No slot is an unimplemented stub: Binding kind Slots Implementation 6,981 Version adapter (an old signature mapped onto today's implementation) 418 Zero stub 0 Status column Implemented : every slot has real behaviour backed by 0x. Implemented (some slots inert) : the interface works; a few slots drive a Steam-only feature (a client UI, a Steam-only service) and are inert by design, see below. Inert by design : the whole interface drives something 0x does not have (a music player, an embedded browser, broadcasting, Remote Play). Every slot returns exactly what Steam returns when that feature is unavailable, so games take their \"not available\" path. Inert values are not guesses: each one is asserted by a test against the value Steam returns in the equivalent state. Interface versions are not behaviour guarantees A version being present means a game built against it initialises and every call lands in an implementation or an adapter. It does not prove every argument combination"},{"u":"/steamworks/interfaces/#interfaces-and-versions","t":"Supported interfaces","h":"Interfaces and versions","s":"Steamworks compatibility","x":"Interface Status Versions Version strings (oldest first) ISteamAppDisableUpdate Inert by design 1 SteamAppDisableUpdate001 ISteamAppList Inert by design 1 STEAMAPPLIST_INTERFACE_VERSION001 ISteamAppTicket Implemented 1 STEAMAPPTICKET_INTERFACE_VERSION001 ISteamApps Implemented 10 STEAMAPPS_INTERFACE_VERSION001 , SteamApps001 , STEAMAPPS_INTERFACE_VERSION002 , STEAMAPPS_INTERFACE_VERSION003 , STEAMAPPS_INTERFACE_VERSION004 , STEAMAPPS_INTERFACE_VERSION005 , STEAMAPPS_INTERFACE_VERSION006 , STEAMAPPS_INTERFACE_VERSION007 , STEAMAPPS_INTERFACE_VERSION008 , STEAMAPPS_INTERFACE_VERSION009 ISteamBilling Inert by design 1 SteamBilling002 ISteamChat Inert by design 1 STEAMCHAT_INTERFACE_VERSION003 ISteamClient Implemented (some slots inert) 18 SteamClient006 , SteamClient007 , SteamClient008 , SteamClient009 , SteamClient010 , SteamClient011 , SteamClient012 , SteamClient013 , SteamClient014 , SteamClient015 , SteamClient016 , SteamClient017 , SteamClient018 , SteamClient019 , SteamClient020 , SteamClient021 , SteamClient022 , SteamClient023 ISteamController Implemented (some slots inert) 7 STEAMCONTROLLER_INTERFACE_VERSION , SteamController003 , SteamController004 , SteamController005 , S"},{"u":"/steamworks/interfaces/#inert","t":"Supported interfaces","h":"Inert slots in implemented interfaces","s":"Steamworks compatibility","x":"These are the slots of otherwise working interfaces that do nothing on 0x, with what they return: Slot Returns Why ISteamFriends clan chat window calls, GetNumChatsWithUnreadPriorityMessages , RegisterProtocolInOverlayBrowser false / 0 0x has no in-client chat window and no overlay browser ISteamFriends::SetInGameVoiceSpeaking (nothing) Steam's friends-list speaking indicator ISteamFriends equipped profile items ( RequestEquippedProfileItems , BHasEquippedProfileItem , GetProfileItemProperty* ) OK, no items 0x profiles have no animated avatars, frames or backgrounds ISteamRemoteStorage::GetLocalFileChangeCount , GetLocalFileChange 0 / none 0x syncs cloud files before the game starts, never during play ISteamUGC::GetUserContentDescriptorPreferences 0 no community content filter: the user excludes nothing ISteamUser::GetGameBadgeLevel , phone and two-factor queries, GetMarketEligibility 0 / false / not allowed no badges, no phone verification, no market ISteamUser::TrackAppUsageEvent (nothing) obsolete usage tracking ISteamTimeline::DoesEventRecordingExist , recording fields of DoesGamePhaseRecordingExist no recording 0x records no game video (timeline entries and screenshots are kep"},{"u":"/steamworks/interfaces/#adapters","t":"Supported interfaces","h":"How old versions are served","s":"Steamworks compatibility","x":"An old interface version shares today's implementation slot by slot when the method's ABI shape is the same. When an old signature differs, the slot is routed through an adapter that converts it to today's call. Callbacks are converted into the struct layout of the SDK the game was built with, and into the Windows layout in the Windows build."},{"u":"/steamworks/features/","t":"Steamworks features on 0x","h":"","s":"Steamworks compatibility","x":"Each Steamworks feature below is served by sg-steamclient and the 0x platform API. The game calls the same functions as on Steam and gets the same callbacks. What is behind each call is 0x's: the REST API documents the service side."},{"u":"/steamworks/features/#accounts-ownership-and-dlc","t":"Steamworks features on 0x","h":"Accounts, ownership and DLC","s":"Steamworks compatibility","x":"Steamworks On 0x ISteamUser::GetSteamID , ISteamFriends::GetPersonaName The signed-in 0x account as a 64-bit SteamID, and its display name. ISteamApps::BIsSubscribed , BIsSubscribedApp , BIsDlcInstalled , DLC lists Ownership comes from the account's entitlements on 0x. Betas ( GetCurrentBetaName , branches) Branches you publish with sg-content publish --branch . Players pick a branch in their library, and private branches can have a password. GetLaunchCommandLine , GetLaunchQueryParam What the 0x app passes in (join links, +connect ). Auth tickets ( GetAuthSessionTicket , GetAuthTicketForWebApi , BeginAuthSession ) Ed25519-signed by 0x, valid for 1 hour, issued only for owned apps. Online verification is one-shot, so a ticket cannot be replayed. Servers can also verify offline with the keys at GET /v1/keys . Encrypted app tickets Issued by 0x with up to 128 bytes of your data; your server decrypts them through the API with its game-server session. Offline Each online session caches identity, schema, ownership and stats. An offline start uses them, and ownership is honoured for 30 days. Stats and cloud writes that failed offline are replayed before the next online session."},{"u":"/steamworks/features/#stats-achievements-and-leaderboards","t":"Steamworks features on 0x","h":"Stats, achievements and leaderboards","s":"Steamworks compatibility","x":"Stats (int, float, average-rate) and achievements, with the app's schema rules enforced on the service side (min, max, increment-only). UserStatsReceived_t arrives after sign-in. StoreStats is written by an ordered worker and flushed at shutdown. Global achievement percentages and global stats ( RequestGlobalAchievementPercentages , RequestGlobalStats with daily history). Leaderboards: find or create, upload with details, download global, around-user and friends ranges, and attach a file to an entry ( AttachLeaderboardUGC ). Achievements and leaderboards also appear on the game's store page."},{"u":"/steamworks/features/#steam-cloud-isteamremotestorage","t":"Steamworks features on 0x","h":"Steam Cloud ( ISteamRemoteStorage )","s":"Steamworks compatibility","x":"Files are kept per user and app, mirrored to 0x. 0x syncs them down before the game starts and up as the game writes them. Uploads are hash-checked, and file bytes go through pre-signed URLs, never through the API itself. Shared files (UGC handles) are supported, up to 200 MB each."},{"u":"/steamworks/features/#workshop-isteamugc","t":"Steamworks features on 0x","h":"Workshop ( ISteamUGC )","s":"Steamworks compatibility","x":"Publishing : CreateItem , StartItemUpdate , the SetItem* calls, then SubmitItemUpdate . GetItemUpdateProgress reports each stage and the bytes sent. Queries : all items, user lists and details; tags (required, excluded, grouped), text search, key-value tags, created and updated ranges; the usual rankings, in pages of 50. Visibility : public items are listed. Unlisted items are found by ID only. Friends-only and private items are visible to their owner. Subscriptions : SubscribeItem downloads and installs the item, as the Steam client does. Votes, favourites, played and completed actions work too."},{"u":"/steamworks/features/#inventory-isteaminventory","t":"Steamworks features on 0x","h":"Inventory ( ISteamInventory )","s":"Steamworks compatibility","x":"Items, item definitions, promo items, exchanges (crafting), playtime drops ( TriggerItemDrop , using 0x's play time), trades, and purchases. Every result is signed by 0x: serialized results can be verified by a server with the keys at GET /v1/keys ."},{"u":"/steamworks/features/#friends-presence-and-parties","t":"Steamworks features on 0x","h":"Friends, presence and parties","s":"Steamworks compatibility","x":"The friends list, friend groups, nicknames, players played with, clans and clan chat, friend messages, follows and game invites, all backed by 0x's social graph and kept current by push events. Rich presence: keys you set appear to friends. Join requests ( GameRichPresenceJoinRequested_t ) work. ISteamParties : party beacons in the player's clans."},{"u":"/steamworks/features/#lobbies-and-matchmaking-isteammatchmaking","t":"Steamworks features on 0x","h":"Lobbies and matchmaking ( ISteamMatchmaking )","s":"Steamworks compatibility","x":"Create, search (string, numerical, near, slots, count and compatibility filters), join, leave, owner data and member data, chat, invites, owner changes, linked lobbies, and the lobby's game server. Every change is pushed to the members, and the usual Lobby* callbacks fire. Lobbies are ephemeral, as on Steam. See also matchmaking on 0x ."},{"u":"/steamworks/features/#server-browser-and-game-servers","t":"Steamworks features on 0x","h":"Server browser and game servers","s":"Steamworks compatibility","x":"ISteamGameServer , ISteamGameServerStats and ISteamMatchmakingServers work: logon (anonymous, or with a registered token), heartbeats with rules and player lists, the internet and LAN lists with Steam's master-server filters, PingServer , ServerRules , PlayerDetails , player authentication and licence checks. Details: game servers ."},{"u":"/steamworks/features/#networking","t":"Steamworks features on 0x","h":"Networking","s":"Steamworks compatibility","x":"API Transport on 0x ISteamNetworkingSockets P2P, ISteamNetworkingMessages , ISteamNetworking (legacy P2P) Peers are addressed by SteamID. Traffic goes over QUIC: a direct connection through NATs, or a 0x relay, or the 0x push stream when QUIC is not available. Unreliable sends are really unreliable on QUIC (datagrams). Reliable ones are ordered per lane. ISteamNetworkingSockets IP ( CreateListenSocketIP , ConnectByIPAddress ) TCP between two sg-steamclient ends, for dedicated servers. Every send is delivered reliably. Hosted servers and relay tickets ( ReceivedRelayAuthTicket , GetHostedDedicatedServer* , game-coordinator logins, certificates) 0x signs the relay tickets and certificates. A publisher of the app issues them through the API. FakeIP ( BeginAsyncRequestFakeIP , CreateFakeUDPPort , ConnectByIPAddress to a FakeIP) 0x hands out global FakeIPs in 169.254.128.0/17 (unique per app, up to four ports). Traffic is carried over the P2P transport. Custom signaling ( ConnectP2PCustomSignaling ) Works between processes. ISteamNetworkingUtils Relay network status, ping locations, config values, and the debug output hook. FakePacketLoss_Send and FakePacketLag_Send apply to unreliable "},{"u":"/steamworks/features/#other-interfaces","t":"Steamworks features on 0x","h":"Other interfaces","s":"Steamworks compatibility","x":"Interface On 0x ISteamHTTP The game's own HTTP client, with streamed responses. Requests to Steam's own hosts fail like a network failure. ISteamScreenshots WriteScreenshot and AddScreenshotToLibrary save the image (with a thumbnail) and upload it to the player's library. HookScreenshots works. ISteamInput , ISteamController Action manifests and controller configurations in the Steam input format, read from evdev devices on Linux, with action origins and glyph names. ISteamUser voice Capture at 16 kHz mono, compressed and decompressed as on Steam, with speech detection. ISteamTimeline Timeline events and game phases are stored per play session. No video is recorded. ISteamUtils App ID, server time, IP country, images (avatars, achievement icons), text filtering, gamepad text input, Steam Deck detection. Overlay ( ActivateGameOverlay* ) Requests (store page, user profile, web page, invite dialog) are handed to the host app, and the game gets GameOverlayActivated_t open, then closed when the app is done. sg-steamclient never draws UI itself. The 0x app does not draw an overlay yet, so today the game sees the overlay open and close at once."},{"u":"/steamworks/limitations/#not-covered-yet","t":"Limitations and test evidence","h":"Not covered yet","s":"Steamworks compatibility","x":"Area Status Distribution sg-steamclient is not in the 0x app download (0.1.0) yet, and the app does not start Steamworks games. Self-serve app setup An app's stats and achievements schema, inventory item definitions and registered game-server tokens are set up by 0x with the app. There is no self-serve editor for them yet. Use LogOnAnonymous for servers. macOS No macOS build. 32-bit Windows No steamclient.dll . 64-bit only. Windows See Windows below. Steam-signed data Relay tickets, certificates and auth tickets are signed by 0x, not by Steam. A game or server that checks Steam's own signatures itself will reject them. Steam-only services Remote Play, broadcasting and video, the music player, the embedded HTML browser, the game coordinator, parental settings, and game search have no 0x counterpart. They are inert by design : they report \"unavailable\" exactly as Steam does in that state. Unreliable sends on fallback paths Over the IP (TCP) sockets and the push-stream fallback, every message is delivered reliably and in order. That is within the API contract, but it can add latency under packet loss. Overlay The 0x app does not draw an in-game overlay yet. Video No game video is reco"},{"u":"/steamworks/limitations/#windows","t":"Limitations and test evidence","h":"Windows","s":"Steamworks compatibility","x":"The native steamclient64.dll is new and exercised by one real game so far. Structs that methods fill through a pointer are converted to the Windows layout where it differs. One gap remains: games built with Windows SDKs older than 1.64 receive callbacks in the 1.64 Windows layout, so a few callback fields may read wrongly in those games. Windows games under Proton or Wine use the Linux library through Proton's bridge and do not have this gap."},{"u":"/steamworks/limitations/#evidence","t":"Limitations and test evidence","h":"Evidence","s":"Steamworks compatibility","x":"Suites. C++ test programs built against the public Steamworks SDK headers drive sg-steamclient against a fresh 0x backend, usually as two users, and most run once per SDK generation. They cover friends and presence, user, utilities, apps and DLC, cloud, Workshop, stats, achievements and leaderboards (46 checks per SDK generation), timeline, parties, input, both networking APIs (165 checks per SDK generation for ISteamNetworkingSockets ), game servers and the server browser. A legacy-ABI suite calls through 12 historical SDK header generations (0.99u to 1.49) and asserts every inert-by-design value (576 checks). Real games. Each of these runs unmodified, with its own libsteam_api , on a fresh sg-steamclient and backend: Game Engine Path Exercised DDNet C++ Linux, SDK 0.10-era library init, launch command line, rich presence, join requests, two clients on a server Mindustry Java (steamworks4j) Linux stats, achievements, lobby create, search and join, P2P world download and chat over the relay Skillet demo Godot 4 (GodotSteam) Linux, SDK 1.65 stats, an achievement, leaderboard upload with an attached replay, and a second player downloading it Pixelorama Godot 4 (GodotSteam) Linux; Win"},{"u":"/native/","t":"Native runtime","h":"","s":"Native runtime","x":"The 0x native runtime, sg-runtime , runs games that are delivered over HTTP like web games but execute natively: the game is a WebAssembly module (a guest ) running in a wasmtime sandbox, and it draws with wgpu on the player's GPU. The runtime exposes features stock browser WebGPU does not have: hardware ray queries and mesh shaders. Preview The runtime is not in the 0x app download yet, and it is not a public production release: an external security audit and production signing roots are still to come. The SDK crates ( sg-guest , sg-abi ) are not published on a package registry yet. This section documents the API as it stands so you can plan a port, and it will grow into the release documentation."},{"u":"/native/#the-pieces","t":"Native runtime","h":"The pieces","s":"Native runtime","x":"Piece What it is sg-runtime The host. It fetches the game's manifest, pulls the module and assets through a content-addressed cache, shows the player what the game asks for, and runs the module with only the sg host API available. sg-guest The Rust guest SDK. A wgpu custom backend (so ordinary wgpu code runs unchanged on the host GPU), safe wrappers for the rest of the sg API (clock, input, HTTP fetch, TCP, key/value storage, audio, workers, WebRTC data channels, display), and log integration. sg-abi The ABI shared by host and guest: the GPU wire format, input event records and key codes, display and HDR constants. sg_platform_v1 An optional second import module with 0x platform services (identity, ownership, stats, achievements, leaderboards, cloud saves, lobbies, P2P, trusted UI), the same services Steamworks games get. See permissions ."},{"u":"/native/#a-games-shape","t":"Native runtime","h":"A game's shape","s":"Native runtime","x":"A game is a cdylib built for wasm32-unknown-unknown . It exports sg_init() -> i32 (0 for success) and sg_frame(t: f64, dt: f64) . Worker instances of the same module export sg_worker_init() -> i32 and sg_worker_tick(t: f64) -> i32 . It imports only from module sg (and sg_platform_v1 if it asked for platform services). A module that imports anything else, WASI included, is rejected before it starts. It is described by a manifest.json : the entry module and assets, each named by SHA-256, and the permissions it requests."},{"u":"/native/#sandbox-guarantees","t":"Native runtime","h":"Sandbox guarantees","s":"Native runtime","x":"Hostile behaviour What the runtime does Imports outside sg (and sg_platform_v1 when granted), WASI included Rejected before instantiation. Pointers outside guest memory The call traps with the bad pointer and length. Forged GPU handles The call traps (\"invalid handle\"). Endless loops sg_init gets 10 s of guest time and each sg_frame 4 s; past that the guest is interrupted. Memory bombs Linear memory is capped (512 MiB by default, up to 4096 MiB if the manifest asks and the player grants it); memory.grow past the cap fails. Invalid shaders and descriptors A validation error goes to the game's wgpu error scopes, as in WebGPU, and the game keeps running. Out-of-range audio values (NaN, infinities) Clamped; a forged voice returns 0. Undeclared network destinations or platform domains Denied: the call traps."},{"u":"/native/#in-this-section","t":"Native runtime","h":"In this section","s":"Native runtime","x":"Quickstart : a minimal guest in Rust, built, packaged and run. Permissions and grants : the manifest, what a game may ask for, and what the player approves. Swarm assets : how a native game's files come from the player swarm. Graphics : wgpu backends, GPU limits, ray queries and mesh shaders, HDR and presentation. The sg ABI : every host function, conventions, and versioning. Rust API reference : the generated rustdoc for sg-guest and sg-abi ."},{"u":"/native/quickstart/","t":"Native quickstart","h":"","s":"Native runtime","x":"This builds a minimal native game: a window cleared to a slowly changing colour, using ordinary wgpu code through sg-guest . The code on this page compiles as shown against sg-guest 0.1.0 and wgpu 30.0.1, and runs in sg-runtime as described in step 6. Preview sg-guest is not on a package registry yet and the runtime is not in the 0x app download. The steps are the ones the 0x test games use; see the overview ."},{"u":"/native/quickstart/#1-toolchain","t":"Native quickstart","h":"1. Toolchain","s":"Native runtime","x":"Rust 1.96 or newer with the WebAssembly target: rustup toolchain install 1.96.0 rustup target add wasm32-unknown-unknown --toolchain 1.96.0"},{"u":"/native/quickstart/#2-cargotoml","t":"Native quickstart","h":"2. Cargo.toml","s":"Native runtime","x":"The game is a cdylib . wgpu is used without default features, with custom (the sg backend) and wgsl : [package] name = \"hello-sg\" version = \"0.1.0\" edition = \"2021\" [lib] crate-type = [\"cdylib\"] [dependencies] sg-guest = { path = \"../sg-guest\" } # until the crate is published wgpu = { version = \"30.0.1\", default-features = false, features = [\"custom\", \"wgsl\", \"std\"] } log = \"0.4\" [profile.release] opt-level = 3 lto = true panic = \"abort\""},{"u":"/native/quickstart/#3-srclibrs","t":"Native quickstart","h":"3. src/lib.rs","s":"Native runtime","x":"A game exports sg_init (return 0 on success) and sg_frame(t, dt) . sg_guest::gpu::instance() returns a normal wgpu::Instance whose calls go to the host GPU, so everything after it is plain wgpu. use sg_guest::abi::input::{self, kind}; use std::cell::RefCell; struct Game { device: wgpu::Device, queue: wgpu::Queue, surface: wgpu::Surface<'static>, config: wgpu::SurfaceConfiguration, hue: f64, } thread_local!(static GAME: RefCell<Option<Game>> = const { RefCell::new(None) }); fn init() -> Result<Game, String> { let instance = sg_guest::gpu::instance(); let surface = sg_guest::gpu::surface(&instance); // Futures from the sg backend are already resolved: block_on returns at once. let adapter = sg_guest::gpu::block_on(instance.request_adapter(&Default::default())).map_err(|e| e.to_string())?; let (device, queue) = sg_guest::gpu::block_on(adapter.request_device(&Default::default())).map_err(|e| e.to_string())?; let (width, height) = sg_guest::surface_size(); let caps = surface.get_capabilities(&adapter); let format = caps.formats.iter().copied().find(|f| f.is_srgb()).unwrap_or(caps.formats[0]); let config = wgpu::SurfaceConfiguration { usage: wgpu::TextureUsages::RENDER_ATTACHMENT, format"},{"u":"/native/quickstart/#4-build","t":"Native quickstart","h":"4. Build","s":"Native runtime","x":"cargo +1.96.0 build --release --target wasm32-unknown-unknown # -> target/wasm32-unknown-unknown/release/hello_sg.wasm"},{"u":"/native/quickstart/#5-the-manifest","t":"Native quickstart","h":"5. The manifest","s":"Native runtime","x":"Every file is named by its SHA-256 and size, so the runtime can cache and verify it. A minimal manifest.json next to the module: { \"name\": \"Hello 0x\", \"entry\": {\"name\": \"main\", \"path\": \"hello_sg.wasm\", \"sha256\": \"<hex sha256 of the file>\", \"size\": 484512}, \"assets\": [], \"permissions\": {} } This script writes it: f=hello_sg.wasm printf '{\"name\":\"Hello 0x\",\"entry\":{\"name\":\"main\",\"path\":\"%s\",\"sha256\":\"%s\",\"size\":%d},\"assets\":[],\"permissions\":{}}\\n' \\ \"$f\" \"$(sha256sum \"$f\" | cut -d' ' -f1)\" \"$(stat -c %s \"$f\")\" > manifest.json The game above asks for nothing. Network access, storage, workers, audio, WebRTC, more memory, experimental GPU features and platform services are all requested in permissions : see Permissions and grants ."},{"u":"/native/quickstart/#6-run","t":"Native quickstart","h":"6. Run","s":"Native runtime","x":"Serve the directory over HTTP and point the runtime at the manifest URL: python3 -m http.server 8000 & sg-runtime http://127.0.0.1:8000/manifest.json --size 1280x720 Flag Effect --size WxH Window size. --vsync / --no-vsync , --present-mode , --latency 1-3 , --fps-cap N Presentation; the player's choice always wins over the game's (see Graphics ). --grants FILE The player's approval of the game's permissions (the 0x app writes it). --trust-manifest Local development: grant whatever the manifest asks for. --frames N , --screenshot PATH Run N frames, save the last one as a PNG, exit (tests). --cache DIR , --data DIR The content-addressed asset cache and the per-game storage directory. --display-info Print what the GPU and display offer, and exit. Launched this way, without --grants , the game runs under the default policy, and the log says so: grants: default policy (no --grants): no network, platform services or experimental GPU features . The manifest URL's query string is passed to the game as its launch arguments ( sg_guest::args() , sg_guest::arg(\"name\") )."},{"u":"/native/permissions-and-grants/","t":"Permissions and grants","h":"","s":"Native runtime","x":"A native game's manifest.json only requests capabilities. What the game actually gets is the intersection of that request and what the player approved . Anything not granted is denied and listed in the runtime's log at launch; a call that needs it fails (most trap, for example a TCP connect to an undeclared destination)."},{"u":"/native/permissions-and-grants/#manifest","t":"Permissions and grants","h":"The manifest","s":"Native runtime","x":"{ \"name\": \"My Game\", \"entry\": {\"name\": \"main\", \"path\": \"game.wasm\", \"sha256\": \"…\", \"size\": 1234567}, \"assets\": [ {\"name\": \"level1.bin\", \"path\": \"data/level1.bin\", \"sha256\": \"…\", \"size\": 40960} ], \"permissions\": { \"fetch\": [{\"prefix\": \"https://mygame-play.0x.limo/sites/mygame/3/\"}], \"tcp\": [\"game.example.com:7777\"], \"storage_mb\": 32, \"workers\": 2, \"audio\": true, \"rtc\": true, \"memory_mb\": 1024, \"gpu_experimental\": false, \"platform\": {\"appid\": 1234, \"domains\": [\"user\", \"entitlements\", \"stats\", \"cloud\"]} }, \"display\": {\"present_mode\": \"fifo\", \"frame_latency\": 1, \"fps_cap\": 0, \"fullscreen\": \"borderless\"} } Field Meaning name The game's display name. entry The module: name , path relative to the manifest URL, sha256 (hex), size in bytes. assets Files the runtime downloads before sg_init and the game reads with sg_guest::asset(name) . Each is verified against its SHA-256 and kept in a content-addressed cache, shared across games and versions. permissions What the game asks for (below). Unknown fields are rejected. display Presentation defaults (see Graphics ). Bad values refuse the launch."},{"u":"/native/permissions-and-grants/#permissions","t":"Permissions and grants","h":"Permissions","s":"Native runtime","x":"Permission Type What it allows fetch list of {prefix, tls?} HTTP(S) requests ( sg_guest::Fetch ) to URLs under each prefix. A prefix must end with / . tls is \"system\" (default, normal certificate checks) or \"insecure-lan\" (no certificate check, allowed only when every address the host resolves to is private or loopback, for self-signed LAN servers). tcp list of \"host:port\" Non-blocking TCP streams ( sg_guest::TcpStream ) to exactly those destinations. storage_mb integer Persistent per-game key/value storage ( sg_guest::kv ) up to this many MiB. 0 means no storage. workers integer How many worker instances the game may run ( sg_guest::worker ). audio bool Sound playback ( sg_guest::audio ). rtc bool WebRTC data channels to other players, browsers included ( sg_guest::rtc ). The game carries the SDP itself. memory_mb integer Linear memory per instance in MiB. Default 512, at most 4096. gpu_experimental bool Hardware ray queries and mesh shaders. platform {appid, domains} 0x platform services for app appid , in the listed domains (below). A game that asks for nothing still runs. Without the player's approval (a direct launch with no grant), the runtime applies a default policy: 64 MiB"},{"u":"/native/permissions-and-grants/#platform","t":"Permissions and grants","h":"Platform services","s":"Native runtime","x":"platform gives the game the sg_platform_v1 import module, the native equivalent of the Steamworks APIs, served by the same core as Steamworks compatibility . It has 55 functions, 11 records and 17 events in 9 domains. Async calls return a request ID, and every completion arrives through one queue ( event_next ). Records and events are CBOR maps, so there is no struct packing to get wrong. Bindings exist for Rust ( sg-platform-guest ), C ( sg_platform.h ) and a source-compatible subset of the Steamworks C++ headers, so C++ Steamworks code can be recompiled to WebAssembly. Domain Covers events The event queue (always included with any platform grant). user The signed-in account (ID, name, country, language, online) and auth tickets for your servers. entitlements Ownership of the app and its DLC, build ID, languages. stats Stats (int, float, average rate), achievements and progress, other users' stats. leaderboards Find or create, upload with details, download ranges. cloud Cloud saves (per user, synced; separate from storage_mb , which is per install). lobbies Create, filtered search, join, leave, data, member data, chat, invites, owner and joinable. net Messages to other players by "},{"u":"/native/permissions-and-grants/#approval","t":"Permissions and grants","h":"How approval works","s":"Native runtime","x":"The 0x app reads the manifest and shows the player what the game asks for. The player approves (in the app, or 0x approve <game> --yes on the command line). The approval is stored for that game, bound to its manifest source and app ID. Each launch passes the approval to the runtime as --grants FILE , bound to that launch's manifest URL. The runtime grants the intersection. Anything the manifest asks for beyond the approval is denied and logged, and the game keeps running without it. If a new version of the game asks for more, the player is asked again. During development, sg-runtime --trust-manifest (or SG_TRUST_MANIFEST=1 ) grants the manifest as written. The player's own P2P setting applies on top of rtc : direct links on, relay-only (addresses kept private), or off."},{"u":"/native/swarm-assets/","t":"Swarm assets for native games","h":"","s":"Native runtime","x":"A native game gets its files in two ways. Both are verified by hash before the game sees a byte."},{"u":"/native/swarm-assets/#manifest-assets","t":"Swarm assets for native games","h":"1. Manifest assets","s":"Native runtime","x":"Files listed in the manifest's assets (and the entry module) are downloaded before sg_init and read with: let level = sg_guest::asset(\"level1.bin\").expect(\"listed in the manifest\"); Each file is named by its SHA-256 and stored on disk as <cache>/sha256/<hex> . A cached file is used only after its hash is checked again, identical files are shared across games and versions, and an update downloads only the files whose hash changed."},{"u":"/native/swarm-assets/#swarm","t":"Swarm assets for native games","h":"2. Site files through the player swarm","s":"Native runtime","x":"A game that loads files at run time from its web site (with a fetch permission for the site's URL prefix) can have those files delivered by other players instead of the site. This is the same swarm that serves the site to browser players : The site publishes swarm/manifest.json at the root of the fetch prefix, in the meshtorrent asset-manifest format: {\"version\": 1, \"entries\": {\"/path\": {\"tileId\": \"<sha256>\", \"infoHash\": \"<40 hex>\", \"size\": N}}} . The 0x hosting pipeline writes it for you from the site's swarm-assets policy . When the game does a GET (without a Range header) for a listed path, the runtime asks the swarm first: this machine's store, then the WebTorrent swarm the site's browser players share, then the native swarm with the site's content store as the web seed. The bytes must match the entry's size and SHA-256. Then the game gets them, and the runtime seeds them to both swarms. Anything else is the game's ordinary request to the site: a path that is not listed, a site without a manifest, the swarm not ready within 3 seconds, a timeout, or a hash mismatch. The game behaves exactly as without the swarm. Your code does not change: it is an ordinary sg_guest::Fetch::get ."},{"u":"/native/graphics/","t":"Graphics","h":"","s":"Native runtime","x":"A native game draws with stock wgpu 30 . sg_guest::gpu::instance() returns a normal wgpu::Instance backed by a custom backend. The guest holds only IDs, the host validates every request and runs it on a real wgpu device, so existing wgpu code (and WGSL shaders) run unchanged."},{"u":"/native/graphics/#backends","t":"Graphics","h":"Backends","s":"Native runtime","x":"The runtime uses wgpu's backends: Backend Where Status Vulkan Linux (NVIDIA, AMD RADV, Mesa lavapipe), Windows The primary backend. Every feature, including ray queries and mesh shaders. DX12 Windows Supported by wgpu. Tested only through translation layers so far, not on native Windows drivers. Ray queries and mesh shaders need the DXC compiler ( dxcompiler.dll , dxil.dll ) next to the runtime. Metal macOS Supported by wgpu. Not run yet. GL / GLES Fallback Needs desktop GL 4.3 or GLES 3.1 (compute shaders, which wgpu requires). An older context, such as GL 3.3, is refused with the reason. No ray tracing on GL. D3D11 — Not supported. wgpu has no D3D11 backend. By default the runtime picks wgpu's primary backends (Vulkan on Linux, DX12 and Vulkan on Windows, Metal on macOS) and a high-performance adapter. Players and testers can override it: Variable Effect WGPU_BACKEND vulkan , dx12 , metal , gl , or a comma list. WGPU_ADAPTER_NAME The first adapter whose name contains this text (case-insensitive). WGPU_POWER_PREF high (default), low or none ."},{"u":"/native/graphics/#limits","t":"Graphics","h":"Limits and quotas","s":"Native runtime","x":"Limit Value Device limits Whatever the adapter offers. Asking for more than the adapter's limits fails request_device . GPU memory a game may allocate 6 GiB (buffers, textures, acceleration structures). One GPU request or reply 64 MiB. Live GPU objects about one million. Acceleration structures 2 GiB in total; at most 256 geometries and 16,777,216 primitives per BLAS; at most 262,144 instances per TLAS. Error scopes 64 nested. Errors behave like WebGPU. A validation error (bad WGSL, a wrong descriptor) is delivered to the game's error scopes, or as an uncaptured error, and the game keeps running. A request that names a bad handle, breaks a rule wgpu would panic on (map ranges, surface state) or goes over the quota traps the guest. A panic inside wgpu ends the game, never the host."},{"u":"/native/graphics/#experimental","t":"Graphics","h":"Ray queries and mesh shaders","s":"Native runtime","x":"Hardware ray queries (BLAS/TLAS, rayQuery in WGSL) and task and mesh shaders are available when the manifest sets \"gpu_experimental\": true , the player grants it, and the adapter supports them. Check adapter.features() and fall back: the runtime can be told to hide either feature ( SG_GPU_DENY=rt,mesh ), and a game must still render without them. Feature Measured Hardware ray query, 1920×1080, one ray per pixel, 977k triangles 0.21–0.24 ms primary, 0.64–0.66 ms incoherent: the same as raw Vulkan on the same GPU. Mesh shaders, 30,538 meshlets Pixel-identical to the vertex-pipeline reference. Mesh shaders are not run on AMD RADV at present (they hang the GPU in tests)."},{"u":"/native/graphics/#presentation","t":"Graphics","h":"Presentation","s":"Native runtime","x":"Present mode, frame latency, the frame cap and fullscreen are set from four places. When they conflict, the strongest wins: The player's launch settings ( --present-mode , --vsync / --no-vsync , --latency 1-3 , --fps-cap N , --fullscreen ). These always win; the game is told LOCKED . The game at run time : sg_guest::display::set_present , set_frame_latency , set_frame_cap , set_fullscreen . The manifest : \"display\": {\"present_mode\": \"fifo\", \"frame_latency\": 1, \"fps_cap\": 0, \"fullscreen\": \"borderless\"} . Present modes are fifo , fifo_relaxed , mailbox , immediate , auto_vsync , auto_no_vsync . The game's own surface.configure (stock wgpu). Rules a game can rely on: A present mode the surface does not offer makes configure trap with a reason, so check surface.get_capabilities . The frame cap accepts 10 to 1000 fps, or 0 for none. Entering fullscreen needs a recent key or button press from the player, and is rate-limited. F11 and Alt+Enter belong to the player and never reach the game. frame_stats reports the measured present interval, blocking times and display latency."},{"u":"/native/graphics/#hdr","t":"Graphics","h":"HDR","s":"Native runtime","x":"Render scene-linear BT.709 colour in paper-white units (1.0 = SDR white) and call sg_encode_output from the WGSL that sg_abi::hdr provides as the last step of your final pass. It tone-maps to what the output can show and applies the output's encoding: Output mode Surface format and colour space SDR (sRGB format) *UnormSrgb , sRGB SDR (unorm) *Unorm , sRGB curve in the shader scRGB Rgba16Float , extended sRGB linear PQ (HDR10) Rgb10a2Unorm or Rgba16Float , BT.2100 PQ sg_guest::display::negotiate_output (over sg_abi::hdr::negotiate ) picks the best mode from the surface's capabilities and falls back to SDR when no HDR colour space is offered. sg_guest::display::set_hdr_metadata sends mastering metadata (primaries, white point, luminance, MaxCLL, MaxFALL). The player can turn HDR off ( --no-hdr )."},{"u":"/native/abi/","t":"The sg ABI","h":"","s":"Native runtime","x":"A native game imports its host functions from the WebAssembly module sg , and optionally platform services from sg_platform_v1 . sg-guest wraps all of them in safe Rust; this page is for writing bindings in another language, or for understanding what the wrappers do."},{"u":"/native/abi/#conventions","t":"The sg ABI","h":"Conventions","s":"Native runtime","x":"Buffers in are (ptr, len) pairs in guest memory. Buffers out are (ptr, cap) , and the call returns an i64 length. If the value is larger than cap , nothing is written and the needed length is returned, so call again with a bigger buffer (or call with cap 0 first to ask for the size). Handles are u32 ( 0 means none or failure). They index per-game tables in the host and are never reused. Validation. Every pointer and length is checked against guest memory. A pointer outside it traps. Out-of-range values in display and audio calls are clamped or rejected with a status code, not a trap. Strings are UTF-8. Exports. The main instance exports sg_init() -> i32 and sg_frame(t: f64, dt: f64) ; t and dt are in seconds. Worker instances export sg_worker_init() -> i32 and sg_worker_tick(t: f64) -> i32 ."},{"u":"/native/abi/#functions","t":"The sg ABI","h":"Host functions (module sg )","s":"Native runtime","x":"The import list as sg-guest declares it ( sg_guest::sys ):"},{"u":"/native/abi/#core","t":"The sg ABI","h":"Core","s":"Native runtime","x":"Function Returns log(p: *const u8, l: usize) — set_title(p: *const u8, l: usize) — surface_size() u64 now_ms() f64 wall_ms() f64 random_fill(p: *mut u8, l: usize) — args(p: *mut u8, cap: usize) i64 is_worker() u32 quit() —"},{"u":"/native/abi/#gpu-the-sg-gpu-protocol","t":"The sg ABI","h":"GPU (the sg-gpu protocol)","s":"Native runtime","x":"Function Returns gpu_call(p: *const u8, l: usize, out: *mut u8, cap: usize) i64 gpu_reply(out: *mut u8, cap: usize) i64 gpu_write_buffer(buf: u32, off: u64, p: *const u8, l: usize) — gpu_write_texture(dp: *const u8, dl: usize, p: *const u8, l: usize) — gpu_mapped_read(buf: u32, off: u64, p: *mut u8, l: usize) — gpu_mapped_write(buf: u32, off: u64, p: *const u8, l: usize) —"},{"u":"/native/abi/#input","t":"The sg ABI","h":"Input","s":"Native runtime","x":"Function Returns input_poll(p: *mut u8, max: u32) u32 pointer_lock(on: u32) — pointer_locked() u32 window_focused() u32"},{"u":"/native/abi/#tcp-manifest-tcp","t":"The sg ABI","h":"TCP (manifest tcp )","s":"Native runtime","x":"Function Returns tcp_connect(p: *const u8, l: usize, port: u32) u32 tcp_status(s: u32, ep: *mut u8, ecap: usize) i32 tcp_recv(s: u32, p: *mut u8, cap: usize) u32 tcp_send(s: u32, p: *const u8, l: usize) u32 tcp_close(s: u32) —"},{"u":"/native/abi/#http-fetch-manifest-fetch","t":"The sg ABI","h":"HTTP fetch (manifest fetch )","s":"Native runtime","x":"Function Returns fetch_start(p: *const u8, l: usize) u32 fetch_status(f: u32) i32 fetch_body_len(f: u32) i64 fetch_meta(f: u32, p: *mut u8, cap: usize) i64 fetch_read(f: u32, off: u64, p: *mut u8, cap: usize) u32 fetch_free(f: u32) —"},{"u":"/native/abi/#keyvalue-storage-manifest-storage_mb","t":"The sg ABI","h":"Key/value storage (manifest storage_mb )","s":"Native runtime","x":"Function Returns kv_size(kp: *const u8, kl: usize) i64 kv_read(kp: *const u8, kl: usize, off: u64, p: *mut u8, cap: usize) i64 kv_write(kp: *const u8, kl: usize, p: *const u8, l: usize) u32 kv_delete(kp: *const u8, kl: usize) — kv_list(kp: *const u8, kl: usize, p: *mut u8, cap: usize) i64"},{"u":"/native/abi/#audio-manifest-audio","t":"The sg ABI","h":"Audio (manifest audio )","s":"Native runtime","x":"Function Returns sound_create(p: *const u8, l: usize, format: u32, channels: u32, rate: u32) u32 sound_free(s: u32) — voice_play(s: u32, vol: f32, pan: f32, pitch: f32, looping: u32) u32 voice_set(v: u32, vol: f32, pan: f32, pitch: f32) u32 voice_stop(v: u32) u32 voice_fx(v: u32, lowpass_hz: f32, send: f32) u32 reverb_set(rt60: f32, damp_hz: f32, predelay_ms: f32, early: f32) — voice_active(v: u32) u32 audio_master(v: f32) —"},{"u":"/native/abi/#workers-and-messages-manifest-workers","t":"The sg ABI","h":"Workers and messages (manifest workers )","s":"Native runtime","x":"Function Returns worker_spawn(p: *const u8, l: usize) u32 worker_terminate(id: u32) — msg_post(to: u32, p: *const u8, l: usize) u32 msg_peek() i64 msg_recv(p: *mut u8, cap: usize) i64"},{"u":"/native/abi/#webrtc-data-channels-manifest-rtc","t":"The sg ABI","h":"WebRTC data channels (manifest rtc )","s":"Native runtime","x":"Function Returns rtc_available() u32 rtc_ice(p: *const u8, l: usize) u32 rtc_offer() u32 rtc_accept_offer(p: *const u8, l: usize) u32 rtc_accept_answer(peer: u64, p: *const u8, l: usize) u32 rtc_send(peer: u64, p: *const u8, l: usize) u32 rtc_close(peer: u64) — rtc_poll(p: *mut u8, cap: usize) i64"},{"u":"/native/abi/#display-main-instance-only","t":"The sg ABI","h":"Display (main instance only)","s":"Native runtime","x":"Function Returns display_info(p: *mut u8, cap: usize) i64 frame_stats(p: *mut u8, cap: usize) i64 present_config(mode: u32, latency: u32) i32 frame_cap(fps: f64) i32 fullscreen(mode: u32) i32 hdr_metadata(p: *const u8, l: usize) i32"},{"u":"/native/abi/#manifest-assets","t":"The sg ABI","h":"Manifest assets","s":"Native runtime","x":"Function Returns asset_size(p: *const u8, l: usize) i64 asset_read(p: *const u8, l: usize, off: u64, dst: *mut u8, cap: usize) i64"},{"u":"/native/abi/#gpu","t":"The sg ABI","h":"The GPU protocol","s":"Native runtime","x":"The guest never holds a GPU object. Requests are postcard -encoded sg_abi::gpu::Req values passed to gpu_call ; the host validates every field and answers with an encoded Reply . Command encoders, passes and bundles are recorded entirely in the guest and sent as one request when finished, so a frame costs a handful of host calls. Bulk data (buffer and texture uploads, mapped ranges) bypasses the serializer through gpu_write_buffer , gpu_write_texture , gpu_mapped_read and gpu_mapped_write . The descriptor types embed wgpu-types 30, so their encoding is part of the protocol."},{"u":"/native/abi/#input-1","t":"The sg ABI","h":"Input events","s":"Native runtime","x":"input_poll fills 24-byte records ( sg_abi::input::RawEvent ): a kind , a code , x and y , modifier bits and flags. Kind Value Meaning KEY_DOWN , KEY_UP 1, 2 code indexes KEY_NAMES (1-based, 0 unknown), which are DOM KeyboardEvent.code names, so web input code ports unchanged. FLAG_REPEAT marks auto-repeat. TEXT 3 code is a Unicode scalar the user typed. MOUSE_MOVE 4 Raw relative motion, locked or not. CURSOR 5 Cursor position in physical pixels. BUTTON_DOWN , BUTTON_UP 6, 7 DOM button numbering: 0 left, 1 middle, 2 right, 3 back, 4 forward. WHEEL 8 Scroll in lines; positive y is away from the user. FOCUS 9 Window focus changed. RESIZE 10 New surface size in pixels. POINTER_LOCK 11 Pointer lock changed. Modifiers: MOD_SHIFT 1, MOD_CTRL 2, MOD_ALT 4, MOD_META 8."},{"u":"/native/abi/#status","t":"The sg ABI","h":"Display status codes","s":"Native runtime","x":"present_config , frame_cap , fullscreen and hdr_metadata return OK 0, NOT_APPLIED 1 (stored, but no HDR swapchain), INVALID -1, UNSUPPORTED -2, DENIED -3, RATE_LIMITED -4 or LOCKED -5 (the player's launch settings win)."},{"u":"/native/abi/#versioning","t":"The sg ABI","h":"Versioning","s":"Native runtime","x":"Interface Version Compatibility Module sg no version in the name A guest that imports a function the host does not provide fails to instantiate, naming the missing import. sg-gpu protocol 2 ( sg_abi::gpu::VERSION ) Hosts accept guests from version 1 ( MIN_VERSION ). Version 2 added frame controls; version 1 guests never send them. Bumped on any incompatible change, including a layout-affecting wgpu-types upgrade. sg_platform_v1 1 Records and events are CBOR maps with text keys: new optional fields and new event types are backward compatible. An incompatible change would be a new module name. The sg-guest and sg-abi crates are at version 0.1.0."},{"u":"/native/rustdoc/","t":"Rust API reference","h":"","s":"Native runtime","x":"The full API of the native SDK crates, generated by rustdoc from their source at each docs release: Crate What it contains Reference sg-guest The guest SDK: the wgpu backend ( gpu ), display and HDR ( display ), raw imports ( sys ), and safe wrappers for clock, launch arguments, input, assets, TCP, fetch, key/value storage, audio, WebRTC and workers. sg_guest sg-abi The ABI shared by host and guest: the GPU wire format ( gpu ), input events and key names ( input ), display constants ( display ), HDR negotiation and the sg_encode_output WGSL ( hdr ). sg_abi The reference is built for the wasm32-unknown-unknown target, the one games are compiled for. Both crates are at version 0.1.0 and depend on wgpu 30.0.1 ( sg-guest ) and wgpu-types 30.0.1 ( sg-abi ). For the concepts behind the API, start with the overview , the quickstart and the sg ABI ."},{"u":"/scripting/","t":"Scripting with @x1/script","h":"","s":"Scripting","x":"Publishing is open Creators publish TypeScript packages into OG Earth: see Publishing scripts to worlds . @x1/script 0.2.0 and the 0x CLI 0.1.7 ( 0x script publish ) are in the 0x registry . Sign in with 0x login , or use a publish token from Developer › Tokens in CI. What a package can ask for is in Capabilities ."},{"u":"/scripting/#what","t":"Scripting with @x1/script","h":"What it is","s":"Scripting","x":"@x1/script lets you write game logic in TypeScript once and run it on every 0x host: OG worlds (the Minecraft-stack worlds), games on the native runtime, and hosted web games. The API, its names and its semantics follow the Luau-style scripting model ( Players.PlayerAdded , task.wait , DataStore , signals with Connect ). Methods that wait for the host return promises. import { Players, Messaging, task } from \"@x1/script\"; Players.PlayerAdded.Connect(async (p) => { p.SendMessage(`Welcome, ${p.DisplayName}`); await task.wait(1); await Messaging.PublishAsync(\"players.joined\", { player: p.UserId }); });"},{"u":"/scripting/#design","t":"Scripting with @x1/script","h":"Design, as it stands","s":"Scripting","x":"One API, every host: OG worlds (Paper), games on the 0x engine (sg-runtime), hosted web games, and the links between them. Roblox-style API: Players.PlayerAdded.Connect(...) , Chat and World events; DataStore.GetStore(name).UpdateAsync(...) ; Messaging.PublishAsync / SubscribeAsync across experiences (with grants); Teleport.TeleportAsync(player, destination, data) ; task.wait / spawn / delay ; RunService.Heartbeat . Anything that waits on the host returns a promise. Compiler: x1-script build (pinned) turns each script into one ES module with a source map, so errors point at your .ts lines. Runtime: scripts run in x1script.wasm (QuickJS-ng compiled to WebAssembly). The same module runs on every host: wasmtime in worlds and games, the browser in web games. Capabilities: sensitive calls need a capability the host grants ( chat , kick , world , teleport , kv , messaging , items , …). A script can check one with Host.Supports(capability) . Sandbox: each script gets its own sandbox: frozen built-ins, no eval or new Function(string) , imports from @x1/script only, and per-handler time and step budgets plus a memory cap that try / catch can't escape. Script bus: experiences talk to ea"},{"u":"/scripting/#status","t":"Scripting with @x1/script","h":"Status","s":"Scripting","x":"Live (2026-10-17): OG Earth runs X1Script (wasmtime) as the experience earth on the production script bus. Its first script only publishes events: players.joined , players.left and items.picked . Live (2026-10-23): publishing packages into worlds, reviewed and approved per version, each in its own sandbox: see Publishing scripts to worlds . Live (2026-10-23): @x1/script 0.2.0 (typings, the pinned compiler and x1-script pack/submit/status/withdraw ) and @x1/script-runtime 0.2.0 in the 0x registry ( https://0x.limo/npm/ ); 0x script publish in the 0x CLI 0.1.7. Live (2026-10-24): publish tokens for CI at Developer › Tokens . Public: the bus answers GET https://api.0x.limo/v1/scriptbus/info ( {\"api\":0,\"universe\":\"earth\"} ). Not open yet: direct third-party access to the script bus from your own servers or clients (experience keys and bus grants). Packages reach the bus through their sandbox's messaging and kv capabilities. Next: Publishing scripts to worlds · Capabilities · Sandboxes ."},{"u":"/scripting/publish/","t":"Publishing scripts to worlds","h":"","s":"Scripting","x":"Live since 2026-10-23 Publishing is open on 0x.limo: @x1/script 0.2.0 and the 0x CLI 0.1.7 ( 0x script ) are in the 0x registry, and approved packages run in OG Earth in their own sandboxes. A package is your experience: TypeScript scripts plus a manifest, x1.json , that says which worlds it wants to run in and what it needs from them. Each version you upload goes through four steps: Upload. 0x script publish (or x1-script pack --sign + x1-script submit , or the developer portal ) builds your scripts with the pinned compiler, adds your sources, signs the bundle and uploads it. Automated review. Within a minute, 0x checks the package and runs it in a sandbox. Approval. A 0x reviewer reads the report and your code, and approves the version for a world. The reviewer may grant less than you asked for. Live. The world's host loads your scripts in their own sandbox within about 10 seconds, without a server restart."},{"u":"/scripting/publish/#manifest","t":"Publishing scripts to worlds","h":"The manifest","s":"Scripting","x":"The manifest keeps its name x1.json for now (it is read by @x1/script ); a 0x.json name is planned. x1.json , at the root of your project: { \"id\": \"lago-fishing\", \"name\": \"Lago fishing\", \"version\": \"1.0.0\", \"api\": 1, \"scripts\": { \"main\": \"src/main.ts\" }, \"targets\": [\"earth\"], \"capabilities\": { \"kv\": {}, \"inventory\": { \"bases\": [\"fishing_rod\", \"cod\"], \"gives_per_min\": 60 }, \"economy\": { \"per_payout\": 200, \"per_player_day\": 1000, \"per_day\": 10000 }, \"regions\": { \"request\": [{ \"id\": \"lago-pond\", \"rights\": [\"read\"], \"why\": \"the fishing spot\" }] }, \"commands\": { \"names\": [\"sell\", \"log\"] }, \"ui\": { \"kinds\": [\"actionbar\", \"panel\"] }, \"fishing\": {} }, \"budgets\": { \"memory_mb\": 16 }, \"description\": \"Fish the lake; a fishmonger pays SCRIP from the game's wallet.\" } Field What it is id Your experience's id: 2-40 of a-z 0-9 - . The first upload claims it for your account. version Semver MAJOR.MINOR.PATCH . Versions are immutable, and each upload must be higher than the last. api 1 , the @x1/script major version. scripts Script name to entry file. Each becomes one ES module, dist/<name>.js . targets The worlds you ask to be installed in. capabilities What the scripts need, with parameters. See "},{"u":"/scripting/publish/#capabilities","t":"Publishing scripts to worlds","h":"Capabilities","s":"Scripting","x":"Every call that touches the world or players needs a capability. A call outside your grants throws CapabilityError . 0x script capabilities lists them, with the worlds and their regions. Capability Allows Parameters chat Player.SendMessage , Chat.MessagePosted none chat.broadcast Chat.Broadcast (reviewers grant it only by hand) per_min (1-6) kv DataStore none messaging Messaging none teleport Teleport , Player.TeleportAsync destinations? world World.GetBlock / SetBlock / Spawn inside your regions none items Items.GetAsync none inventory Inventory : your own sealed items bases , gives_per_min , max_count economy Economy : SCRIP payouts from your funded wallet per_payout , per_player_day , per_day (all required) regions Regions ; bounds world and region events request: [{id, rights: [read, build, spawn], why}] , ids from the world's catalogue commands Commands.Register under /x1 <id> names , aliases ui Ui kinds , sounds , particles fishing Fishing none environment Environment.GetAsync none Every call, parameter, limit and error is in the Capabilities reference . Several capabilities also have a guide: Inventory , Economy , Regions , Commands , UI , Fishing and Environment . Sandboxes"},{"u":"/scripting/publish/#budgets","t":"Publishing scripts to worlds","h":"Budgets","s":"Scripting","x":"Community sandboxes get 5 ms and 500,000 steps per handler, 16 MiB of JS heap, 2 ms of server time per tick, 100 host calls a second and 1,000 pending tasks. Your manifest can ask for more under budgets ( slice_ms , slice_steps , entry_ms , memory_mb , cpu_ms_per_tick , events_per_s , calls_per_s , tasks , kv_bytes , kv_keys_per_store , bus_per_s ), up to 4 times each default. A sandbox that keeps overrunning is stopped. Other sandboxes and the world are never affected."},{"u":"/scripting/publish/#publish","t":"Publishing scripts to worlds","h":"Publish","s":"Scripting","x":"echo \"@x1:registry=https://0x.limo/npm/\" >> .npmrc npm i -D @x1/script npx x1-script pack . --sign npx x1-script submit . --api https://api.0x.limo --token \"$X1_TOKEN\" --notes \"First release\" npx x1-script status lago-fishing@1.0.0 Or, with the 0x CLI (0.1.7 or newer: curl -fsSL https://0x.limo/sdk/install.sh | sh updates it), in one step: 0x login 0x script publish --notes \"First release\" 0x script status lago-fishing@1.0.0 x1-script submit signs in with --token , X1_TOKEN ( X1_BACKEND for the API), or the login in ~/.config/0x1/x1-cli.json . @x1/script 0.2.0 doesn't read the ZEROX_* names or ~/.config/0x/ yet, so pass --token if you only have a newer 0x login . Publish tokens. 0x login saves a publish token ( 0xpub_… ). To publish from CI, or from a machine where you can't run the device sign-in, make one at api.0x.limo/dev/tokens (Developer › Tokens): sign in, name it, copy it (it is shown once). Then 0x login --token <token> , or set it as ZEROX_TOKEN in CI. The same page lists your tokens (created, last used) and revokes them. A publish token can upload hosted sites, store listings and script packages for you, and nothing else: it can't sign in, spend or make more tokens. 0x s"},{"u":"/scripting/publish/#portal","t":"Publishing scripts to worlds","h":"The developer portal","s":"Scripting","x":"At api.0x.limo/dev/scripts you can sign in, upload a dist/package.json built with x1-script pack --sign , read each version's review, see where it is installed, and withdraw a version."},{"u":"/scripting/publish/#review","t":"Publishing scripts to worlds","h":"The automated review","s":"Scripting","x":"Check Fails when Forbidden constructs eval , the Function constructor, import() , WebAssembly , fetch or require , prototype tampering, or setTimeout with a string Imports A module imports anything but @x1/script . Bundle your dependencies. Capability over-reach Code calls an API of a capability the manifest doesn't ask for Source scan The platform's malware and abuse rules find something serious Reproducible build A module isn't byte-for-byte what its sources compile to with the pinned compiler Smoke run In a sandbox with your budgets, players join, chat and run your commands for a few seconds. It fails on a crash, a load error, a budget strike, or a host call outside your capabilities. Guests The smoke run's guest, mc-ReviewGuest , is refused a player data store ( scope player needs player ), even if your code catches the error Guests. Players without a 0x account join worlds too. Their UserId is mc-<name> , and they have no player data store: DataStore.GetStore(name, { scope: \"player\", player }) fails for them with scope player needs player . The smoke run includes a guest, mc-ReviewGuest , who joins, chats and runs your commands. If your code opens a player store for them, the "},{"u":"/scripting/publish/#after","t":"Publishing scripts to worlds","h":"Approval, review issues, and after","s":"Scripting","x":"Approval. A reviewer approves a version for one world at a time, with grants that are at most what you asked for. For example, lower payout caps, fewer item bases, or only some of your regions. Review issues. If something must change, the reviewer opens a review issue. A rejection's message is one too. Answer them in /dev/submit or with 0x issues , then upload a new version. Updates. Each update is a new version and is reviewed again. The console shows reviewers the diff of your sources against the version that runs now. Roll back, kill switch, revoke. 0x can roll a world back to an earlier approved version of yours. It can also switch your scripts off everywhere (the kill switch), or revoke the install in a world. Status Meaning uploaded , reviewing The automated review is pending or running review_failed Fix it and upload a new version pending_approval Waiting for a 0x reviewer approved Installed in a world; it runs there rejected See the review issue for why superseded A newer version was uploaded or approved withdrawn You withdrew it"},{"u":"/scripting/capabilities/","t":"Capabilities reference","h":"","s":"Scripting","x":"A package asks for capabilities in its manifest ( x1.json ), and a 0x reviewer grants some or all of them, per world, when approving a version. Every call that touches players, the world, data or money needs one. This page lists every capability the production backend accepts today; 0x script capabilities prints the same list, with the worlds and their regions: 0x script capabilities # or: 0x script capabilities --json The list comes from GET https://api.0x.limo/v1/scriptbus/packages/capabilities , which needs a sign-in ( 0x login , or a publish token ). It answers {capabilities, budgets, limits, worlds} ."},{"u":"/scripting/capabilities/#grants","t":"Capabilities reference","h":"How grants work","s":"Scripting","x":"// x1.json { \"id\": \"lago-fishing\", \"version\": \"1.0.0\", \"api\": 1, \"scripts\": { \"main\": \"src/main.ts\" }, \"targets\": [\"earth\"], \"capabilities\": { \"chat\": {}, \"kv\": {}, \"inventory\": { \"bases\": [\"cod\", \"salmon\"], \"gives_per_min\": 120, \"max_count\": 16 }, \"economy\": { \"per_payout\": 50, \"per_player_day\": 500, \"per_day\": 5000 }, \"regions\": { \"request\": [{ \"id\": \"lago-pond\", \"rights\": [\"read\"], \"why\": \"the pond we fish in\" }] }, \"ui\": { \"kinds\": [\"actionbar\", \"title\", \"sound\", \"panel\"], \"sounds\": [\"entity.fishing_bobber.splash\"] }, \"fishing\": {} } } Parameters: each capability takes an object, {} for none. The upload checks and normalizes them; an unknown capability or a bad parameter fails the upload with the field named ( capabilities.inventory.bases: ... ). The grant: what the reviewer approves is at most what you asked for, often narrower (lower caps, fewer bases, some of your regions). At run time your sandbox sees it in Host.capabilities (the names) and Host.Supports(name) . Who may hold it: community capabilities are granted to packages. By hand capabilities ( chat.broadcast ) are never part of a plain approval: the reviewer must grant them one by one. Operator capabilities ( kick ) b"},{"u":"/scripting/capabilities/#errors","t":"Capabilities reference","h":"Errors","s":"Scripting","x":"A call outside your grants throws CapabilityError before anything happens. Its capability field names what was missing, and its message reads x1: the \"economy\" capability is not granted to earth/lago-fishing . A call inside your grants that breaks a grant parameter (a base, a sound, a command name, a region you don't hold) also throws CapabilityError , with the reason as the message. Everything else (a rate limit, a bad argument, a player who left) throws a plain Error whose message starts with x1: , for example x1: rate limited (10 ui calls a second per player) . Calls that return a promise reject with the same errors. import { CapabilityError, Economy, Host } from \"@x1/script\"; if (!Host.Supports(\"economy\")) warn(\"no payouts in this world\"); try { await Economy.PayoutAsync(player, 10, \"Catch of the day\", `catch:${player.UserId}:${day}`); } catch (e) { if (e instanceof CapabilityError) warn(`missing ${e.capability}: ${e.message}`); else warn(String(e)); // x1: rate limited (2 payouts a second) }"},{"u":"/scripting/capabilities/#budgets","t":"Capabilities reference","h":"Budgets and package limits","s":"Scripting","x":"Every sandbox also has budgets, independent of capabilities. You may ask for more in x1.json budgets , up to the maximum: Budget Default Maximum slice_ms : one handler, task or continuation 5 ms 20 ms slice_steps : VM steps per slice 500,000 2,000,000 entry_ms : one call from the host into the VM 50 ms 200 ms cpu_ms_per_tick : main-thread time per tick, averaged over 1 s 2 ms 8 ms memory_mb : JS heap 16 64 calls_per_s : host calls 100 400 events_per_s : events in 200 800 tasks : pending tasks 1,000 4,000 kv_bytes : data store size 4 MiB 16 MiB kv_keys_per_store 1,000 4,000 bus_per_s : bus publishes 5 20 A package holds at most 16 scripts and 300 files, 1 MiB per file and 4 MiB in all. What happens past a budget (strikes, throttling, restarts) is in Sandboxes ."},{"u":"/scripting/capabilities/#summary","t":"Capabilities reference","h":"Summary","s":"Scripting","x":"Capability Unlocks Grant parameters Who may hold it chat Player.SendMessage , Chat.MessagePosted none community chat.broadcast Chat.Broadcast per_min 1-6 by hand, sensitive kick Player.Kick none operator only kv DataStore none (size via budgets ) community messaging Messaging none community teleport Teleport.TeleportAsync , Player.TeleportAsync destinations? community, sensitive world World.GetBlock / SetBlock / Spawn , Player.GetPosition none (bounded by regions ) community, sensitive items Items.GetAsync none community inventory Inventory bases , gives_per_min , max_count community, sensitive economy Economy per_payout , per_player_day , per_day community, sensitive regions Regions , region events request community commands Commands.Register names , aliases community ui Ui kinds , sounds , particles community fishing Fishing events and hook changes none (bounded by regions ) community environment Environment.GetAsync none (bounded by regions ) community"},{"u":"/scripting/capabilities/#chat","t":"Capabilities reference","h":"chat","s":"Scripting","x":"Talk to one player, and hear the world's chat. API Arguments Returns player.SendMessage(text) text : plain text, cut at 512 characters nothing Chat.MessagePosted event (player, text) Limits: 5 messages a second per player (burst 10). Links in a package's messages are not clickable. Errors: rate limited (5 messages a second per player) ; player <id> is not in this world . import { Chat } from \"@x1/script\"; Chat.MessagePosted.Connect((p, text) => { if (text === \"!hi\") p.SendMessage(`Hi ${p.DisplayName}`); });"},{"u":"/scripting/capabilities/#chat-broadcast","t":"Capabilities reference","h":"chat.broadcast","s":"Scripting","x":"One message to everyone in the world. Granted only by hand. API Arguments Returns Chat.Broadcast(text) text : plain text, cut at 256 characters, shown as [<experience>] text nothing Parameters: per_min : broadcasts a minute, 1-6 (default 6 when you ask without it). Also needs chat : ask for both; the call checks chat first, then the host checks chat.broadcast . Errors: rate limited (<per_min> broadcasts a minute) . Chat.Broadcast(\"The fishing contest starts in 5 minutes at the pond\");"},{"u":"/scripting/capabilities/#kick","t":"Capabilities reference","h":"kick","s":"Scripting","x":"Player.Kick(reason?) . Operator only: a world's own scripts hold it, and a package that asks for it fails the upload with capabilities.kick: only a world's own scripts hold it ."},{"u":"/scripting/capabilities/#kv","t":"Capabilities reference","h":"kv","s":"Scripting","x":"Your experience's data stores, kept by the platform across restarts and hosts. API Arguments Returns DataStore.GetStore(name, {scope?, player?}) name : 1-64 of A-Z a-z 0-9 _ . - / : ; scope : \"experience\" (default), \"publisher\" (all your experiences), \"player\" (one player's, needs a 0x account), \"exp:<id>\" (another experience that granted you its store) a DataStore store.GetAsync(key) / GetVersionedAsync(key) key : 1-128 bytes the value (or {value, version} ), undefined when absent store.SetAsync(key, value) value : JSON, at most 64 KiB the new version store.UpdateAsync(key, transform) transform(old, version) returns the new value or undefined to leave it the stored value; retried up to 8 times on conflicting writers store.RemoveAsync(key) / ListKeysAsync(prefix?) nothing / the keys Limits: 16 stores, 1,000 keys per store and 4 MiB in all (raise with budgets.kv_bytes , up to 16 MiB). Errors: keys are 1-128 bytes , value over 64 KiB , store full (1000 keys for community sandboxes) , at most 16 stores for community sandboxes , data store quota: <used> of <cap> bytes used , scope player needs player (a guest, mc-<name> , has no player store: keep guests' data in the experience store u"},{"u":"/scripting/capabilities/#messaging","t":"Capabilities reference","h":"messaging","s":"Scripting","x":"Publish and subscribe on the 0x script bus. API Arguments Returns Messaging.PublishAsync(topic, data) topic : yours ( \"scores\" ) or another experience's ( \"exp:<id>/<topic>\" , needs its grant); data : JSON, at most 16 KiB {id, topic} (the resolved exp:<experience>/<topic> ) Messaging.SubscribeAsync(topic, callback) callback(message) with {Topic, Data, Sent, Id, From} a Connection Limits: 5 publishes a second, burst 30 (raise with budgets.bus_per_s , up to 20). Errors: bad topic , message data over 16 KiB , not allowed: publish / subscribe (another experience's topic without its grant), rate limited (with retry_after_ms ). import { Messaging } from \"@x1/script\"; await Messaging.PublishAsync(\"catches\", { player: p.UserId, fish: \"salmon\", kg: 2.4 });"},{"u":"/scripting/capabilities/#teleport","t":"Capabilities reference","h":"teleport","s":"Scripting","x":"Send a player to another experience with a one-time ticket; the destination's scripts see Teleport.Arrived(player, data, from) . API Arguments Returns Teleport.TeleportAsync(player, destination, data?) player : a player with a 0x account; destination : an experience id; data : JSON, at most 16 KiB {url, ticket} player.TeleportAsync(destination, data?) the same the same Parameters: destinations : the experience ids you plan to send players to (at most 32), shown to the reviewer. Accepted when: the destination is your own experience, or accepts teleports from anyone, from the same publisher, or from experiences it granted teleport . Errors: player: a 0x account id (guests can't be teleported), no such destination , no such player , not allowed: teleport , teleport data over 16 KiB , rate limited . const r = await Teleport.TeleportAsync(p, \"gem-catcher\", { from: \"pond\" });"},{"u":"/scripting/capabilities/#world","t":"Capabilities reference","h":"world","s":"Scripting","x":"Read and change blocks, spawn, and read positions, inside your granted regions only. API Arguments Returns World.GetBlock(x, y, z) block coordinates in a region with read the block id ( \"water\" ) World.SetBlock(x, y, z, block) a region with build ; block : a block id nothing World.Spawn(kind, x, y, z) a region with spawn ; kind : item:<id> drops an item, or one of pig , cow , chicken , sheep , villager , armor_stand , rabbit nothing player.GetPosition() the player is inside one of your regions {x, y, z, world} Limits: SetBlock 200 a second; Spawn 60 a minute. Errors: outside your regions (build) (or read , spawn ), outside your regions , not a block: <id> , not an item: <id> , cannot spawn <kind> , x, y and z are numbers , rate limited (200 blocks a second) , spawn limit reached (60 a minute) . await World.SetBlock(-900, 90, -520, \"lantern\");"},{"u":"/scripting/capabilities/#items","t":"Capabilities reference","h":"items","s":"Scripting","x":"Items.GetAsync(player) returns the player's 0x platform inventory (read only) as a JSON array. It is not the world inventory: for that, see inventory . const owned = await Items.GetAsync(p);"},{"u":"/scripting/capabilities/#inventory","t":"Capabilities reference","h":"inventory","s":"Scripting","x":"Give, take and list your own sealed items in the player's world inventory. Full guide: Inventory . API Arguments Returns Inventory.GiveAsync(player, item) item : {base, name?, lore?, tag?, count?} : base from your grant; name 64 chars; lore 8 lines of 64; tag at most 2 KiB of JSON; count 1-64 and at most max_count {given, dropped} (what didn't fit drops at the player's feet) Inventory.TakeAsync(player, slots | filter, max?) slot numbers (at most 41) or a filter over your own items the ItemRef s taken Inventory.ListAsync(player) / HeldAsync(player) ItemRef[] / the main-hand ItemRef or undefined Inventory.ItemUsed event (player, item) : a right-click with one of your items Parameters: bases (required, at most 64; weapons, spawn eggs and operator items are refused), gives_per_min 1-600 (default 120), max_count 1-64 (default 64). Errors: base \"<b>\" is not in this experience's granted bases , <b> is a weapon: scripts give no weapons in v1 , <b> is never given by scripts , count is 1-<n> , tag is at most 2 KiB of JSON , rate limited (gives_per_min <n>) , at most 41 slots , player <id> is not in this world . await Inventory.GiveAsync(p, { base: \"cod\", name: \"Lago cod\", tag: { kg: 1.2 } })"},{"u":"/scripting/capabilities/#economy","t":"Capabilities reference","h":"economy","s":"Scripting","x":"Pay SCRIP from your experience's funded wallet, under caps. Scripts never mint money. Full guide: Economy . API Arguments Returns Economy.PayoutAsync(player, amount, memo, key) amount : whole SCRIP, at least 1; memo : at most 80 characters, in the player's history; key : 1-128 printable characters without spaces, the idempotency key {paid, capped, reason?, balance, tax?, id?} Economy.WalletAsync() {balance, todayPaid, caps, frozen?} Parameters: per_payout , per_player_day , per_day , all required, whole SCRIP, up to the platform's maxima (the upload names the limit you crossed). Cut short, not thrown: a payout over a cap or the balance pays less and says why in reason : per_payout , per_player_day , per_day , wallet , duplicate or frozen . Days are UTC days. The same key never pays twice. Limits: 2 payouts a second. Errors: rate limited (2 payouts a second) , amount is a whole number of SCRIP, at least 1 , key is 1-128 printable characters without spaces , player <id> is not in this world . const r = await Economy.PayoutAsync(p, 25, \"Salmon, 2.4 kg\", `catch:${hookId}`); if (r.capped) p.SendMessage(`Paid ${r.paid} (limit: ${r.reason})`);"},{"u":"/scripting/capabilities/#regions","t":"Capabilities reference","h":"regions","s":"Scripting","x":"The map areas your experience may act in. Full guide: Regions . API Arguments Returns Regions.All() / Regions.Get(id) Region[] / a Region or undefined region.Contains(pos) / region.GetPlayers() boolean / the players inside (at most 1 s old) region.PlayerEntered / PlayerLeft events (player) A Region has Id , World , Min , Max (inclusive block box), Rights and Water ( \"sea\" , \"fresh\" , \"brackish\" ). Parameters: request : 1-16 of {id, rights, why} . id comes from the world's catalogue ( 0x script capabilities lists them, for example lago-pond in earth ); rights are some of read (events, positions), build ( SetBlock ), spawn (default read ); why is up to 200 characters for the reviewer. Bounds: granted regions bound world , fishing , environment and Ui.Particles , and filter world events. Errors: region <id> is not granted to this experience . const pond = Regions.Get(\"lago-pond\"); pond?.PlayerEntered.Connect((p) => Ui.ActionBar(p, \"Cast here to fish\"));"},{"u":"/scripting/capabilities/#commands","t":"Capabilities reference","h":"commands","s":"Scripting","x":"Chat commands under your namespace: /x1 <experience> <name> [args] . Full guide: Commands . API Arguments Returns Commands.Register(name, handler, options?) name : 1-24 of a-z 0-9 - _ , in your grant; handler(player, args) : up to 16 plain-text args of 100 characters; options : {description?, usage?, who?: \"everyone\" | \"creator\" | \"operator\"} a Connection Parameters: names (required, at most 16), aliases (some of names : also /<name> when no other plugin or package holds it). Limits: a player runs at most 5 commands a second. help and fund are the host's own. Errors: \"<name>\" is not in this experience's granted names , \"<name>\" is the host's own , \"<name>\" is already registered , name is 1-24 of a-z 0-9 - _ , who is everyone, creator or operator . Commands.Register(\"top\", async (p) => p.SendMessage(await topList()), { description: \"The best catches\" });"},{"u":"/scripting/capabilities/#ui","t":"Capabilities reference","h":"ui","s":"Scripting","x":"What the player sees: action bars, titles, sounds, particles, sidebars, panels, toasts and the HUD. Text is always plain. Full guide: UI . API Grant kind Notes Ui.ActionBar(player, text) actionbar 120 characters Ui.Title(player, title, subtitle?) title 1 a second per player Ui.Sound(player, key, volume?, pitch?) sound key from your sounds Ui.Particles(kind, at, count) particles kind from your particles , inside your regions, count at most 64, 20 calls a second Ui.Sidebar(player, title, lines) sidebar up to 12 lines; [] removes it Ui.Panel(player, panel) / Ui.ShowAsync(player, panel) / Ui.ClosePanel(player) panel resolves with the button id (or {button, card?, qty?} ), undefined when closed or timed out; 2 panels a second per player Ui.Toast(player, text, kind?) toast info , success , warn , error Ui.Hud(player, hud | null) hud title, up to 6 lines, a 0..1 progress bar Parameters: kinds : some of actionbar , title , sound , particles , sidebar , panel , toast , hud ; sounds : vanilla sound keys (at most 64); particles : particle kinds (at most 32). Limits: 10 UI calls a second per player. Errors: the ui grant has no \"<kind>\" , sound <key> is not in this experience's granted sounds ,"},{"u":"/scripting/capabilities/#fishing","t":"Capabilities reference","h":"fishing","s":"Scripting","x":"The vanilla fishing hook, inside your regions. Full guide: Fishing and Environment . API Arguments Notes Fishing.Cast / Bite / Reel events (hook) ; Reel: (hook, hadBite) hook has Player , Position , Rod , Depth? , ReactionMs? (Reel) hook.SetWait(minTicks, maxTicks) whole ticks, 1 ≤ min ≤ max ≤ 6000 Cast only hook.HoldOff() Bite only: the hook waits again hook.CancelLoot() Reel only: no vanilla loot; give your own catch Synchronous only: hook methods change the vanilla event, so they work only in the handler before its first await . Errors: that hook is not being delivered now (hook changes work only in the handler, before its first await) , Hook.<method> works only in Fishing.<stage> , SetWait: whole ticks, 1 <= min <= max <= 6000 . Fishing.Cast.Connect((hook) => hook.SetWait(60, 200)); Fishing.Reel.Connect(async (hook, bit) => { if (!bit) return; hook.CancelLoot(); await Inventory.GiveAsync(hook.Player, { base: \"salmon\" }); });"},{"u":"/scripting/capabilities/#environment","t":"Capabilities reference","h":"environment","s":"Scripting","x":"Real water and weather conditions at a place inside your regions. API Arguments Returns Environment.GetAsync(at) at : a position inside a region with read {waterTempC, airTempC, windMs, windFromDeg, waveM, salinity, basin, month, localHour, daylight} Errors: outside your regions , no such world . const c = await Environment.GetAsync(hook.Position); if (c.waterTempC < 12) Ui.ActionBar(hook.Player, \"Cold water: trout bite\");"},{"u":"/scripting/sandbox/","t":"Sandboxes: how your scripts run","h":"","s":"Scripting","x":"Sandboxes: how your scripts run Every package you publish runs in its own sandbox on each world that installs it."},{"u":"/scripting/sandbox/#what-a-sandbox-is","t":"Sandboxes: how your scripts run","h":"What a sandbox is","s":"Scripting","x":"A sandbox is one VM (QuickJS-ng in x1script.wasm , on wasmtime) per world and experience: earth/fishing-ada . It has its own memory, globals, timers, budgets and log. Nothing is shared with other creators' sandboxes. They reach each other only through the bus, using grants. A crash, a runaway loop or a memory bomb in one sandbox stops that sandbox only. It never stops another sandbox or the server tick."},{"u":"/scripting/sandbox/#budgets-community-tier","t":"Sandboxes: how your scripts run","h":"Budgets (community tier)","s":"Scripting","x":"What Limit Past it One handler, task or await continuation 5 ms or 500,000 VM steps It is stopped (try/catch can't keep it running) and counts 1 strike One call from the host into your VM 50 ms Stopped; at 4× this, the engine traps the VM JS heap 16 MiB The VM is terminated Main-thread time 2 ms per tick, averaged over 1 s Throttled : events wait and steps pause until you are under 80 % Host calls 100/s (burst 200) The call throws rate limited Events in 200/s, queue 512 The oldest droppable events (Heartbeat, Chat, region moves) are dropped Pending tasks / signal connections 1,000 each task.* / Connect throw RangeError Data store 16 stores, 1,000 keys per store, 4 MiB in all, 64 KiB per value The write fails Bus 5 publishes/s (burst 30), 16 KiB per message 429 Per creator and world, you get at most 4 sandboxes, 48 MiB of heap and 4 ms per tick in all. What happens when a sandbox misbehaves: Strikes: ten strikes within a minute terminate the VM. Crashes: a terminated or trapped VM restarts after 10 s, then after 60 s, then after 300 s. The third crash within an hour suspends it until an operator resumes it, or until a new version is approved. Throttling: 30 s of throttling within 5 "},{"u":"/scripting/sandbox/#what-you-can-use","t":"Sandboxes: how your scripts run","h":"What you can use","s":"Scripting","x":"Your manifest ( x1.json ) asks for capabilities, and the approver grants some or all of them. The full list, with every call, parameter, limit and error, is in the Capabilities reference . The grant comes in Host.capabilities , and Host.Supports(\"inventory\") tells you whether you have one. A call outside your grants throws a CapabilityError naming the capability: import { Chat, CapabilityError, Host } from \"@x1/script\"; try { Chat.Broadcast(\"hi\"); } catch (e) { if (e instanceof CapabilityError) print(`no ${e.capability} here`); } print(Host.sandbox?.id, Host.Usage().cpuMsLastSecond); Two smaller APIs: Host.Usage() shows your memory, CPU, calls and strikes against your budgets. Random.create(seed) gives the same draws on every host."},{"u":"/scripting/sandbox/#logs","t":"Sandboxes: how your scripts run","h":"Logs","s":"Scripting","x":"print , warn and console.* write to your sandbox's log on each host. Your warnings and errors also reach the server's log, rate-limited, and 0x sees the last lines, the last error and your budget counters when it looks into a problem with your package. To watch your budgets from inside, call Host.Usage() ."},{"u":"/scripting/sandbox/#when-0x-steps-in","t":"Sandboxes: how your scripts run","h":"When 0x steps in","s":"Scripting","x":"0x can suspend, resume, restart or stop a sandbox, and can raise one install's budgets up to 4× the tier's. A sandbox suspended by the crash or throttle rules above stays suspended until 0x resumes it or a new version of yours is approved. For a version-wide stop (the kill switch, rollback, revoke), see Publishing: after approval ."},{"u":"/scripting/inventory/","t":"Inventory: sealed items with server records","h":"","s":"Scripting","x":"Inventory: sealed items with server records Capability inventory . Typings: Inventory , ItemSpec , ItemRef ( packages/script/v1/inventory.d.ts ). import { Inventory } from \"@x1/script\"; await Inventory.GiveAsync(player, { base: \"cod\", name: \"Lago pike\", lore: [\"4.2 kg\"], tag: { species: \"pike\", kg: 4.2 } }); const mine = (await Inventory.ListAsync(player)).filter((i) => i.mine && i.tag.species === \"pike\"); const sold = await Inventory.TakeAsync(player, (i) => i.tag.species === \"pike\", 10); Inventory.ItemUsed.Connect((p, item) => { /* a right click with one of your items */ });"},{"u":"/scripting/inventory/#what-you-can-give","t":"Inventory: sealed items with server records","h":"What you can give","s":"Scripting","x":"base must be in your grant's bases . Operator items are never given, whatever the grant says: command blocks, barriers, spawners, spawn eggs, debug sticks, totems, elytra and the like. Weapons (swords, axes, bows, TNT, lava buckets, ...) are never given in v1. count is 1-64 and at most the grant's max_count . gives_per_min (default 120) limits gives per minute. Names and lore are plain text. Every item also carries a last lore line naming your experience."},{"u":"/scripting/inventory/#why-a-forged-item-doesnt-count","t":"Inventory: sealed items with server records","h":"Why a forged item doesn't count","s":"Scripting","x":"Every item a script gives is sealed . The item carries x1:<experience> = {id, tag, mac} : id names a record the server keeps (how many units it gave, how many came back); mac is an HMAC over the world, the experience, that id, the base and the tag, under a key only the server holds. ItemRef.mine is true only when both hold: the seal checks, so an item made in creative mode, by a hacked client or by another plugin with an invented or edited tag never counts; the player holds no more units of that id than the record has outstanding, so a copy of a real item doesn't count while the original is still out. TakeAsync takes only items that are mine and consumes the record. A record never gives back more units than it handed out. So if you pay for items you take back, you pay at most once per unit you gave, however many copies exist. In creative mode, a sealed stack can only be moved: taken out of a slot and put back within 2 seconds. The creative inventory packet can't clone or forge one. Operators are exempt. The console shows the records per experience and base: given, taken back, outstanding."},{"u":"/scripting/inventory/#takeasync","t":"Inventory: sealed items with server records","h":"TakeAsync","s":"Scripting","x":"With a filter: it runs in your script over ListAsync 's list, and the host takes only slots that still hold the same sealed id. With slot numbers: only the slots that hold your sealed items. In both forms max limits the total units taken."},{"u":"/scripting/economy/","t":"Economy: SCRIP payouts from a funded wallet","h":"","s":"Scripting","x":"Economy: SCRIP payouts from a funded wallet Capability economy . Typings: @x1/script Economy , Payout , Wallet ( packages/script/v1/economy.d.ts ). import { Economy, Players } from \"@x1/script\"; const r = await Economy.PayoutAsync(player, 25, \"Pike, 4.2 kg\", `catch-${catchId}`); if (r.capped) player.SendMessage(`Paid ${r.paid} (cut: ${r.reason})`); const w = await Economy.WalletAsync(); // { balance, todayPaid, caps: { perPayout, perPlayerDay, perDay }, frozen }"},{"u":"/scripting/economy/#where-the-money-is","t":"Economy: SCRIP payouts from a funded wallet","h":"Where the money is","s":"Scripting","x":"SCRIP lives in each world's SCRIP ledger, the same one the Earth shop and the world's games use. That ledger is the only record of who holds what. Your experience's wallet is an account in it, x1w:<experience> , one per world. A payout is an ordinary ledger transfer from the wallet to the player. The world's tax law applies. Nothing can create SCRIP. There is no mint call in the API or in the host. A payout the wallet can't cover pays what it can, down to 0 ( reason: \"wallet\" ). The wallet is funded only by transfers: you, in the world: /x1 <experience> fund <amount> moves your own SCRIP into the wallet; an operator in the console (Worlds › Script economy › Fund), from the treasury or another ledger account."},{"u":"/scripting/economy/#caps","t":"Economy: SCRIP payouts from a funded wallet","h":"Caps","s":"Scripting","x":"The approver grants three caps with the capability: Cap Meaning per_payout The most one payout pays per_player_day The most one player receives from this experience per UTC day per_day The most this experience pays per UTC day, across every world and server An operator can lower them in the console, or freeze the wallet (payouts pay 0, reason: \"frozen\" ). Caps cut a payout short instead of failing it: check paid , capped and reason ( per_payout , per_player_day , per_day , wallet , frozen ). The host also limits payouts to 2 per second per sandbox; past that the call throws rate limited ."},{"u":"/scripting/economy/#idempotency","t":"Economy: SCRIP payouts from a funded wallet","h":"Idempotency","s":"Scripting","x":"key (1-128 printable characters, no spaces) names the payout. The platform keeps one record per (experience, key), so a retry with the same key answers the first result with reason: \"duplicate\" and never pays twice. That holds even if the call timed out, the server restarted mid-payout or the retry ran on another server. Use a key that names the thing being rewarded, such as catch-<id> or quest-<player>-<quest> , never a random value per call."},{"u":"/scripting/economy/#what-happens-on-a-payout","t":"Economy: SCRIP payouts from a funded wallet","h":"What happens on a payout","s":"Scripting","x":"The host checks your grant and the rate, and reads the wallet's ledger balance. The platform reserves the payout. In one transaction it applies the three caps and the key, and answers the amount allowed. The host writes the payout to its journal on disk, then asks the ledger to transfer. The memo is x1pay <experience> <id>: <memo> . The host reports the result. A crash between steps 3 and 4 is settled at the next start from the ledger's own audit: the transfer is either there or it never happened. Every payout is in the console's payout log: key, asked, allowed, paid, tax, why it was cut."},{"u":"/scripting/economy/#when-payouts-are-closed","t":"Economy: SCRIP payouts from a funded wallet","h":"When payouts are closed","s":"Scripting","x":"Payouts are refused while the world's PaperMCP says SCRIP can become real money. That covers three cases: mcp.custom.scrip.real_money is on; payments run on a real network; the settings can't be read. These are the same rules as the world's casino and poker. The operator can allow payouts anyway with the X1Script setting economy.allow-when-real-money ."},{"u":"/scripting/regions/","t":"Regions: the map areas your experience may act in","h":"","s":"Scripting","x":"Regions: the map areas your experience may act in Capability regions . Typings: Regions , Region ( packages/script/v1/regions.d.ts ). import { Regions } from \"@x1/script\"; const lake = Regions.Get(\"lago-di-gusana\")!; lake.PlayerEntered.Connect((p) => p.SendMessage(\"Welcome to the lake\")); lake.PlayerLeft.Connect((p) => { /* ... */ }); print(lake.GetPlayers().length, lake.Contains(await player.GetPosition()), lake.Water);"},{"u":"/scripting/regions/#where-regions-come-from","t":"Regions: the map areas your experience may act in","h":"Where regions come from","s":"Scripting","x":"Operators draw regions per world in the console (Worlds › Script economy › Regions): boxes of blocks, with the water inside them. Your manifest asks for regions by id under capabilities.regions.request . The approver grants a subset, each with rights: read : events and positions; build : World.SetBlock ; spawn : World.Spawn . Your sandbox sees only the regions it was granted, with the box as approved. A later change to the catalogue reaches you only at your next approval."},{"u":"/scripting/regions/#what-regions-bound","t":"Regions: the map areas your experience may act in","h":"What regions bound","s":"Scripting","x":"World.GetBlock , SetBlock and Spawn work only inside a region with the matching right. Player.GetPosition works only for players inside one of your regions. World events ( BlockBroken , BlockPlaced , Interact , the fishing hook) reach your sandbox only when they happen inside your regions. Ui.Particles draws only inside your regions."},{"u":"/scripting/regions/#enter-and-leave","t":"Regions: the map areas your experience may act in","h":"Enter and leave","s":"Scripting","x":"The host checks every online player's block position once a second: PlayerEntered and PlayerLeft fire on the changes; a sandbox that starts gets PlayerEntered for everyone already inside; a player who leaves the server gets PlayerLeft . GetPlayers() is who is inside as of that last check, so it is at most 1 s old. Boxes are inclusive and in one Minecraft world ( Region.World )."},{"u":"/scripting/commands/","t":"Commands: /x1 <experience> <command>","h":"","s":"Scripting","x":"Commands: /x1 Capability commands . Typings: Commands , CommandOptions ( packages/script/v1/commands.d.ts ). import { Commands } from \"@x1/script\"; Commands.Register(\"sell\", async (player, args) => { const [what, n] = args; // \"/x1 fishing-ada sell pike 3\" }, { description: \"Sell your catch\", usage: \"<fish> [count]\" }); Commands.Register(\"reset\", (p) => { /* ... */ }, { who: \"creator\" });"},{"u":"/scripting/commands/#names","t":"Commands: /x1 <experience> <command>","h":"Names","s":"Scripting","x":"A command lives in your experience's namespace: /x1 <experience> <name> [args] . name is 1-24 characters of a-z 0-9 - _ and must be in your grant's names . help and fund belong to the host: /x1 <experience> help lists your commands that the player may run; /x1 <experience> fund <amount> lets the creator fund the wallet (see economy.md). /x1 alone lists the experiences in the world. An alias listed in the grant's aliases (and in its names ) is also /<name> , but only when no plugin or other sandbox already holds that label. Otherwise it stays /x1 <experience> <name> , and your sandbox log says so. Aliases are removed when your sandbox stops."},{"u":"/scripting/commands/#who-may-run-it","t":"Commands: /x1 <experience> <command>","h":"Who may run it","s":"Scripting","x":"who decides who may run a command. The host checks it before your handler runs: who Who may run it everyone Every player (the default) creator You, plus server operators and staff holding x1.experience.<experience>.admin operator Operators and that staff only"},{"u":"/scripting/commands/#arguments-are-data","t":"Commands: /x1 <experience> <command>","h":"Arguments are data","s":"Scripting","x":"Arguments are split on spaces; \"double quotes\" keep spaces. At most 16 arguments of 100 characters each. Formatting codes, control characters, zero-width characters and bidi overrides are removed. The host never hands them to a command dispatcher. /x1 shop buy ; op me gives your handler the strings buy , ; , op , me and nothing else. A player runs at most 5 commands a second."},{"u":"/scripting/ui/","t":"UI: panels, toasts, HUD, titles and sounds","h":"","s":"Scripting","x":"UI: panels, toasts, HUD, titles and sounds Capability ui . Typings: Ui , Panel , PanelCard , PanelResult , Hud ( packages/script/v1/ui.d.ts ). import { Ui } from \"@x1/script\"; const r = await Ui.ShowAsync(player, { id: \"market\", title: \"Fish market\", subtitle: \"Sell your catch\", stat: { label: \"Wallet\", value: `${balance} SCRIP` }, tabs: [{ id: \"sea\", label: \"Sea\" }, { id: \"lake\", label: \"Lake\" }], cards: catch.map((f) => ({ id: f.id, title: f.name, icon: \"cod\", detail: [`${f.kg} kg`], price: f.price, qty: { max: f.count }, tab: f.water })), buttons: [{ id: \"sell\", label: \"Sell\", style: \"primary\" }, { id: \"close\", label: \"Close\" }], }); if (r?.button === \"sell\") sell(player, r.card!, r.qty!); Ui.Toast(player, \"Sold 3 pike for 27 SCRIP\", \"success\"); Ui.Hud(player, { title: \"Tournament\", lines: [\"Your best: 4.2 kg\"], progress: 0.6 });"},{"u":"/scripting/ui/#declarative-never-html","t":"UI: panels, toasts, HUD, titles and sounds","h":"Declarative, never HTML","s":"Scripting","x":"A panel is data: a header, tabs, item cards and footer buttons. Web players get the web client's own panel. It has the experience's name in the header, tabs, cards with a picture, details, a price and a badge, a quantity stepper with − + Max and the total, a primary button that waits for a selection, and keys (Esc, Enter, arrows, + −). Java players get the same panel as a chest GUI: tabs in the top row and an info book (title, lines, stat, whose panel); cards as items, 36 a page with page arrows; a quantity screen for cards with a stepper (−10 −5 −1, +1 +5 +10, Max, OK); the buttons in the bottom row. Every string is plain text. Formatting codes, controls, bidi overrides and resource-pack glyphs are removed, and the web client writes text with textContent only. Every panel, HUD box and toast says which experience sent it. A script can't draw anything that looks like the world's or 0x's own interface. Panels resolve when the player acts: Ui.ShowAsync → {button, card?, qty?} , or undefined when closed, timed out ( timeoutS , default 60, at most or replaced; Ui.Panel → the button id. A panel with cards and no buttons resolves with button: \"card\" when a card is chosen. The host checks "},{"u":"/scripting/ui/#the-rest","t":"UI: panels, toasts, HUD, titles and sounds","h":"The rest","s":"Scripting","x":"Call Web Java ActionBar , Title the action bar, a title the same Toast(player, text, kind) a toast naming the experience the action bar, coloured by kind Hud(player, hud | null) a HUD box per experience (title, up to 6 lines, a progress bar) a boss bar Sidebar(player, title, lines) a box per experience the scoreboard sidebar (only while no other plugin owns the player's scoreboard) Sound(player, key) the sound the same Particles(kind, at, count) particles the same, only inside your regions Sounds must be in the grant's sounds and particles in its particles ; each kind of call must be in the grant's kinds ."},{"u":"/scripting/ui/#limits","t":"UI: panels, toasts, HUD, titles and sounds","h":"Limits","s":"Scripting","x":"10 UI calls per second per player per sandbox. 1 title per second per player. 2 panels per second per player per sandbox. One open panel per player: a newer one, from any experience, closes the older one, which resolves undefined . At most 54 cards, 8 tabs, 6 buttons and 12 lines per panel. Each player sees at most 3 HUD boxes and 4 toasts at a time."},{"u":"/scripting/fishing/","t":"Fishing and Environment (0x script v1)","h":"","s":"Scripting","x":"Fishing and Environment (0x script v1) The vanilla fishing hook is a host primitive: the bite, its timing and the reel stay native (Paper's PlayerFishEvent ), and a script steers them and decides what was caught. Capabilities fishing and environment ; typings in packages/script/v1/fishing.d.ts ."},{"u":"/scripting/fishing/#fishing","t":"Fishing and Environment (0x script v1)","h":"Fishing","s":"Scripting","x":"Signal When Hook methods that work Fishing.Cast(hook) the line lands (FISHING) SetWait(minTicks, maxTicks) : the vanilla wait before a bite (1..6000) Fishing.Bite(hook) a fish bites (BITE) HoldOff() : no bite this time, the hook stays in the water for another wait Fishing.Reel(hook, hadBite) the player reels in (CAUGHT_FISH, REEL_IN, FAILED_ATTEMPT, IN_GROUND, CAUGHT_ENTITY) CancelLoot() : the vanilla catch does not land (the script gives its own) Events reach a sandbox only for hooks inside its granted regions. An event another plugin cancelled (for example FishingGame's own rods) is not delivered, and a throttled sandbox misses it (vanilla plays). Hook methods change that one vanilla event, so they work only while the event is delivered : call them before the handler's first await . Later they throw. Calling one in the wrong stage throws. hook.Rod is the rod in hand as an ItemRef . It is mine (with this experience's tag) only for a sealed item this experience gave, so a creative copy or another plugin's rod is never yours. A vanilla rod should play vanilla: check hook.Rod?.mine first. hook.Depth is the blocks of water under the hook. On Reel after a bite, hook.ReactionMs is the t"},{"u":"/scripting/fishing/#environment","t":"Fishing and Environment (0x script v1)","h":"Environment","s":"Scripting","x":"Environment.GetAsync(position) gives the real conditions at a place from PaperMCP's water and weather services: waterTempC , airTempC , windMs , windFromDeg , waveM , salinity , month , localHour and daylight . A value the world does not know is NaN . Community sandboxes may read only places inside their regions."},{"u":"/scripting/fishing/#the-example-game","t":"Fishing and Environment (0x script v1)","h":"The example game","s":"Scripting","x":"examples/fishing ( x1.json + src/main.ts , about 90 lines) is Lago fishing: /x1 fishing-ada start gives a Lago rod and shows the HUD; stop ends it; inside the lago-pond region a bite shows a BITE! HUD and a splash, and a catch lands as a sealed fish item (species, kg) with a toast and a title; /x1 fishing-ada log opens the catch log panel (tabs: your bag with a quantity on each stack, the last 20 catches) with Sell selected / Sell all; the fishmonger pays SCRIP from the game's funded wallet, never more than one payout's cap, and gives the fish back when the wallet or a cap pays nothing. Tests: node tests/fishing/js.mjs (the VM side and the example game against a mock host) and the lab e2e."},{"u":"/reference/","t":"Reference","h":"","s":"Reference","x":"Page What it covers Limits and quotas Every limit you can hit, in one place: hosting quota and file sizes, request sizes, rate limits, store and payment ranges Error codes What errors look like on the REST API, in the SDK packages and in the 0x CLI Versioning and compatibility How /v1 , the @0xlimo/* packages, the CLI and site versions change, and what 0x promises about breaking changes Changelog Developer-visible changes, newest first FAQ Short answers to the most common questions Glossary The terms used across these docs The machine-readable sources behind the generated pages are the backend's OpenAPI document (see the REST reference ) and the packages' typings (the API reference pages in JavaScript SDK )."},{"u":"/reference/limits-and-quotas/","t":"Limits and quotas","h":"","s":"Reference","x":"These are the values in force on 0x.limo. Where a topic has its own page, this page links there and gives the number, so you can scan everything at once. Rate limits can be adjusted by 0x at runtime. The values below are the configured defaults."},{"u":"/reference/limits-and-quotas/#hosting","t":"Limits and quotas","h":"Hosting","s":"Reference","x":"Details: Hosting limits . You can read your own usage and limits from GET /v1/hosting/me , and the public values from GET https://api.0x.limo/v1/hosting/config . Limit Value Storage quota per developer (all sites and versions) 2048 MB (2 GiB) Largest file 64 MB Files per version 5000 Sites per developer 20 Site name 3–40 characters a-z , 0-9 , - , not starting or ending with - ; globally unique; names of 0x's own hosts are reserved Blocked file types exe dll com scr msi msix bat cmd ps1 vbs lnk reg so dylib app dmg pkg deb rpm appimage apk ipa jar sh Request body on api.0x.limo 80 MB (an upload sends one file per request)"},{"u":"/reference/limits-and-quotas/#rate-limits","t":"Limits and quotas","h":"API rate limits","s":"Reference","x":"Details: Rate limits . They are token buckets shared by all API nodes. Over the limit, you get 429 with Retry-After . Class Applies to Rate (per second) Burst auth requests that check a password (password grant, sign-in pages), per client IP 2 20 api everything else, per caller (token, or IP when anonymous) 50 300 Reviews writing a review, per account 1 per 30 s 10 Reports (player reports) per account / per IP 1 per 60 s / 1 per 20 s 5 / 20 Store review issue replies per account 1 per 20 s 10 CSP reports ( /x1/csp ) per address / per site 1 / 20 120 / 2000 Sign-up accounts per IP address per day 5 —"},{"u":"/reference/limits-and-quotas/#text","t":"Limits and quotas","h":"Sizes of text and reports","s":"Reference","x":"What Limit Review body 4000 characters Player report text 2000 characters Review issue reply 4000 characters; at most 200 messages per issue CSP report request 64 KB, at most 50 reports per request Trailer file on the submission page 60 MB"},{"u":"/reference/limits-and-quotas/#payments","t":"Limits and quotas","h":"Store and payments","s":"Reference","x":"What Range Game price 99–100000 US cents ($0.99–$1,000), USD only ( paid games ) Platform fee 10 % of each sale Top-up $20–$500, whole dollars ( wallet ) In-game item price 25–50000 US cents; quantity 1–100 per purchase; a purchase intent lives 10 minutes (switched off) Subscription plans at most 10 per game; prices 99–100000 cents per period (switched off) Play ticket lifetime 5 minutes (switched off) Paygate pass 12 hours; 1 hour for subscription-only games (not deployed)"},{"u":"/reference/limits-and-quotas/#sdk","t":"Limits and quotas","h":"SDK and CLI","s":"Reference","x":"What Limit Launcher requests from @0xlimo/platform/launcher 10 s timeout by default ( timeoutMs ); dialogs that wait for the player have none @0xlimo/iap receipt keys cache ( fetchKeys ) 10 minutes"},{"u":"/reference/error-codes/#api","t":"Error codes","h":"REST API","s":"Reference","x":"Every error from /v1 is a JSON object {\"error\": \"...\"} with an HTTP status. Some errors add fields, for example missing on insufficient_funds . The full list of statuses, with retry advice, is in API errors . In short: Status Meaning 400 malformed request; the error text names the field 401 no token, or an expired or invalid token 402 payment needed: the game isn't owned ( not_owned ) 403 signed in, but not allowed (e.g. account_required for a guest) 404 no such resource, or the feature is switched off (in-game purchases and subscriptions answer 404 while off) 409 a conflict with the current state (see below) 410 gone: an expired intent 429 rate limited; wait Retry-After seconds ( limits ) 503 a dependency is briefly unavailable, or a feature isn't configured (e.g. play tickets): retry later Codes you can branch on, as the error value: error Status Where account_required 403 buying, top-ups, in-game purchases, reviews: guests can't not_owned 402 play tickets for a paid game insufficient_funds 409 buying, in-game purchases, subscribing; carries missing / missingUsd subscription_only 409 buying a subscription-only game already_owned , limit_reached 409 in-game purchases ( limit_reach"},{"u":"/reference/error-codes/#sdk","t":"Error codes","h":"JS SDK","s":"Reference","x":"Package Error Codes / fields @0xlimo/platform X1Error status (HTTP), body (the API's JSON), path @0xlimo/platform/launcher LauncherError code : no_launcher (not inside the 0x launcher), timeout , closed , busy (a dialog is already open), signed_out , no_such_plan , no_such_period , unknown_type , failed ; detail @0xlimo/platform/server EntitlementError status , body @0xlimo/iap (page) IapError code : canceled , insufficient_funds , limit_reached , already_owned , not_found , not_signed_in , unavailable , busy , failed , timeout , not_in_launcher @0xlimo/iap/server IapError code , status , body subscriptions.subscribe() doesn't reject when the player says no. It resolves with an outcome : subscribed , already_subscribed , canceled , signed_out , insufficient_funds or failed ."},{"u":"/reference/error-codes/#cli","t":"Error codes","h":"0x CLI","s":"Reference","x":"On failure the CLI prints x1: <message> to stderr and exits with: Exit code Meaning 0 success (also 0x help ) 1 the command failed (the message says why; API errors pass on the backend's error text) 2 unknown command (the usage text is printed) 3 0x source check : the build did not match the published files ( verdict other than match )"},{"u":"/reference/versioning/","t":"Versioning and compatibility","h":"","s":"Reference","x":"0x launched on 2026-10-10. Some of what follows is a written promise; the rest is current practice , marked as such, until a formal policy replaces it."},{"u":"/reference/versioning/#api","t":"Versioning and compatibility","h":"REST API /v1","s":"Reference","x":"Every route lives under /v1 . The contract is the OpenAPI document of the backend ( openapi.yaml , version 1.0 ), and the API reference is generated from it. A contract test checks that every route the backend serves is documented, and that every documented route exists. Additive changes happen without notice. New routes, new optional request fields and new response fields can appear at any time. Unknown request fields are tolerated, so clients must ignore response fields they don't know. Breaking changes to a /v1 route, such as removing a route or field, changing a field's type or making an optional field required, are not made in place. Current practice: when a flow must change, the old one is kept and marked deprecated in the reference (for example POST /v1/auth/verify_any , the deprecated connect flow), and new behaviour comes as a new route. A future /v2 would run alongside /v1 . Switched-off features answer 404 until they are switched on. Switching a feature on is not a breaking change. Build so that a 404 from a switched-off feature degrades gracefully."},{"u":"/reference/versioning/#sdk","t":"Versioning and compatibility","h":"SDK packages @0xlimo/*","s":"Reference","x":"They are published to the 0x registry ( https://0x.limo/npm/ ), not to npmjs, and follow semver. All of them are in the 0.x range today: current practice is that a patch release ( 0.1.x ) never removes or renames an export, while a minor release ( 0.x.0 ) may, and its changelog entry says so. Published versions are never overwritten or removed, so a version you pin keeps installing. Pin exact versions in production games. The 0x CLI depends on exact versions of the packages it bundles into sites ( @0xlimo/swarm-sw , @0xlimo/net , @0xlimo/iap , @0xlimo/byo-assets )."},{"u":"/reference/versioning/#cli","t":"Versioning and compatibility","h":"0x CLI","s":"Reference","x":"The latest version is in the registry's latest tag. The installer installs it into ~/.0x : curl -fsSL https://0x.limo/sdk/install.sh | sh # latest curl -fsSL https://0x.limo/sdk/install.sh | ZEROX_VERSION=0.1.4 sh # a pinned version Run the installer again to update. The CLI doesn't update itself. Site versions published with an older CLI keep working: each version carries the runtime it was built with (below)."},{"u":"/reference/versioning/#sites","t":"Versioning and compatibility","h":"Hosted site versions","s":"Reference","x":"Every publish creates a new immutable version at https://<site>-play.0x.limo/sites/<site>/<n>/ . Its files never change. The 0x runtime that was added to it at finalize is versioned with it, so a new SDK release never changes a version that is already published. What can change for a published version without a new publish: the response headers 0x serves it with (its security policy, which you control with csp in 0x.config.json ; see Security ), and swarm delivery (on, private or off). Old shared URLs ( https://play.0x.limo/sites/<site>/… ) redirect permanently to the site's own origin."},{"u":"/reference/versioning/#steamworks","t":"Versioning and compatibility","h":"Steamworks compatibility","s":"Reference","x":"The Steam-compatible layer implements specific interface versions (for example SteamUser023 ), each matched by its exact version string. Current practice: support for an interface version isn't removed; newer versions are added beside the old ones. See Steamworks compatibility ."},{"u":"/reference/versioning/#deprecation","t":"Versioning and compatibility","h":"Deprecation notices","s":"Reference","x":"Deprecations and every developer-visible change are listed in the changelog , with their dates."},{"u":"/reference/changelog/","t":"Changelog","h":"","s":"Reference","x":"Developer-visible changes on 0x.limo, newest first. Dates are UTC. \"Deployed off\" means the code is in production but switched off; see what is live ."},{"u":"/reference/changelog/#2026-11-02","t":"Changelog","h":"2026-11-02","s":"Reference","x":"@0xlimo/swarm-sw 0.1.8 (site runtime 0.2.6) on the 0x registry ( https://0x.limo/npm/ ). These are the runtime changes made on 2026-10-28 to 10-30, for self-hosted sites. 0x hosting still installs runtime 0.1.4, and the published 0x CLI (0.1.7) installs 0.1.3. See @0xlimo/swarm-sw . Mounts (runtime 0.1.9): a large data tree your own server serves at a URL prefix goes on the swarm in 1 MiB pieces, without being copied into the site. A Range request is answered from only the pieces that cover it. Publishing a mount ( 0x publish --to … --mount <prefix>=<dir> , --mount-exclude , --mount-cache , mounts in 0x.config.json ) is in the CLI source but not in a published CLI yet. Each mounted file is one pack torrent ( swarm/t/ ), indexed in swarm/x/<name>/packs.json . See Mounts, mirror and readahead . Starter packs from disk (0.1.9 to 0.2.2): the player keeps one file of boot data, and the runtime reads covered spans from it with every piece hash-checked. The page can download the pack resumably in parallel ranges. data-manual on the boot tag waits for your Play button. .x1patch updates carry only the changed pieces. See Starter packs . readahead in x1.json (0.2.0): ranged reads of a mounte"},{"u":"/reference/changelog/#2026-10-24","t":"Changelog","h":"2026-10-24","s":"Reference","x":"Developer › Tokens. Create, list and revoke your publish tokens in the browser at api.0x.limo/dev/tokens : name, created, last used, and what each can do. A new token is shown once, with a Copy button. At most 25 live tokens per account; minting is rate-limited. See Accounts and tokens . Script review: guests fail the review. If the smoke run's guest ( mc-ReviewGuest , a player without a 0x account) is refused a player data store ( scope player needs player ), the version fails the automated review (check guest-store ); it used to be a warning. Keep guests' data in an experience store keyed by their UserId . See Guests ."},{"u":"/reference/changelog/#2026-10-23","t":"Changelog","h":"2026-10-23","s":"Reference","x":"Publish 0x scripts into worlds. Creators package TypeScript scripts with an x1.json manifest (capabilities, regions, budgets) and upload them with 0x script publish (0x CLI 0.1.7) or x1-script pack --sign + x1-script submit ( @x1/script 0.2.0) or at api.0x.limo/dev/scripts . Each version gets an automated review (code checks, a reproducible rebuild, a sandboxed smoke run) and a 0x reviewer's approval; approved versions run in OG Earth in their own sandbox, with at most the capabilities they asked for. See Publishing scripts to worlds . New capabilities for scripts: inventory, economy (SCRIP payouts from a funded wallet), regions, commands, UI and fishing. See the pages under Scripting ."},{"u":"/reference/changelog/#2026-10-19","t":"Changelog","h":"2026-10-19","s":"Reference","x":"Store: choose the release stage in your submission. release: \"demo\" | \"full\" on POST /v1/listings , listing.release / 0x submit --release (0x CLI 0.1.6), and Release stage on the submission form. An approved \"demo\" version lists the game under Upcoming releases; a version without the field keeps the game's stage. See Release types ."},{"u":"/reference/changelog/#2026-10-17","t":"Changelog","h":"2026-10-17","s":"Reference","x":"0x script (TypeScript scripting) runs on production in OG Earth, on the script bus. It is not open to developers yet ( Scripting ). docs.0x.limo : this site, the developer documentation in one place. 0x CLI 0.1.4 : csp in 0x.config.json declares the outside hosts and browser permissions your site needs. It is sent with each version, and 0x publish prints the version's security policy after finalize. 0x submit also sends the store details (controls, phones, players, languages), release_notes and trailer from 0x.config.json , and checks that the capsule is a PNG. Hosted sites: enforced Content-Security-Policy and Permissions-Policy. Versions published from now on are served with an enforced policy built from 0x's baseline and your csp declaration. Older versions stay report-only. Before this, every hosted page got a report-only policy, with reports going to the site's own POST /x1/csp , and you can read them from GET /v1/hosting/csp-reports . See Security . Swarm for sites on their own origin : sites at <site>-play.0x.limo are seeded and shared by players again, and swarm responses from the site runtime carry COEP/COOP/CORP, so cross-origin-isolated pages keep working when files"},{"u":"/reference/changelog/#2026-10-16","t":"Changelog","h":"2026-10-16","s":"Reference","x":"Hosted sites on their own origin : https://<site>-play.0x.limo/sites/<site>/<n>/ . Old https://play.0x.limo/sites/… links redirect permanently. Embeds : /embed/<id> (X player cards, oEmbed): the game plays inside other sites' frames. 0xpak asset packs : signed, content-addressed packs delivered by the swarm ( 0xpak ). @0xlimo/platform 0.1.1 : plays ( start / beat / end , auto), findAppid , siteApi ; hosted sites find the platform API in x1.json . 0x CLI 0.1.3 : 0x login prints a full device link. Wallet : a player can cancel an unpaid top-up."},{"u":"/reference/changelog/#2026-10-15","t":"Changelog","h":"2026-10-15","s":"Reference","x":"Bitcoin top-ups (credited at the realized value less the checkout's fee). Store review issues : a thread per issue between store reviewers and you. Answer from the submission page or with 0x issues / 0x issues reply . Site runtime (added to each version at finalize): pages opened directly report swarm and origin bytes per file, and the runtime is versioned per site version."},{"u":"/reference/changelog/#2026-10-14","t":"Changelog","h":"2026-10-14","s":"Reference","x":"Source integrity : 0x submit --source , 0x source check , 0x.build.json . Game pages show \"Source verified\", \"Source check failed\" or \"Source not provided\" (guide: https://0x.limo/sdk/source-integrity.html )."},{"u":"/reference/changelog/#2026-10-13","t":"Changelog","h":"2026-10-13","s":"Reference","x":"Payments on : paid games bought from the 0x balance, card top-ups settled in USDT, 10 % platform fee. Developer settlement on : USDT payouts on the network you choose ( settlement ). The networks are Ethereum and Tron, then Arbitrum One, BNB Smart Chain and Polygon PoS (all on the same day). In-game purchases ( @0xlimo/iap ) and subscriptions deployed off ."},{"u":"/reference/changelog/#2026-10-12","t":"Changelog","h":"2026-10-12","s":"Reference","x":"Private and Off sharing for hosted games ( p2p=relay , p2p=0 ). @0xlimo/net 0.1.2, @0xlimo/swarm-sw 0.1.1, @0xlimo/host 0.1.1. x1-host : a just-published site is looked up again before a game server is refused. Store pages : achievements, leaderboards, friends and developer news. Live player counts and the web launcher library. Starter templates: Neon Drift (canvas) and Orb Rush (3D multiplayer), with guides."},{"u":"/reference/changelog/#2026-10-10","t":"Changelog","h":"2026-10-10 — launch","s":"Reference","x":"0x.limo is open: sign-up ( POST /v1/oauth/signup ), hosted publishing ( 0x publish , the upload page at https://api.0x.limo/hosting/ ), store submission ( 0x submit , https://api.0x.limo/dev/submit ), hosted game servers ( 0x deploy-server ) and the broadcast service ( wss://play.0x.limo/x1/bcast/… ). The default swarm policy shares every file of 16 KiB or more, in any format."},{"u":"/reference/faq/#publishing","t":"FAQ","h":"Publishing and hosting","s":"Reference","x":"Does hosting cost anything? No. 0x doesn't charge for hosting within the limits : 2048 MB per developer, 64 MB per file, 20 sites. Do I need the CLI? No. You can upload a built folder in the browser at https://api.0x.limo/hosting/ and fill in the store listing at https://api.0x.limo/dev/submit . The CLI ( 0x publish , 0x submit ) does the same and adds the swarm runtime, a local dev server and templates. See Getting started . Which engines work? Anything that runs in a browser: three.js, Babylon.js, Phaser, plain canvas, and WebAssembly builds. Starters exist for three.js, Babylon.js, Phaser and canvas. Native games run through the Steamworks compatibility layer or the native runtime . Why is my published page at <site>-play.0x.limo and not on 0x.limo ? Every hosted site gets its own origin, so a game's scripts can never share an origin with the store, your account or another game. The launcher frames your page from there. Can I change a published version? No. Versions are immutable: publish a new version and point your listing at it. See versioning . My page works locally but a request or a font is blocked on 0x. New versions are served with an enforced Content-Security-Policy. De"},{"u":"/reference/faq/#store","t":"FAQ","h":"Store","s":"Reference","x":"What happens after I submit a listing? Every listing version waits for review. Reviewers can open issues on your listing; you answer them on the submission page or with 0x issues reply . A version submitted while another one is pending replaces it. How do I mark my game as a demo or upcoming? Submit the version with \"release\": \"demo\" ( 0x submit --release demo , or Release stage on the submission form). See Release types ."},{"u":"/reference/faq/#money","t":"FAQ","h":"Money","s":"Reference","x":"How do I sell my game? Set a price on the listing through POST /v1/listings , set a USDT payout address, and wait for review. See Paid games . Note that the submission form and 0x submit always send \"free\" . How and when am I paid? In USDT, on the network you pick. Your share is transferred to your account at the USDT checkout within minutes of a sale, and paid out on-chain automatically when it reaches your threshold. See Developer settlement . Can I sell items or subscriptions? The code is in production but switched off. The SDKs ( @0xlimo/iap , @0xlimo/platform/launcher ) work, and the routes answer 404 until 0x switches them on. See In-game purchases and Subscriptions . Can players pay me directly, by card or crypto? No. Players pay from their 0x balance, which they top up by card. Your game never handles cards, wallets or chains."},{"u":"/reference/faq/#sdk","t":"FAQ","h":"SDK","s":"Reference","x":"Where do I install the packages from? From the 0x registry: npm install @0xlimo/net --@0xlimo:registry=https://0x.limo/npm/ . The installer sets @0xlimo:registry in ~/.npmrc for you, and @x1:registry too ( @x1/script and @x1/meshtorrent keep the old scope). The packages are not on npmjs. Does my game have to use the SDK? No. A plain static game publishes as is. The SDK adds swarm delivery, multiplayer broadcasts, sign-in, stats and payments when you want them. Something in these docs is wrong. Tell us through a review issue reply or your usual contact at 0x. The docs are rebuilt from the code on every release."},{"u":"/reference/glossary/","t":"Glossary","h":"","s":"Reference","x":"0x balance — A player's money on 0x, in US cents. Topped up by card and spent on games, items and subscriptions. See Wallet . appid — The numeric id of a game (an app ) on 0x, the same kind of number Steam uses. Listings, stats, inventory and payments are keyed by it. Broadcast service — 0x's message relay for multiplayer web games ( wss://play.0x.limo/x1/bcast/… ). The @0xlimo/net adapters for socket.io and Colyseus send broadcasts through it. Checkout (USDT checkout) — 0x's payment partner page where players pay by card. It also holds developers' balances and makes their USDT payouts. Consumable / permanent — The two kinds of in-game items : bought in quantities and used up by your server, or owned once. Entitlement — Proof that a player holds something: a game (from a purchase or a subscription), or a subscription plan's entitlement key such as vip . Finalize — The last step of a publish: 0x assembles the uploaded files, adds the site runtime and the swarm manifest, and makes the version immutable. Guest — A visitor the launcher signs in without an account. Guests can play free games, but can't buy, top up or write reviews ( account_required ). Hosted site — A developer's static"}]