Exception: Nostr::InvalidKeyFormatError

Inherits:
KeyValidationError show all
Defined in:
lib/nostr/errors/invalid_key_format_error.rb

Overview

Raised when the private key is in an invalid format

Instance Method Summary collapse

Constructor Details

#initialize(key_kind) ⇒ InvalidKeyFormatError

Initializes the error

Examples:

InvalidKeyFormatError.new('private')

Parameters:

  • key_kind (String)

    The kind of key that is invalid (public or private)



16
17
18
# File 'lib/nostr/errors/invalid_key_format_error.rb', line 16

def initialize(key_kind)
  super("Only lowercase hexadecimal characters are allowed in #{key_kind} keys.")
end