Open vicariousdrama opened 1 year ago
@honza do you have an opinion?
getPubKey expects config.PrivateKey to be in hex format.
func getPubKey(privateKey string) string {
if keyb, err := hex.DecodeString(config.PrivateKey); err != nil {
log.Printf("Error decoding key from hex: %s\n", err.Error())
return ""
} else {
_, pubkey := btcec.PrivKeyFromBytes(keyb)
return hex.EncodeToString(schnorr.SerializePubKey(pubkey))
}
}
--onlymentions
flag