Add bud-02 User Server List

This commit is contained in:
hzrd149 2024-05-18 07:38:27 -05:00
parent 585e66fe39
commit 79d1543358
3 changed files with 51 additions and 26 deletions

View File

@ -1,26 +0,0 @@
# Blossom nostr integration
Blossom uses nostr for public / private key identities. Users are expected to sign authentication events to prove their identity when uploading or deleting blobs
See [Authorization events](./Server.md#authorization-events)
## User Server Discovery
Users should publish a kind `10063` event with a list of ordered `server` tags indicating servers that others users should use when getting their blobs
### Example
```json
{
"id": "e4bee088334cb5d38cff1616e964369c37b6081be997962ab289d6c671975d71",
"pubkey": "781208004e09102d7da3b7345e64fd193cd1bc3fce8fdae6008d77f9cabcd036",
"content": "",
"kind": 10063,
"created_at": 1708774162,
"tags": [
["server", "https://cdn.self.hosted"],
["server", "https://cdn.satellite.earth"]
],
"sig": "cc5efa74f59e80622c77cacf4dd62076bcb7581b45e9acff471e7963a1f4d8b3406adab5ee1ac9673487480e57d20e523428e60ffcc7e7a904ac882cfccfc653"
}
```

View File

@ -29,6 +29,17 @@ BUDs stand for **Blossom Upgrade Documents**.
See the [BUDs](./buds) folder and specifically [BUD-01](./buds/bud-01.md) for a detailed explanation of the endpoints
## BUDs
- [Core endpoint description](./buds/bud-01.md)
- [User Server List](./buds/bud-02.md)
## Event kinds
| kind | description | NIP |
| ------------- | -------------------------- | ------------------------ |
| `24242` | Authorization event | [01](./buds/bud-01.md.md)|
| `10063` | User Server List | [02](./buds/bud-02.md.md)|
## License
Public domain.

40
buds/bud-02.md Normal file
View File

@ -0,0 +1,40 @@
BUD-02
======
User Server List
-------------------------
`draft` `optional`
Defines a replaceable event using `kind:10063` to advertise the blossom servers for downloading a user's blobs from.
The event MUST include an ordered list of `server` tags with the server URL including the `http://` or `https://`.
The order of these tags is important and should be arranged with the users most "reliable" or "trusted" servers coming first.
The `.content` is not used.
```json
{
"id": "e4bee088334cb5d38cff1616e964369c37b6081be997962ab289d6c671975d71",
"pubkey": "781208004e09102d7da3b7345e64fd193cd1bc3fce8fdae6008d77f9cabcd036",
"content": "",
"kind": 10063,
"created_at": 1708774162,
"tags": [
["server", "https://cdn.self.hosted"],
["server", "https://cdn.satellite.earth"]
],
"sig": "cc5efa74f59e80622c77cacf4dd62076bcb7581b45e9acff471e7963a1f4d8b3406adab5ee1ac9673487480e57d20e523428e60ffcc7e7a904ac882cfccfc653"
}
```
## Client Integration
When uploading blobs clients should attempt to upload the blob to all or at least the top 3 server on the list event.
This ensures that the blob is available in multiple locations in the case one of the servers goes offline.
## Server Integration
Servers may use this event kind to discover other servers that a user is uploading to in order to download specific blobs from.