import { type JWTPayload, type KeyLike, SignJWT, jwtVerify } from "jose"; export namespace jwt { export function create(payload: JWTPayload, algorithm: string, privateKey: KeyLike) { return new SignJWT(payload).setProtectedHeader({ alg: algorithm, typ: "JWT", kid: "sst" }).sign(privateKey); } export function verify(token: string, publicKey: KeyLike) { return jwtVerify(token, publicKey); } }