Add sat at index content endpoint (/r/sat/:sat_number/at/:index/content
)
#4113
+130
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add recursive endpoint for sat inscription content
This PR adds a new recursive endpoint
/r/sat/<SAT_NUMBER>/at/<INDEX>/content
that returns the raw content of inscriptions on a specific sat at a given index. This endpoint complements the existing/r/sat/<SAT_NUMBER>/at/<INDEX>
endpoint by directly returning the inscription content instead of just the inscription ID.Features
/r/sat/<SAT_NUMBER>/at/<INDEX>/content
--index-sats
flag like other sat-based endpointsDocumentation
docs/src/inscriptions/recursion.md
Testing
Example Usage
curl -s -H "Accept: application/json" \ http://0.0.0.0:80/r/sat/289488340427831/at/-1/content
Use cases
This endpoint is particularly valuable for dynamic on-chain content that evolves over time through reinscriptions. For example:
By providing direct access to the latest inscription content on a specific sat, this endpoint reduces the number of API calls needed (from 2 to 1) and simplifies the development of applications that leverage reinscription functionality. This makes it easier to build applications that treat sats as updateable storage locations while maintaining the decentralized nature of ordinal inscriptions.