dcrd/dcrutil
Dave Collins 8922295ae5
txsort: Implement stable tx sorting package.
This adds a new package under dcrutil named txsort which implements a
standard lexicographical sort order of transaction inputs and outputs.
This is useful to standardize transactions for faster multi-party
agreement as well as preventing information leaks in a single-party use
case.  It is a modified form of BIP69 which has been updated to account
for differences with Decred-specific transactions.

The sort order for transaction inputs is defined as follows:
- Previous transaction tree in ascending order
- Previous transaction hash (treated as a big-endian uint256)
  lexicographically in ascending order
- Previous output index in ascending order

The sort order for transaction outputs is defined as follows:
- Amount in ascending order
- Public key script version in ascending order
- Raw public key script bytes lexicographically in ascending order
2017-12-08 11:22:21 -06:00
..
txsort txsort: Implement stable tx sorting package. 2017-12-08 11:22:21 -06:00
address_test.go multi: remove unused funcs and vars 2017-12-07 21:46:25 -06:00
address.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
amount_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
amount.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
appdata_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
appdata.go travis: add gosimple linter 2017-11-20 18:49:55 -06:00
bitflags.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
block_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
block.go travis: add gosimple linter 2017-11-20 18:49:55 -06:00
const.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
doc.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
example_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
hash160.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
internal_test.go Import dcrutil repo under dcrutil directory. 2017-10-11 21:29:08 -04:00
README.md Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
tx_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
tx.go travis: add gosimple linter 2017-11-20 18:49:55 -06:00
wif_test.go Merge remaining dcrutil code into a dcrd package. 2017-10-11 22:06:36 -04:00
wif.go multi: remove unused funcs and vars 2017-12-07 21:46:25 -06:00

dcrutil

Build Status ISC License GoDoc

Package dcrutil provides decred-specific convenience functions and types. A comprehensive suite of tests is provided to ensure proper functionality.

This package was developed for dcrd, a full-node implementation of Decred which is under active development by Company 0. Although it was primarily written for dcrd, this package has intentionally been designed so it can be used as a standalone package for any projects needing the functionality provided.

Installation and Updating

$ go get -u github.com/decred/dcrd/dcrutil

License

Package dcrutil is licensed under the copyfree ISC License.