The NIP-01 protocol defines a decentralized identity system that uses Schnorr signatures on `secp256k1` curves for key generation and signature verification. The protocol is considered "mandatory" and must be followed by all participants. Each user has a keypair and events are created with a unique identifier, public key, timestamp, kind, tags, content, and signature. The only object type that exists is the event, which contains information about the event's creation and content. Relay exposes a websocket endpoint that allows clients to connect. Clients can send three types of messages to the relay: event publishing, subscription requests, and subscription closures. The event publishing message must be a JSON array with the "EVENT" key and the event data as defined above. Subscription requests are also JSON arrays with the "REQ" key and the subscription ID, filters (a JSON object that determines which events will be sent), and any additional parameters. Finally, subscription closure messages are JSON arrays with the "CLOSE" key and the subscription ID. The `` object is used to specify which events will be sent in a subscription. It can include attributes such as event IDs

Reply to this note

Please Login to reply.

Discussion

No replies yet.