### Example Delegator and Delegatee Keypairs Source: https://github.com/nostr-protocol/nips/blob/master/26.md Provides example private and public keypairs for both the delegator and the delegatee, used in the subsequent delegation example. ```APIDOC # Delegator: privkey: ee35e8bb71131c02c1d7e73231daa48e9953d329a4b701f7133c8f46dd21139c pubkey: 8e0d3d3eb2881ec137a11debe736a9086715a8c8beeeda615780064d68bc25dd # Delegatee: privkey: 777e4f60b4aa87937e13acc84f7abcc3c93cc035cb4c1e9f7a9086dd78fffce1 pubkey: 477318cfb5427b9cfc66a9fa376150c1ddbc62115ae27cef72417eb959691396 ``` -------------------------------- ### PGN Example: Game with Headers and In-Progress Source: https://github.com/nostr-protocol/nips/blob/master/64.md A PGN example including basic headers (White, Black) and a game that is currently in progress. ```pgn [White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} * ``` -------------------------------- ### PGN Example: Game in Progress Source: https://github.com/nostr-protocol/nips/blob/master/64.md A PGN example showing a game that has started but is still in progress, indicated by a single asterisk after the moves. ```pgn 1. e4 * ``` -------------------------------- ### PGN Example: Complete Chess Game Source: https://github.com/nostr-protocol/nips/blob/master/64.md A full PGN example of a complete chess game, including all standard headers and the full sequence of moves. ```pgn [Event \"F/S Return Match\"]\n[Site \"Belgrade, Serbia JUG\"]\n[Date \"1992.11.04\"]\n[Round \"29\"]\n[White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n[Result \"1/2-1/2\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} 3... a6\n4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7\n11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5\nNxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6\n23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5\nhxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5\n35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6\nNf2 42. g4 Bd3 43. Re6 1/2-1/2 ``` -------------------------------- ### API: List User Files (GET /files) Source: https://github.com/nostr-protocol/nips/blob/master/96.md Describes the authenticated GET endpoint for retrieving a paginated list of files linked to the current user's pubkey. It details the query parameters `page` and `count` for pagination and provides an example JSON response structure, including file metadata and content. ```APIDOC GET $api_url?page=x&count=y AUTH required Returns a list of files linked to the authenticated users pubkey. Query args: - page: page number (offset=page*count) - count: number of items per page ``` ```json { "count": 1, // server page size, eg. max(1, min(server_max_page_size, arg_count)) "total": 1, // total number of files "page": 0, // the current page number "files": [ { "tags": [ ["ox", "719171db19525d9d08dd69cb716a18158a249b7b3b3ec4bbdec5698dca104b7b"], ["x", "5d2899290e0e69bcd809949ee516a4a1597205390878f780c098707a7f18e3df"], ["size", "123456"], ["alt", "a meme that makes you laugh"], ["expiration", "1715691139"] // ...other metadata ], "content": "haha funny meme", // caption "created_at": 1715691130 // upload timestamp } ] } ``` -------------------------------- ### PGN Example: Multiple Games in One File Source: https://github.com/nostr-protocol/nips/blob/master/64.md A PGN example demonstrating how multiple chess games, each with its own headers and moves, can be stored sequentially within a single PGN file. ```pgn [Event \"Hourly HyperBullet Arena\"]\n[Site \"https://lichess.org/wxx4GldJ\"]\n[Date \"2017.04.01\"]\n[White \"T_LUKE\"]\n[Black \"decidement\"]\n[Result \"1-0\"]\n[UTCDate \"2017.04.01\"]\n[UTCTime \"11:56:14\"]\n[WhiteElo \"2047\"]\n[BlackElo \"1984\"]\n[WhiteRatingDiff \"+10\"]\n[BlackRatingDiff \"-7\"]\n[Variant \"Standard\"]\n[TimeControl \"30+0\"]\n[ECO \"B00\"]\n[Termination \"Abandoned\"]\n\n1. e4 1-0\n\n\n[Event \"Hourly HyperBullet Arena\"]\n[Site \"https://lichess.org/rospUdSk\"]\n[Date \"2017.04.01\"]\n[White \"Bastel\"]\n[Black \"oslochess\"]\n[Result \"1-0\"]\n[UTCDate \"2017.04.01\"]\n[UTCTime \"11:55:56\"]\n[WhiteElo \"2212\"]\n[BlackElo \"2000\"]\n[WhiteRatingDiff \"+6\"]\n[BlackRatingDiff \"-4\"]\n[Variant \"Standard\"]\n[TimeControl \"30+0\"]\n[ECO \"A01\"]\n[Termination \"Normal\"]\n\n1. b3 d5 2. Bb2 c6 3. Nc3 Bf5 4. d4 Nf6 5. e3 Nbd7 6. f4 Bg6 7. Nf3 Bh5 8. Bd3 e6 9. O-O Be7 10. Qe1 O-O 11. Ne5 Bg6 12. Nxg6 hxg6 13. e4 dxe4 14. Nxe4 Nxe4 15. Bxe4 Nf6 16. c4 Bd6 17. Bc2 Qc7 18. f5 Be7 19. fxe6 fxe6 20. Qxe6+ Kh8 21. Qh3+ Kg8 22. Bxg6 Qd7 23. Qe3 Bd6 24. Bf5 Qe7 25. Be6+ Kh8 26. Qh3+ Nh7 27. Bf5 Rf6 28. Qxh7# 1-0 ``` -------------------------------- ### Example Relay Information Document Icon Field Source: https://github.com/nostr-protocol/nips/blob/master/11.md An example showing the `icon` field within the Relay Information Document, pointing to an image URL. ```json { "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg" } ``` -------------------------------- ### Client Initiated Connection URL Example Source: https://github.com/nostr-protocol/nips/blob/master/46.md An example of a 'nostrconnect://' URL provided by the client for initiating a connection. It includes the client's public key, required relay URLs, a secret for validation, and optional permissions, client name, URL, and image. ```URL nostrconnect://83f3b2ae6aa368e8275397b9c26cf550101d63ebaab900d19dd4a4429f5ad8f5?relay=wss%3A%2F%2Frelay1.example.com&perms=nip44_encrypt%2Cnip44_decrypt%2Csign_event%3A13%2Csign_event%3A14%2Csign_event%3A1059&name=My+Client&secret=0s8j2djs&relay=wss%3A%2F%2Frelay2.example2.com ``` -------------------------------- ### Example Valid NIP-26 Delegation Condition Strings Source: https://github.com/nostr-protocol/nips/blob/master/26.md Provides examples of valid condition query strings, demonstrating how to use single and multiple conditions, including combining conditions on the same field, separated by '&'. ```APIDOC kind=1&created_at<1675721813 kind=0&kind=1&created_at>1675721813 kind=1&created_at>1674777689&created_at<1675721813 ``` -------------------------------- ### Example Nostr Conference Meeting Event (kind:30313) Source: https://github.com/nostr-protocol/nips/blob/master/53.md Demonstrates a practical application of the kind 30313 event, specifically for a conference meeting. This example shows how to link a meeting to a parent room (kind 30312), specify its title, summary, start and end times, current status, and track participant counts and roles. ```jsonc { "kind": 30313, "tags": [ ["d", "annual-meeting-2025"], ["a", "30312:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:main-conference-room", "wss://nostr.example.com"], ["title", "Annual Company Meeting 2025"], ["summary", "Yearly company-wide meeting"], ["image", "https://example.com/meeting.jpg"], ["starts", "1676262123"], ["ends", "1676269323"], ["status", "live"], ["total_participants", "180"], ["current_participants", "175"], ["p", "91cf9..4e5ca", "wss://provider1.com/", "Speaker"] ], "content": "" } ``` -------------------------------- ### Example Nostr Wallet Connect URI Source: https://github.com/nostr-protocol/nips/blob/master/47.md An example of a Nostr Wallet Connect URI, demonstrating the `nostr+walletconnect://` protocol, the wallet service's public key, and query parameters for `relay` and `secret`. ```sh nostr+walletconnect://b889ff5b1513b641e2a139f661a661364979c5beee91842f8f0ef42ab558e9d4?relay=wss%3A%2F%2Frelay.damus.io&secret=71a8c14c1407c113601079c4302dab36460f0ccd0ad506f1f2dc73b5100e4f3c ``` -------------------------------- ### Example Nostr Event with Delegation Tag Source: https://github.com/nostr-protocol/nips/blob/master/26.md A complete example of a Nostr event signed by a delegatee, including the 'delegation' tag with all its components, demonstrating how a delegated event appears before publication. ```JSON { "id": "e93c6095c3db1c31d15ac771f8fc5fb672f6e52cd25505099f62cd055523224f", "pubkey": "477318cfb5427b9cfc66a9fa376150c1ddbc62115ae27cef72417eb959691396", "created_at": 1677426298, "kind": 1, "tags": [ [ "delegation", "8e0d3d3eb2881ec137a11debe736a9086715a8c8beeeda615780064d68bc25dd", "kind=1&created_at>1674834236&created_at<1677426236", "6f44d7fe4f1c09f3954640fb58bd12bae8bb8ff4120853c4693106c82e920e2b898f1f9ba9bd65449a987c39c0423426ab7b53910c0c6abfb41b30bc16e5f524" ] ], "content": "Hello, world!", "sig": "633db60e2e7082c13a47a6b19d663d45b2a2ebdeaf0b4c35ef83be2738030c54fc7fd56d139652937cdca875ee61b51904a1d0d0588a6acd6168d7be2909d693" } ``` -------------------------------- ### Example Nostr Live Streaming Event (kind:30311) Source: https://github.com/nostr-protocol/nips/blob/master/53.md A concrete example of a Nostr 'Live Event' (kind `30311`) representing a live streaming activity. It includes a unique identifier, title, summary, streaming URL, start timestamp, live status, and relevant hashtags. ```json { "id": "57f28dbc264990e2c61e80a883862f7c114019804208b14da0bff81371e484d2", "pubkey": "1597246ac22f7d1375041054f2a4986bd971d8d196d7997e48973263ac9879ec", "created_at": 1687182672, "kind": 30311, "tags": [ ["d", "demo-cf-stream"], ["title", "Adult Swim Metalocalypse"], ["summary", "Live stream from IPTV-ORG collection"], ["streaming", "https://adultswim-vodlive.cdn.turner.com/live/metalocalypse/stream.m3u8"], ["starts", "1687182672"], ["status", "live"], ["t", "animation"], ["t", "iptv"], ["image", "https://i.imgur.com/CaKq6Mt.png"] ], "content": "", "sig": "5bc7a60f5688effa5287244a24768cbe0dcd854436090abc3bef172f7f5db1410af4277508dbafc4f70a754a891c90ce3b966a7bc47e7c1eb71ff57640f3d389" } ``` -------------------------------- ### Reference Podcast GUIDs in Nostr Event Source: https://github.com/nostr-protocol/nips/blob/master/73.md Provides examples for referencing different types of podcast GUIDs (feed, item, publisher) in Nostr events using specific prefixes in the 'i' tag and corresponding 'k' tags. ```JSON [ ["i", "podcast:guid:c90e609a-df1e-596a-bd5e-57bcc8aad6cc"], ["k", "podcast:guid"] ] ``` ```JSON [ ["i", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f"], ["k", "podcast:item:guid"] ] ``` ```JSON [ ["i", "podcast:publisher:guid:18bcbf10-6701-4ffb-b255-bc057390d738"], ["k", "podcast:publisher:guid"] ] ``` -------------------------------- ### NIP-66 Tag 'N' (Supported Nips) Example Source: https://github.com/nostr-protocol/nips/blob/master/66.md Example of the 'N' tag, used to list NIPs supported by the relay, derived from the NIP-11 informational document. ```json [ "N", "42" ] ``` -------------------------------- ### Nostr Event Example: User A Recommends kind:31337 Handler Source: https://github.com/nostr-protocol/nips/blob/master/89.md This example illustrates a `kind:31989` event where User A recommends 'Zapstr' as a handler for `kind:31337` events. The 'd' tag specifies '31337' as the supported event kind, and the 'a' tag provides the `kind:31990` identifier for Zapstr, along with a relay URL and 'web' platform hint. This demonstrates the practical application of the recommendation event. ```jsonc { "kind": 31989, "tags": [ ["d", "31337"], ["a", "31990:1743058db7078661b94aaf4286429d97ee5257d14a86d6bfa54cb0482b876fb0:abcd", "", "web"] ] // other fields... } ``` -------------------------------- ### Example Nostr Delegation String with Conditions Source: https://github.com/nostr-protocol/nips/blob/master/26.md An example of a fully formed delegation string, including the delegatee's public key and specific 'kind' and 'created_at' conditions, ready for hashing and signing by the delegator. ```APIDOC nostr:delegation:477318cfb5427b9cfc66a9fa376150c1ddbc62115ae27cef72417eb959691396:kind=1&created_at>1674834236&created_at<1677426236 ``` -------------------------------- ### Nostr COUNT Example: Posts and Reactions Count Source: https://github.com/nostr-protocol/nips/blob/master/45.md Example showing how to request the combined count of kind-1 (text note) and kind-7 (reaction) events authored by a specific public key. Includes both the request and a sample response. ```Nostr Protocol ["COUNT", , {"kinds": [1, 7], "authors": []}] ["COUNT", , {"count": 5}] ``` -------------------------------- ### PGN Example: Unknown Game State Source: https://github.com/nostr-protocol/nips/blob/master/64.md A PGN example representing a game where the result is unknown, indicated by a single asterisk. ```pgn // A game where nothing is known. Game still in progress, game abandoned, or result otherwise unknown. // Maybe players died before a move has been made. * ``` -------------------------------- ### Nostr NIP-38 User Status Event Examples Source: https://github.com/nostr-protocol/nips/blob/master/38.md Examples of NIP-38 'User Status' events (kind: 30315) demonstrating 'general' and 'music' status types, including content, tags, and optional expiration. ```json { "kind": 30315, "content": "Sign up for nostrasia!", "tags": [ ["d", "general"], ["r", "https://nostr.world"] ] } ``` ```json { "kind": 30315, "content": "Intergalatic - Beastie Boys", "tags": [ ["d", "music"], ["r", "spotify:search:Intergalatic%20-%20Beastie%20Boys"], ["expiration", "1692845589"] ] } ``` -------------------------------- ### Labeling Pubkeys with a Topic (NIP-32) Source: https://github.com/nostr-protocol/nips/blob/master/32.md This example demonstrates how to use NIP-32 to associate multiple public keys (`p` tags) with a specific topic, 'permies', using a `#t` namespace for topic association within a `kind:1985` event. ```JSON { "kind": 1985, "tags": [ ["L", "#t"], ["l", "permies", "#t"], ["p", "", ""], ["p", "", ""] ] } ``` -------------------------------- ### Example Nostr Web Bookmark Event (kind 39701) Source: https://github.com/nostr-protocol/nips/blob/master/B0.md An example JSON structure for a `kind:39701` Nostr web bookmark event, illustrating required tags like `d` (for the URL identifier) and optional tags such as `published_at`, `title`, and `t` (for topics/hashtags). It also shows the `content` field for a detailed description and other standard event fields like `id`, `pubkey`, `created_at`, and `sig`. ```JSON { "kind": 39701, "id": "d7a92714f81d0f712e715556aee69ea6da6bfb287e6baf794a095d301d603ec7", "pubkey": "2729620da105979b22acfdfe9585274a78c282869b493abfa4120d3af2061298", "created_at": 1738869705, "tags": [ ["d", "alice.blog/post"], ["published_at", "1738863000"], ["title", "Blog insights by Alice"], ["t", "post"], ["t", "insight"] ], "content": "A marvelous insight by Alice about the nature of blogs and posts.", "sig": "36d34e6448fe0223e9999361c39c492a208bc423d2fcdfc2a3404e04df7c22dc65bbbd62dbe8a4373c62e4d29aac285b5aa4bb9b4b8053bd6207a8b45fbd0c98" } ``` -------------------------------- ### Example: Decrypting an Encrypted Private Key Source: https://github.com/nostr-protocol/nips/blob/master/49.md Provides a test case for the decryption process, showing an encrypted private key, the password and log_n used, and the resulting hex-encoded private key. ```Text Encrypted Private Key: ncryptsec1qgg9947rlpvqu76pj5ecreduf9jxhselq2nae2kghhvd5g7dgjtcxfqtd67p9m0w57lspw8gsq6yphnm8623nsl8xn9j4jdzz84zm3frztj3z7s35vpzmqf6ksu8r89qk5z2zxfmu5gv8th8wclt0h4p Password: 'nostr' log_n: 16 Decrypted Hex-encoded Private Key: 3501454135014541350145413501453fefb02227e449e57cf4d3a3ce05378683 ``` -------------------------------- ### Query Nostr Relay Information and Parse JSON Response Source: https://github.com/nostr-protocol/nips/blob/master/11.md This snippet demonstrates how to use `curl` to send an HTTP GET request to a Nostr relay, specifying the `Accept` header for Nostr JSON. The output is then piped to `jq` for pretty-printing the JSON response. The subsequent JSON block shows an example of the structured metadata returned by a Nostr relay, including its name, description, public key, supported NIPs, fees, and limitations. ```bash curl -H "Accept: application/nostr+json" https://jellyfish.land | jq ``` ```json { "name": "JellyFish", "description": "Stay Immortal!", "banner": "https://image.nostr.build/7fdefea2dec1f1ec25b8ce69362566c13b2b7f13f1726c2e4584f05f64f62496.jpg", "pubkey": "bf2bee5281149c7c350f5d12ae32f514c7864ff10805182f4178538c2c421007", "contact": "hi@dezh.tech", "software": "https://github.com/dezh-tech/immortal", "supported_nips": [ 1, 9, 11, 13, 17, 40, 42, 59, 62, 70 ], "version": "immortal - 0.0.9", "relay_countries": [ "*" ], "language_tags": [ "*" ], "tags": [], "posting_policy": "https://jellyfish.land/tos.txt", "payments_url": "https://jellyfish.land/relay", "icon": "https://image.nostr.build/2547e9ec4b23589e09bc7071e0806c3d4293f76284c58ff331a64bce978aaee8.jpg", "retention": [], "fees": { "subscription": [ { "amount": 3000, "period": 2628003, "unit": "sats" }, { "amount": 8000, "period": 7884009, "unit": "sats" }, { "amount": 15000, "period": 15768018, "unit": "sats" }, { "amount": 28000, "period": 31536036, "unit": "sats" } ] }, "limitation": { "auth_required": false, "max_message_length": 70000, "max_subid_length": 256, "max_subscriptions": 350, "min_pow_difficulty": 0, "payment_required": true, "restricted_writes": true, "max_event_tags": 2000, "max_content_length": 70000, "created_at_lower_limit": 0, "created_at_upper_limit": 2147483647, "default_limit": 500, "max_limit": 5000 } } ``` -------------------------------- ### NIP-66 Tag 'k' (Accepted Kinds) Example Source: https://github.com/nostr-protocol/nips/blob/master/66.md Examples of the 'k' tag, used to list accepted event kinds by the relay, based on NIP-22. ```json [ "k", "0" ], [ "k", "3" ], [ "k", "10002" ] ``` -------------------------------- ### Nostr COUNT Example: Followers Count Source: https://github.com/nostr-protocol/nips/blob/master/45.md Example demonstrating how to request the count of kind-3 (contact list) events referring to a specific public key, effectively counting followers. Shows both the request and a sample response. ```Nostr Protocol ["COUNT", , {"kinds": [3], "#p": []}] ["COUNT", , {"count": 238}] ``` -------------------------------- ### Example Nostr Long-form Content Event (NIP-23) Source: https://github.com/nostr-protocol/nips/blob/master/23.md An example JSON structure for a `kind:30023` Nostr event, demonstrating the required and optional tags for long-form content, including title, summary, published_at, and references to other Nostr events and addresses. ```json { "kind": 30023, "created_at": 1675642635, "content": "Lorem [ipsum][nostr:nevent1qqst8cujky046negxgwwm5ynqwn53t8aqjr6afd8g59nfqwxpdhylpcpzamhxue69uhhyetvv9ujuetcv9khqmr99e3k7mg8arnc9] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nRead more at nostr:naddr1qqzkjurnw4ksz9thwden5te0wfjkccte9ehx7um5wghx7un8qgs2d90kkcq3nk2jry62dyf50k0h36rhpdtd594my40w9pkal876jxgrqsqqqa28pccpzu.", "tags": [ ["d", "lorem-ipsum"], ["title", "Lorem Ipsum"], ["published_at", "1296962229"], ["t", "placeholder"], ["e", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87", "wss://relay.example.com"], ["a", "30023:a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919:ipsum", "wss://relay.nostr.org"] ], "pubkey": "...", "id": "..." } ``` -------------------------------- ### Example of User's Internal Follow List for Petname Scheme Source: https://github.com/nostr-protocol/nips/blob/master/02.md Illustrates a user's own internal follow list entry, specifically showing how a 'p' tag defines a followed profile with its public key, an empty relay URL, and a local petname, "erin", within the context of the petname scheme. ```json [ ["p", "21df6d143fb96c2ec9d63726bf9edc71", "", "erin"] ] ``` -------------------------------- ### Example of Follow List Received from Erin for Petname Scheme Source: https://github.com/nostr-protocol/nips/blob/master/02.md Shows a follow list received from the profile identified as "erin" by the user. This list contains an entry for "david", demonstrating how petnames can be chained for contextual naming. ```json [ ["p", "a8bb3d884d5d90b413d9891fe4c4e46d", "", "david"] ] ``` -------------------------------- ### NIP-66 Tag 't' (Topics) Example Source: https://github.com/nostr-protocol/nips/blob/master/66.md Example of the 't' tag, used to specify topics associated with the relay, as defined in the NIP-11 informational document. ```json [ "t", "nsfw" ] ``` -------------------------------- ### NIP-66 Tag 'n' (Network) Example Source: https://github.com/nostr-protocol/nips/blob/master/66.md Example of the 'n' tag, used to specify the network type of the relay, such as 'clearnet'. ```json [ "n", "clearnet" ] ``` -------------------------------- ### NIP-64 Chess Note JSON with Full PGN and Tags Source: https://github.com/nostr-protocol/nips/blob/master/64.md An example of a NIP-64 chess note in JSON format, including `alt` tags for description and a complete PGN game in the `content` field. ```jsonc { "kind": 64, "tags": [ ["alt", "Fischer vs. Spassky in Belgrade on 1992-11-04 (F/S Return Match, Round 29)"], // rest of tags... ], "content": "[Event \"F/S Return Match\"]\n[Site \"Belgrade, Serbia JUG\"]\n[Date \"1992.11.04\"]\n[Round \"29\"]\n[White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n[Result \"1/2-1/2\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} 3... a6\n4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7\n11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5\nNxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6\n23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5\nhxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5\n35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6\nNf2 42. g4 Bd3 43. Re6 1/2-1/2", // other fields... } ``` -------------------------------- ### HTML Example for Nostr Signer Integration Source: https://github.com/nostr-protocol/nips/blob/master/55.md Demonstrates a basic HTML page that integrates with a Nostr signer application. It shows how to parse a callback URL for results and how to construct a `nostrsigner:` URL to request an event signature. ```html Document

