#!/bin/bash
# Generate Ed25519 keypair for ADMIN_PUBLIC_KEY (one-off, prints to stdout).
# For etc/ + docker compose, use ./bin/gen-server-keys.sh instead.
set -e
cd "$(dirname "$0")/.."
(cd libs/geo-api-client && bun run build 2>/dev/null) || true
cd libs/geo-api-client
bun -e "
import { generateKeyPair } from './dist/index.js';
const k = await generateKeyPair();
console.log('ADMIN_PUBLIC_KEY=' + k.publicKey);
console.log('# Private key (keep secret, bootstrap only): ' + k.privateKey);
"
