claim resources feature proposal
See original GitHub issueThis is a proposal for adding secondary content (resources) to claims such as images in a markdown claim, subtitles for a video claim and any other kind of supporting data to the claims primary content.
Addressing of the content and storage of the content are the two main issues that need to be tackled.
Protobuf
below this line: https://github.com/lbryio/types/blob/master/v2/proto/claim.proto#L14
add: repeated Source resources = 14;
done.
Addressing
syntax: lbry://[current-lbry-url-scheme]~[resource-name]:[resource-blob-hash]
URLs that have ~
return the raw bytes of the content.
Examples:
URL | Description |
---|---|
lbry://one |
resolve claim one and return the JSON / HTML representing the claim (this is how it works now) |
lbry://one~ |
resolve claim, then return the primary claim payload bytes (eg, like opening a plain image file in browser) |
lbry://one~thumbnail |
resolve claim, then if an explicit thumbnail is defined in protobuf then that payload is returned, otherwise it will lookup thumbnail in claim resources and return that |
lbry://one~foo |
resolve claim, then lookup foo in resources and return payload |
lbry://~foo |
a “relative” version of previous URL can be used from within the claim primary content (eg. markdown), a LBRY “browser” app rendering the primary content would have to rewrite the URL to add the missing claim or pass some kind of context value along with the request providing info to the SDK of what this URL is relative to |
lbry://one:beef~foo:abc123 |
resolve claim, then lookup a resource in resources which has both the matching name and the matching blob hash |
lbry://one:beef~:abc123 |
same as above but only match on blob hash |
Implementation Details
- To maintain consistent API response types the current
resolve
command should not change it’s return type. If you pass a resource URL to resolve it will ignore the resource part and just return the claim. - The existing
get
command will be used to retrieve the resources. - When “browser” app converts markdown to HTML it would also convert all of the
lbry://
urls with~
in them to something like (assuminglbrynet
API is running onlocalhost:123
):http://localhost:123/get?url=one~foo:abc123
. - If you call
get
with a URL that doesn’t have~
it will assume you want the primary content (current implementation already). - Therefore:
lbry://one~two
andlbry://one
both return the same claim JSON when URL is passed toresolve
endpoint;lbry://one~two
andlbry://one
would return different resources when passed toget
command, resource namedtwo
for first URL and the primary claim payload for second URL.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:17 (15 by maintainers)
Top Results From Across the Web
Use Discriminators to Support Your Claims - 24 Hour Company
Great proposal themes highlight the important and relevant elements of your solution. They are found throughout proposals—most notably in theme statements, ...
Read more >The Ultimate RFP Guide: Steps, Guidelines & Template for ...
The RFP invites relevant vendors to submit a proposal to meet the desired need. ... However, issuing an RFP takes time and resources....
Read more >How to Write a Business Proposal That Wins New Clients
Start your proposal by thanking the prospect for the opportunity to pitch your services; it's courteous. Also, explicitly state your interest in tackling...
Read more >10 Best Proposal Management Software & Systems Of 2022
Below you'll find an overview of each of the 10 best RFP project Management tools, with screenshots, feature overviews, and pricing.
Read more >Using Layers of Proof to Strengthen Proposal Claims
Strong proofs are critical to compelling proposal content because they serve to substantiate claims and provide evidence that the contractor ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
from allhands discussion
ideally yes.
another use case is preview thumbnails https://github.com/lbryio/lbry-desktop/issues/6169