From 8e578ea2ab27b7e2f37415b05967ba10a94ce683 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 01:12:15 +0200 Subject: [PATCH] cultnet-ts: delete unused readAuthorityRecordBytes Never called; removed with nothing else depending on it. Co-Authored-By: Claude Sonnet 5 --- packages/cultnet-ts/src/idunn-runtime-authority.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/cultnet-ts/src/idunn-runtime-authority.ts b/packages/cultnet-ts/src/idunn-runtime-authority.ts index d55c4dc4..d96c892b 100644 --- a/packages/cultnet-ts/src/idunn-runtime-authority.ts +++ b/packages/cultnet-ts/src/idunn-runtime-authority.ts @@ -637,20 +637,6 @@ function providerIdentityByteVector(value: unknown, label: string): Uint8Array { return Uint8Array.from(value as number[]); } -function readAuthorityRecordBytes(bytes: Buffer, type: string, schemaId: string): Uint8Array { - const decoded = decode(bytes); - if (!Array.isArray(decoded) || decoded[0] !== CULTCACHE_STORE_FORMAT || !Array.isArray(decoded[1]) || !Array.isArray(decoded[2])) { - throw new Error("Runtime credential is not a CultCache v1 store."); - } - if (decoded[2].length !== 1) throw new Error("Runtime credential must contain exactly one record."); - const rows = (decoded[2] as unknown[]).filter((raw) => Array.isArray(raw) && raw[1] === schemaId); - if (rows.length !== 1) throw new Error(`Runtime credential must contain exactly one ${schemaId} record.`); - const catalog = (decoded[1] as unknown[]).find((raw) => Array.isArray(raw) && raw[0] === schemaId); - if (!Array.isArray(catalog) || catalog[1] !== type) throw new Error("Runtime credential has an unexpected CultCache type."); - const row = array(rows[0], 4, "Runtime credential record"); - return bytesValue(row[3], "Runtime credential payload"); -} - function inheritedDescriptorMap(): Map { if (!systemdListenPidMatches(process.env.LISTEN_PID, process.pid)) throw new Error("Inherited Idunn descriptors do not belong to this process."); const count = Number(process.env.LISTEN_FDS);