1 Commits

Author SHA1 Message Date
hzrd149
a3b1ef577b unrecommend the list endpoint 2025-11-25 08:45:35 -06:00
4 changed files with 5 additions and 72 deletions

View File

@@ -27,7 +27,6 @@ BUDs or **Blossom Upgrade Documents** are short documents that outline an additi
- [BUD-08: Nostr File Metadata Tags](./buds/08.md) - [BUD-08: Nostr File Metadata Tags](./buds/08.md)
- [BUD-09: Blob Report](./buds/09.md) - [BUD-09: Blob Report](./buds/09.md)
- [BUD-10: Blossom URI Schema](./buds/10.md) - [BUD-10: Blossom URI Schema](./buds/10.md)
- [BUD-12: Chunked blobs](./buds/12.md)
## Endpoints ## Endpoints
@@ -39,7 +38,7 @@ Blossom Servers expose a few endpoints for managing blobs
- `Authentication`: Signed [nostr event](./buds/02.md#upload-authorization-required) - `Authentication`: Signed [nostr event](./buds/02.md#upload-authorization-required)
- Return a blob descriptor - Return a blob descriptor
- `HEAD /upload` [BUD-06](./buds/06.md#head-upload---upload-requirements) - `HEAD /upload` [BUD-06](./buds/06.md#head-upload---upload-requirements)
- `GET /list/<pubkey>` [BUD-02](./buds/02.md#get-listpubkey---list-blobs) - `GET /list/<pubkey>` [BUD-02](./buds/02.md#get-listpubkey---list-blobs-unrecommended) _(optional, unrecommended)_
- Returns an array of blob descriptors - Returns an array of blob descriptors
- `Authentication` _(optional)_: Signed [nostr event](./buds/02.md#list-authorization-optional) - `Authentication` _(optional)_: Signed [nostr event](./buds/02.md#list-authorization-optional)
- `DELETE /<sha256>` [BUD-02](./buds/02.md#delete-sha256---delete-blob) - `DELETE /<sha256>` [BUD-02](./buds/02.md#delete-sha256---delete-blob)
@@ -57,7 +56,6 @@ Blossom Servers expose a few endpoints for managing blobs
| ------- | ------------------- | ------------------ | | ------- | ------------------- | ------------------ |
| `24242` | Authorization event | [01](./buds/01.md) | | `24242` | Authorization event | [01](./buds/01.md) |
| `10063` | User Server List | [03](./buds/03.md) | | `10063` | User Server List | [03](./buds/03.md) |
| `2001` | Merkle tree | [12](./buds/12.md) |
## License ## License

View File

@@ -76,7 +76,9 @@ Example Authorization event:
} }
``` ```
## GET /list/pubkey - List Blobs (Optional) ## GET /list/pubkey - List Blobs (Unrecommended)
**Note:** The `/list` endpoint is optional and unrecommended. It is not necessary for all servers to implement the `/list` endpoint. Servers MAY implement this endpoint, but are not required to do so.
The `/list/<pubkey>` endpoint MUST return a JSON array of [Blob Descriptor](#blob-descriptor) that were uploaded by the specified pubkey The `/list/<pubkey>` endpoint MUST return a JSON array of [Blob Descriptor](#blob-descriptor) that were uploaded by the specified pubkey

View File

@@ -204,3 +204,4 @@ blossom:b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553.pdf?xs=
``` ```
blossom:a7b3c2d1e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1.png?xs=cdn.example.com&xs=media.nostr.build&as=781208004e09102d7da3b7345e64fd193cd1bc3fce8fdae6008d77f9cabcd036&as=b53185b9f27962ebdf76b8a9b0a84cd8b27f9f3d4abd59f715788a3bf9e7f75e&sz=2547831 blossom:a7b3c2d1e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1.png?xs=cdn.example.com&xs=media.nostr.build&as=781208004e09102d7da3b7345e64fd193cd1bc3fce8fdae6008d77f9cabcd036&as=b53185b9f27962ebdf76b8a9b0a84cd8b27f9f3d4abd59f715788a3bf9e7f75e&sz=2547831
``` ```

View File

@@ -1,68 +0,0 @@
# BUD-12
## Chunked blobs
`draft` `optional`
Breaking large blobs into smaller chunks for distribution
### Chunking
The client MAY break large blobs into any number or size of chunks. although its recommended to use the size `1Mb` or `4Mb` for small and large chunks
Clients MUST NOT pad the remaining chunk, If clients need privacy they should use random chunk sizes and optionally encrypt the large blob
### Publishing
Clients should publish a `2001` kind event after chunking the file in order to store the list of chunks
The events MUST contain an ordered list of `chunk` tags with the sha256 hashes of the chunks
The `content` field MUST be a human readable description of the chunked file
```json
{
"tags": [
[ "chunk", "7e668b56a58c7891e0cf263ea3f093b75eebade23d663a45aa9920f347b3d671"],
[ "chunk", "9b9c44a91396f19fd8700986eb0586dff2dcccf96c75bc2caefef302bcd78da1"],
[ "chunk", "7a281548f1223664b855b10b08e59e84389ccabeb742517f6cd75eda2724a798"],
[ "chunk", "fadeccee86b123088bbc452df10e8fbc99d4c2f22a70ef7a35605ec8e439c345"],
[ "chunk", "5d62398419e6d136771541f3d2215e0ce31b1be45e99dbc64b43a4b734b447ca"],
]
}
```
### Metadata
The `2001` event MAY include additional metadata tags to help other clients know the filename, mime type or servers to download from
Metadata tags:
- `name` Filename
- `mime` Mime type of file
- `size` Total size in bytes of the file
- `server` (multiple) Recommended servers to download chunks from
### Examples
Example `2001` event
```json
{
"pubkey": "5328e6c743a50271745e16476590ba7ea3dc591c65f3a5e2b03430814c1dabc0",
"created_at": 1731405194,
"kind": 2001,
"content": "Large zip archive of documents",
"tags": [
[ "chunk", "7e668b56a58c7891e0cf263ea3f093b75eebade23d663a45aa9920f347b3d671"],
[ "chunk", "9b9c44a91396f19fd8700986eb0586dff2dcccf96c75bc2caefef302bcd78da1"],
[ "chunk", "7a281548f1223664b855b10b08e59e84389ccabeb742517f6cd75eda2724a798"],
[ "chunk", "fadeccee86b123088bbc452df10e8fbc99d4c2f22a70ef7a35605ec8e439c345"],
[ "chunk", "5d62398419e6d136771541f3d2215e0ce31b1be45e99dbc64b43a4b734b447ca"],
[ "name", "example.mp4" ],
[ "mime", "video/mp4" ],
[ "size", "4823449" ],
[ "server", "https://cdn.example.com" ],
[ "server", "https://nostr.download" ]
]
}
```