As decided in the 2019 summer hackathon, BTCR should only use a short txref if the specified txo index is zero. For example, the following transaction parameters can be encoded as short (implicit txout=0) and long (explicit):
I think that the filtering should be done in the BTCR utilities (txid2txref, createBtcrDid, etc) and not in libtxref itself. That way libtxref can be "clean" and we will keep the BTCR-related logic in the BTCR code.
Finally, following Postel's law, we should allow the long form of a txref as input to the command line utilities, but we will convert to the short form for any output (possibly with a warning message as well).
As decided in the 2019 summer hackathon, BTCR should only use a short txref if the specified txo index is zero. For example, the following transaction parameters can be encoded as short (implicit txout=0) and long (explicit):
Short:
txtest1:xyv2-xzpq-q9wa-p7t
Long:txtest1:8yv2-xzpq-qqqq-9yce-nk
I think that the filtering should be done in the BTCR utilities (txid2txref, createBtcrDid, etc) and not in libtxref itself. That way libtxref can be "clean" and we will keep the BTCR-related logic in the BTCR code.
Finally, following Postel's law, we should allow the long form of a txref as input to the command line utilities, but we will convert to the short form for any output (possibly with a warning message as well).