Skip to content

BTCR utilities should only use short txref if txo index is zero #30

Description

@danpape

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):

    "block-height": "1152194",
    "transaction-position": "1",
    "txo-index": "0"

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions