Author

Topic: sendalert (Read 683 times)

legendary
Activity: 1413
Merit: 1003
Bagholder. Hodling shit since 2014
January 04, 2018, 12:33:49 PM
#2
I'm trying to test something related to sendalert for another btc clone

when I try sendalert

i get can't sign message, when using a hex privkey generated with
openssl ecparam -name secp256k1 -genkey -noout -out secp256k1-key.pem
then to find the hex keys
openssl ec -in secp256k1-key.pem -text -out myprivkey.txt

i have tested this private key on paper wallets, and it shows the pub/private, bitcoin addresses properly, so I know the functions worked.

But if i try to use sendalert with this privkey it says can't sign, check private key

does the sendalert function check the privkey to see if it matches something.  Looking at the functions it calls, it appears to just read the input off of command line, assign them to variables, and then send them to the setprivkey function and key.sign to handle the dirty work.  I don't see it checking anything.

Granted, I know the alert will fail, if I send it, and a bitcoin client or other client receives it, because it doesn't match the public key they are going to verify, but I should be able to send a bogus alert just for testing purposes?
Hi!

I was trying to send alert on the altcoin network and encountered the same error, it says:

"Unable to sign alert, check private key?
(code -1)"

Private keys are fine, checked them with a paper wallet generator.

Maybe you can help if you managed to solve this problem?
legendary
Activity: 1023
Merit: 1001
Tokenize Fantasy Sports
July 11, 2014, 10:16:53 AM
#1
I'm trying to test something related to sendalert for another btc clone

when I try sendalert

i get can't sign message, when using a hex privkey generated with
openssl ecparam -name secp256k1 -genkey -noout -out secp256k1-key.pem
then to find the hex keys
openssl ec -in secp256k1-key.pem -text -out myprivkey.txt

i have tested this private key on paper wallets, and it shows the pub/private, bitcoin addresses properly, so I know the functions worked.

But if i try to use sendalert with this privkey it says can't sign, check private key

does the sendalert function check the privkey to see if it matches something.  Looking at the functions it calls, it appears to just read the input off of command line, assign them to variables, and then send them to the setprivkey function and key.sign to handle the dirty work.  I don't see it checking anything.

Granted, I know the alert will fail, if I send it, and a bitcoin client or other client receives it, because it doesn't match the public key they are going to verify, but I should be able to send a bogus alert just for testing purposes?
Jump to: