Support Groestlcoin xpub

This commit is contained in:
Yura Pakhuchiy 2019-03-28 14:05:43 +03:00 committed by Martin Boehm
parent c813f76336
commit 827cbcd1d8
2 changed files with 4 additions and 4 deletions

2
Gopkg.lock generated
View File

@ -95,7 +95,7 @@
branch = "master" branch = "master"
name = "github.com/martinboehm/btcutil" name = "github.com/martinboehm/btcutil"
packages = [".","base58","bech32","chaincfg","hdkeychain","txscript"] packages = [".","base58","bech32","chaincfg","hdkeychain","txscript"]
revision = "63034958e64b209cb9294128309dbaed497cde7b" revision = "225ed00dbbd5cb8d8b3949a0ee7c9ea540754585"
[[projects]] [[projects]]
branch = "master" branch = "master"

View File

@ -343,7 +343,7 @@ func (p *BitcoinParser) addrDescFromExtKey(extKey *hdkeychain.ExtendedKey) (bcha
// DeriveAddressDescriptors derives address descriptors from given xpub for listed indexes // DeriveAddressDescriptors derives address descriptors from given xpub for listed indexes
func (p *BitcoinParser) DeriveAddressDescriptors(xpub string, change uint32, indexes []uint32) ([]bchain.AddressDescriptor, error) { func (p *BitcoinParser) DeriveAddressDescriptors(xpub string, change uint32, indexes []uint32) ([]bchain.AddressDescriptor, error) {
extKey, err := hdkeychain.NewKeyFromString(xpub) extKey, err := hdkeychain.NewKeyFromString(xpub, p.Params.Base58CksumHasher)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -370,7 +370,7 @@ func (p *BitcoinParser) DeriveAddressDescriptorsFromTo(xpub string, change uint3
if toIndex <= fromIndex { if toIndex <= fromIndex {
return nil, errors.New("toIndex<=fromIndex") return nil, errors.New("toIndex<=fromIndex")
} }
extKey, err := hdkeychain.NewKeyFromString(xpub) extKey, err := hdkeychain.NewKeyFromString(xpub, p.Params.Base58CksumHasher)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -394,7 +394,7 @@ func (p *BitcoinParser) DeriveAddressDescriptorsFromTo(xpub string, change uint3
// DerivationBasePath returns base path of xpub // DerivationBasePath returns base path of xpub
func (p *BitcoinParser) DerivationBasePath(xpub string) (string, error) { func (p *BitcoinParser) DerivationBasePath(xpub string) (string, error) {
extKey, err := hdkeychain.NewKeyFromString(xpub) extKey, err := hdkeychain.NewKeyFromString(xpub, p.Params.Base58CksumHasher)
if err != nil { if err != nil {
return "", err return "", err
} }