github.com/mit-dci/lit@v0.0.0-20221102210550-8c3d3b49f2ce/btcutil/txsort/doc.go (about)

     1  // Copyright (c) 2015 The btcsuite developers
     2  // Use of this source code is governed by an ISC
     3  // license that can be found in the LICENSE file.
     4  
     5  /*
     6  Package txsort provides the transaction sorting according to BIP 69.
     7  
     8  Overview
     9  
    10  BIP 69 defines a standard lexicographical sort order of transaction inputs and
    11  outputs.  This is useful to standardize transactions for faster multi-party
    12  agreement as well as preventing information leaks in a single-party use case.
    13  
    14  The BIP goes into more detail, but for a quick and simplistic overview, the
    15  order for inputs is defined as first sorting on the previous output hash and
    16  then on the index as a tie breaker.  The order for outputs is defined as first
    17  sorting on the amount and then on the raw public key script bytes as a tie
    18  breaker.
    19  */
    20  package txsort