Expose provider health public identity

This commit is contained in:
Meta Vens 2026-08-22 02:35:20 +02:00
commit 36488a5e58
2 changed files with 13 additions and 0 deletions

View file

@ -12,6 +12,7 @@
"start": "node dist/index.js",
"test": "vitest run --config vitest.config.ts",
"typecheck": "tsc -p tsconfig.json --noEmit",
"export:provider-health-public-key": "tsx src/export-provider-health-public-key.ts",
"export:provider-advertisement": "tsx src/export-provider-advertisement.ts --pretty"
},
"dependencies": {

View file

@ -0,0 +1,12 @@
import {
openOrEnrollProviderHealthIdentity,
providerHealthPublicIdentity,
} from "./provider-health-identity.js";
const identityPath = process.argv[2];
if (!identityPath) {
throw new Error("Usage: export-provider-health-public-key <provider-health-identity.cc>");
}
const identity = await openOrEnrollProviderHealthIdentity(identityPath);
process.stdout.write(`${providerHealthPublicIdentity(identity).publicKeyHex}\n`);