rust-esplora-client icon indicating copy to clipboard operation
rust-esplora-client copied to clipboard

Rename `OutputStatus` to `OutSpendStatus`

Open evanlinjin opened this issue 2 years ago • 2 comments

OutputStatus is the wrong name. It is really the status of the output's spend.

evanlinjin avatar Feb 24 '23 03:02 evanlinjin

Not sure? It has a spent: bool field, so it's really describing the status of the output itself? What would be missing to make it a real OutputStatus?

However, if someone touches it already, the status field probably should be renamed too, as it would be less confusing to name it spending_tx_status, tx_status or similar.

tnull avatar Feb 27 '23 13:02 tnull

The Esplora API docs describes the endpoint as "Returns the spending status of a transaction output." I noticed the difference in names when touching this area, but like BDK's current name of OutputStatus which I think is more accurate. Furthermore, I think the difference between outspend and output is small enough that people won't have trouble recognizing it if they end up reading the Esplora api docs.

MaxFangX avatar Apr 27 '23 03:04 MaxFangX