1hdkeychain 2========== 3 4[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil) 5[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) 6[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/hdkeychain) 7 8Package hdkeychain provides an API for bitcoin hierarchical deterministic 9extended keys (BIP0032). 10 11A comprehensive suite of tests is provided to ensure proper functionality. See 12`test_coverage.txt` for the gocov coverage report. Alternatively, if you are 13running a POSIX OS, you can run the `cov_report.sh` script for a real-time 14report. 15 16## Feature Overview 17 18- Full BIP0032 implementation 19- Single type for private and public extended keys 20- Convenient cryptograpically secure seed generation 21- Simple creation of master nodes 22- Support for multi-layer derivation 23- Easy serialization and deserialization for both private and public extended 24 keys 25- Support for custom networks by registering them with chaincfg 26- Obtaining the underlying EC pubkeys, EC privkeys, and associated bitcoin 27 addresses ties in seamlessly with existing btcec and btcutil types which 28 provide powerful tools for working with them to do things like sign 29 transations and generate payment scripts 30- Uses the btcec package which is highly optimized for secp256k1 31- Code examples including: 32 - Generating a cryptographically secure random seed and deriving a 33 master node from it 34 - Default HD wallet layout as described by BIP0032 35 - Audits use case as described by BIP0032 36- Comprehensive test coverage including the BIP0032 test vectors 37- Benchmarks 38 39## Installation and Updating 40 41```bash 42$ go get -u github.com/btcsuite/btcutil/hdkeychain 43``` 44 45## Examples 46 47* [NewMaster Example](http://godoc.org/github.com/btcsuite/btcutil/hdkeychain#example-NewMaster) 48 Demonstrates how to generate a cryptographically random seed then use it to 49 create a new master node (extended key). 50* [Default Wallet Layout Example](http://godoc.org/github.com/btcsuite/btcutil/hdkeychain#example-package--DefaultWalletLayout) 51 Demonstrates the default hierarchical deterministic wallet layout as described 52 in BIP0032. 53* [Audits Use Case Example](http://godoc.org/github.com/btcsuite/btcutil/hdkeychain#example-package--Audits) 54 Demonstrates the audits use case in BIP0032. 55 56## License 57 58Package hdkeychain is licensed under the [copyfree](http://copyfree.org) ISC 59License. 60