Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIP-96 sign payload, content field for file caption #148

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

ice-cronus
Copy link
Contributor

content in upload response for file caption as in NIP-94:

{
  "kind": 1063,
  "tags": [
    ["url",<string with URI of file>],
    ["m", <MIME type>],
    ["x",<Hash SHA-256>],
    ["ox",<Hash SHA-256>],
    ["size", <size of file in bytes>],
    ["dim", <size of file in pixels>],
    ["magnet",<magnet URI> ],
    ["i",<torrent infohash>],
    ["blurhash", <value>],
    ["thumb", <string with thumbnail URI>],
    ["image", <string with preview URI>],
    ["summary", <excerpt>],
    ["alt", <description>]
  ],
  "content": "<caption>", // <--- THIS
  // other fields...
}

optional signing of file payload in NIP-98 header for file uploads:

When the request contains a body (as in POST/PUT/PATCH methods) clients SHOULD include a SHA256 hash of the request body in a payload tag as hex (["payload", ""]), servers MAY check this to validate that the requested payload is authorized.

@fiatjaf fiatjaf merged commit c8c295f into nbd-wtf:master Sep 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants