verifying message.
Closed this issue · 4 comments
coingeek commented
How i can get the message that sign the transaction? to verify it.
coingeek commented
$messageHash = "\x18Bitcoin Signed Message:\n" hex2bin(RawTransaction::_encode_vint(strlen($message))) . $message;
shall i change Bitcoin to my coin name? also what about \x18 how to generate it
hectorj commented
Assuming you just forked the main Bitcoin repo, it has to be the same value as here : https://github.com/bitcoin/bitcoin/blob/3e8a1f2725f5d3c0b8462352e69b78cb59268fb2/src/main.cpp#L83
rubensayshi commented
BitcoinLib::verifyMessage($address, $signature, $message)
afk11 commented
Answered :)