/** * Dataset: entitlement-to-GUID mappings from aces.vromfs.bin config/gui.blk bundles/guid * (gui.vromfs.bin scripts/onlineShop/onlineBundles.nut, implementation notes). */ import { findBlock } from '@wto/blk'; import type { Dataset } from './dataset.ts'; const GUI_CONFIG = 'config/gui.blk'; /** Entitlement name -> store item GUID (upper-case UUID string). */ export type StoreBundleGuids = Readonly>; export const storeBundles: Dataset = { id: 'store-bundles', version: 1, extract: (source) => { const gui = source.readBlk('aces.vromfs.bin', GUI_CONFIG); const guidBlock = findBlock(findBlock(gui, 'bundles') ?? { name: '', params: [], blocks: [] }, 'guid'); const result: Record = {}; for (const param of guidBlock?.params ?? []) { if (param.value.type === 'string' && param.value.value) { result[param.name] = param.value.value; } } return result; }, };