stacks-blockchain-api icon indicating copy to clipboard operation
stacks-blockchain-api copied to clipboard

Provide stacks ID within transaction response

Open aulneau opened this issue 4 years ago • 4 comments

@zone117x would it be possible for the transaction object to contain both a stacks address and the corresponding ID if there exists one? The explorer provides options for displaying that relationship.

aulneau avatar Sep 29 '20 19:09 aulneau

Possibly -- we'll have to see how quickly names can be queried once BNS is implemented in Stacks 2.0. If a tx list response requires hundreds of data-map lookups to the core-node it might not be doable.

zone117x avatar Sep 30 '20 12:09 zone117x

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 02 '21 23:09 stale[bot]

@zone117x: Given that the BNS implementation is now available, do we have a way to return the ID as part of the response payload? It seems logical to present the opportunity to trace the parent<->child relationship.

sabbyanandan avatar Mar 04 '22 19:03 sabbyanandan

This sounds possible -- although we'd be querying the BNS table(s) we already have in pg rather than doing requests to the stacks-node. However, we'd need to figure out which endpoints and payloads containing addresses that we'd want to add associated name fields. The original request here is referring to the /tx/<txid> endpoint which was one of the only ones implemented at the time, but it's not clear to me if adding associated BNS names to addresses in this endpoint's payload would be useful or make sense today.

And note that we do already have BNS endpoints to lookup names associated with an address.

zone117x avatar Apr 12 '22 13:04 zone117x

Closing due to inactivity.

smcclellan avatar Jul 21 '23 15:07 smcclellan