ordinals-api icon indicating copy to clipboard operation
ordinals-api copied to clipboard

feat: add more recursion endpoints

Open janniks opened this issue 2 years ago • 3 comments

Adding these endpoints covered by ord https://docs.ordinals.com/inscriptions.html?highlight=rec#recursion

A couple other endpoints that inscriptions may access are the following:

/blockheight: latest block height.
/blockhash: latest block hash.
/blockhash/<HEIGHT>: block hash at given block height.
/blocktime: UNIX time stamp of latest block.

todo

  • [x] ~cacheing: what's your preferred etag/cacheing option? we could add a stats/inscriptioncountperblock cache for most, and a custom new cache for the /:blockheight show endpoint.~

janniks avatar Jul 11 '23 21:07 janniks

Vercel deployment URL: https://ordinals-5ut3rkhrx-blockstack.vercel.app :rocket:

github-actions[bot] avatar Jul 11 '23 21:07 github-actions[bot]

Codecov Report

Merging #144 (a3c3add) into develop (a7674a9) will decrease coverage by 4.25%. The diff coverage is 100.00%.

:exclamation: Current head a3c3add differs from pull request most recent head 389ec23. Consider uploading reports for the commit 389ec23 to get more accurate results

@@             Coverage Diff             @@
##           develop     #144      +/-   ##
===========================================
- Coverage    91.98%   87.74%   -4.25%     
===========================================
  Files           26       34       +8     
  Lines         2970     3622     +652     
  Branches       239      294      +55     
===========================================
+ Hits          2732     3178     +446     
- Misses         236      440     +204     
- Partials         2        4       +2     
Impacted Files Coverage Δ
src/api/init.ts 70.49% <100.00%> (+1.52%) :arrow_up:
src/api/routes/recursion.ts 100.00% <100.00%> (ø)
src/api/schemas.ts 100.00% <100.00%> (ø)
src/pg/pg-store.ts 99.27% <100.00%> (+1.79%) :arrow_up:

... and 19 files with indirect coverage changes

codecov[bot] avatar Jul 11 '23 21:07 codecov[bot]

Forgot about this one. A lot of recursive viewing doesn't really work in our explorer due to security concerns, so it might not be too important to have these endpoints right now..

janniks avatar Jan 29 '24 16:01 janniks