mwg API
    Preparing search index...

    Function verifyPackage

    • Checks a .mwp end to end and reports instead of throwing: container (digests, limits, paths), schema, declared asset.sha256, every reference, the licence and source of each medium, the capabilities requested, requires.mwg, instrument ROM images, and the game's policy when one is given.

      Parameters

      Returns Promise<PackageReport>

      import { encodePackage, verifyPackage } from '@datamoc/mwg/mwl';

      const source = "[{ tag: 'package', id: 'marta', version: '1.0.0' }]";
      const bytes = await encodePackage([{ path: 'content.mwl', data: new TextEncoder().encode(source) }]);
      console.log((await verifyPackage(bytes)).ok); // true