Blockstream / Blockstream/esplora

Question on API tx order for same block & low priority suggestions

Open
#165 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.3k
Forks
514
Avg merge
1d 10h
Merged PRs (30d)
16

Description

Hi, thanks for great API and explorer.

When using `/api/address/:address/txs/chain` or `/block/:hash/txs`
is the order API lists tx that were in same block always based on order within that block?

[Documentation ](https://github.com/Blockstream/esplora/blob/esplora_v2.00/API.md) does mention `sorted with newest first` but since blocks confirm its tx at same time, I wasn't sure.

I would like to use some logic that depends on placement within the block for tie breaking beyond block_height, and I imagine various embedded protocols could use too.

Requesting possibly the entire block's worth of tx with `/block/:hash/txs[/:start_index]` would be a lot of redundant info just to find order or to get txid's within a block for merkle proof. Is it possible to find the order of my tx's by txid within same block another way?

I just wanted to get a confirmation on the order used in API but possible suggestions:

- tx index within a block for `transaction format > status` - the only missing sorting data point for checking sorting
- endpoint that has only provides all txid for a block (data you already have) with indexes or specified order in [documentation](https://github.com/Blockstream/esplora/blob/esplora_v2.00/API.md)
- if people want to provide more confidence in api results, is it possible to have an endpoint for only the hashes needed for a specific txid merkle proof to the root in the header?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.