Expand public tariffs with tax rules, reserve instruments and economic formulas; add complete PDF and audited direct publisher

This commit is contained in:
unimatrixgit 2026-11-18 23:41:21 +01:00
commit 8eca3945ba

View file

@ -17,3 +17,9 @@ test('expiry, tampering and unavailable developer privileges reject before execu
now=10100;await assert.rejects(service.verify(dev,issued.key,manifest),/unavailable/);
await assert.rejects(setup({authorize:async()=>false}).issue(dev,manifest),/Developer access/);
});
test('tariff publication keys bind exact public file hashes and reject unrelated developer actions',async()=>{
const service=setup(),publication={action:'tariff-publication',state:'planned',files:[{path:'/rates-and-charges.html',sha256:'ab'.repeat(32)}],changesBalances:false};
const issued=await service.issue(dev,publication);assert.equal((await service.verify(dev,issued.key,publication)).manifest.changesBalances,false);
await assert.rejects(service.verify(dev,issued.key,{...publication,files:[{path:'/other.html',sha256:'ab'.repeat(32)}]}),/manifest/);
await assert.rejects(service.issue(dev,{action:'arbitrary-sql',state:'planned'}),/Invalid developer batch/);
});