Merge pull request #60 from v0l/patch-2

Use array for nip94 tags
This commit is contained in:
hzrd149
2025-03-09 09:17:20 +00:00
committed by GitHub

View File

@@ -12,7 +12,7 @@ As described in [BUD-02](./02.md#blob-descriptor) servers MAY add any additional
Servers MAY return an additional `nip94` field in the [blob descriptor](./02.md#blob-descriptor) from the `/upload` or `/mirror` endpoints Servers MAY return an additional `nip94` field in the [blob descriptor](./02.md#blob-descriptor) from the `/upload` or `/mirror` endpoints
The `nip94` field should contain a JSON object with the keys being the tag names defined in [NIP-94](https://github.com/nostr-protocol/nips/blob/master/94.md) and the values being strings The `nip94` field should contain a JSON array with KV pairs as defined in [NIP-94](https://github.com/nostr-protocol/nips/blob/master/94.md)
An example response would look like: An example response would look like:
@@ -23,13 +23,13 @@ An example response would look like:
"size": 184292, "size": 184292,
"type": "application/pdf", "type": "application/pdf",
"uploaded": 1725909682, "uploaded": 1725909682,
"nip94": { "nip94": [
"url": "https://cdn.example.com/b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553.pdf", ["url", "https://cdn.example.com/b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553.pdf"],
"m": "application/pdf", ["m", "application/pdf"],
"x": "b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553", ["x", "b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553"],
"size": "184292", ["size", "184292"],
"magnet": "magnet:?xt=urn:btih:9804c5286a3fb07b2244c968b39bc3cc814313bc&dn=bitcoin.pdf", ["magnet", "magnet:?xt=urn:btih:9804c5286a3fb07b2244c968b39bc3cc814313bc&dn=bitcoin.pdf"],
"i": "9804c5286a3fb07b2244c968b39bc3cc814313bc" ["i", "9804c5286a3fb07b2244c968b39bc3cc814313bc"]
} ]
} }
``` ```