From 455a376df895d55ffa9d0397ade24397ccb1f878 Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Wed, 20 Nov 2013 10:17:49 -0500 Subject: [PATCH] Add hex string of pubkey to AddressInfo. --- wallet/wallet.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wallet/wallet.go b/wallet/wallet.go index 1f946cf..bfb2bc8 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -26,6 +26,7 @@ import ( "crypto/sha256" "crypto/sha512" "encoding/binary" + "encoding/hex" "errors" "fmt" "github.com/conformal/btcec" @@ -920,6 +921,7 @@ type AddressInfo struct { Compressed bool FirstBlock int32 Imported bool + Pubkey string } // 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, FirstBlock: a.firstBlock, Imported: a.chainIndex == importedKeyChainIdx, + Pubkey: hex.EncodeToString(a.pubKey), }, nil }