Add hex string of pubkey to AddressInfo.

This commit is contained in:
Josh Rickmar 2013-11-20 10:17:49 -05:00
parent 89e3054bc5
commit 455a376df8

View file

@ -26,6 +26,7 @@ import (
"crypto/sha256" "crypto/sha256"
"crypto/sha512" "crypto/sha512"
"encoding/binary" "encoding/binary"
"encoding/hex"
"errors" "errors"
"fmt" "fmt"
"github.com/conformal/btcec" "github.com/conformal/btcec"
@ -920,6 +921,7 @@ type AddressInfo struct {
Compressed bool Compressed bool
FirstBlock int32 FirstBlock int32
Imported bool Imported bool
Pubkey string
} }
// GetSortedActiveAddresses returns all wallet addresses that have been // GetSortedActiveAddresses returns all wallet addresses that have been
@ -1405,6 +1407,7 @@ func (a *btcAddress) info(net btcwire.BitcoinNet) (*AddressInfo, error) {
Compressed: a.flags.compressed, Compressed: a.flags.compressed,
FirstBlock: a.firstBlock, FirstBlock: a.firstBlock,
Imported: a.chainIndex == importedKeyChainIdx, Imported: a.chainIndex == importedKeyChainIdx,
Pubkey: hex.EncodeToString(a.pubKey),
}, nil }, nil
} }