Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add NIP-19 bech32 identifier generation for note, nevent, and naddr prefixes #166

Merged
merged 6 commits into from
Jul 1, 2024

Conversation

tyiu
Copy link
Contributor

@tyiu tyiu commented Jun 30, 2024

https://github.com/nostr-protocol/nips/blob/master/19.md

This change enables clients to generate shareable identifiers easily for human consumption.

I also refactored the npub and nsec bech32 prefixes into the Bech32IdentifierType enum.

@tyiu tyiu requested a review from bryanmontz June 30, 2024 05:38
Copy link
Collaborator

@bryanmontz bryanmontz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thanks, @tyiu.

@tyiu tyiu requested a review from bryanmontz June 30, 2024 15:00
@bryanmontz bryanmontz merged commit 0275657 into main Jul 1, 2024
4 checks passed
@bryanmontz bryanmontz deleted the tyiu/nip-19 branch July 1, 2024 14:16
RandyMcMillan pushed a commit to RandyMcMillan/nostr-sdk-ios that referenced this pull request Sep 1, 2024
…refixes (nostr-sdk#166)

* Add NIP-19 bech32 identifier generation for note, nevent, and naddr prefixes

* Apply suggestions from code review

Co-authored-by: Bryan Montz <bryanmontz@me.com>

* Fix incomplete sentence in the Bech32IdentifierType documentation

* Remove unused bech32NoteIdPrefix constant

* Inverse the excludeAuthor and excludeKind parameters in the shareableEventCoordinates function in the ReplaceableEvent protocol for easier readability

* Refactor duplicate code for the shareableEventCoordinates function for ReplaceableEvents

---------

Co-authored-by: Bryan Montz <bryanmontz@me.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants