Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Fix saving privatekey, add onlymentions #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vicariousdrama
Copy link

  • home option can now filter for events mentioning caller even if no followers using --onlymentions flag
  • fixed bug in storage of private key. it should be in a format that can be consistently decoded for future calls.
  • restored call to printPublishStatus in message handler

@fiatjaf
Copy link
Owner

fiatjaf commented Mar 10, 2023

@honza do you have an opinion?

@vicariousdrama
Copy link
Author

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))
	}
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants