Documentation
¶
Overview ¶
Package hd provides hierarchical deterministic wallet (HD wallet) functionality according to BIP39, BIP32 and BIP44. The initialization of the wallet requires a 64-byte seed. It is recommended to generate seeds using BIP39 out of a 24 word mnemonic and passphrase which are easy to remember. Once the HdWallet is initialized, you can easily generate any address. For a full description of what a HD wallet is, please read: https://en.bitcoinwiki.org/wiki/Deterministic_wallet
Index ¶
Constants ¶
View Source
const ( // External addresses are used for inputs or deposits. External uint8 = 0x00 // Change addresses are used for internal use. Change uint8 = 0x01 )
Variables ¶
View Source
var ( // ErrInternal wraps errors reported by deps. ErrInternal error = errors.New("hd internal error") // ErrInvalidSeedLen will be reported when setting a wrong length (recommended seed length is 64-byte). ErrInvalidSeedLen error = errors.New("hd: length of seed is invalid") // ErrUnusableSeed will be reported if the seed cannot be used. ErrUnusableSeed error = errors.New("hd: the master key cannot be used") )
Functions ¶
This section is empty.
Types ¶
type HdWallet ¶
type HdWallet struct {
*hdkeychain.ExtendedKey // HD wallet branch from which account/addresses are generated
}
HdWallet is a composed type.
Click to show internal directories.
Click to hide internal directories.