5 Commits

Author SHA1 Message Date
Wilson Silva
01010c763f
Allow the verification of signatures and events
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.
2024-03-15 19:13:33 +00:00
Wilson Silva
3520cf8219
Implement NIP-19 bech32-encoded private and public keys
https://github.com/nostr-protocol/nips/blob/master/19.md
2023-11-20 09:59:27 +07:00
Wilson Silva
4b630c678b
Ensure that Nostr::Crypto#descrypt_text always returns a string
Fixes another Steep/RBS violation
2023-11-18 16:38:03 +07:00
Wilson Silva
857bf0ce8e
Implement NIP-04: Encrypted Direct Messages 2023-02-25 17:38:00 +07:00
Wilson Silva
79567fcf22
Extract event signing into its own class 2023-02-25 17:37:58 +07:00