Adds the SHA-256 of a known instrument ROM image to the refusal list. Digests are kept as lower-case hex and never ship with mwg, so the list is whatever a game or a studio registers.
import { detectRomImage, registerRomDigest, sha256Hex } from '@datamoc/mwg/mwl';const bytes = new Uint8Array([1, 2, 3]);registerRomDigest(await sha256Hex(bytes), 'example ROM');console.log((await detectRomImage(bytes))?.reason); // 'digest' Copy
import { detectRomImage, registerRomDigest, sha256Hex } from '@datamoc/mwg/mwl';const bytes = new Uint8Array([1, 2, 3]);registerRomDigest(await sha256Hex(bytes), 'example ROM');console.log((await detectRomImage(bytes))?.reason); // 'digest'
Adds the SHA-256 of a known instrument ROM image to the refusal list. Digests are kept as lower-case hex and never ship with mwg, so the list is whatever a game or a studio registers.