ordinals / ord

👁‍🗨 Rare and exotic sats
https://ordinals.com
Creative Commons Zero v1.0 Universal
3.85k stars 1.38k forks source link

Delegator content `/r/undelegated-content/<INSCRIPTION_ID>` #3932

Closed elocremarc closed 4 weeks ago

elocremarc commented 2 months ago

Allows a delegated inscription to acess its own content with /r/undelegated-content/:id closes https://github.com/ordinals/ord/issues/3700

An inscription with delegated content "foo" and original content "bar" will return the following:

Endpoint Response
/content/:id foo
/r/undelegated-content/:id bar
elocremarc commented 2 months ago

@raphjaph @casey thoughts? We discussed this in an issue and on stream a few months back.

lifofifoX commented 2 months ago

Love this! Wonder if something like /content/:id/delegation is a better endpoint. Seems a bit odd to have this be the only endpoint under /r/ that won't return JSON.

elocremarc commented 2 months ago

@lifofifoX I been thinking the same thing. Also yeah /r/ is required to be JSON this breaks that convention. Plus they already cache /content/ on cloudflare this would be a easy add.

I just went with the route Casey and I discussed in the initial issue.

casey commented 1 month ago

Endpoints are under r/ not because they return JSON, but because they are recursive, i.e., accessible to inscriptions.

elocremarc commented 1 month ago

@casey @raphjaph made the changes. Other than what we call the route it should be gtg.