function generateInstanceKey
generateInstanceKey(): Promise<{ kid: string; privateJwk: JWK; publicJwk: JWK; }>

Returns a new Ed25519 key pair as JWKs, with a random kid, for instance-key-service.ts to store when the instance has none. The public JWK carries the kid, alg and use a JWKS entry needs.

Return Type

Promise<{ kid: string; privateJwk: JWK; publicJwk: JWK; }>

Usage

import { generateInstanceKey } from "api/lib/jwt.ts";