Add entrypoint to get the pubkey out AddressPubKey

This commit is contained in:
Owain G. Ainsworth 2014-04-24 01:23:43 +01:00
parent 3e403ed6c0
commit 973174daa4

View file

@ -507,6 +507,11 @@ func (a *AddressPubKey) AddressPubKeyHash() *AddressPubKeyHash {
}
// PubKey returns the underlying public key for the address.
func (a *AddressPubKey) PubKey() *btcec.PublicKey {
return a.pubKey
}
// EncodePrivateKey takes a 32-byte private key and encodes it into the
// Wallet Import Format (WIF).
func EncodePrivateKey(privKey []byte, net btcwire.BitcoinNet, compressed bool) (string, error) {