validatePrivateKey

Validates the provided Jwk (JSON Web Key) to ensure it conforms to the expected key type and format.

This function checks the following:

  • The key must be a private key

  • The key must be a valid Ed25519 key

If any of these checks fail, this function throws an IllegalArgumentException with a descriptive error message.

Parameters

key

The Jwk to validate.

Throws

if the key is not a private key