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

Have some way to return content on the envelop if there is a delegate. #3700

Open
elocremarc opened this issue Apr 27, 2024 · 6 comments
Open

Comments

@elocremarc
Copy link
Contributor

elocremarc commented Apr 27, 2024

It would be nice if there was some way to return the content inside the envelope of a delegate inscription. This would be useful for generative inscriptions.

For example a 3D scene that uses a GLB file inside the content and the scene is rendered by the delegate inscription. We can get unique data in /r/metadata however we can't create unique files for a delegate.

@elocremarc
Copy link
Contributor Author

elocremarc commented May 9, 2024

@raphjaph @casey any thoughts on this? I keep coming up with all these ideas that need the inscribed content of a delegatee. Another example is having a GLSL shader as the content and then the delegate will handle the rendering of the shader code. With GLSL the content are strings so you would need a delegate inscription in order to render them.

@elocremarc
Copy link
Contributor Author

elocremarc commented May 9, 2024

Found a third reason. I am working on an onchain music engine. People would delegate the music engine then inscribe the mod files into the content for playback.
https://en.wikipedia.org/wiki/MOD_(file_format)

@casey
Copy link
Collaborator

casey commented May 14, 2024

I think this is a good feature. We'd need a new endpoint, like /r/content-no-delegate or /r/delegee.

@elocremarc
Copy link
Contributor Author

elocremarc commented May 14, 2024

@casey
To clarify would that be
/r/content-no-delegate returns the content that is in the envelope which we can't access now?
/r/delegee returns the content of the delegate like /content/ does currently?

Wouldn't we only need the first one?

We also need to make a new cache for those new routes.

I was brainstorming a solution to still use the current cached/content/ by using some key that we parse off as a query param.
Example:
Key raw:
/content/<raw:><id>
/content/raw:6fb97....799i0

Then around where we proxy the delegate if it has that key in the URL string for the route param we parse it off and then return the envelope inside the inscription Tx.

Would this break the /r/ recursion convention?

We could do /content/raw/:id then cache everything under the top level of content route.

@casey
Copy link
Collaborator

casey commented May 14, 2024

Whoops, sorry, I meant /r/delegator, it could also be /r/delegator-content

@elocremarc
Copy link
Contributor Author

How about
/r/delgatee-content/
or maybe just
/r/delegatee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

3 participants