Skip to content

Commit f0b3171

Browse files
authored
Merge pull request #32 from MostroP2P/docs/nip01-kind0-metadata
Document NIP-01 Kind 0 metadata event for node identity
2 parents 13a094d + eb428a7 commit f0b3171

1 file changed

Lines changed: 59 additions & 1 deletion

File tree

src/other_events.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
# Other events published by Mostro
22

3+
Each Mostro instance publishes several types of events to Nostr relays. These include identity metadata, instance status, relay lists, and development fee records. Below, we provide details on each of these events.
4+
5+
## Node Identity (NIP-01 Kind 0)
6+
7+
Each Mostro instance publishes a [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md) kind 0 metadata event on startup so that Nostr clients can display the node's profile information. This is the standard Nostr profile mechanism — every relay-aware client already knows how to fetch and display kind 0 metadata.
8+
9+
The event is a **replaceable event**, meaning relays keep only the latest version. It is re-published on every restart, ensuring the profile stays fresh.
10+
11+
The `content` field contains a stringified JSON object with the following optional fields:
12+
13+
```json
14+
{
15+
"name": "Mostro P2P",
16+
"about": "A peer-to-peer Bitcoin trading daemon over the Lightning Network",
17+
"picture": "https://example.com/mostro-avatar.png",
18+
"website": "https://mostro.network"
19+
}
20+
```
21+
22+
The full event looks like this:
23+
24+
```json
25+
[
26+
"EVENT",
27+
"RAND",
28+
{
29+
"id": "<Event id>",
30+
"pubkey": "<Mostro's pubkey>",
31+
"kind": 0,
32+
"tags": [],
33+
"content": "{\"name\":\"Mostro P2P\",\"about\":\"A peer-to-peer Bitcoin trading daemon over the Lightning Network\",\"picture\":\"https://example.com/mostro-avatar.png\",\"website\":\"https://mostro.network\"}",
34+
"sig": "<Mostro's signature>",
35+
"created_at": 1731701441
36+
}
37+
]
38+
```
39+
40+
### Fields
41+
42+
- `name`: Human-readable name for the Mostro instance (e.g., "LatAm Mostro", "Bitcoin Munich Exchange").
43+
- `about`: Short description of the instance and the community it serves.
44+
- `picture`: URL to an avatar image. Recommended: square, max 128×128 pixels, PNG or JPEG.
45+
- `website`: Operator's website URL.
46+
47+
All fields are optional. If no metadata fields are configured, no kind 0 event is published. These fields are configured in the `[mostro]` section of `settings.toml`:
48+
49+
```toml
50+
[mostro]
51+
name = "Mostro P2P"
52+
about = "A peer-to-peer Bitcoin trading daemon over the Lightning Network"
53+
picture = "https://example.com/mostro-avatar.png"
54+
website = "https://mostro.network"
55+
```
56+
57+
This allows clients like Mostro Mobile to display meaningful information about each Mostro instance — its name, description, avatar, and website — so users know which node they are trading on.
58+
59+
## Mostro Instance Status
60+
361
Each Mostro instance periodically publishes events with relevant information about its status, such as the code version it is using, the latest commit, the fees it charges, allowed exchange limits, the relays it publishes to, and much more. Below, we provide details on these events.
462

563
## Mostro Instance Status
@@ -153,7 +211,7 @@ The operator of a Mostro instance decides which relays the events from that inst
153211
"kind": 10002,
154212
"tags": [
155213
["r", "wss://relay.mostro.network/"],
156-
["r", "wss://nostr.bilthon.dev/"]
214+
["r", "wss://nos.lol/"]
157215
],
158216
"content": "",
159217
"sig": "<Mostro's signature>",

0 commit comments

Comments
 (0)