/**
 * Ed25519 signature utilities for request authentication
 */
import { ed25519 } from "@noble/curves/ed25519.js";
/**
 * Sign a message with Ed25519 private key
 */
export function signMessage(message, privateKey) {
    return ed25519.sign(message, privateKey);
}
/**
 * Verify Ed25519 signature
 */
export function verifySignature(message, signature, publicKey) {
    return ed25519.verify(signature, message, publicKey);
}
/**
 * Create signed message structure
 */
export function createSignedMessage(message, privateKey, publicKey) {
    const signature = signMessage(message, privateKey);
    return {
        message,
        signature,
        publicKey,
    };
}
/**
 * Verify signed message
 */
export function verifySignedMessage(signed) {
    return verifySignature(signed.message, signed.signature, signed.publicKey);
}
//# sourceMappingURL=signature.js.map