btcsuite / btcutil

Provides bitcoin-specific convenience functions and types
475 stars 408 forks source link

Ecdsa public key 88 byte to bitcoin format #207

Closed codelkirby closed 2 years ago

codelkirby commented 2 years ago

Hi,

I don't have access to the ECDSA private key (it's in an HSM), but I have an api to generate the public key from private key. I'm trying to use the btcsuite util package to create a newaddresspubkey eg:

addrPubKey, err := btcutil.NewAddressPubKey(wif.PrivKey.PubKey().SerializeUncompressed(), &chaincfg.TestNet3Params)

I can't seem to find any function in the library that supports using 88 byte public keys and converting them to the bitcoin format. Is this something the util library can be enhanced to do?

Thanks, Pete.