import type * as http from 'node:http'; /** * HEAD /new-nonce — Returns 200 with Replay-Nonce header (added by router). * GET /new-nonce — Returns 204 with Replay-Nonce header (added by router). */ export function createNonceHeadHandler() { return async ( _req: http.IncomingMessage, res: http.ServerResponse, _params: Record, _body: any, ): Promise => { res.writeHead(200, { 'Content-Type': 'application/octet-stream' }); res.end(); }; } export function createNonceGetHandler() { return async ( _req: http.IncomingMessage, res: http.ServerResponse, _params: Record, _body: any, ): Promise => { res.writeHead(204); res.end(); }; }