bitcoinjs-message
Examples
var bitcoin = // v3.x.xvar bitcoinMessage =
sign(message, privateKey, compressed[, network.messagePrefix])
Sign a Bitcoin message
var keyPair = bitcoinECPairvar privateKey = keyPairprivateKeyvar message = 'This is an example of a signed message.'var signature = bitcoinMessageconsole// => 'G9L5yLFjti0QTHhPyFrZCT1V/MMnBtXKmoiKDZ78NDBjERki6ZTQZdSMCtkgoNmp17By9ItJr8o7ChX0XxY91nk='
verify(message, address, signature[, network.messagePrefix])
Verify a Bitcoin message
var address = '1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN'console// => true