Added the methods: - Event#verify_signature - Crypto#check_sig! - Crypto#valid_sig? - Crypto#sign_message Fixed a primitive obsession by introducing a Signature class to ensure that signatures are valid Nostr signatures.
15 lines
206 B
Plaintext
15 lines
206 B
Plaintext
module Nostr
|
|
class Signature < String
|
|
FORMAT: Regexp
|
|
LENGTH: int
|
|
|
|
def initialize: (String) -> void
|
|
|
|
private
|
|
|
|
attr_reader hex_value: String
|
|
|
|
def validate: (String) -> nil
|
|
end
|
|
end
|