Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Some recommendations #1

Open
Semisol opened this issue Oct 14, 2022 · 1 comment
Open

Some recommendations #1

Semisol opened this issue Oct 14, 2022 · 1 comment

Comments

@Semisol
Copy link
Contributor

Semisol commented Oct 14, 2022

  • If you want to be fully nostr compatible, you will need to do some changes
    • time should be replaced by created_at, and uses unix seconds instead of ms
    • public_key must be a 64 character public key according to BIP 340, and should be renamed to pubkey
    • signature must be a 128 character hex signature of the event, how it is generated is defined in NIP-01
    • message should be replaced by content
    • You cannot have properties like contact on the event itself, you can make content a stringified JSON object though.
    • You need to add a tags array, that may be empty or contain additional metadata. The current standard is one letter tags will get indexed, so you can look up any event with a specific tag value.
    • Kinds must be numbers, not strings.
  • Optional recommendations if you want to use nostr
    • CANCEL_REQUEST can be replaced by kind 5 events that will mark an event as "deleted" and may stop returning it in queries in some relays implementations, currently only nostr-rs-relay from my knowledge.
@dannydeezy
Copy link
Owner

thank you for this, agreed we should make all these changes

dannydeezy added a commit that referenced this issue Oct 14, 2022
Implement suggestions from #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants