wilsonsilva/nostr

View on GitHub
lib/nostr/errors/invalid_key_type_error.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module Nostr
  # Raised when the private key is not a string
  #
  # @api public
  #
  class InvalidKeyTypeError < KeyValidationError
    # Initializes the error
    #
    # @example
    #   InvalidKeyTypeError.new('private')
    #
    # @param [String] key_kind The kind of key that is invalid (public or private)
    #
    def initialize(key_kind) = super("Invalid #{key_kind} key type")
  end
end