ord icon indicating copy to clipboard operation
ord copied to clipboard

Rune balances for spent outputs

Open koirikivi opened this issue 9 months ago • 2 comments

I noticed that /output/<txid>:<vout> doesn't show the Rune balances for spent outputs. It also shows those outputs as indexed: false.

I'm working on a service that accepts Rune deposits from users (and will eventually spend the outputs associated with the users' deposits). The way I'm have currently implemented this is using the listsinceblock Bitcoin RPC api to list the all received transactions, and then for each txid/vout pair I query /output/<txid>:<vout> from the ord api to see the Rune amounts transferred as a part of that transaction. However, this doesn't work for outputs that have been spent before scanning the received transactions.

It would be very helpful to have access to the historical rune amounts transferred as a part of some output. Maybe we could have a flag like --index-spent-runes, in congruence with --index-spent-sats?

koirikivi avatar May 03 '24 12:05 koirikivi

Spending the outputs before knowing their runic contents will spend their runic contents willy nilly. Wouldn't you want to know their contents before spending them?

gmart7t2 avatar May 03 '24 12:05 gmart7t2

Spending the outputs before knowing their runic contents will spend their runic contents willy nilly. Wouldn't you want to know their contents before spending them?

In my use case, the UTXOs are held in an n-of-m P2WSH wallet that's being scanned by multiple backend instances. It's possible that one instance is down and the other instances agree to spend the outputs. After that, it's not possible for the other instance to scan them properly.

Even if we ignore my use case, it would be a useful feature to be able to construct the Rune transaction history of a wallet. I don't think it's currently possible, at least easily.

koirikivi avatar May 03 '24 13:05 koirikivi