Provides bitcoin-specific convenience functions and types
Find a file
nsa f06d6af2f0 psbt: return ErrInvalidKeydata if value isn't a 32-bit uint
This commit fixes a panic when deserializing PSBTs in raw binary.
If the key type was SighashType and the value was not 4 bytes long,
the call to binary.LittleEndian.Uint32(value) would panic as the
function expects 4 bytes to parse into a uint32. We now perform a
sanity check that asserts that the value is 4 bytes long.
2020-04-08 17:54:59 -04:00
base58 multi: Update markdown files for GFM changes. 2017-05-25 13:01:10 -05:00
bech32 bech32: Add bech32 encoding package. 2017-07-25 22:14:01 -05:00
bloom bloom: update due to latest wire updates 2018-05-14 19:59:31 -07:00
coinset multi: Update markdown files for GFM changes. 2017-05-25 13:01:10 -05:00
gcs gcs/gcs: use sort.Slice instead of sort.Sort, remove uint64Slice 2019-04-25 16:57:16 -07:00
hdkeychain hdkeychain: update test case error string due to btcec changes 2018-07-06 15:31:18 -07:00
psbt psbt: return ErrInvalidKeydata if value isn't a 32-bit uint 2020-04-08 17:54:59 -04:00
txsort multi: Update markdown files for GFM changes. 2017-05-25 13:01:10 -05:00
.gitignore Initial commit. 2013-05-28 17:20:28 -05:00
.travis.yml build: use go 1.9.4 and 1.10 for travis builds 2018-05-14 19:51:39 -07:00
address.go use defaultnet params instead of btc chaincfg for decode address 2019-03-15 18:01:44 -07:00
address_test.go use defaultnet params instead of btc chaincfg for decode address 2019-03-15 18:01:44 -07:00
amount.go Update docs for NewAmount 2015-08-12 07:01:50 +00:00
amount_test.go Fix tiny typo 2015-07-20 11:20:46 +00:00
appdata.go build: Add gosimple linter to goclean.sh 2017-01-11 15:38:44 -05:00
appdata_test.go Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00
block.go add new BytesNoWitness method to Block 2017-07-26 11:36:09 -07:00
block_test.go Update for recent chainhash-related API changes. (#78) 2016-08-08 12:38:16 -05:00
certgen.go Add Common Name to certificate. 2015-06-15 16:14:08 -04:00
certgen_test.go Add Common Name to certificate. 2015-06-15 16:14:08 -04:00
const.go Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00
cov_report.sh Initial implementation. 2013-05-28 18:21:26 -05:00
doc.go Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00
example_test.go Add testable example for UnitConversions 2015-07-22 21:20:10 +00:00
go.mod build: add top-level go mod file 2020-01-15 17:56:58 -08:00
go.sum build: add top-level go mod file 2020-01-15 17:56:58 -08:00
goclean.sh build: Add gosimple linter to goclean.sh 2017-01-11 15:38:44 -05:00
hash160.go Switch to upstream golang.org/x/crypto 2017-05-08 23:05:27 -05:00
internal_test.go bech32 encoded segwit addresses. 2017-07-25 22:14:01 -05:00
LICENSE gcs: add package for building and using Golomb-coded set filters 2018-05-15 19:14:18 -07:00
net.go Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00
net_noop.go Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00
README.md multi: Update markdown files for GFM changes. 2017-05-25 13:01:10 -05:00
test_coverage.txt Add PEM encode error checking 2014-12-13 10:29:36 -05:00
tx.go add cached version of HasWitness 2017-07-26 11:36:19 -07:00
tx_test.go Update for recent chainhash-related API changes. (#78) 2016-08-08 12:38:16 -05:00
wif.go Update for recent chainhash-related API changes. (#78) 2016-08-08 12:38:16 -05:00
wif_test.go Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00

btcutil

Build Status Coverage Status ISC License GoDoc

Package btcutil provides bitcoin-specific convenience functions and types. A comprehensive suite of tests is provided to ensure proper functionality. See test_coverage.txt for the gocov coverage report. Alternatively, if you are running a POSIX OS, you can run the cov_report.sh script for a real-time report.

This package was developed for btcd, an alternative full-node implementation of bitcoin which is under active development by Conformal. Although it was primarily written for btcd, 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/btcsuite/btcutil

GPG Verification Key

All official release tags are signed by Conformal so users can ensure the code has not been tampered with and is coming from the btcsuite developers. To verify the signature perform the following:

  • Download the public key from the Conformal website at https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt

  • Import the public key into your GPG keyring:

    gpg --import GIT-GPG-KEY-conformal.txt
    
  • Verify the release tag with the following command where TAG_NAME is a placeholder for the specific tag:

    git tag -v TAG_NAME
    

License

Package btcutil is licensed under the copyfree ISC License.