Test

``` -------------------------------- ### NIP-66 Tag 'd' (Relay URL) Example Source: https://github.com/nostr-protocol/nips/blob/master/66.md Example of the 'd' tag, which specifies the relay URL/URI. This tag is mandatory and must be the relay websocket URL/URI, potentially normalized. ```json [ "d", "wss://somerelay.abc/"] ``` -------------------------------- ### Example Date-Based Calendar Event Structure (NIP-52) Source: https://github.com/nostr-protocol/nips/blob/master/52.md Illustrates the YAML structure for a date-based calendar event (kind: 31922) in Nostr, including common tags like 'd', 'title', and date-specific tags 'start' and 'end', along with optional fields for location and participants. ```yaml { "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, "created_at": , "kind": 31922, "content": "", "tags": [ ["d", ""], ["title", ""], // dates ["start", "<YYYY-MM-DD>"], ["end", "<YYYY-MM-DD>"], // location ["location", "<location>"], ["g", "<geohash>"], // participants ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>", "<role>"], ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>", "<role>"], ] } ``` -------------------------------- ### Example HTTP Authorization Header with Base64 Encoded Nostr Event Source: https://github.com/nostr-protocol/nips/blob/master/98.md An example of the HTTP `Authorization` header, showing how a `kind 27235` Nostr event is base64 encoded and transmitted using the `Nostr` authorization scheme. ```http Authorization: Nostr eyJpZCI6ImZlOTY0ZTc1ODkwMzM2MGYyOGQ4NDI0ZDA5MmRhODQ5NGVkMjA3Y2JhODQ5NGVkMjA3Y2JhODIzMTEwYmUzYTU3ZGZlNGI1Nzg3MzQiLCJwdWJrZXkiOiI2M2ZlNjMxOGRjNTg1ODNjZmUxNjgxMGY4NmRkMDllMThiZmQ3NmFhYmMyNGEwMDgxY2UyODU2ZjMzMDUwNGVkIiwiY29udGVudCI6IiIsImtpbmQiOjI3MjM1LCJjcmVhdGVkX2F0IjoxNjgyMzI3ODUyLCJ0YWdzIjpbWyJ1IiwiaHR0cHM6Ly9hcGkuc25vcnQuc29jaWFsL2FwaS92MS9uNXNwL2xpc3QiXSxbIm1ldGhvZCIsIkdFVCJdXSwic2lnIjoiNWVkOWQ4ZWM5NThiYzg1NGY5OTdiZGMyNGFjMzM3ZDAwNWFmMzcyMzI0NzQ3ZWZlNGEwMGUyNGY0YzMwNDM3ZmY0ZGQ4MzA4Njg0YmVkNDY3ZDlkNmJlM2U1YTUxN2JiNDNiMTczMmNjN2QzMzk0OWEzYWFmODY3MDVjMjIxODQifQ ``` -------------------------------- ### Nostr NIP-56 Report Event Examples Source: https://github.com/nostr-protocol/nips/blob/master/56.md These JSON examples demonstrate various NIP-56 `kind 1984` report events for different scenarios, including reporting a profile for nudity, a note for illegal content, a profile for impersonation, and a blob for malware. Each example showcases the required tags (`p`, `e`, `x`) and the specific report type string, along with optional tags like `L`, `l`, or `server`. ```json { "kind": 1984, "tags": [ ["p", "<pubkey>", "nudity"], ["L", "social.nos.ontology"], ["l", "NS-nud", "social.nos.ontology"] ], "content": "" } ``` ```json { "kind": 1984, "tags": [ ["e", "<eventId>", "illegal"], ["p", "<pubkey>"] ], "content": "He's insulting the king!" } ``` ```json { "kind": 1984, "tags": [ ["p", "<impersonator pubkey>", "impersonation"] ], "content": "Profile is impersonating nostr:<victim bech32 pubkey>" } ``` ```json { "kind": 1984, "tags": [ ["x", "<blob hash>", "malware"], ["e", "<event id which contains the blob on x tag>", "malware"], ["server", "https://you-may-find-the-blob-here.com/path-to-url.ext"] ], "content": "This file contains malware software in it." } ``` -------------------------------- ### NIP-66 Tag 'g' (Geohash) Example Source: https://github.com/nostr-protocol/nips/blob/master/66.md Example of the 'g' tag, used to specify the geohash of the relay, based on NIP-52. ```json [ "g", "9r1652whz" ] ``` -------------------------------- ### NIP-66 Tag 'R' (Requirements) Examples Source: https://github.com/nostr-protocol/nips/blob/master/66.md Examples of the 'R' tag, indicating limitations or requirements of the relay such as payment or authentication, derived from NIP-11. It also shows how to signal the absence of a requirement using a '!' flag. ```json [ "R", "payment" ], [ "R", "auth" ], [ "R", "!payment" ], [ "R", "!auth" ] ``` -------------------------------- ### Example NIP-47 Info Event Structure Source: https://github.com/nostr-protocol/nips/blob/master/47.md Illustrates a NIP-47 info event, showing its structure including ID, public key, creation timestamp, kind, tags, and content, which lists supported Nostr Wallet Connect methods like `pay_invoice` and `get_balance`. ```jsonc { "id": "df467db0a9f9ec77ffe6f561811714ccaa2e26051c20f58f33c3d66d6c2b4d1c", "pubkey": "c04ccd5c82fc1ea3499b9c6a5c0a7ab627fbe00a0116110d4c750faeaecba1e2", "created_at": 1713883677, "kind": 13194, "tags": [ [ "notifications", "payment_received payment_sent" ] ], "content": "pay_invoice pay_keysend get_balance get_info make_invoice lookup_invoice list_transactions multi_pay_invoice multi_pay_keysend sign_message notifications", "sig": "31f57b369459b5306a5353aa9e03be7fbde169bc881c3233625605dd12f53548179def16b9fe1137e6465d7e4d5bb27ce81fd6e75908c46b06269f4233c845d8" } ``` -------------------------------- ### Nostr Event Tag Structure Example Source: https://github.com/nostr-protocol/nips/blob/master/01.md Illustrates the structure of the tags array within a Nostr event, showing examples of e, p, a, and alt tags. It highlights that the first element is the tag name/key and the second is the value, with subsequent elements being optional. ```JSON { "tags": [ ["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"], ["p", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca"], ["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"], ["alt", "reply"] ] } ``` -------------------------------- ### NIP-66 Tag 'T' (Relay Type) Example Source: https://github.com/nostr-protocol/nips/blob/master/66.md Example of the 'T' tag, which indicates the enumerated relay type, formatted as PascalCase, based on NIP-11. ```json ["T", "PrivateInbox" ] ``` -------------------------------- ### Example: NFKC Unicode Normalization for Passwords Source: https://github.com/nostr-protocol/nips/blob/master/49.md Demonstrates the required NFKC unicode normalization for passwords before use in scrypt, showing the transformation of codepoints and UTF-8 bytes for a specific input. ```Text Input password: "ÅΩẛ̣" - Unicode Codepoints: U+212B U+2126 U+1E9B U+0323 - UTF-8 bytes: [0xE2, 0x84, 0xAB, 0xE2, 0x84, 0xA6, 0xE1, 0xBA, 0x9B, 0xCC, 0xA3] Normalized NFKC password: "ÅΩẛ̣" - Unicode Codepoints: U+00C5 U+03A9 U+1E69 - UTF-8 bytes: [0xC3, 0x85, 0xCE, 0xA9, 0xE1, 0xB9, 0xA9] ``` -------------------------------- ### Example NIP-26 Delegation Token Signature Source: https://github.com/nostr-protocol/nips/blob/master/26.md The resulting 64-byte Schnorr signature (delegation token) obtained by the delegator signing the SHA256 hash of the example delegation string. ```APIDOC 6f44d7fe4f1c09f3954640fb58bd12bae8bb8ff4120853c4693106c82e920e2b898f1f9ba9bd65449a987c39c0423426ab7b53910c0c6abfb41b30bc16e5f524 ``` -------------------------------- ### Example Nostr Interactive Room Event (kind:30312) Source: https://github.com/nostr-protocol/nips/blob/master/53.md Provides an example of a Nostr event with kind 30312, defining an interactive room. This snippet illustrates how to set up a room with a unique identifier, name, summary, image, status, and service endpoints, along with relay hints and participant roles. ```jsonc { "kind": 30312, "tags": [ ["d", "main-conference-room"], ["room", "Main Conference Hall"], ["summary", "Our primary conference space"], ["image", "https://example.com/room.jpg"], ["status", "open"], ["service", "https://meet.example.com/room"], ["endpoint", "https://api.example.com/room"], ["t", "conference"], ["p", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca", "wss://nostr.example.com/", "Owner"], ["p", "14aeb..8dad4", "wss://provider2.com/", "Moderator"], ["relays", "wss://relay1.com", "wss://relay2.com"] ], "content": "" } ``` -------------------------------- ### Assigning a License to an Event (NIP-32) Source: https://github.com/nostr-protocol/nips/blob/master/32.md This example demonstrates assigning a license, specifically 'MIT', to an existing event (identified by an `e` tag) using NIP-32. The label is applied within the 'license' namespace in a `kind:1985` event. ```JSON { "kind": 1985, "tags": [ ["L", "license"], ["l", "MIT", "license"], ["e", "<event_id>", "<relay_url>"] ] } ``` -------------------------------- ### Example NIP-99 Classified Listing Event in JSON Source: https://github.com/nostr-protocol/nips/blob/master/99.md A complete example of a kind:30402 Nostr event for a classified listing, demonstrating the use of various standardized tags including title, summary, location, and price, along with content and other event fields. ```json { "kind": 30402, "created_at": 1675642635, "content": "Lorem [ipsum][nostr:nevent1qqst8cujky046negxgwwm5ynqwn53t8aqjr6afd8g59nfqwxpdhylpcpzamhxue69uhhyetvv9ujuetcv9khqmr99e3k7mg8arnc9] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nRead more at nostr:naddr1qqzkjurnw4ksz9thwden5te0wfjkccte9ehx7um5wghx7un8qgs2d90kkcq3nk2jry62dyf50k0h36rhpdtd594my40w9pkal876jxgrqsqqqa28pccpzu.", "tags": [ ["d", "lorem-ipsum"], ["title", "Lorem Ipsum"], ["published_at", "1296962229"], ["t", "electronics"], ["image", "https://url.to.img", "256x256"], ["summary", "More lorem ipsum that is a little more than the title"], ["location", "NYC"], ["price", "100", "USD"], [ "e", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87", "wss://relay.example.com" ], [ "a", "30023:a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919:ipsum", "wss://relay.nostr.org" ] ], "pubkey": "...", "id": "..." } ``` -------------------------------- ### Example Nostr Event for HTTP Authorization Source: https://github.com/nostr-protocol/nips/blob/master/98.md A `kind 27235` Nostr event example demonstrating the required `u` (absolute URL) and `method` (HTTP Request Method) tags for HTTP authorization. The `content` field is empty as per specification. ```json { "id": "fe964e758903360f28d8424d092da8494ed207cba823110be3a57dfe4b578734", "pubkey": "63fe6318dc58583cfe16810f86dd09e18bfd76aabc24a0081ce2856f330504ed", "content": "", "kind": 27235, "created_at": 1682327852, "tags": [ ["u", "https://api.snort.social/api/v1/n5sp/list"], ["method", "GET"] ], "sig": "5ed9d8ec958bc854f997bdc24ac337d005af372324747efe4a00e24f4c30437ff4dd8308684bed467d9d6be3e5a517bb43b1732cc7d33949a3aaf86705c22184" } ```