Real Blockfrost returns both cost_models (named-key dict) and cost_models_raw (flat int array). yaci-store 0.10.6 only returns cost_models. Breaks Blaze's getParameters(), which does Object.entries(response.cost_models_raw) directly - surfaces as TypeError: Cannot convert undefined or null to object at tx-build time.
Client-side workaround (Yaci already emits op names in canonical ledger order, so Object.values() reproduces the expected array):
const cost_models_raw: Record<string, number[]> = {};
for (const [v, ops] of Object.entries(response.cost_models)) {
cost_models_raw[v] = Object.values(ops as Record<string, number>);
}
Happy to open a PR emitting cost_models_raw alongside cost_models.
Real Blockfrost returns both
cost_models(named-key dict) andcost_models_raw(flat int array). yaci-store 0.10.6 only returnscost_models. Breaks Blaze'sgetParameters(), which doesObject.entries(response.cost_models_raw)directly - surfaces asTypeError: Cannot convert undefined or null to objectat tx-build time.Client-side workaround (Yaci already emits op names in canonical ledger order, so
Object.values()reproduces the expected array):Happy to open a PR emitting
cost_models_rawalongsidecost_models.