nylorun 0.8.0-beta → 0.9.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +0,0 @@
1
- import { createHmac } from "node:crypto";
2
- /** The derived principal a Project uses; the local Runtime registers it on its Tenant. */
3
- export const PROJECT_PRINCIPAL_ID = "project";
4
- /**
5
- * Key of a derived principal on the local Tenant, from the admin key. A copy of
6
- * `deriveTenantKey` in `@nylorun/admin` (nylorun depends on `@nylorun/core` only); both are
7
- * tested against the same fixed vector.
8
- */
9
- export function deriveTenantKey(adminKey, tenantId, principalId) {
10
- const message = Buffer.concat([
11
- Buffer.from("nylorun/principal/v1", "utf8"),
12
- Buffer.from([0]),
13
- Buffer.from(principalId, "utf8"),
14
- Buffer.from([0]),
15
- Buffer.from(tenantId, "utf8"),
16
- ]);
17
- return createHmac("sha256", Buffer.from(adminKey, "utf8")).update(message).digest("hex");
18
- }