@evoskuil @neillm - I was digging through how btcd does payments/address indexing and found something curious. Would love to hear your thoughts on it.
They index addresses, as v3 does. The interesting thing is that they index pubkeys from a multisig output as well. They convert those pubkeys into addresses, which seems kind of odd. But they index that transaction for all those addresses (obtained from the pubkeys) enabling queries for use of pubkeys in payments.
As I understand, with our approach to index hashes of output scripts, we won't be able to support querying the payments index for a single pubkey in the multisig transactions. Is that right? Also, is that a concern, given that LN might cause some growth in the share of multisig transactions?
In case you are curious, this is where they grab the pubkeys and convert them to addresses:
https://github.com/btcsuite/btcd/blob/86fed781132ac890ee03e906e4ecd5d6fa180c64/txscript/standard.go#L596