Signs a message and returns the signature as a Base64 string.
Convenience wrapper around signRaw + toBase64.
32-byte Ed25519 private key.
The message bytes to sign.
Base64-encoded 64-byte signature.
'SIGNATURE_FAILED' if key length ≠ 32.
Note: signatures are public (not secret), so the string allocation in toBase64 is safe here — see toBase64's caveat.
toBase64
const sigB64 = signRawToBase64(privKey, data); Copy
const sigB64 = signRawToBase64(privKey, data);
Signs a message and returns the signature as a Base64 string.
Convenience wrapper around signRaw + toBase64.