{"id":"fe656486c8527a43388c9ecbc9322e78ad7f8d481e2a01bfab382190233e5c0d","pubkey":"266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5","created_at":1770142361,"kind":30817,"tags":[["d","chunked-blobs"],["title","Chunked Blobs"],["client","nostrhub.io"]],"content":"# Chunked blobs\n\nBreaking large blossom blobs into smaller chunks for distribution\n\n## Chunking\n\nThe 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\n\nClients MUST NOT pad the remaining chunk, If clients need privacy they should use random chunk sizes and optionally encrypt the large blob\n\n## Publishing\n\nClients should publish a `2001` kind event after chunking the file in order to store the list of chunks\n\nThe events MUST contain an ordered list of `chunk` tags with the sha256 hashes of the chunks\n\nThe `content` field MUST be a human readable description of the chunked file\n\n```json\n{\n  \"tags\": [\n    [ \"chunk\", \"7e668b56a58c7891e0cf263ea3f093b75eebade23d663a45aa9920f347b3d671\"],\n    [ \"chunk\", \"9b9c44a91396f19fd8700986eb0586dff2dcccf96c75bc2caefef302bcd78da1\"],\n    [ \"chunk\", \"7a281548f1223664b855b10b08e59e84389ccabeb742517f6cd75eda2724a798\"],\n    [ \"chunk\", \"fadeccee86b123088bbc452df10e8fbc99d4c2f22a70ef7a35605ec8e439c345\"],\n    [ \"chunk\", \"5d62398419e6d136771541f3d2215e0ce31b1be45e99dbc64b43a4b734b447ca\"],\n  ]\n}\n```\n\n## Metadata\n\nThe `2001` event MAY include additional metadata tags to help other clients know the filename, mime type or servers to download from\n\nMetadata tags:\n  - `name` Filename\n  - `mime` Mime type of file\n  - `size` Total size in bytes of the file\n  - `server` (multiple) Recommended servers to download chunks from\n\n## Examples\n\nExample `2001` event\n```json\n{\n  \"pubkey\": \"5328e6c743a50271745e16476590ba7ea3dc591c65f3a5e2b03430814c1dabc0\",\n  \"created_at\": 1731405194,\n  \"kind\": 2001,\n  \"content\": \"Large zip archive of documents\",\n  \"tags\": [\n    [ \"chunk\", \"7e668b56a58c7891e0cf263ea3f093b75eebade23d663a45aa9920f347b3d671\"],\n    [ \"chunk\", \"9b9c44a91396f19fd8700986eb0586dff2dcccf96c75bc2caefef302bcd78da1\"],\n    [ \"chunk\", \"7a281548f1223664b855b10b08e59e84389ccabeb742517f6cd75eda2724a798\"],\n    [ \"chunk\", \"fadeccee86b123088bbc452df10e8fbc99d4c2f22a70ef7a35605ec8e439c345\"],\n    [ \"chunk\", \"5d62398419e6d136771541f3d2215e0ce31b1be45e99dbc64b43a4b734b447ca\"],\n    [ \"name\", \"example.mp4\" ],\n    [ \"mime\", \"video/mp4\" ],\n    [ \"size\", \"4823449\" ],\n    [ \"server\", \"https://cdn.example.com\" ],\n    [ \"server\", \"https://nostr.download\" ]\n  ]\n}\n```","sig":"70dc5217e9c190096c93cc557e6b14c129b438495dfb6c4af10d6de6ed03f7fbc6236ec0534430cb5495bbd3162bf803022645ba7812239584ca7ba61162f470"}