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

Recursive endpoint to get inscription on sat #2277

Closed
casey opened this issue Jul 15, 2023 · 6 comments
Closed

Recursive endpoint to get inscription on sat #2277

casey opened this issue Jul 15, 2023 · 6 comments

Comments

@casey
Copy link
Collaborator

casey commented Jul 15, 2023

See discussion in #2200. Something like:

/sat/N # first inscription on sat N
/sat/N/X # Xth inscription on sat N, oldest first
/sat/N/-X # Xth inscription on sat N, newest first
@onchainguy-btc
Copy link
Contributor

Inscriptions on the same sat are prohibited by the current ord codebase aren't they? Was looking at this line. Of course, one can just remove the condition, build and inscribe but was wondering what's the idea here.

@lifofifoX
Copy link
Collaborator

lifofifoX commented Jul 19, 2023

Having these same API endpoints available under inscriptions would be super useful too:

/content/ID/sat/X
/content/ID/sat/-X

Also, is it necessary to have /sat/N when it's always going to be the same as /sat/N/0? Instead, /sat/N.json endpoint can be used for returning a JSON of sat specific information such as rarity and blockheight.

@raphjaph raphjaph moved this from Backlog to In Progress in Tracker Aug 10, 2023
@null-ish
Copy link

Looking forward to this so I can make my own "social media wall" sat which I will post stuff to by re-inscribing the "data" sat it's connected to.

src="/content/sat/DATA_SAT_NUMBER/-1"

Plenty other use cases become possible with this. Sky is the limit!

@raphjaph
Copy link
Collaborator

probably not going to add the /content/sat/... endpoint since this makes caching more difficult.

Recursive inscriptions would need to get the id from /sat/N and then get the content with that id like so /content/ID.

@lifofifoX
Copy link
Collaborator

@raphjaph Having /content/sat/-1 would be really convenient, especially with HTML inscriptions.

Consider the following inscription:

<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="/sat/XXX/-1" />
  <script src="/sat/YYY/-1"></script>
</head>

<body>
  ...
</body>
</html>

With sat indexed endpoints for fetching content, I can easily update this inscription. Same is certainly possible with /sat/N + /content/ID, but it'd require a lot more code gymanstics.

@raphjaph raphjaph moved this from In Progress to Ready for Review in Tracker Oct 2, 2023
@raphjaph raphjaph moved this from Ready for Review to In Progress in Tracker Oct 2, 2023
@raphjaph
Copy link
Collaborator

raphjaph commented Nov 24, 2023

Closed by #2680

@github-project-automation github-project-automation bot moved this from In Progress to Done in Tracker Nov 24, 2023
@casey casey removed this from Tracker Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants