Skip to main content

manifest.json

Scopes

scopes lists the requested scopes. Only the scopes staff approve after review (approved_scopes) take effect, and methods without an approved scope return SCOPE_DENIED. The authorization notice users see when they first open the game also lists the approved scopes. Request only the scopes you use. Game energy scopes get stricter review, and the game must be rated 18+.

Game packages

A game package (.nlgame) is a zip file with manifest.json and the entry page at the root. On upload the platform checks that:
  • It is at most 20 MB compressed, at most 100 MB uncompressed, and has at most 2,000 files.
  • Paths are relative paths inside the package only: no .., absolute paths, backslashes, or symbolic links, and no files whose names differ only in case.
  • The compression method is store or deflate only. File types are limited to an allowlist of web pages, scripts, images, audio and video, fonts, wasm, and similar.
  • __MACOSX/ and .DS_Store are removed. Any existing _signature/ in the package is discarded.
When the checks pass, the platform generates _signature/files.json (the SHA-256 of every file) and signs it with the platform private key. The app verifies the signature after download and does not run packages that fail verification.

Runtime restrictions

The game page has a strict CSP:
  • script-src 'self' 'wasm-unsafe-eval': no inline scripts, no eval or new Function, and no scripts loaded from outside.
  • connect-src covers only the game itself, the game service, the forum’s /api/v1/games/, and the addresses in network.connect.
  • Images can come from the game itself, data:, blob:, the forum, and the forum’s storage domain (user avatars).
  • No embedded iframes or objects, and no form submission.
The static scan on upload blocks external scripts (<script src="http…">, import("http…"), and so on). eval / new Function with non-literal arguments and direct access to webkit.messageHandlers or nlBridge produce warnings. Engines that rely on new Function (such as PixiJS) need a patch; the Dou Dizhu example has a ready-made one in vendor/.