Skip to content

Add recursive child inscription lookup by index#4531

Open
0xjc65eth wants to merge 1 commit into
ordinals:masterfrom
0xjc65eth:latest-child-recursion
Open

Add recursive child inscription lookup by index#4531
0xjc65eth wants to merge 1 commit into
ordinals:masterfrom
0xjc65eth:latest-child-recursion

Conversation

@0xjc65eth

Copy link
Copy Markdown

Summary

  • add /r/children/{inscription_id}/inscriptions/at/{index}
  • support positive indexes from the first child and negative indexes from the latest child
  • return Cache-Control: no-store for negative lookups because the latest child can change
  • add regression coverage for empty, first, and latest-child lookups

Why
Consumers currently need to walk all child inscription pages to find the latest child. This adds the indexed lookup suggested in #3923 while matching the existing /r/sat/{sat}/at/{index} convention.

Testing

  • cargo +1.93.0 test child_inscriptions_recursive_endpoint
  • cargo +1.93.0 fmt -- --check
  • cargo +1.93.0 check

Closes #3923.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recursion: Get latest child from parent inscription

1 participant