diff options
Diffstat (limited to '75.md')
| -rw-r--r-- | 75.md | 26 |
1 files changed, 13 insertions, 13 deletions
| @@ -21,15 +21,16 @@ The following tags are defined as REQUIRED. | |||
| 21 | 21 | ||
| 22 | Example event: | 22 | Example event: |
| 23 | 23 | ||
| 24 | ```json | 24 | ```jsonc |
| 25 | { | 25 | { |
| 26 | "kind": 9041, | 26 | "kind": 9041, |
| 27 | "tags": [ | 27 | "tags": [ |
| 28 | ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...], | 28 | ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/], |
| 29 | ["amount", "210000"], | 29 | ["amount", "210000"], |
| 30 | ], | 30 | ], |
| 31 | "content": "Nostrasia travel expenses", | 31 | "content": "Nostrasia travel expenses", |
| 32 | ... | 32 | // other fields... |
| 33 | } | ||
| 33 | ``` | 34 | ``` |
| 34 | 35 | ||
| 35 | The following tags are OPTIONAL. | 36 | The following tags are OPTIONAL. |
| @@ -38,36 +39,35 @@ The following tags are OPTIONAL. | |||
| 38 | - `image` - an image for the goal | 39 | - `image` - an image for the goal |
| 39 | - `summary` - a brief description | 40 | - `summary` - a brief description |
| 40 | 41 | ||
| 41 | ```json | 42 | ```jsonc |
| 42 | { | 43 | { |
| 43 | "kind": 9041, | 44 | "kind": 9041, |
| 44 | "tags": [ | 45 | "tags": [ |
| 45 | ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...], | 46 | ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/], |
| 46 | ["amount", "210000"], | 47 | ["amount", "210000"], |
| 47 | ["closed_at", "<unix timestamp in seconds>"], | 48 | ["closed_at", "<unix timestamp in seconds>"], |
| 48 | ["image", "<image URL>"], | 49 | ["image", "<image URL>"], |
| 49 | ["summary", "<description of the goal>"], | 50 | ["summary", "<description of the goal>"], |
| 50 | ], | 51 | ], |
| 51 | "content": "Nostrasia travel expenses", | 52 | "content": "Nostrasia travel expenses", |
| 52 | ... | 53 | // other fields... |
| 53 | } | 54 | } |
| 54 | ``` | 55 | ``` |
| 55 | 56 | ||
| 56 | The goal MAY include an `r` or `a` tag linking to a URL or parameterized replaceable event. | 57 | The goal MAY include an `r` or `a` tag linking to a URL or addressable event. |
| 57 | 58 | ||
| 58 | The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags](57.md#appendix-g-zap-tag-on-other-events). | 59 | The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags](57.md#appendix-g-zap-tag-on-other-events). |
| 59 | 60 | ||
| 60 | Parameterized replaceable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint. | 61 | Addressable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint. |
| 61 | 62 | ||
| 62 | ```json | 63 | ```jsonc |
| 63 | { | 64 | { |
| 64 | ... | ||
| 65 | "kind": 3xxxx, | 65 | "kind": 3xxxx, |
| 66 | "tags": [ | 66 | "tags": [ |
| 67 | ... | ||
| 68 | ["goal", "<event id>", "<Relay URL (optional)>"], | 67 | ["goal", "<event id>", "<Relay URL (optional)>"], |
| 68 | // rest of tags... | ||
| 69 | ], | 69 | ], |
| 70 | ... | 70 | // other fields... |
| 71 | } | 71 | } |
| 72 | ``` | 72 | ``` |
| 73 | 73 | ||
| @@ -77,7 +77,7 @@ Clients MAY display funding goals on user profiles. | |||
| 77 | 77 | ||
| 78 | When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag. | 78 | When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag. |
| 79 | 79 | ||
| 80 | When zapping a parameterized replaceable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request. | 80 | When zapping an addressable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request. |
| 81 | 81 | ||
| 82 | ## Use cases | 82 | ## Use cases |
| 83 | 83 | ||